Skip to content

Commit

Permalink
Do not duplicate the energy calibration entity
Browse files Browse the repository at this point in the history
Fixes #1
  • Loading branch information
ckuethe committed Jun 22, 2024
1 parent d3aaea6 commit 3fee9e3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/radiacode_poll.py
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ def format_spectrum(hw_num: str, res: radiacode.Spectrum, bg: bool = False):
# they come from the same instrument, and in this case the same observing session.

cal_str = f"""
<EnergyCalibration id="ec-{hw_num}">
<EnergyCalibration id="ec-{hw_num}-{tag}">
<CoefficientValues> {res.a0} {res.a1} {res.a2} </CoefficientValues>
</EnergyCalibration>
"""
Expand All @@ -170,7 +170,7 @@ def format_spectrum(hw_num: str, res: radiacode.Spectrum, bg: bool = False):
<MeasurementClassCode>{mc}</MeasurementClassCode>
<StartDateTime> {sdt} </StartDateTime>
<RealTimeDuration> PT{md}S </RealTimeDuration>
<Spectrum id="sp-{hw_num}-{tag}" radDetectorInformationReference="radiacode-csi-sipm" energyCalibrationReference="ec-{hw_num}">
<Spectrum id="sp-{hw_num}-{tag}" radDetectorInformationReference="radiacode-csi-sipm" energyCalibrationReference="ec-{hw_num}-{tag}">
<LiveTimeDuration> PT{md}S </LiveTimeDuration>
<ChannelData compressionCode="None"> {count_str} </ChannelData>
</Spectrum>
Expand Down

0 comments on commit 3fee9e3

Please sign in to comment.