jwst icon indicating copy to clipboard operation
jwst copied to clipboard

Move common resample code to stcal

Open mcara opened this issue 6 months ago • 3 comments

This PR add the common resample code used by both JWST and Roman pipelines to stcal. Also, for the first time, this PR adopts the new drizzle API from https://github.com/spacetelescope/drizzle/pull/134 for the resample code used in the pipelines. For now only imaging mode was switched to the new code

This work is related to https://jira.stsci.edu/browse/AL-835

The code in this PR requires the code from https://github.com/spacetelescope/stcal/pull/279 and https://github.com/spacetelescope/drizzle/pull/134 be installed.

At this moment this is a very rough draft for illustration purpose. It should run with default arguments (except input_models and output file name can be specified; everything else is not guaranteed to work). There are no unit/regression tests and documentation may not match the code. Also, for now I kept the old ResampleData code to allow resampling of spectral data to work with the old code.

Example:

from stdatamodels.jwst.datamodels import ModelContainer
from jwst.resample import ResampleStep
from jwst import resample as jr
step = ResampleStep(ModelContainer(['jw01536070001_0210l_00001_nis_cal.fits']))
step.call(f, single=False)

Checklist for PR authors (skip items if you don't have permissions or they are not applicable)

  • [ ] added entry in CHANGES.rst within the relevant release section
  • [ ] updated or added relevant tests
  • [ ] updated relevant documentation
  • [ ] added relevant milestone
  • [ ] added relevant label(s)
  • [ ] ran regression tests, post a link to the Jenkins job below. How to run regression tests on a PR
  • [ ] All comments are resolved
  • [ ] Make sure the JIRA ticket is resolved properly

mcara avatar Aug 08 '24 13:08 mcara