Skip to content

Commit

Permalink
Minor changes to the wording of the description of some PSF specifica…
Browse files Browse the repository at this point in the history
…tions.
  • Loading branch information
Onoddil committed Oct 17, 2018
1 parent c5538bb commit 0d5cd05
Show file tree
Hide file tree
Showing 5 changed files with 30 additions and 27 deletions.
4 changes: 3 additions & 1 deletion docs/psf_spec/background_estimator.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@ BackgroundEstimator
Existing code documented at
https://photutils.readthedocs.io/en/stable/api/photutils.background.BackgroundBase.html
- while the ``__call__`` function has no docstring, the ``calc_background``
function is the actual block API. The documentation is therefore unlikely to change.
function is the actual block API. This function is used significantly through `photutils`
and should therefore be relatively stable to call changes; documentation is therefore
unlikely to change.

Routine to estimate the background level of images and provide background subtraction.
Can either be applied across an entire image or applied in a two-dimensional grid, at
Expand Down
4 changes: 2 additions & 2 deletions docs/psf_spec/finder.rst
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ Example Usage

StarFinder currently implements two methods: DAOFind and IRAFFind. For example, daofind
can be run to find objects with FWHM of approximately 3 pixels with a peak 5-sigma above
the background:
::
the background::

from photutils import DAOStarFinder
daofind = DAOStarFinder(fwhm=3.0, threshold=5.*std)
sources = daofind(data)
Expand Down
18 changes: 10 additions & 8 deletions docs/psf_spec/group_maker.rst
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
GroupMaker
==========

Documented as the `__call__` method of ``GroupStarsBase`` - see
Documented as the ``__call__`` method of ``GroupStarsBase`` - see
https://photutils.readthedocs.io/en/stable/api/photutils.psf.groupstars.GroupStarsBase.html
It'll be substantial work to re-design the photometry loops if this is changed
in a backwards-incompatible manner, but of course that's possible if there's a
good reason for it.
API may potentially change if group_stars is updated to scene_maker extending PSF fitting to
non-point source objects; however, it is likely that the fundamental inputs and outputs
remain at least functionally similar to those shown here. Large changes to the GroupMaker
call may require significant changes to the PSF Photometry fitting routines (e.g.,
``IterativelySubtractedPSFPhotometry``).

An object which groups stars within some critical separation, returning potentially
A function which groups stars within some critical separation, returning potentially
overlapping sources with an additonal column indicating their common group members.
Subclasses of ``GroupStarsBase`` may require further input parameters, such as
``crit_separation`` required for ``DAOGroup``.
Expand Down Expand Up @@ -48,15 +50,15 @@ starlist : `~astropy.table.Table`
Returns
"""""""

`~np.array` with the IDs of all stars with distance less than ``crit_separation`` to ``star``.
`~numpy.array` with the IDs of all stars with distance less than ``crit_separation`` to ``star``.


Example Usage
-------------

Here we create a ``DAOGroup`` list of overlapping sources, then find all sources within 3 pixels
of the first source in the list.
::
of the first source in the list.::

from photutils.psf.groupstars import DAOGroup
group = DAOGroup(starlist, crit_separation=3)
stargroups = group.group_stars(starlist)
Expand Down
2 changes: 2 additions & 0 deletions docs/psf_spec/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ Blocks
.. toctree::
:maxdepth: 1

block_template
background_estimator
block_template
culler_and_ender
Expand All @@ -24,3 +25,4 @@ Blocks
psf_model
scene_maker
single_object_model

29 changes: 13 additions & 16 deletions docs/psf_spec/psf_model.rst
Original file line number Diff line number Diff line change
@@ -1,22 +1,19 @@
PsfModel
========

The PSF models in the current ``photutils.psf`` are not explicitly
defined as a specific class, but any 2D model (inputs: x,y, output: flux) can
be considered a PSF Model. The `~photutils.psf.PRFAdapter` class is the
clearest application specific example, however, and demonstrates the required
convention for *names* of the PSF model's parameters. Hopefully that class can
be used *directly* as this block, as it is meant to wrap any arbitrary other
models to make it compatible with the machinery.

The model for the PSF -- integrated over discrete pixels (see `discussion
<https://github.com/astropy/photutils/blob/master/docs/psf.rst#terminology>'_
<https://github.com/astropy/photutils/blob/master/docs/psf.rst#terminology>`_
on terminology for more details) -- on which we should evaluate the parameters
of the source. The main input is a 2D image, with the model being represented
by a ``FittableImageModel``, returning ``flux``, ``x_0``, and ``y_0``, the
overall source flux and centroid position. Individual models will require
additional parameters, such as the ``IntegratedGaussianPRF`` which additionally
requiring ``sigma`` as a parameter that describes the underlying Gaussian PSF.
of the source. The main input is a 2D image, with the model returning ``flux``,
``x_0``, and ``y_0``, the overall source flux and centroid position. PSF models
in the current ``photutils.psf`` are not explicitly defined as a specific class,
but any 2D model (inputs: x,y, output: flux) can be considered a PSF Model.

The `~photutils.psf.PRFAdapter` class allows for the wrapping of any arbitrary
other models to make it compatible with the machinery. Some individual models
will require additional parameters, such as the ``IntegratedGaussianPRF`` which
additionally requiring ``sigma`` as a parameter that describes the underlying
Gaussian PSF.

Parameters
----------
Expand Down Expand Up @@ -75,8 +72,8 @@ and with the flux level specified.
Example Usage
-------------
Here we create a discrete Gaussian PSF with standard deviation of 2 pixels, and
fit for centroid and overall flux level of a source.
::
fit for centroid and overall flux level of a source.::

from photutils.psf import IntegratedGaussianPRF
psf_model = IntegratedGaussianPRF(sigma=2)
model_image = psf_model.evaluate(x, y, flux, x_0, y_0, sigma=2)

0 comments on commit 0d5cd05

Please sign in to comment.