-
Notifications
You must be signed in to change notification settings - Fork 28
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
2a896df
commit f6c5bba
Showing
8 changed files
with
350 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,3 +5,4 @@ | |
references_general/index.rst | ||
stpipe/index.rst | ||
refpix/index.rst | ||
source_detection/index.rst |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
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. | ||
|
||
* ``--save_catalogs``: A True/False value that specifies whether to write | ||
the optional output catalog. Default is False. | ||
|
||
* ``--kernel_fwhm``: A parameter for DAOStarFinder: size of Gaussian kernel in | ||
pixels. Default is 1.5. | ||
* ``--sharplo``: A parameter for DAOStarFinder: lower bound for sharpness. | ||
Default is 0.5. | ||
* ``--sharphi``: A parameter for DAOStarFinder: upper bound for sharpness. | ||
Default is 1.0. | ||
* ``--roundlo``: A parameter for DAOStarFinder: lower bound for roundness. | ||
Default is -1.0. | ||
* ``--roundhi``: A parameter for DAOStarFinder: upper bound for roundness. | ||
Default is 1.0. | ||
* ``--peakmax``: A parameter for DAOStarFinder: upper limit on brightest pixel | ||
in sources. Default is 1000.0. | ||
* ``--max_sources``: The maximum number of sources in the output catalog, | ||
choosing brightest. Default is None, which will return all | ||
detected sources. | ||
* ``--scalar_threshold``: If specified, a single scalar threshold to be used | ||
for source detection with DAOStarFinder across the | ||
entire image. One of `scalar_threshold`, | ||
`calc_scalar_threshold`, or `calc_threshold_2d` must | ||
be chosen. Default is None. | ||
* ``--calc_scalar_threshold``: If specified, a single scalar threshold will be | ||
determined for the entire image. This is done by | ||
calculating a 2D background image, and using that | ||
to determine a single threshold value for the | ||
entire image. One of `scalar_threshold`, | ||
`calc_scalar_threshold`, or `calc_threshold_2d` | ||
must be chosen. | ||
* ``--calc_threshold_2d``: (**NOTE: this option is not currently enabled**) | ||
If specified, a 2D threshold image will be calculated, | ||
and sources will be detected in segments of the image | ||
to use these thresholds (based on `bkg_boxsize`). | ||
* ``--snr_threshold``: If using `calc_threshold_img` or `calc_threshold_2d`, | ||
the SNR for the threshold image. Default is 3.0. | ||
* ``--bkg_estimator``: If using `calc_threshold_img` or `calc_threshold_2d`, | ||
choice of mean, median, or mode. Default is `median`. | ||
* ``--bkg_boxsize``: If using `calc_threshold_img` or `calc_threshold_2d`, | ||
size of box in pixels for 2D background / threshold images | ||
and if using calc_threshold_2d, the size of the box used | ||
when detecting sources. Default is 3. | ||
* ``--bkg_sigma``: If using `calc_threshold_img` or `calc_threshold_2d`, | ||
n sigma for sigma clipping for background calculation. | ||
Default is 2.0. | ||
* ``--bkg_filter_size``: If using `calc_threshold_img` or `calc_threshold_2d`, | ||
size of square gaussian kernel for background | ||
calculation. Default is 3. | ||
* ``--coverage_mask``: Optional mask for image (i.e to mask artifacts). | ||
Default is None. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
Description | ||
============ | ||
|
||
The source detection step produces catalogs of point-like sources for use by the | ||
tweakreg step for image alignment. It uses DAOStarFinder to detect point sources | ||
in the image. The output source catalog will be returned with the output file | ||
as an attribute under `meta.source_catalog`, in a dictionary keyed by input | ||
file rootname. Optionally, the file may be saved to disk as well. | ||
|
||
Options for Thresholding | ||
======================== | ||
|
||
The DAOStarFinder routine detects point-like sources in in image that are above | ||
a certain, specified floating point threshold. This step provides several options | ||
for calculating this threshold, either using one value for the entire image, | ||
or by detecting sources in segments of the image and using a different appropriate | ||
threshold for each (useful if background varies across the image). | ||
|
||
The first option is to set `scalar_threshold` - this will use the specified | ||
threshold as the detection threshold for the entire image. | ||
|
||
The second option is to use `calc_threshold` - this will calculate a single | ||
threshold value for the entire image on-the-fly, based on the median background | ||
level of the whole image. | ||
|
||
(**NOTE: this option is not currently enabled**) Finally, if `calc_threshold_2d` | ||
is set, a 2D threshold image will be generated, and sources will be deteteced | ||
within each box of this image. | ||
|
||
Output Catalogs | ||
=============== | ||
|
||
The output catalog will be in the form of an astropy table stored in the output | ||
image's `meta` section. If `save_catalogs` is specified, a `.csv` table will | ||
be written out to the same directory as the input image. The output catalogs | ||
will contain the following columns - `id`, `xcentroid`, `ycentroid`, `flux`, | ||
where `id` is the source ID (a unique identifier determined by DAOStarFinder), | ||
`xcentroid` and `ycentroid` are the centroid positions of the detected source | ||
in image coordinates, and `flux` is the non-background subtracted total sum | ||
within the source. If `calc_threshold_2d` is used, there will be additional | ||
columns reporting the threshold level used for that source. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
.. _source_detection_step: | ||
|
||
================ | ||
Source Detection | ||
================ | ||
|
||
.. toctree:: | ||
:maxdepth: 2 | ||
|
||
description.rst | ||
arguments.rst | ||
|
||
.. automodapi:: romancal.source_detection |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
from .source_detection_step import SourceDetectionStep | ||
|
||
__all__ = ['SourceDetectionStep'] |
Oops, something went wrong.