Skip to content

Commit

Permalink
better intersphinx
Browse files Browse the repository at this point in the history
  • Loading branch information
bmorris3 committed Nov 13, 2023
1 parent ac3f28b commit b7efe27
Show file tree
Hide file tree
Showing 6 changed files with 20 additions and 9 deletions.
1 change: 1 addition & 0 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
1 change: 1 addition & 0 deletions docs/roman/source_detection/arguments.rst
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
12 changes: 6 additions & 6 deletions docs/roman/source_detection/description.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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 <https://photutils.readthedocs.io/en/stable/>`_, which is an
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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
Expand Down
3 changes: 3 additions & 0 deletions docs/roman/source_detection/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,8 @@ Source Detection

description.rst
arguments.rst
psf.rst

.. automodapi:: romancal.source_detection

.. automodapi:: romancal.lib.psf
2 changes: 1 addition & 1 deletion docs/roman/source_detection/psf.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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 <https://webbpsf.readthedocs.io/>`_. 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
Expand Down
10 changes: 8 additions & 2 deletions romancal/lib/psf.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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
----------
Expand Down Expand Up @@ -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
----------
Expand Down

0 comments on commit b7efe27

Please sign in to comment.