8000 JP-3509: Cut cube collapse for autocentroiding short of 26 microns by drlaw1558 · Pull Request #8199 · spacetelescope/jwst · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

JP-3509: Cut cube collapse for autocentroiding short of 26 microns #8199

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jan 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,10 @@ extract_1d
- Fixed a bug in the calling of optional MIRI MRS 1d residual fringe
correction that could cause defringing to fail in some cases. [#8180]

- Fixed ifu auto-centroiding to only use wavelengths shortward of 26 microns
to avoid failures for moderate-brightness sources due to extremely low
throughput at the long wavelength end of MRS band 4C. [#8199]

tweakreg
--------

Expand Down
3 changes: 2 additions & 1 deletion docs/jwst/extract_1d/arguments.rst
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,8 @@ The ``extract_1d`` step has the following step-specific arguments.
``--ifu_autocen``
Switch to select whether or not to enable auto-centroiding of the extraction
aperture for IFU point sources. Auto-centroiding works by median collapsing the
IFU cube across all wavelengths and using DAOStarFinder to locate the brightest
IFU cube across all wavelengths (shortward of 26 microns where the MRS throughput
becomes extremely low) and using DAOStarFinder to locate the brightest
source in the field. Default is ``False``.

``--ifu_rfcorr``
Expand Down
8 changes: 7 additions & 1 deletion jwst/extract_1d/ifu.py
Original file line number Diff line number Diff line change
Expand Up @@ -504,7 +504,13 @@ def extract_ifu(input_model, source_type, extract_params):
# If ifu_autocen is set, try to find the source in the field using DAOphot
if extract_params['ifu_autocen'] is True:
log.info('Using auto source detection.')
collapse = np.ma.median(np.ma.masked_invalid(data), axis=0)

# Median collapse across wavelengths, but ignore wavelengths above
# 26 microns where MRS throughput is extremely low
(_, _, wavetemp) = get_coordinates(input_model, 1, 1)
indx = (np.where(wavetemp < 26))[0]
collapse = np.ma.median(np.ma.masked_invalid(data[indx, :, :]), axis=0)

# Sigma-clipped stats on collapsed image
_, clipmed, cliprms = sigclip(collapse)
# Find source in the collapsed image above 3 sigma
Expand Down
0