Skip to content

Commit

Permalink
another try at output name
Browse files Browse the repository at this point in the history
  • Loading branch information
jemorrison committed Apr 22, 2024
1 parent 04ca36d commit 6caec07
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions jwst/pixel_replace/pixel_replace_step.py
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ def process(self, input):
)

# Check models to confirm they are the correct type
for i, model in enumerate(input_model):
for i, model in enumerate(output_model):
run_pixel_replace = True

Check warning on line 109 in jwst/pixel_replace/pixel_replace_step.py

View check run for this annotation

Codecov / codecov/patch

jwst/pixel_replace/pixel_replace_step.py#L108-L109

Added lines #L108 - L109 were not covered by tests
# for each spectrum - NRS_FIXEDSLIT, WFSS
if isinstance(model, datamodels.MultiSlitModel):
Expand All @@ -126,18 +126,18 @@ def process(self, input):
self.log.error(f'Input is of type {str(type(input_model))} for which')
self.log.error('pixel_replace does not have an algorithm.\n')
self.log.error('Pixel replacement will be skipped.')
output_model[i].meta.cal_step.pixel_replace = 'SKIPPED'
model.meta.cal_step.pixel_replace = 'SKIPPED'
run_pixel_replace = False

Check warning on line 130 in jwst/pixel_replace/pixel_replace_step.py

View check run for this annotation

Codecov / codecov/patch

jwst/pixel_replace/pixel_replace_step.py#L126-L130

Added lines #L126 - L130 were not covered by tests

# all checks on model have passed. Now run pixel replacement
if run_pixel_replace:
replacement = PixelReplacement(model, **pars)
replacement.replace()
self.record_step_status(replacement.output, 'pixel_replace', success=True)
output_model[i] = replacement.output
output_path_name = self.make_output_path(basepath=output_model[i].meta.filename)
model = replacement.output
output_path_name = self.make_output_path(basepath=model.meta.filename, suffix='pixel_replace')
if self.save_results:
output_model[i].meta.filename = output_path_name
model.meta.filename = output_path_name
print(output_path_name)

Check warning on line 141 in jwst/pixel_replace/pixel_replace_step.py

View check run for this annotation

Codecov / codecov/patch

jwst/pixel_replace/pixel_replace_step.py#L133-L141

Added lines #L133 - L141 were not covered by tests

return output_model

Check warning on line 143 in jwst/pixel_replace/pixel_replace_step.py

View check run for this annotation

Codecov / codecov/patch

jwst/pixel_replace/pixel_replace_step.py#L143

Added line #L143 was not covered by tests
Expand Down

0 comments on commit 6caec07

Please sign in to comment.