Skip to content

GitLab

  • Menu
Projects Groups Snippets
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
    • Switch to GitLab Next
  • Sign in / Register
  • navarp navarp
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Locked Files
  • Issues 2
    • Issues 2
    • List
    • Boards
    • Service Desk
    • Milestones
    • Requirements
  • Merge requests 0
    • Merge requests 0
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
    • Test Cases
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages & Registries
    • Packages & Registries
    • Package Registry
    • Container Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Code review
    • Insights
    • Issue
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Federico Bisti
  • navarpnavarp
  • Issues
  • #2
Closed
Open
Created Dec 04, 2021 by David Subires@Dsubires12🎯

Yaml file reading a collection of txt files

Hi, everyone. I read here NavARP (v.1.2.0) can already open a collection of .txt files from a .yaml file. So, I am testing it. First time, I tried to load an example.yaml file I got the following error:

error_navarp_yaml_txt_1

the way in which I solved this problem was changing the line

1561: if "Dimension 3 size": to 1561: if "Dimension 3 size" in line:

So, this change fixed up that error. After doing this and trying again to load the .example.yaml file. I got the following error

error_navarp_yaml_txt_2

I am working on solving this. When I fix up, I will update this issue.

Comment 1: This last error has been also found for a collection of .pxt and .krx files.

Comment 2: This error comes from the method fermilevel.align_to_same_eb . It expects as argument energies a two-dimensional np.array. Where the first index has to be related to the energy scan (hv=10,11,12..) and the second one is the full initial energy of the measurement. If we measure at hv=10 eV, the second index will be a set of energies in a range for example [3,5.5] eV. So we need to prepare the argument to this method (energy_init) a two-dimensional np.array. For doing it is necessary to make a modification of the metod init_ebins in navfile.py.

Comment 3: I have got eliminate the errors. For it, I have made a modification of the method init_ebins in navfile. The modification is the

following: self.energies_init = np.copy(self.energies) Comment the upper line and write: self.energies_init=np.array([[None for j in range(len(self.energies))] for i in range (len(self.scans))]) for i in range(len(self.scans)): for j in range(len(self.energies)): self.energies_init[i][j] = self.data[i][0][j] #any index is ok for angular index

Anyway, I am sure that this change, (although correct the error), produces others. So, in order to have a consistent form. I will suggest to introduce to the method "init_ebins" an optional boolean argument called "Yaml". If "Yaml == True", then it does my modification (or other more elegant). If "Yaml == False", then it does the previous one case.

Bye!

Edited Dec 04, 2021 by David Subires
Assignee
Assign to
Time tracking