Skip to content

Commit

Permalink
Fix closing of models - for now use save
Browse files Browse the repository at this point in the history
  • Loading branch information
mcara committed Aug 8, 2024
1 parent 2e84531 commit b7cde64
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion jwst/resample/resample.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,8 @@ def get_model_meta(self, file_name, fields):
raise NotImplementedError()

def close_model(self, model):
model.close()
self.save_model(model)

Check warning on line 41 in jwst/resample/resample.py

View check run for this annotation

Codecov / codecov/patch

jwst/resample/resample.py#L40-L41

Added lines #L40 - L41 were not covered by tests
# model.close()

def save_model(self, model):
if model.meta.filename:
Expand Down
3 changes: 2 additions & 1 deletion jwst/resample/resample_step.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,13 +86,14 @@ def process(self, input):

# Setup drizzle-related parameters
kwargs = self.get_drizpars()
kwargs.pop('blendheaders', None)

Check warning on line 89 in jwst/resample/resample_step.py

View check run for this annotation

Codecov / codecov/patch

jwst/resample/resample_step.py#L89

Added line #L89 was not covered by tests

# Call the resampling routine
# resamp = resample.ResampleData(input_models, output=output, **kwargs)
# result = resamp.do_drizzle(input_models)

if self.single:
resamp = resample.ResampleJWSTSingle(input_models, output=output, **kwargs)
resamp = resample.ResampleJWSTSingle(input_models, **kwargs)

Check warning on line 96 in jwst/resample/resample_step.py

View check run for this annotation

Codecov / codecov/patch

jwst/resample/resample_step.py#L95-L96

Added lines #L95 - L96 were not covered by tests
else:
resamp = resample.ResampleJWSTCoAdd(input_models, output=output, **kwargs)
resamp.run()
Expand Down

0 comments on commit b7cde64

Please sign in to comment.