Skip to content

Commit

Permalink
Keep 0s in profile and scene model
Browse files Browse the repository at this point in the history
  • Loading branch information
melanieclarke committed Nov 26, 2024
1 parent d21fa9b commit a9e3a45
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions jwst/extract_1d/extract.py
Original file line number Diff line number Diff line change
Expand Up @@ -1424,7 +1424,6 @@ def extract_one_slit(data_model, integration, profile, bg_profile, extract_param
# of the number of input profiles. It may need to be transposed to match
# the input data.
scene_model = result[-1]
scene_model[profile_view == 0] = np.nan
if extract_params['dispaxis'] == HORIZONTAL:
first_result.append(scene_model)
else:
Expand Down Expand Up @@ -1615,10 +1614,7 @@ def create_extraction(input_model, slit, output_model,

# Save the profile if desired
if save_profile:
profile_copy = profile.copy()
profile_copy[profile_copy == 0] = np.nan

profile_model = datamodels.ImageModel(profile_copy)
profile_model = datamodels.ImageModel(profile)
profile_model.update(input_model, only='PRIMARY')
profile_model.name = slitname
else:
Expand Down

0 comments on commit a9e3a45

Please sign in to comment.