-
Notifications
You must be signed in to change notification settings - Fork 18
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add spectrum_required=False to FormatXTC #674
Conversation
New parameter and updated behavior to account for occasional dropped spectra in the XTC stream, when spectra a used to produce a calibrated average wavelength. If spectrum_required=True, and the FEE spectrometer is not found in an event, get_spectrum will raise a RuntimeError. If spectrum_required = False and spectra calibration constants (spectrum_eV_per_pixel and spectrum_eV_offset) are provided, wavelength_offset can be used to apply a general correction for any events with a dropped spectrum. If the spectrum is present and calibration constants are provided, wavelength_offset is ignored.
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## main #674 +/- ##
==========================================
- Coverage 42.62% 42.60% -0.03%
==========================================
Files 182 182
Lines 15924 15935 +11
Branches 3056 3058 +2
==========================================
+ Hits 6788 6789 +1
- Misses 8510 8520 +10
Partials 626 626 |
We've used this successfully a few times, so as such it LGTM. A couple comments that don't need to prevent merging:
|
No, we've never had a situation with both a calibrated spectrum and the need to apply wavelength_offset. If we did, we'd just add wavelength_offset to spectrum_eV_offset (adjusting the units). |
New parameter and updated behavior to account for occasional dropped spectra in the XTC stream, when spectra a used to produce a calibrated average wavelength. If spectrum_required=True, and the FEE spectrometer is not found in an event, get_spectrum will raise a RuntimeError. If spectrum_required = False and spectra calibration constants (spectrum_eV_per_pixel and spectrum_eV_offset) are provided, wavelength_offset can be used to apply a general correction for any events with a dropped spectrum. If the spectrum is present and calibration constants are provided, wavelength_offset is ignored.
New parameter and updated behavior to account for occasional dropped spectra in the XTC stream, when spectra a used to produce a calibrated average wavelength. If spectrum_required=True, and the FEE spectrometer is not found in an event, get_spectrum will raise a RuntimeError. If spectrum_required = False and spectra calibration constants (spectrum_eV_per_pixel and spectrum_eV_offset) are provided, wavelength_offset can be used to apply a general correction for any events with a dropped spectrum. If the spectrum is present and calibration constants are provided, wavelength_offset is ignored.
New parameter and updated behavior to account for occasional dropped spectra in the XTC stream, when spectra a used to produce a calibrated average wavelength. If spectrum_required=True, and the FEE spectrometer is not found in an event, get_spectrum will raise a RuntimeError. If spectrum_required = False and spectra calibration constants (spectrum_eV_per_pixel and spectrum_eV_offset) are provided, wavelength_offset can be used to apply a general correction for any events with a dropped spectrum. If the spectrum is present and calibration constants are provided, wavelength_offset is ignored.