Skip to content

Commit

Permalink
fix docs
Browse files Browse the repository at this point in the history
  • Loading branch information
braingram committed Nov 7, 2024
1 parent ce55424 commit b697b4f
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 22 deletions.
4 changes: 2 additions & 2 deletions docs/roman/outlier_detection/outlier_examples.rst
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ the outlier detection step.
# read the file list into a ModelLibrary object
mc = ModelLibrary(["img_1.asdf", "img_2.asdf"])
step = OutlierDetectionStep()
step.process(mc)
step.run(mc)
2. To run the outlier detection step (with the default parameters) on an ASN file
called "asn_sample.json" with the following content:
Expand Down Expand Up @@ -56,7 +56,7 @@ the outlier detection step.
# read the file list into a ModelLibrary object
mc = ModelLibrary("asn_sample.json")
step = OutlierDetectionStep()
step.process(mc)
step.run(mc)
#. To run the outlier detection step (with the default parameters) on an ASN file
called "asn_sample.json" (the files listed in the association file must have been
Expand Down
8 changes: 1 addition & 7 deletions docs/roman/stpipe/call_via_run.rst
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,6 @@ parameter file will be ignored.
pipe.output_dir = '/my/data/pipeline_outputs'

# Run the pipeline
result = pipe('r0000101001001001001_01101_0001_WFI01_uncal.asdf')

# Or, execute the pipeline using the run method
result = pipe.run('r0000101001001001001_01101_0001_WFI01_uncal.asdf')

To run a single step:
Expand All @@ -41,8 +38,5 @@ To run a single step:
step.save_results = True
step.output_dir = '/my/data/jump_data'

# Execute by calling the instance directly
result = step('r0000101001001001001_01101_0001_WFI01_linearity.asdf')

# Or, execute using the run method
# Execute using the run method
result = step.run('r0000101001001001001_01101_0001_WFI01_linearity.asdf')
6 changes: 3 additions & 3 deletions docs/roman/stpipe/user_pipeline.rst
Original file line number Diff line number Diff line change
Expand Up @@ -183,10 +183,10 @@ step in the example above, one can do::
From Python
-----------
Once the pipeline has been configured (as above), just call the
instance to run it.
Once the pipeline has been configured (as above) it can be executed
using run.
pipe(input_data)
pipe.run(input_data)
Caching details
---------------
Expand Down
5 changes: 0 additions & 5 deletions docs/roman/stpipe/user_step.rst
Original file line number Diff line number Diff line change
Expand Up @@ -243,8 +243,3 @@ the step. The previous example could be re-written as::

mystep = FlatFieldStep(override_sflat='sflat.asdf')
output = mystep.run(input)

Using the ``.run()`` method is the same as calling the instance directly.
They are equivalent::

output = mystep(input)
10 changes: 5 additions & 5 deletions docs/roman/tweakreg/tweakreg_examples.rst
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@ or a Roman datamodel `ImageModel`.
from romancal.tweakreg.tweakreg_step import TweakRegStep
step = TweakRegStep()
step.call([img])
step.run([img])
.. note::
If the input is a single Roman ``DataModel``,
either ``step.call([img])`` or ``step.call(img)`` will work. For multiple elements as input,
either ``step.run([img])`` or ``step.run(img)`` will work. For multiple elements as input,
they must be passed in as either a list or a ModelLibrary.

#. To run TweakReg in a Python session on an association file with the default parameters:
Expand All @@ -22,7 +22,7 @@ or a Roman datamodel `ImageModel`.
from romancal.tweakreg.tweakreg_step import TweakRegStep
step = TweakRegStep()
step.call("asn_file.json")
step.run("asn_file.json")
#. To run TweakReg on a Roman's exposure with default astrometric parameters and save
the absolute catalog data:
Expand All @@ -34,7 +34,7 @@ or a Roman datamodel `ImageModel`.
step.save_abs_catalog = True # save the catalog data used for absolute astrometry
step.abs_refcat = 'GAIADR3' # use Gaia DR3 for absolute astrometry
step.catalog_path = '/path/for/the/abs/catalog' # save the Gaia catalog to this path
step.call([img])
step.run([img])
#. To run TweakReg using a custom source catalog with the default parameters:

Expand Down Expand Up @@ -93,4 +93,4 @@ or a Roman datamodel `ImageModel`.
step.use_custom_catalogs = True # use custom catalogs
step.catalog_format = "ascii.ecsv" # custom catalogs format
step.catfile = '/path/to/catfile/catfilename' # path to datamodel:catalog mapping
step.call([img])
step.run([img])

0 comments on commit b697b4f

Please sign in to comment.