I have a chemometrics project where I need to put Raman Spectroscopy data files into a Multivariate Curve Resolution model. I have been given .CNF files which came off the instrument, converted into .TXT in a format shown below. This is unlike any standard file format I can find through searching, so read commands I have tried in spectrochempy have not worked and given a "none type has no attribute plot" error.
# Sample type: QA Calibration A
# User name:
# Sample description: QA Count
#
# Start time: 2018-01-05, 07:53:59
# Real time (s): 690.050
# Live time (s): 600.000
#
# Total counts: 49930
#
# Left marker: 4095 (1024.358 keV)
# Right marker: 4097 (1024.858 keV)
# Counts: 6
#
# Energy calibration coefficients ( E = sum(Ai * n**i) )
# A0: -0.196120
# A1: 0.250152
# A2: 0.000000
# A3: 0.000000
# Energy unit: keV
#
# Channel data
# n energy(keV) counts rate(1/s)
#-----------------------------------------------------------------------
1 0.054 0 0
2 0.304 0 0
3 0.554 0 0
4 0.804 0 0
5 1.055 0 0
.....
8188 2048.772 0 0
8189 2049.023 0 0
8190 2049.273 0 0
8191 2049.523 1 0.00166667
8192 2049.774 0 0
I have tried adding my data's instrument details into the example file given in spectrochempy and reading the file with the example data, which plots successfully. When I add my data list of energies, then it doesn't plot (nonetype error).
My aim is to get this data into a format that can be read by a package (currently using spectrochempy in jupyterlab) that I can then use for a MCR-ALS analysis - so I need the data in a matrix with count(?) and wavelength, I believe. All of the example data files I am unable to make sense of to make my data into a format similar. I haven't been able to find any example data inputs that are visual rather than just described, and I'm new to this so step-by-step guidance would be appreciated!
I also have the PDF report file from the instrument. I will need to do this process for 200000 samples, so an automated/simple way would be important.