drizzle icon indicating copy to clipboard operation
drizzle copied to clipboard

API re-design: simplify interface, remove I/O, make instrument agnostic

Open mcara opened this issue 5 months ago • 6 comments

~WARNING: This first commit is the first draft and it is definitely not ready for merging and unit tests have not been updated. Also, documentation is incomplete.~

This PR quite radically changes the API of this package with intention to make this package independent of how data are stored (FITS files, asdf, etc.) and the instrument used (JWST, HST, etc.) and also to reduce the number of functions and duplication and the number of conflicting parameters (or parameters that are changing meaning in different functions).

If some items on the TODO list (in the code) are implemented such as support for weight map of the input image to be None, then these changes would result in performance increase for EXPTIME, EXPSQ weighting schemes (as opposite to IVM). I would argue that we go even further with this in not having two parameters for input weights: weight_map and wht_scale. I think these should combine into a single weight which can be either an array or a scalar. IMO, having two parameters is an unnecessary complication.

BUG FIX: exposure time was undefined when in_units were not cps. That is, drizzle was producing random outputs when input image units were, let's say 'counts'.

BUG FIX: tdriz signature was out of date.

It is also worth mentioning this issue that probably should be handled in this PR too: https://github.com/spacetelescope/drizzlepac/issues/1722

mcara avatar Jan 19 '24 18:01 mcara