wojdyr / xylib

library for reading files with x-y data from powder diffraction, spectroscopy, or other experimental methods
GNU Lesser General Public License v2.1
61 stars 18 forks source link

Add Bruker SPC binary format #13

Closed RLumSK closed 7 years ago

RLumSK commented 7 years ago

Hi Marcin,

as announced I've implemented the SPC file format in the 'xylib'. However, there is one important thing that should be kept in mind: The data format consists of two files:

So far I can see it, it would be necessary to test whether such file exists along with the SPC file and then parse the file. The question is: how such thing can be best implemented. Probably the file format itself would need to gain a new logical meta information like multiple_files.

Best,

Sebastian

wojdyr commented 7 years ago

Thanks for this! Is the PAR file always in the same directory? The simplest thing to do would be to read it quietly (without any additional action from the user) after reading the SPC file, and if the PAR file is not found just ignore it.

RLumSK commented 7 years ago

Yes, it is in the same directory (can be defined like this). My problems are:

wojdyr commented 7 years ago

Hi Sebastian, these are good questions, I'll look into it but I'm afraid not this week, I have urgent things to finish. I'll get back to it later this month.

wojdyr commented 5 years ago

Sorry it took two years.

I've just added file path as the second argument to load_data().

RLumSK commented 5 years ago

No problem and thanks. I will look into it and implement the reading of the 2nd file (if available).