Skip to content

Commit

Permalink
JP-3605: Change default value for abs_separation in the tweakreg step (
Browse files Browse the repository at this point in the history
…#8445)

Co-authored-by: Nadia Dencheva <nadia.dencheva@gmail.com>
  • Loading branch information
mcara and nden authored May 2, 2024
1 parent 63bc4b0 commit a833633
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 19 deletions.
7 changes: 5 additions & 2 deletions CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ associations
and dither pointing, ``MOSTILNO`` and ``DITHPTIN``. [#8410]

dark_current
------------
------------

- Add log info message when specifying an average_dark_current for noise calculations.
[#8425]
Expand All @@ -33,7 +33,7 @@ documentation

- Added docs for the NIRSpec MSA metadata file to the data products area of RTD.
[#8399]

- Added documentation for multiprocessing. [#8408]

extract_1d
Expand Down Expand Up @@ -104,6 +104,9 @@ tweakreg

- Improved how a image group name is determined. [#8426]

- Changed default settings for ``abs_separation`` parameter for the ``tweakreg``
step to have a value compatible with the ``abs_tolerance`` parameter. [#8445]


1.14.0 (2024-03-29)
===================
Expand Down
30 changes: 14 additions & 16 deletions docs/jwst/tweakreg/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ format automatically recognized by :py:meth:`~astropy.table.Table.read`.
When the ``meta.tweakreg_catalog`` attribute of input data models is `None` or
an empty string, then the ``tweakreg`` step will attempt to detect sources in the
input images. Stars are detected in the image with one of the following source
detection algorithms: ``photutils.detection.DAOStarFinder`` (default),
``photutils.detection.IRAFStarFinder``, or ``photutils.segmentation.SourceFinder``
detection algorithms: ``photutils.detection.DAOStarFinder`` (default),
``photutils.detection.IRAFStarFinder``, or ``photutils.segmentation.SourceFinder``
in conjunction with ``photutils.segmentation.SourceCatalog``.

DAOStarFinder is an implementation of the `DAOFIND`_ algorithm
Expand All @@ -38,26 +38,26 @@ specified.
IRAFStarFinder is a Python implementation of the IRAF star finding algorithm,
which also calculates the objects' centroids, roundness, and sharpness.
However, IRAFStarFinder uses image moments
instead of 1-D Gaussian fits to projected light distributions like
instead of 1-D Gaussian fits to projected light distributions like
DAOStarFinder.

SourceFinder implements a segmentation algorithm that identifies
sources in an image based on a number of connected pixels above a
specified threshold value. The sources are deblended using a
combination of multi-thresholding and watershed segmentation.
sources in an image based on a number of connected pixels above a
specified threshold value. The sources are deblended using a
combination of multi-thresholding and watershed segmentation.
SourceCatalog finds the centroids of these sources, which are used
as the retrieved star positions.
as the retrieved star positions.

.. warning::
It has been shown (`STScI Technical Report JWST-STScI-008116, SM-12
<https://www.stsci.edu/~goudfroo/NIRISSdoc/Centroid_Accuracies_Precisions_NIRISS_v2.pdf>`_)
It has been shown (`STScI Technical Report JWST-STScI-008116, SM-12
<https://www.stsci.edu/~goudfroo/NIRISSdoc/Centroid_Accuracies_Precisions_NIRISS_v2.pdf>`_)
that for undersampled PSFs, e.g. for short-wavelength NIRISS
imaging data, ``DAOStarFinder`` gives bad results no matter the input parameters
due to its use of 1-D Gaussian fits.
``IRAFStarFinder`` or ``SourceFinder`` should be used instead.

.. note::
``SourceFinder`` is likely to detect non-stellar sources
.. note::
``SourceFinder`` is likely to detect non-stellar sources
such as galaxies because sources are not assumed to be
point-source-like. This may lead to mismatches between the
derived source catalog and the reference catalog during the
Expand Down Expand Up @@ -254,7 +254,7 @@ The ``tweakreg`` step has the following optional arguments:

**Additional source finding parameters for segmentation:**

* ``npixels``: An `int` value indicating the minimum number of
* ``npixels``: An `int` value indicating the minimum number of
connected pixels that comprises a segment (Default=10)

* ``connectivity``: An `int` value indicating the connectivity defining the
Expand All @@ -280,7 +280,7 @@ The ``tweakreg`` step has the following optional arguments:
Allowed values: `'correct'`, `'mask'`, `'none'`. (Default= `'correct'`)

* ``kron_params``: A tuple of `float` values indicating the
parameters defining Kron aperture. If None,
parameters defining Kron aperture. If None,
the parameters `(2.5, 1.4, 0.0)` are used. (Default=None)

**Optimize alignment order:**
Expand Down Expand Up @@ -374,9 +374,7 @@ Parameters used for absolute astrometry to a reference catalog.
Otherwise the initial guess for the offsets will be set to zero
(Default=True)

* ``abs_separation``: Minimum object separation in arcsec. It is recommended
that a value smaller than ``separation`` be used for this parameter
(e.g. 10 times smaller) (Default=0.1)
* ``abs_separation``: Minimum object separation in arcsec. (Default=1.0)

* ``abs_tolerance``: Matching tolerance for ``xyxymatch`` in arcsec.
(Default=0.7)
Expand Down
2 changes: 1 addition & 1 deletion jwst/tweakreg/tweakreg_step.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ class TweakRegStep(Step):
abs_searchrad = float(default=6.0) # The search radius in arcsec for a match when performing absolute astrometry
# We encourage setting this parameter to True. Otherwise, xoffset and yoffset will be set to zero.
abs_use2dhist = boolean(default=True) # Use 2D histogram to find initial offset when performing absolute astrometry?
abs_separation = float(default=0.1) # Minimum object separation in arcsec when performing absolute astrometry
abs_separation = float(default=1) # Minimum object separation in arcsec when performing absolute astrometry
abs_tolerance = float(default=0.7) # Matching tolerance for xyxymatch in arcsec when performing absolute astrometry
# Fitting geometry when performing absolute astrometry
abs_fitgeometry = option('shift', 'rshift', 'rscale', 'general', default='rshift')
Expand Down

0 comments on commit a833633

Please sign in to comment.