-
Notifications
You must be signed in to change notification settings - Fork 18
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
OptoDAS channel numbering ignores spatial decimation of original file #419
Comments
Hey @speleos, Do you by chance have a small OptoDAS file which uses spatial decimation you can share? I implemented a potential fix in the branch There might also be some improvements we can make to how coordinates can represent decimated values but I will need a bit more time to think about it. |
I have a ten second file directly from the interrogator, but even compressed it is too large to send through here. |
I also have post-processed files using the simpledas library from ASN that might be missing a few header words. These break dascore in different ways. |
Ok, send me both if you can. chambers.ja.derrick (a gmail address). |
Done |
Hey @speleos, #420 should fix your issue. It reads both files now, but I had to change the smaller file's decimation factor from 5 to 50 to match the array size. I suspect this was overlooked when creating the smaller file, but I could be wrong. Can you take the |
The second file had been further spatially decimated. |
For the original file it works now. I'm not sure if the proper way to handle this should rely solely on roiDec, as one can simply remove a few channels from a complete dataset. The roiDec parameter might apply for some, it will certainly not apply for all situations. A simple count the number of elements in ['/header/channels'][:] seems more elegant and will apply to all situations. import h5py chans |
Thanks, good suggestion. I have updated the code to use channels instead of the decimation factor. |
Description
When attempting to read an OptoDAS file that is spatially decimated (only every 5th channel was saved), DAScore crashes, as it expects that the number of channels in the file matches the channel numbers.
dascore.exceptions.CoordDataError: Data array has a shape of (5000, 11380) which doesnt match the coordinate manager shape of (5000, 56896).
Expected behavior
DAScore should read the '/demodSpec/roiDec' field in the HDF5 file and calculate the new shape of the data block.
Versions
The text was updated successfully, but these errors were encountered: