Skip to content
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

JP-3562: Extend snowball core #8303

Merged
merged 20 commits into from
Mar 25, 2024
Merged
Show file tree
Hide file tree
Changes from 4 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
7 changes: 7 additions & 0 deletions CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,13 @@ general

- Update minimum required photutils version to 1.5.0 [#8211]

Jump
----
- Add parameters to the Jump step to allow the override of the
parameters for flagging the saturated cores of snowballs in
the next integration. [#8303]


hbushouse marked this conversation as resolved.
Show resolved Hide resolved
outlier_detection
-----------------

Expand Down
4 changes: 4 additions & 0 deletions docs/jwst/jump/arguments.rst
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,10 @@ is defined as:

* ``--edge_size``: The distance from the edge of the detector where saturated cores are not required for snowball detection

* ``--mask_snowball_core_nxt_int``: Turns on/off the flagging of the saturated cores of snowballs in the next integration.
hbushouse marked this conversation as resolved.
Show resolved Hide resolved

* ``--snowball_time_masked_next_int``: Controls the total time that the saturated cores of snowballs are flagged in the next integration.

**Parameters that affect MIRI Shower Flagging**

* ``--find_showers``: Turn on the detection of showers for the MIRI detectors
Expand Down
10 changes: 7 additions & 3 deletions jwst/jump/jump.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,9 @@ def run_detect_jumps(input_model, gain_model, readnoise_model,
max_extended_radius=200,
minimum_groups=3,
minimum_sigclip_groups=100,
only_use_ints=True
only_use_ints=True,
mask_snowball_persist_next_int=True,
snowball_time_masked_next_int=250,
hbushouse marked this conversation as resolved.
Show resolved Hide resolved
):

# Runs `detect_jumps` in stcal
Expand All @@ -45,7 +47,7 @@ def run_detect_jumps(input_model, gain_model, readnoise_model,
after_jump_flag_n1 = int(after_jump_flag_time1 // gtime)
after_jump_flag_n2 = int(after_jump_flag_time2 // gtime)
grps_masked_after_shower = int(time_masked_after_shower // gtime)

snowball_grps_masked_next_int = int(snowball_time_masked_next_int // gtime)
# Get 2D gain and read noise values from their respective models
if reffile_utils.ref_matches_sci(input_model, gain_model):
gain_2d = gain_model.data
Expand Down Expand Up @@ -84,7 +86,9 @@ def run_detect_jumps(input_model, gain_model, readnoise_model,
max_extended_radius=max_extended_radius,
minimum_groups=minimum_groups,
minimum_sigclip_groups=minimum_sigclip_groups,
only_use_ints=only_use_ints
only_use_ints=only_use_ints,
mask_persist_grps_next_int = mask_snowball_persist_next_int,
persist_grps_flagged = snowball_grps_masked_next_int,
hbushouse marked this conversation as resolved.
Show resolved Hide resolved
)


Expand Down
6 changes: 5 additions & 1 deletion jwst/jump/jump_step.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@ class JumpStep(Step):
min_sat_radius_extend = float(default=2.5) # The min radius of the sat core to trigger the extension of the core
sat_expand = integer(default=2) # Number of pixels to add to the radius of the saturated core of snowballs
edge_size = integer(default=25) # Size of region on the edges of NIR detectors where a sat core is not required
hbushouse marked this conversation as resolved.
Show resolved Hide resolved
hbushouse marked this conversation as resolved.
Show resolved Hide resolved
mask_snowball_core_nxt_int = boolean(default=True) # Controls whether the saturated cores of snowballs are flagged in the next int.
hbushouse marked this conversation as resolved.
Show resolved Hide resolved
hbushouse marked this conversation as resolved.
Show resolved Hide resolved
snowball_time_masked_next_int(default=4000) The number of seconds to flag the saturated cores in the next integration.
hbushouse marked this conversation as resolved.
Show resolved Hide resolved
find_showers = boolean(default=False) # Turn on shower flagging for MIRI
hbushouse marked this conversation as resolved.
Show resolved Hide resolved
hbushouse marked this conversation as resolved.
Show resolved Hide resolved
extend_snr_threshold = float(default=1.2) # The SNR minimum for detection of extended showers in MIRI
extend_min_area = integer(default=90) # Min area of emission after convolution for the detection of showers
Expand Down Expand Up @@ -124,7 +126,9 @@ def process(self, input):
max_extended_radius=self.max_extended_radius * 2,
minimum_groups=self.minimum_groups,
minimum_sigclip_groups=self.minimum_sigclip_groups,
only_use_ints=self.only_use_ints
only_use_ints=self.only_use_ints,
mask_persist_next_int=self.mask_snowball_core_nxt_int,
hbushouse marked this conversation as resolved.
Show resolved Hide resolved
snowball_time_masked_next_int=self.snowball_time_masked_next_int,
hbushouse marked this conversation as resolved.
Show resolved Hide resolved
)


Expand Down