From 11806fe8a227767a9c8c6a2feee8526aeea10167 Mon Sep 17 00:00:00 2001 From: Brett Date: Thu, 7 Nov 2024 15:23:33 -0500 Subject: [PATCH] fix docs --- docs/roman/outlier_detection/outlier_examples.rst | 4 ++-- docs/roman/stpipe/call_via_run.rst | 8 +------- docs/roman/stpipe/user_pipeline.rst | 6 +++--- docs/roman/stpipe/user_step.rst | 5 ----- docs/roman/tweakreg/tweakreg_examples.rst | 10 +++++----- 5 files changed, 11 insertions(+), 22 deletions(-) diff --git a/docs/roman/outlier_detection/outlier_examples.rst b/docs/roman/outlier_detection/outlier_examples.rst index 1e8592f7e..9caef0733 100644 --- a/docs/roman/outlier_detection/outlier_examples.rst +++ b/docs/roman/outlier_detection/outlier_examples.rst @@ -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: @@ -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 diff --git a/docs/roman/stpipe/call_via_run.rst b/docs/roman/stpipe/call_via_run.rst index af839c1b1..014ef62f8 100644 --- a/docs/roman/stpipe/call_via_run.rst +++ b/docs/roman/stpipe/call_via_run.rst @@ -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: @@ -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') diff --git a/docs/roman/stpipe/user_pipeline.rst b/docs/roman/stpipe/user_pipeline.rst index d1eb71bc0..9176baf8c 100644 --- a/docs/roman/stpipe/user_pipeline.rst +++ b/docs/roman/stpipe/user_pipeline.rst @@ -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 --------------- diff --git a/docs/roman/stpipe/user_step.rst b/docs/roman/stpipe/user_step.rst index 8cb8d3cbd..b50878603 100644 --- a/docs/roman/stpipe/user_step.rst +++ b/docs/roman/stpipe/user_step.rst @@ -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) diff --git a/docs/roman/tweakreg/tweakreg_examples.rst b/docs/roman/tweakreg/tweakreg_examples.rst index 032ffd5a5..d6beced2c 100644 --- a/docs/roman/tweakreg/tweakreg_examples.rst +++ b/docs/roman/tweakreg/tweakreg_examples.rst @@ -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: @@ -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: @@ -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: @@ -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])