diff --git a/doc/changelog.rst b/doc/changelog.rst index ed49140440fef71ba3ade96f637dbed1e2bf540f..2fd0653230967e25621eb0ae056148ddccb89a58 100644 --- a/doc/changelog.rst +++ b/doc/changelog.rst @@ -10,6 +10,7 @@ unreleased - fix :issue:`8` regarding azimuthal integration with pyFAI and hexagonal DSSC pixel splitting by providing an example notebook :mr:`174` - fix :issue:`46` with a change in dask groupby mean behavior :mr:`174` - fix :issue:`47` SLURM script not using the correct kernel :mr:`176` + - fix :issue:`51` make sure that BAM units are in ps :mr:`183` - **Improvements** diff --git a/src/toolbox_scs/detectors/bam_detectors.py b/src/toolbox_scs/detectors/bam_detectors.py index 467cd602cf5eeaede6bfd4aba76d9be7dcf62fdc..24db3ddfa01875f5ca9953eeb743b060d1823058 100644 --- a/src/toolbox_scs/detectors/bam_detectors.py +++ b/src/toolbox_scs/detectors/bam_detectors.py @@ -87,6 +87,10 @@ def get_bam(run, mnemonics=None, merge_with=None, bunchPattern='sase3'): val = run.get_array(*run_mnemonics[m].values(), roi=roi, name=m) log.debug(f'Loading {m} from DataCollection.') val[run_mnemonics[m]['dim'][0]] = np.arange(2700) + # Since winter shutdown 2021-2022, units changed from ps to fs + # Here we convert to ps + if run_mnemonics[m]['key'] != 'data.lowChargeArrivalTime': + val *= 1e-3 ds = ds.merge(val, join='inner') # check if bunch pattern table exists