Allow reading Unspecified type files in WiREReader#848
Allow reading Unspecified type files in WiREReader#848borondics wants to merge 3 commits intoQuasars:masterfrom
Conversation
…ng a file with a single spectrum. No testing yet.
|
The problem (I think) is that the unspecified category could be anything. Should I try to extend this to try all the readers? With several tries or a nested try-try-try? |
|
No, don't speculate, just handle what we know there is... So just this for now, and if there is a file where the reader handles and error, well, then we handle that. |
…nt type anymore, just goes through all readers.
|
So, I found another "unspecified" file that fails for another reason - it seems we have no control over what is in those files. Therefore I came up with this new solution to loop through all readers and check if they can return the structure we expect (at least in case of the single_file for now) or raise some meaningful errors. |
|
It is great that you found the file, but still I'd look only use the loop when the type is undefined. Relying on exceptions could be potentially problematic. I'd have a dict |
Added the Unspecified option to the WiREReaders that allows for readi…ng a file with a single spectrum.
No testing yet.