ewoksid14.tasks.io.mca_data_to_spec_string#
- ewoksid14.tasks.io.mca_data_to_spec_string(mca, title=None, filename=None, date=None, calibration=None, detector_name=None, metadata=None)[source]#
Official file format specs: https://certif.com/downloads/css_docs/spec_man.pdf
- Parameters:
mca (
Sequence
[float
]) – MCA spectrumtitle (
Optional
[str
]) – scan titlefilename (
Optional
[str
]) – name by which the file will be createddate (
Union
[str
,datetime
,date
,None
]) – start date of the scancalibration (
Optional
[Sequence
[float
]]) – MCA calibration as the sequence [zero, gain, quad], all of them optional so that energy = zero + gain*channels + quad*channels^2detector_name (
Optional
[str
]) – name of the MCA detectormetadata (
Optional
[Dict
]) – saved as comments
- Return type:
str
- Returns:
SPEC serialized string