Skip to content

Commit

Permalink
Merge pull request #63 from gbrammer/own-barshadow
Browse files Browse the repository at this point in the history
Render the example plot for RTD
  • Loading branch information
gbrammer authored May 3, 2024
2 parents d04a046 + bf83454 commit fed04a2
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
2 changes: 1 addition & 1 deletion msaexp/slit_combine.py
Original file line number Diff line number Diff line change
Expand Up @@ -535,7 +535,7 @@ def __init__(
"trace_from_yoffset": "Trace derived from yoffsets",
"stuck_threshold": "Stuck shutter threshold",
# 'bad_shutter_names': bad_shutter_names,
"undo_barshadow": "Bar shaddow update behavior",
"undo_barshadow": "Bar shadow update behavior",
"wrapped_barshadow": "Bar shadow was wrapped for central shutter",
"own_barshadow": "Internal bar shadow correction applied",
"nod_offset": "Nod offset size, pixels",
Expand Down
9 changes: 7 additions & 2 deletions msaexp/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -2740,13 +2740,17 @@ def get_prism_bar_correction(scaled_yshutter, wrap="auto", mask=True):
import msaexp.utils
scaled_yshutter = np.linspace(-1.6, 1.6, 512)
fig, ax = plt.subplots(1,1,figsize=(6,4))
bar = msaexp.utils.get_prism_bar_correction(scaled_yshutter)
bar, _wrapped = msaexp.utils.get_prism_bar_correction(scaled_yshutter)
ax.plot(scaled_yshutter, bar)
ax.grid()
ax.set_xlabel('scaled_yshutter = cross-dispersion pixel / 5')
ax.set_ylabel('bar shadow correction')
fig.tight_layout(pad=1)
fig.show()
.. code-block:: python
:dedent:
Expand All @@ -2762,7 +2766,8 @@ def get_prism_bar_correction(scaled_yshutter, wrap="auto", mask=True):
# scaled coordinates
yp, xp = np.indices(slit.data.shape)
scaled_yshutter = (yp - _trace[1]) / 5
bar = msaexp.utils.get_prism_bar_correction(scaled_yshutter)
bar, _wrapped = msaexp.utils.get_prism_bar_correction(scaled_yshutter)
plt.imshow(bar, aspect='auto')
"""
Expand Down

0 comments on commit fed04a2

Please sign in to comment.