Skip to content
Snippets Groups Projects
Commit f3d608e0 authored by camera computer's avatar camera computer
Browse files

adjustment to usage of ImageLabel

parent 81127967
No related branches found
No related tags found
No related merge requests found
......@@ -314,7 +314,12 @@ class FluorescenceScanData(ImagingData):
for label, array in self.arrays.items():
m = label_pat.match(label.label if isinstance(label, ImageLabel) else label)
if m is not None:
array_reps[ImageLabel(m.group(1), label.savedir)].append(array)
array_reps[
ImageLabel(
m.group(1),
label.savedir if isinstance(label, ImageLabel) else None
)
].append(array)
else:
print(f"[imaging] skip averaging for improperly formatted label '{label}'")
averaged_arrays = {
......@@ -444,7 +449,12 @@ class DailyMeasurementData(ImagingData):
for label, array in self.arrays.items():
m = label_pat.match(label.label if isinstance(label, ImageLabel) else label)
if m is not None:
array_reps[ImageLabel(m.group(1), label.savedir)].append(array)
array_reps[
ImageLabel(
m.group(1),
label.savedir if isinstance(label, ImageLabel) else None
)
].append(array)
else:
print(f"[imaging] skip averaging for improperly formatted label '{label}'")
averaged_arrays = {
......@@ -596,11 +606,11 @@ class DailyMeasurementData(ImagingData):
s.append(
np.sqrt( (float(data["sx"])**2 + float(data["sy"])**2) / 2 )
)
N.append(float(data["N"]))
elif m_pre is not None:
s0.append(
np.sqrt( (float(data["sx"])**2 + float(data["sy"])**2) / 2 )
)
N.append(float(data["N"]))
else:
print(f"[imaging] skip TOF free-space resonance processing for"
f" improperly formatted label '{label}'")
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment