I generated a calibration using the ixdat methods siq_multicomp_gas_flux_calibration(), siq_gas_flux_calibration() and ecms_calibration_curve().to_siqu()". In order to get all the sensitivity factors into one calibration file I then use: ec_calibration = ixdat.config.plugins.siq.Calibration(cal_list=[F_from_gas_flux, F_from_ecms_cal])
followed by
calibration = multicomponent_cal + ec_calibration
This is necessary, because siq_multicomp_gas_flux_calibration() returns a Calibration() object, while the other methods return CalPoint objects, and I can't add those otherwise.
If I now want to save this calibration, the only data that gets saved is that from siq_multicomp_gas_flux_calibration(), the rest is discarded without a trace. I traced this back to the last line in Calibration.as_dict:
|
self_as_dict.update(self.extra_stuff) |
Here it seems that
self_as_dict.update(self.extra_stuff) just overwrites everything that the method does prior to this line (at least that's what I gather from changing it to
self_as_dict.update(extra_stuff=self.extra_stuff) and what it then returns as
extra_stuff
I fixed this in my own local version to be able to export such stitched together Calibration objects. Can make PR if it makes sense.
I generated a calibration using the
ixdatmethodssiq_multicomp_gas_flux_calibration(),siq_gas_flux_calibration()andecms_calibration_curve().to_siqu()". In order to get all the sensitivity factors into one calibration file I then use:ec_calibration= ixdat.config.plugins.siq.Calibration(cal_list=[F_from_gas_flux, F_from_ecms_cal])followed by
calibration = multicomponent_cal + ec_calibrationThis is necessary, because
siq_multicomp_gas_flux_calibration()returns aCalibration()object, while the other methods returnCalPointobjects, and I can't add those otherwise.If I now want to save this calibration, the only data that gets saved is that from
siq_multicomp_gas_flux_calibration(), the rest is discarded without a trace. I traced this back to the last line inCalibration.as_dict:spectro_inlets_quantification/src/spectro_inlets_quantification/calibration.py
Line 236 in d5242da
Here it seems that
self_as_dict.update(self.extra_stuff)just overwrites everything that the method does prior to this line (at least that's what I gather from changing it toself_as_dict.update(extra_stuff=self.extra_stuff)and what it then returns asextra_stuffI fixed this in my own local version to be able to export such stitched together
Calibrationobjects. Can make PR if it makes sense.