Skip to content

Commit

Permalink
Merge pull request #1837 from pypeit/hotfix_align
Browse files Browse the repository at this point in the history
Hotfix display
  • Loading branch information
kbwestfall authored Aug 12, 2024
2 parents c2dca65 + 844c2a8 commit a4f1fe0
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
1 change: 1 addition & 0 deletions doc/releases/1.16.1dev.rst
Original file line number Diff line number Diff line change
Expand Up @@ -52,3 +52,4 @@ Bug Fixes
- Fixed a fault caused when all frames in a pypeit file are identified as being
part of ``all`` calibration groups.
- Allow for empty 2D wavecal solution in HDU extension of WaveCalib file
- Fixed a bug in the ginga display function, when the user doesn't provide the `trc_name` argument.
3 changes: 1 addition & 2 deletions pypeit/alignframe.py
Original file line number Diff line number Diff line change
Expand Up @@ -316,8 +316,7 @@ def show_alignment(alignframe, align_traces=None, slits=None, clear=False):
if slt%2 == 0:
color = 'magenta'
# Display the trace
display.show_trace(viewer, channel, align_traces[:, bar, slt], trc_name="",
color=color)
display.show_trace(viewer, channel, align_traces[:, bar, slt], color=color)


class AlignmentSplines:
Expand Down
5 changes: 3 additions & 2 deletions pypeit/display/display.py
Original file line number Diff line number Diff line change
Expand Up @@ -485,6 +485,7 @@ def show_trace(viewer, ch, trace, trc_name=None, maskdef_extr=None, manual_extr=
ntrace = trace.shape[1]
_maskdef_extr = ntrace*[False] if maskdef_extr is None else maskdef_extr
_manual_extr = ntrace*[False] if manual_extr is None else manual_extr
_trc_name = ntrace*[''] if trc_name is None else trc_name

# Show
if yval is None:
Expand All @@ -507,8 +508,8 @@ def show_trace(viewer, ch, trace, trc_name=None, maskdef_extr=None, manual_extr=
# Text
ohf = len(trace[:,i])//2
# Do it
canvas_list += [dict(type='text',args=(float(y[ohf,i]), float(trace[ohf,i]), str(trc_name[i])) if rotate
else (float(trace[ohf,i]), float(y[ohf,i]), str(trc_name[i])),
canvas_list += [dict(type='text',args=(float(y[ohf,i]), float(trace[ohf,i]), str(_trc_name[i])) if rotate
else (float(trace[ohf,i]), float(y[ohf,i]), str(_trc_name[i])),
kwargs=dict(color=_color, fontsize=17., rot_deg=90.))]

canvas.add('constructedcanvas', canvas_list)
Expand Down

0 comments on commit a4f1fe0

Please sign in to comment.