Skip to content

Commit ae4b6de

Browse files
committed
fix
1 parent b791f9a commit ae4b6de

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

marslab/compat/xcam.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -228,6 +228,7 @@ def polish_xcam_spectrum(
228228
righteye_scale = filter_mean / scales[1]
229229

230230
real_filters_to_use = list(cam_info["filters"].keys())
231+
# TODO: get rid of legacy _ERR fields
231232
if average_filters is True:
232233
# construct dictionary of averaged filter values
233234
for v_filter, comps in cam_info["virtual_filter_mapping"].items():
@@ -246,7 +247,7 @@ def polish_xcam_spectrum(
246247
),
247248
}
248249
if all([comp + "_STD" in spectrum.keys() for comp in comps]):
249-
values[v_filter]["var"] = (
250+
values[v_filter]["std"] = (
250251
spectrum[comps[0] + "_STD"] ** 2
251252
+ spectrum[comps[1] + "_STD"] ** 2
252253
) ** 0.5
@@ -269,7 +270,7 @@ def polish_xcam_spectrum(
269270
"mean": spectrum[real_filter] * eye_scale,
270271
}
271272
if real_filter + "_STD" in spectrum.keys():
272-
values[real_filter]["var"] = (
273+
values[real_filter]["std"] = (
273274
spectrum[real_filter + "_STD"] * eye_scale
274275
)
275276
if real_filter + "_ERR" in spectrum.keys():

marslab/imgops/regions.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import numpy as np
2-
from astropy.io import fits
32
from scipy.ndimage import sobel, distance_transform_edt
43
from scipy.stats import skew, kurtosis, mode
54

@@ -158,6 +157,8 @@ def make_roi_hdu(input_array, roi_name, metadata_dict):
158157
"""
159158
make an individual HDU for a marslab .roi file
160159
"""
160+
from astropy.io import fits
161+
161162
roi_hdu = fits.PrimaryHDU(input_array)
162163
# this parameter is separate and mandatory because we really
163164
# need every ROI to have some kind of distinguishing name

0 commit comments

Comments
 (0)