Skip to content

Commit

Permalink
finish changes to parameter name: wht_type->weight_type
Browse files Browse the repository at this point in the history
  • Loading branch information
mcara committed Dec 15, 2024
1 parent aff1ded commit a4301e9
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 10 deletions.
13 changes: 7 additions & 6 deletions jwst/resample/resample.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ class ResampleImage(Resample):
dq_flag_name_map = pixel

def __init__(self, input_models, pixfrac=1.0, kernel="square",
fillval="NAN", wht_type="ivm", good_bits=0,
fillval="NAN", weight_type="ivm", good_bits=0,
blendheaders=True, output_wcs=None, wcs_pars=None,
output=None, enable_ctx=True, enable_var=True,
compute_err=None, asn_id=None, in_memory=True):
Expand Down Expand Up @@ -86,10 +86,11 @@ def __init__(self, input_models, pixfrac=1.0, kernel="square",
``fillval`` value.
wht_type : {"exptime", "ivm"}, optional
The weighting type for adding models' data. For ``wht_type="ivm"``
(the default), the weighting will be determined per-pixel using
the inverse of the read noise (VAR_RNOISE) array stored in each
input image. If the ``VAR_RNOISE`` array does not exist,
The weighting type for adding models' data. For
``weight_type="ivm"`` (the default), the weighting will be
determined per-pixel using the inverse of the read noise
(VAR_RNOISE) array stored in each input image.
If the ``VAR_RNOISE`` array does not exist,
the variance is set to 1 for all pixels (i.e., equal weighting).
If ``weight_type="exptime"``, the weight will be set equal
to the measurement time (``TMEASURE``) when available and to
Expand Down Expand Up @@ -335,7 +336,7 @@ def __init__(self, input_models, pixfrac=1.0, kernel="square",
pixfrac=pixfrac,
kernel=kernel,
fillval=fillval,
wht_type=wht_type,
weight_type=weight_type,
good_bits=good_bits,
output_wcs=output_wcs,
output_model=None,
Expand Down
4 changes: 2 additions & 2 deletions jwst/resample/resample_spec.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ class ResampleSpec(ResampleImage):
a record of metadata from all input models.
"""
def __init__(self, input_models, pixfrac=1.0, kernel="square",
fillval="NAN", wht_type="ivm", good_bits=0,
fillval="NAN", weight_type="ivm", good_bits=0,
blendheaders=True, output_wcs=None, wcs_pars=None,
output=None, enable_ctx=True, enable_var=True,
compute_err=None, asn_id=None, in_memory=True):
Expand Down Expand Up @@ -211,7 +211,7 @@ def __init__(self, input_models, pixfrac=1.0, kernel="square",
pixfrac=pixfrac,
kernel=kernel,
fillval=fillval,
wht_type=wht_type,
weight_type=weight_type,
good_bits=good_bits,
blendheaders=blendheaders,
output_wcs=output_wcs_dict,
Expand Down
2 changes: 1 addition & 1 deletion jwst/resample/resample_spec_step.py
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ def get_drizpars(self):
pixfrac=self.pixfrac,
kernel=self.kernel,
fillval=self.fillval,
wht_type=self.weight_type,
weight_type=self.weight_type,
good_bits=GOOD_BITS,
blendheaders=self.blendheaders,
in_memory=self.in_memory
Expand Down
2 changes: 1 addition & 1 deletion jwst/resample/resample_step.py
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@ def get_drizpars(self):
pixfrac=self.pixfrac,
kernel=self.kernel,
fillval=self.fillval,
wht_type=self.weight_type,
weight_type=self.weight_type,
good_bits=GOOD_BITS,
blendheaders=self.blendheaders,
in_memory=self.in_memory
Expand Down

0 comments on commit a4301e9

Please sign in to comment.