Skip to content

Commit

Permalink
Remove SourceDetection rename source_detection to source_catalog (#1533)
Browse files Browse the repository at this point in the history
  • Loading branch information
braingram authored Dec 3, 2024
2 parents 20b1fdf + 967c03f commit 573d961
Show file tree
Hide file tree
Showing 26 changed files with 92 additions and 636 deletions.
1 change: 1 addition & 0 deletions changes/1533.source_catalog.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Use meta.source_catalog and meta.cal_step.source_catalog in source_catalog step.
1 change: 1 addition & 0 deletions changes/1533.source_detection.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Remove SourceDetectionStep (use SourceCatalogStep).
1 change: 0 additions & 1 deletion docs/roman/package_index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,5 @@
resample/index.rst
skymatch/index.rst
source_catalog/index.rst
source_detection/index.rst
stpipe/index.rst
tweakreg/index.rst
1 change: 0 additions & 1 deletion docs/roman/pipeline_steps.rst
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ Pipeline Steps
flatfield/index.rst
photom/index.rst
flux/index.rst
source_detection/index.rst
tweakreg/index.rst
skymatch/index.rst
outlier_detection/index.rst
Expand Down
2 changes: 1 addition & 1 deletion docs/roman/source_catalog/main.rst
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ PSF Fitting

Star finding algorithms like `~photutils.detection.DAOStarFinder` provide
approximate stellar centroids. More precise centroids may be inferred by
fitting model PSFs to the observations. Setting the SourceDetectionStep's
fitting model PSFs to the observations. Setting the SourceCatalogStep's
option `fit_psf` to True will generate model Roman PSFs with
`WebbPSF <https://webbpsf.readthedocs.io/en/latest/roman.html>`_, and fit
those models to each of the sources detected by
Expand Down
61 changes: 0 additions & 61 deletions docs/roman/source_detection/arguments.rst

This file was deleted.

76 changes: 0 additions & 76 deletions docs/roman/source_detection/description.rst

This file was deleted.

14 changes: 0 additions & 14 deletions docs/roman/source_detection/index.rst

This file was deleted.

29 changes: 0 additions & 29 deletions docs/roman/source_detection/psf.rst

This file was deleted.

4 changes: 2 additions & 2 deletions docs/roman/tweakreg/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Description
Overview
--------
This step uses the coordinates of point-like sources from an input catalog
(i.e. the result from `SourceDetectionStep` saved in the
(i.e. the result from `SourceCatalogStep` saved in the
`meta.tweakreg_catalog` attribute) and compares them with the
coordinates from a Gaia catalog to compute corrections to
the WCS of the input images such that sky catalogs obtained from the image catalogs
Expand Down Expand Up @@ -68,7 +68,7 @@ attributes to the catalog file names provided in either in the ASN table or

Alignment
---------
The source catalog (either created by `SourceDetectionStep` or provided by the user)
The source catalog (either created by `SourceCatalogStep` or provided by the user)
gets cross-matched and fit to an astrometric reference catalog
(set by ``TweakRegStep.abs_refcat``) and the results are stored in
``model.meta.wcs_fit_results``. The pipeline initially supports fitting to any
Expand Down
3 changes: 0 additions & 3 deletions romancal/lib/suffix.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,6 @@
"jump",
"rampfit",
"saturation",
"sourcedetection",
"dark_current",
"darkcurrent",
"outlier_detection",
Expand Down Expand Up @@ -91,8 +90,6 @@
"linearitystep",
"dark_current",
"jump",
"sourcedetection",
"sourcedetectionstep",
"tweakregstep",
"outlierdetectionstep",
"skymatchstep",
Expand Down
8 changes: 4 additions & 4 deletions romancal/pipeline/exposure_pipeline.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ class ExposurePipeline(RomanPipeline):
ramps to produce a 2-D slope product. Included steps are:
dq_init, saturation, linearity, dark current, jump detection, ramp_fit,
assign_wcs, flatfield (only applied to WFI imaging data), photom,
and source_detection.
and source_catalog.
"""

class_alias = "roman_elp"
Expand Down Expand Up @@ -142,7 +142,7 @@ def process(self, input):
"assign_wcs",
"flat_field",
"photom",
"source_detection",
"source_catalog",
"dark",
"refpix",
"linearity",
Expand Down Expand Up @@ -176,7 +176,7 @@ def process(self, input):
log.info("Tweakreg step is being SKIPPED")
result.meta.cal_step.flat_field = "SKIPPED"
result.meta.cal_step.photom = "SKIPPED"
result.meta.cal_step.source_detection = "SKIPPED"
result.meta.cal_step.source_catalog = "SKIPPED"
result.meta.cal_step.tweakreg = "SKIPPED"

self.output_use_model = True
Expand Down Expand Up @@ -215,7 +215,7 @@ def create_fully_saturated_zeroed_image(self, input_model):
"assign_wcs",
"flat_field",
"photom",
"source_detection",
"source_catalog",
"tweakreg",
]:
fully_saturated_model.meta.cal_step[step_str] = "SKIPPED"
Expand Down
2 changes: 1 addition & 1 deletion romancal/regtest/test_multiband_catalog.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ def test_multiband_catalog(rtdata_module):
# filter in it, so this is more of an existence proof for the multiband
# catalogs than a detailed test. Using only a single catalog lets us
# rely on the existing regtest files.
outputfn = "r0099101001001001001_r274dp63x31y81_prompt_cat.asdf"
outputfn = "r0099101001001001001_r274dp63x31y81_prompt_F158_mbcat_cat.asdf"
rtdata.get_asn(f"WFI/image/{inputasnfn}")
rtdata.output = outputfn
rtdata.input = inputasnfn
Expand Down
2 changes: 1 addition & 1 deletion romancal/regtest/test_wfi_grism_pipeline.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ def test_output_matches_truth(output_filename, truth_filename, ignore_asdf_paths
# skipped
("flat_field", "SKIPPED"),
("photom", "SKIPPED"),
("source_detection", "SKIPPED"),
("source_catalog", "SKIPPED"),
("tweakreg", "SKIPPED"),
),
)
Expand Down
2 changes: 1 addition & 1 deletion romancal/regtest/test_wfi_image_pipeline.py
Original file line number Diff line number Diff line change
Expand Up @@ -299,6 +299,6 @@ def test_pipeline_suffix(rtdata, ignore_asdf_paths):
assert model.meta.cal_step.assign_wcs == "COMPLETE"
assert model.meta.cal_step.flat_field == "COMPLETE"
assert model.meta.cal_step.photom == "COMPLETE"
assert model.meta.cal_step.source_detection == "COMPLETE"
assert model.meta.cal_step.source_catalog == "COMPLETE"
assert model.meta.cal_step.tweakreg == "INCOMPLETE"
assert model.meta.filename == output
Loading

0 comments on commit 573d961

Please sign in to comment.