[AGIPD][CORRECT] use yaml.dump and save only empty cons info
Summary:
- yaml.safe_dump is not supporting python objects https://pyyaml.org/wiki/PyYAMLDocumentation.
- Saving only first two indices, which contains empty constant info, in case of no retrieved constant
Tests:
xfel-calibrate AGIPD correct \
--in-folder /gpfs/exfel/exp/SPB/202031/p900145/raw \
--run 236 \
--out-folder /gpfs/exfel/data/scratch/ahmedk/test/AGIPD_CM_75266 \
--slurm-mem 750 \
--karabo-id-control SPB_IRU_AGIPD1M1 \
--karabo-da-control AGIPD1MCTRL00 \
--h5path-ctrl /CONTROL/{}/MDL/FPGA_COMP \
--karabo-id SPB_DET_AGIPD1M-1 \
--sequences 0,1,2,3,4,5 \
--rel-gain
Errors:
1- Error related to using yaml.safe_dump
:
`RepresenterError: ('cannot represent an object', 0)`
2- Wrong saved nested lists for non retrieved constants (Only first two elements needed) :