Skip to content
Snippets Groups Projects

[Gotthard2] Temporary workaround for processing HIREX detector's dark runs using the correct data sources

Merged Karim Ahmed requested to merge fix/use_correct_data_source into master
2 files
+ 10
3
Compare changes
  • Side-by-side
  • Inline
Files
2
run_dc = RunDirectory(in_folder / f"r{run_high:04d}")
run_dc = RunDirectory(in_folder / f"r{run_high:04d}")
file_loc = f"proposal:{run_dc.run_metadata()['proposalNumber']} runs:{run_high} {run_med} {run_low}" # noqa
file_loc = f"proposal:{run_dc.run_metadata()['proposalNumber']} runs:{run_high} {run_med} {run_low}" # noqa
receiver_names = [f"*{receiver_template.format(x)}*" for x in receiver_affixes]
receiver_names = [f"*{receiver_template.format(x)}*" for x in receiver_affixes]
data_sources = list(run_dc.select(receiver_names).all_sources)
data_sources = sorted(list(run_dc.select(receiver_names).all_sources))
%% Cell type:code id:108be688 tags:
%% Cell type:code id:108be688 tags:
np.uint16
np.uint16
)
)
empty_lut = np.stack(1280 * [np.stack([empty_lut] * 2)], axis=0)
empty_lut = np.stack(1280 * [np.stack([empty_lut] * 2)], axis=0)
for mod, src in zip(karabo_da, data_sources):
for mod in karabo_da:
 
 
# TODO: A temporary workaround for using the correct data_source
 
if gh2_detector == "25um":
 
# Bad assumption for CALCAT DA names e.g. GH200/1 and GH200/2
 
src = data_sources[int(mod[-1])-1]
 
else:
 
src = data_sources[0]
# Retrieve LUT constant
# Retrieve LUT constant
lut, time = get_constant_from_db_and_time(
lut, time = get_constant_from_db_and_time(
Loading