Skip to content

Commit

Permalink
fixup! Improve handling of XGM data recording the wrong number of pulses
Browse files Browse the repository at this point in the history
  • Loading branch information
JamesWrigley committed Apr 29, 2024
1 parent 53d15d4 commit abc5cff
Showing 1 changed file with 1 addition and 25 deletions.
26 changes: 1 addition & 25 deletions src/extra/components/xgm.py
Original file line number Diff line number Diff line change
Expand Up @@ -412,17 +412,7 @@ def _get_main_nbunches_key(self):
def npulses(self, sase=None) -> int:
"""The nominal number of pulses.
This calls
[KeyData.as_single_value()][extra_data.KeyData.as_single_value]
internally, which means it will throw an exception if the number of
pulses is not constant.
Warning:
This returns the number of pulses recorded by the XGM in the
`pulseEnergy.numberOf[SAx]BunchesActual` property, which can be
unreliable. Use something like the
[XrayPulses][extra.components.XrayPulses] component to find the real
number of pulses from the bunch pattern table.
This will throw an exception if the number of pulses is not constant.
Args:
sase (int): Same meaning as in
Expand Down Expand Up @@ -491,13 +481,6 @@ def pulse_counts(self, sase=None, force_slow_data=False):
def max_npulses(self, sase=None) -> int:
"""The maximum number of pulses.
Warning:
This returns the number of pulses recorded by the XGM in the
`pulseEnergy.numberOf[SAx]BunchesActual` property, which can be
unreliable. Use something like the
[XrayPulses][extra.components.XrayPulses] component to find the real
number of pulses from the bunch pattern table.
Args:
sase (int): Same meaning as in
[XGM.pulse_energy()][extra.components.XGM.pulse_energy].
Expand All @@ -511,13 +494,6 @@ def max_npulses(self, sase=None) -> int:
def is_constant_pulse_count(self, sase=None) -> bool:
"""Return whether or not the number of pulses is constant.
Warning:
This returns the number of pulses recorded by the XGM in the
`pulseEnergy.numberOf[SAx]BunchesActual` property, which can be
unreliable. Use something like the
[XrayPulses][extra.components.XrayPulses] component to find the real
number of pulses from the bunch pattern table.
Args:
sase (int): Same meaning as in
[XGM.pulse_energy()][extra.components.XGM.pulse_energy].
Expand Down

0 comments on commit abc5cff

Please sign in to comment.