Skip to content

Commit

Permalink
add class aliases for steps (#1509)
Browse files Browse the repository at this point in the history
  • Loading branch information
braingram authored Nov 12, 2024
2 parents 8a04f5a + 18dbaa0 commit 9031ae1
Show file tree
Hide file tree
Showing 14 changed files with 37 additions and 12 deletions.
1 change: 1 addition & 0 deletions changes/1509.stpipe.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Add class_alias for all steps.
2 changes: 2 additions & 0 deletions romancal/assign_wcs/assign_wcs_step.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@
class AssignWcsStep(RomanStep):
"""Assign a gWCS object to a science image."""

class_alias = "assign_wcs"

reference_file_types = ["distortion"]

def process(self, input):
Expand Down
2 changes: 2 additions & 0 deletions romancal/dark_current/dark_current_step.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ class DarkCurrentStep(RomanStep):
dark current reference data from the input science data model.
"""

class_alias = "dark"

spec = """
dark_output = output_file(default = None) # Dark corrected model
"""
Expand Down
2 changes: 2 additions & 0 deletions romancal/dq_init/dq_init_step.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ class DQInitStep(RomanStep):
input model.
"""

class_alias = "dq_init"

reference_file_types = ["mask"]

def process(self, input):
Expand Down
2 changes: 2 additions & 0 deletions romancal/flatfield/flat_field_step.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@
class FlatFieldStep(RomanStep):
"""Flat-field a science image using a flatfield reference image."""

class_alias = "flat_field"

reference_file_types = ["flat"]

def process(self, input_model):
Expand Down
2 changes: 2 additions & 0 deletions romancal/flux/flux_step.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@ class FluxStep(RomanStep):
Currently, the correction is done in-place; the inputs are directly modified if in-memory DataModels are input.
""" # noqa: E501

class_alias = "flux"

spec = """
""" # noqa: E501

Expand Down
2 changes: 2 additions & 0 deletions romancal/jump/jump_step.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ class JumpStep(RomanStep):
applied.
"""

class_alias = "jump"

spec = """
rejection_threshold = float(default=180.0,min=0) # CR sigma rej thresh
three_group_rejection_threshold = float(default=185.0,min=0) # CR sigma rej thresh
Expand Down
2 changes: 2 additions & 0 deletions romancal/linearity/linearity_step.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ class LinearityStep(RomanStep):
detector response, using the "classic" polynomial method.
"""

class_alias = "linearity"

reference_file_types = ["linearity"]

def process(self, input):
Expand Down
2 changes: 2 additions & 0 deletions romancal/photom/photom_step.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ class PhotomStep(RomanStep):
reference files and attaching to the input science data model
"""

class_alias = "photom"

reference_file_types = ["photom"]

def process(self, input):
Expand Down
2 changes: 2 additions & 0 deletions romancal/ramp_fitting/ramp_fit_step.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ class RampFitStep(RomanStep):
determine the mean count rate for each pixel.
"""

class_alias = "ramp_fit"

spec = """
algorithm = option('ols_cas22', default='ols_cas22') # Algorithm to use to fit.
save_opt = boolean(default=False) # Save optional output
Expand Down
2 changes: 2 additions & 0 deletions romancal/refpix/refpix_step.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ class RefPixStep(RomanStep):
pixels
"""

class_alias = "refpix"

spec = """
remove_offset = boolean(default=True) # Turn on or off removing the data offset
# prior to the reference pixel correction, then returning the offset afterwords.
Expand Down
2 changes: 2 additions & 0 deletions romancal/saturation/saturation_step.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ class SaturationStep(RomanStep):
This Step sets saturation flags.
"""

class_alias = "saturation"

reference_file_types = ["saturation"]

def process(self, input):
Expand Down
2 changes: 2 additions & 0 deletions romancal/source_detection/source_detection_step.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@ class SourceDetectionStep(RomanStep):
for alignment in tweakreg.
"""

class_alias = "source_detection"

spec = """
kernel_fwhm = float(default=None) # DAOStarFinder:Size of Gaussian kernel,
# in pixels.
Expand Down
24 changes: 12 additions & 12 deletions romancal/stpipe/integration.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,19 +23,19 @@ def get_steps():
return [
("romancal.pipeline.ExposurePipeline", "roman_elp", True),
("romancal.pipeline.MosaicPipeline", "roman_mos", True),
("romancal.step.DarkCurrentStep", None, False),
("romancal.step.DQInitStep", None, False),
("romancal.step.FlatFieldStep", None, False),
("romancal.step.FluxStep", None, False),
("romancal.step.JumpStep", None, False),
("romancal.step.LinearityStep", None, False),
("romancal.step.PhotomStep", None, False),
("romancal.step.RampFitStep", None, False),
("romancal.step.RefPixStep", None, False),
("romancal.step.SaturationStep", None, False),
("romancal.step.AssignWcsStep", None, False),
("romancal.step.DarkCurrentStep", "dark", False),
("romancal.step.DQInitStep", "dq_init", False),
("romancal.step.FlatFieldStep", "flat_field", False),
("romancal.step.FluxStep", "flux", False),
("romancal.step.JumpStep", "jump", False),
("romancal.step.LinearityStep", "linearity", False),
("romancal.step.PhotomStep", "photom", False),
("romancal.step.RampFitStep", "ramp_fit", False),
("romancal.step.RefPixStep", "refpix", False),
("romancal.step.SaturationStep", "saturation", False),
("romancal.step.AssignWcsStep", "assign_wcs", False),
("romancal.step.OutlierDetectionStep", "outlier_detection", False),
("romancal.step.SourceDetectionStep", None, False),
("romancal.step.SourceDetectionStep", "source_detection", False),
("romancal.step.SkyMatchStep", "skymatch", False),
("romancal.step.TweakRegStep", "tweakreg", False),
("romancal.step.ResampleStep", "resample", False),
Expand Down

0 comments on commit 9031ae1

Please sign in to comment.