fix(file_writer): link NeXus data to the unified nidaq statistic-group names
CI for debye_bec / test (push) Successful in 2m33s
CI for debye_bec / test (push) Successful in 2m33s
This commit is contained in:
@@ -236,7 +236,11 @@ class DebyeNexusStructure(DefaultFormat):
|
||||
self.configuration.get("nidaq", {}).get("nidaq_add_chans", {}).get("value")
|
||||
)
|
||||
|
||||
rle = self.configuration.get("nidaq", {}).get("nidaq_enable_compression", {}).get("value")
|
||||
# The statistic groups are written by the async writer under the device itself,
|
||||
# independent of the readout priority the device is configured with. Compression
|
||||
# (RLE) no longer changes the name: per-oscillation means and raw readbacks both
|
||||
# arrive in the 'mean' group.
|
||||
nidaq_data = "/entry/collection/devices/nidaq"
|
||||
|
||||
measurement_mode = entry.create_group(name="mode")
|
||||
measurement_mode.attrs["NX_class"] = "NX_CHAR"
|
||||
@@ -300,8 +304,7 @@ class DebyeNexusStructure(DefaultFormat):
|
||||
energy.attrs["units"] = "eV"
|
||||
|
||||
main_data.create_soft_link(
|
||||
name="energy",
|
||||
target="/entry/collection/readout_groups/async/nidaq/nidaq_energy/value",
|
||||
name="energy", target=f"{nidaq_data}/nidaq_stream_energy/value"
|
||||
)
|
||||
|
||||
##################
|
||||
@@ -313,11 +316,7 @@ class DebyeNexusStructure(DefaultFormat):
|
||||
i0.attrs["NX_class"] = "NXdata"
|
||||
i0.attrs["units"] = "V"
|
||||
|
||||
if rle:
|
||||
target = "/entry/collection/readout_groups/async/nidaq/nidaq_ai0_mean/value"
|
||||
else:
|
||||
target = "/entry/collection/readout_groups/async/nidaq/nidaq_ai0/value"
|
||||
main_data.create_soft_link(name="i0", target=target)
|
||||
main_data.create_soft_link(name="i0", target=f"{nidaq_data}/nidaq_mean_ai0/value")
|
||||
|
||||
##################
|
||||
## i1
|
||||
@@ -328,11 +327,7 @@ class DebyeNexusStructure(DefaultFormat):
|
||||
i1.attrs["NX_class"] = "NXdata"
|
||||
i1.attrs["units"] = "V"
|
||||
|
||||
if rle:
|
||||
target = "/entry/collection/readout_groups/async/nidaq/nidaq_ai2_mean/value"
|
||||
else:
|
||||
target = "/entry/collection/readout_groups/async/nidaq/nidaq_ai2/value"
|
||||
main_data.create_soft_link(name="i1", target=target)
|
||||
main_data.create_soft_link(name="i1", target=f"{nidaq_data}/nidaq_mean_ai2/value")
|
||||
|
||||
##################
|
||||
## i2
|
||||
@@ -343,11 +338,7 @@ class DebyeNexusStructure(DefaultFormat):
|
||||
i2.attrs["NX_class"] = "NXdata"
|
||||
i2.attrs["units"] = "V"
|
||||
|
||||
if rle:
|
||||
target = "/entry/collection/readout_groups/async/nidaq/nidaq_ai4_mean/value"
|
||||
else:
|
||||
target = "/entry/collection/readout_groups/async/nidaq/nidaq_ai4/value"
|
||||
main_data.create_soft_link(name="i2", target=target)
|
||||
main_data.create_soft_link(name="i2", target=f"{nidaq_data}/nidaq_mean_ai4/value")
|
||||
|
||||
##################
|
||||
## ci sum
|
||||
@@ -359,8 +350,7 @@ class DebyeNexusStructure(DefaultFormat):
|
||||
ci_sum.attrs["units"] = "counts"
|
||||
|
||||
main_data.create_soft_link(
|
||||
name="Fluorescence_Sum",
|
||||
target="/entry/collection/readout_groups/async/nidaq/nidaq_cisum/value",
|
||||
name="Fluorescence_Sum", target=f"{nidaq_data}/nidaq_stream_cisum/value"
|
||||
)
|
||||
|
||||
##################
|
||||
@@ -372,8 +362,7 @@ class DebyeNexusStructure(DefaultFormat):
|
||||
mu_sample.attrs["NX_class"] = "NXdata"
|
||||
|
||||
main_data.create_soft_link(
|
||||
name="mu_sample",
|
||||
target="/entry/collection/readout_groups/async/nidaq/nidaq_smpl_abs/value",
|
||||
name="mu_sample", target=f"{nidaq_data}/nidaq_stream_smpl_abs/value"
|
||||
)
|
||||
|
||||
##################
|
||||
@@ -385,8 +374,7 @@ class DebyeNexusStructure(DefaultFormat):
|
||||
mu_sample.attrs["NX_class"] = "NXdata"
|
||||
|
||||
main_data.create_soft_link(
|
||||
name="fluo_sample",
|
||||
target="/entry/collection/readout_groups/async/nidaq/nidaq_smpl_fluo/value",
|
||||
name="fluo_sample", target=f"{nidaq_data}/nidaq_stream_smpl_fluo/value"
|
||||
)
|
||||
|
||||
##################
|
||||
@@ -398,6 +386,5 @@ class DebyeNexusStructure(DefaultFormat):
|
||||
mu_reference.attrs["NX_class"] = "NXdata"
|
||||
|
||||
main_data.create_soft_link(
|
||||
name="mu_reference",
|
||||
target="/entry/collection/readout_groups/async/nidaq/nidaq_ref_abs/value",
|
||||
name="mu_reference", target=f"{nidaq_data}/nidaq_stream_ref_abs/value"
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user