diff --git a/docs/conf.py b/docs/conf.py index 74e805778..eeb0eedf4 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -70,6 +70,7 @@ def check_sphinx_version(expected_version): "gwcs": ("https://gwcs.readthedocs.io/en/latest/", None), "astropy": ("https://docs.astropy.org/en/stable/", None), "photutils": ("https://photutils.readthedocs.io/en/stable/", None), + "webbpsf": ("https://webbpsf.readthedocs.io/en/latest/", None), } if sys.version_info[0] == 2: diff --git a/docs/roman/source_detection/arguments.rst b/docs/roman/source_detection/arguments.rst index 4c3f4143e..7323cca7f 100644 --- a/docs/roman/source_detection/arguments.rst +++ b/docs/roman/source_detection/arguments.rst @@ -1,5 +1,6 @@ Arguments ========= + The source detection fitting step has several arguments. These can be specified by the user by passing them to the step in a Python session, or setting them in a parameter file. diff --git a/docs/roman/source_detection/description.rst b/docs/roman/source_detection/description.rst index 3003dbf6e..21b37c150 100644 --- a/docs/roman/source_detection/description.rst +++ b/docs/roman/source_detection/description.rst @@ -7,7 +7,7 @@ in the image, with an option to subsequently fit PSF models to the detected sources for more precise centroids and fluxes. Detecting Sources -================= +----------------- Sources are detected using `~photutils.detection.DAOStarFinder` from `photutils `_, which is an @@ -17,7 +17,7 @@ The algorithm can be provided limits on the source flux, radius, roundness, sharpness, and background. PSF Fitting -=========== +----------- Star finding algorithms like `~photutils.detection.DAOStarFinder` provide approximate stellar centroids. More precise centroids may be inferred by @@ -28,7 +28,7 @@ those models to each of the sources detected by `~photutils.detection.DAOStarFinder`. More details are in :doc:`psf`. Outputs / Returns -================= +----------------- By default, the resulting source catalog will be temporarily attached to the output ImageModel in the `meta.source_catalog.tweakreg_catalog` attribute as @@ -49,7 +49,7 @@ only be saved if it does not contain an attached catalog - to do this, use the separately. Options for Thresholding -======================== +------------------------ The DAOStarFinder routine detects point-like sources in an image that are above a certain, specified floating point threshold. This step provides several options @@ -65,10 +65,10 @@ threshold value for the entire image based on the sigma-clipped average (mean, median, or mode) background level of the whole image. Other Options -============= +------------- Limiting maximum number of sources ----------------------------------- +++++++++++++++++++++++++++++++++++ By default, all detected sources will be returned in the final output catalog. If you wish to limit the number of sources, this can be done with the diff --git a/docs/roman/source_detection/index.rst b/docs/roman/source_detection/index.rst index 2dc35264f..31aa52bfd 100644 --- a/docs/roman/source_detection/index.rst +++ b/docs/roman/source_detection/index.rst @@ -9,5 +9,8 @@ Source Detection description.rst arguments.rst + psf.rst .. automodapi:: romancal.source_detection + +.. automodapi:: romancal.lib.psf diff --git a/docs/roman/source_detection/psf.rst b/docs/roman/source_detection/psf.rst index db8dd004d..56f4af506 100644 --- a/docs/roman/source_detection/psf.rst +++ b/docs/roman/source_detection/psf.rst @@ -9,7 +9,7 @@ Create PSF models ----------------- `~romancal.lib.psf.create_gridded_psf_model` computes a gridded PSF model for -a given detector using `webbpsf.gridded_library.CreatePSFLibrary` from +a given detector using `~webbpsf.gridded_library.CreatePSFLibrary` from `WebbPSF `_. The defaults are chosen to balance more accurate PSF models with the cost of increased runtime. For further reading on the WebbPSF approach to ePSFs, see the WebbPSF docs on diff --git a/romancal/lib/psf.py b/romancal/lib/psf.py index 99e4733a7..227d6c4b2 100644 --- a/romancal/lib/psf.py +++ b/romancal/lib/psf.py @@ -24,6 +24,12 @@ from romancal.lib.dqflags import pixel as roman_dq_flag_map +__all__ = [ + "create_gridded_psf_model", + "fit_psf_to_image_model", + "dq_to_boolean_mask", +] + # set loggers to debug level by default: log = logging.getLogger(__name__) log.setLevel(logging.DEBUG) @@ -68,7 +74,7 @@ def create_gridded_psf_model( ): """ Compute a gridded PSF model for one SCA via - `webbpsf.gridded_library.CreatePSFLibrary`. + `~webbpsf.gridded_library.CreatePSFLibrary`. Parameters ---------- @@ -210,7 +216,7 @@ def fit_psf_to_image_model( exclude_out_of_bounds=True, ): """ - Fit PSF models to an ImageModel. + Fit PSF models to an ``ImageModel``. Parameters ----------