Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[IO] FIO files: handle missing data #4155

Open
tifuchs opened this issue Aug 6, 2024 · 0 comments · May be fixed by #4156
Open

[IO] FIO files: handle missing data #4155

tifuchs opened this issue Aug 6, 2024 · 0 comments · May be fixed by #4156

Comments

@tifuchs
Copy link
Contributor

tifuchs commented Aug 6, 2024

Hi silx team,

I have encountered FIO files with entries like

  -89.99999279994226 -89.74998879491014                1                  <no-data>      <no-data>   
  -89.74998879491014 -89.4999937899502                 2                   1                    120.9696655273438
  -89.4999937899502   -89.24998978491807               3                   1                    120.9657211303711 

which cannot be read in the current implementation of fioh5.py.

Suggested fix

Use numpy.genfromtxt instead of numpy.loadtxt in fioh5.py,

self.data = numpy.loadtxt(

which more gracefully handles missing data and automatically fills missing data with numpy.nan.

I am working on the implementation of the fix and will create a PR once the code is ready. (if this is ok for you)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant