Skip to content

Commit bc91180

Browse files
author
Rama Vasudevan
committed
Labview patch fix for some corrupted BELINE
1 parent 73cf6c5 commit bc91180

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

BGlib/be/translators/labview_h5_patcher.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -153,15 +153,15 @@ def translate(self, h5_path, force_patch=False, **kwargs):
153153
if h5_spec_vals.shape[1]!=h5_raw.shape[1]:
154154

155155
print("Problem encountered with spectroscopic dimensions. Attempting to fix.")
156-
spec_inds_fixed = h5_main.parent.create_dataset("spec_inds_fixed",
156+
spec_inds_fixed = h5_raw.parent.create_dataset("spec_inds_fixed",
157157
shape=(1,h5_raw.shape[1]),dtype = 'uint32')
158-
spec_inds_fixed.attrs['labels'] = spec_indices.attrs['labels']
159-
spec_inds_fixed.attrs['units'] = spec_indices.attrs['units']
158+
spec_inds_fixed.attrs['labels'] = h5_spec_inds.attrs['labels']
159+
spec_inds_fixed.attrs['units'] = h5_spec_inds.attrs['units']
160160

161-
spec_vals_fixed = h5_main.parent.create_dataset("spec_vals_fixed",
161+
spec_vals_fixed = h5_raw.parent.create_dataset("spec_vals_fixed",
162162
shape=(1,h5_raw.shape[1]),dtype = 'uint32')
163-
spec_vals_fixed.attrs['labels'] = spec_values.attrs['labels']
164-
spec_vals_fixed.attrs['units'] = spec_values.attrs['units']
163+
spec_vals_fixed.attrs['labels'] = h5_spec_vals.attrs['labels']
164+
spec_vals_fixed.attrs['units'] = h5_spec_vals.attrs['units']
165165
spec_vals_fixed[:] = h5_spec_vals[0,:h5_raw.shape[1]]
166166
h5_raw.file.flush()
167167
h5_spec_inds = h5_chan['spec_inds_fixed']

0 commit comments

Comments
 (0)