Is there a way to add file types to the read_omnic protocol? #455
-
I work with data files that are basically .spg but with a different extension (either .HDR, .DDR, or .SDR). The manufacturer of the instrumentation actually worked with Thermo on making their data files compatible with OMNIC. I am wondering if there is a way to add these extensions to the read_omnic method so they can be read with the same protocol. |
Beta Was this translation helpful? Give feedback.
Replies: 7 comments 10 replies
-
Hi. |
Beta Was this translation helpful? Give feedback.
-
Thanks. |
Beta Was this translation helpful? Give feedback.
-
Hello, There is probably a difference in timestamp format: scpy indicates a very old acquisition date : Jan 22nd 1956 !. Strangely, when opened in omnic (after changing the extension to spg), the date indicated by omnic is April 7th 1982. To my knowledge and to date, the date given by scpy is correct for all spg files generated by omnic. @chet-j-ski : can you indicate the actual acquisition date of this spectrum ? If you can discliose it, can you also indicate the name of the manufacturer ? |
Beta Was this translation helpful? Give feedback.
-
Actually it looks like it is a *.spa not a *.spg. The date is correct using spa extension. |
Beta Was this translation helpful? Give feedback.
-
It display 2018-01-17 around midnight, so ithe difference with the actual date may be the UTC conversion. |
Beta Was this translation helpful? Give feedback.
-
@chet-j-ski In addition to these information, you were mentioning also .DDR, or .SDR extension : It could be interesting to have a sample of these files too, if you like us to include reading of them. And of course any information about the kind of experiment and date with timezone seems also necessary. |
Beta Was this translation helpful? Give feedback.
-
@chet-j-ski, readers have been added en the DEV version and will be included in the next scpy release.
For instance, the following are equivalent:
and if the 3 sample files (hdr, ddr, adn sdr) are present, the following will return a single dataset containing the 3 spectra:
Note the files contain text metadata such as, for the sample DDR file:
Let us know if you'd like these data being added to the dataset: we could add them in the Finally: we would like to include your 3 sample files in the spectrochempy_data repository in order to facilitate systematic test of theses readers each time scpy is updated. Do you authorize use to do so ? Thanks, |
Beta Was this translation helpful? Give feedback.
@chet-j-ski, readers have been added en the DEV version and will be included in the next scpy release.
scp.read_hdr()
,scp.read_ddr()
,scp.read_sdr()
will read only .hdr, .ddr or .sdr, repectivelyscp.read_soc()
and the generic readerscp.read()
will read any of .hdr, .ddr or .sdr single filescp.read_dir
For instance, the following are equivalent:
and if the 3 sample files (hdr, ddr, adn sdr) are present, the following will return a single dataset containing the 3 spectra: