Skip to content

Commit 366f7ac

Browse files
committed
tidy of parameters and determineDistortion() code after debugging
1 parent c2f5bc4 commit 366f7ac

3 files changed

Lines changed: 2 additions & 15 deletions

File tree

geminidr/core/parameters_spect.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ class determineDistortionConfig(config.Config):
140140
min_snr = config.RangeField("Minimum SNR for peak detection", float, 5., min=3.)
141141
fwidth = config.RangeField("Feature width in pixels if reidentifying",
142142
float, None, min=1., optional=True)
143-
nsum = config.RangeField("Number of lines to sum", int, 10, min=1)
143+
nsum = config.RangeField("Number of lines to sum", int, 10, min=5)
144144
step = config.RangeField("Step in rows/columns for tracing", int, 10, min=1)
145145
max_shift = config.RangeField("Maximum shift per pixel in line position",
146146
float, 0.05, min=0.001, max=0.1)

geminidr/core/primitives_spect.py

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1509,10 +1509,6 @@ def determineDistortion(self, adinputs=None, **params):
15091509
viewer=self.viewer if debug else None,
15101510
min_line_length=0.1))
15111511

1512-
print("TRACES")
1513-
for trace in traces:
1514-
print(trace.input_coordinates())
1515-
15161512
# List of traced peak positions
15171513
in_coords = np.array([coord for trace in traces for
15181514
coord in trace.input_coordinates()]).T
@@ -1523,16 +1519,6 @@ def determineDistortion(self, adinputs=None, **params):
15231519
f"{ad.filename}:{ext.id}")
15241520
continue
15251521

1526-
# If there's a "rectified" frame, we want to use the pixel
1527-
# coordinates in *that* frame as input so that the pixels
1528-
# -> rectified -> distortion_corrected transform works
1529-
# correctly.
1530-
try:
1531-
t = ext.wcs.get_transform(ext.wcs.input_frame, 'rectified')
1532-
except CoordinateFrameError:
1533-
pass
1534-
else:
1535-
in_coords = np.array(t(*in_coords))
15361522
# List of "reference" positions (i.e., the coordinate
15371523
# perpendicular to the line remains constant at its initial value
15381524
ref_coords = np.array([coord for trace in traces for

geminidr/gnirs/parameters_gnirs_crossdispersed.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ class determineDistortionConfig(parameters_spect.determineDistortionConfig):
2525
int, None, min=0, optional=True)
2626
def setDefaults(self):
2727
self.min_snr = 10
28+
self.spatial_order = 2
2829
self.debug_reject_bad = False
2930

3031

0 commit comments

Comments
 (0)