Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rcal 954 Remove jump code from rcal tree #1534

Merged
merged 19 commits into from
Dec 11, 2024

Conversation

ddavis-stsci
Copy link
Collaborator

Resolves RCAL-954

Closes #1518

This PR removes the old jump code for even ramps and updates the documentation.

Tasks

  • request a review from someone specific, to avoid making the maintainers review every PR
  • add a build milestone, i.e. 24Q4_B15 (use the latest build if not sure)
  • Does this PR change user-facing code / API? (if not, label with no-changelog-entry-needed)
    • write news fragment(s) in changes/: echo "changed something" > changes/<PR#>.<changetype>.rst (see below for change types)
    • [ x] update or add relevant tests
    • update relevant docstrings and / or docs/ page
    • start a regression test and include a link to the running job (click here for instructions)
      • Do truth files need to be updated ("okified")?
        • after the reviewer has approved these changes, run okify_regtests to update the truth files
  • if a JIRA ticket exists, make sure it is resolved properly
news fragment change types...
  • changes/<PR#>.general.rst: infrastructure or miscellaneous change
  • changes/<PR#>.docs.rst
  • changes/<PR#>.stpipe.rst
  • changes/<PR#>.associations.rst
  • changes/<PR#>.scripts.rst
  • changes/<PR#>.mosaic_pipeline.rst
  • changes/<PR#>.patch_match.rst

steps

  • changes/<PR#>.dq_init.rst
  • changes/<PR#>.saturation.rst
  • changes/<PR#>.refpix.rst
  • changes/<PR#>.linearity.rst
  • changes/<PR#>.dark_current.rst
  • changes/<PR#>.jump_detection.rst
  • changes/<PR#>.ramp_fitting.rst
  • changes/<PR#>.assign_wcs.rst
  • changes/<PR#>.flatfield.rst
  • changes/<PR#>.photom.rst
  • changes/<PR#>.flux.rst
  • changes/<PR#>.source_detection.rst
  • changes/<PR#>.tweakreg.rst
  • changes/<PR#>.skymatch.rst
  • changes/<PR#>.outlier_detection.rst
  • changes/<PR#>.resample.rst
  • changes/<PR#>.source_catalog.rst
The regression tests are at https://github.com/spacetelescope/RegressionTests/actions/runs/11972755984 the one failure is for the ALL SATURNATED case where the truth file will need to be updated for the removal of the cal_step 'jump"

Copy link

codecov bot commented Nov 22, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 78.00%. Comparing base (6cb4b51) to head (7f75c72).
Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1534      +/-   ##
==========================================
- Coverage   78.11%   78.00%   -0.12%     
==========================================
  Files         117      115       -2     
  Lines        7639     7555      -84     
==========================================
- Hits         5967     5893      -74     
+ Misses       1672     1662      -10     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@ddavis-stsci ddavis-stsci force-pushed the rcal-954_dsd branch 2 times, most recently from 69201cd to c8d37cd Compare December 2, 2024 18:59
Copy link
Collaborator

@mairanteodoro mairanteodoro left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall, looks good, @ddavis-stsci! However, I agree with @braingram that we should stick with the recommended call instead of run.

changes/1534.general.rst Outdated Show resolved Hide resolved
docs/roman/stpipe/index.rst Outdated Show resolved Hide resolved
@ddavis-stsci ddavis-stsci enabled auto-merge (squash) December 4, 2024 13:15
docs/roman/pipeline_run.rst Outdated Show resolved Hide resolved
@github-actions github-actions bot added the dependencies Pull requests that update a dependency file label Dec 9, 2024
Copy link
Collaborator

@braingram braingram left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for working on this. I left a few more requested changes.

Comment on lines 73 to 77
You can execute a pipeline or a step from within python by using the
``call`` method of the class.

The ``call`` method creates a new instance of the class and runs the pipeline or
step. Optional parameter settings can be specified by via keyword arguments or
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please restore this section.

Comment on lines 82 to 83
elp = ExposurePipeline()
result = elp.call('r0000101001001001001_0001_wfi01_uncal.asdf')
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
elp = ExposurePipeline()
result = elp.call('r0000101001001001001_0001_wfi01_uncal.asdf')
elp = ExposurePipeline()
result = elp.call('r0000101001001001001_0001_wfi01_uncal.asdf')

call is a class method and doesn't require an instance. Please restore the code from main.

Comment on lines 86 to 87
linearity = LinearityStep()
result = linearity.call('r0000101001001001001_0001_wfi01_uncal.asdf')
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
linearity = LinearityStep()
result = linearity.call('r0000101001001001001_0001_wfi01_uncal.asdf')
linearity = LinearityStep()
result = linearity.call('r0000101001001001001_0001_wfi01_uncal.asdf')

Same here, please restore the code from main.

@@ -95,13 +94,11 @@ For the mosaic level pipeline and steps,
::

from romancal.pipeline import MosaicPipeline
result = ExposurePipeline.call('r0000101001001001001_asn.json')
mosp = MosaicPipeline('r0000101001001001001_asn.json')
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
mosp = MosaicPipeline('r0000101001001001001_asn.json')
result = MosaicPipeline.call('r0000101001001001001_asn.json')

Thanks for switching this to MosaicPipeline. I think from the text above that this should be a call as it's describing the pipeline results.


from romancal.skymatch import SkyMatchStep
result = SkyMatchStep.call('r0000101001001001001_asn.json')

skymatch = SkyMatchStep.call('r0000101001001001001_asn.json')
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
skymatch = SkyMatchStep.call('r0000101001001001001_asn.json')
result = SkyMatchStep.call('r0000101001001001001_asn.json')

Assigning to skymatch is misleading as call is not returning a SkyMatchStep instance.


From Python
-----------

Once the pipeline has been configured (as above) it can be executed
using run.

pipe.run(input_data)
pipe(input_data)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
pipe(input_data)
pipe.run(input_data)

Using pipe(input_data) executes pipe.__call__ (which is deprecated). Please restore the example from main pipe.run.



call()
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please restore this section.

@@ -233,11 +198,11 @@ example is::
`input` in this case can be a asdf file containing the appropriate data, or the output
of a previously run step/pipeline, which is an instance of a particular :ref:`datamodel<datamodels>`.

Unlike the ``call`` class method, there is no parameter initialization that
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please restore this section.

@@ -76,20 +72,12 @@ documentation on each reference file.
+--------------------------------------------------+---------------------------------------------+
| :ref:`FLAT <flat_reffile>` | :ref:`flatfield <flatfield_step>` |
+--------------------------------------------------+---------------------------------------------+
| :ref:`GAIN <gain_reffile>` | :ref:`jump_detection <jump_step>` |
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please restore this. The GAIN reference file is still used by the ramp step.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is still not correct. The table is not formatted and GAIN and READNOISE are missing from the lower tables:
https://roman-pipeline--1534.org.readthedocs.build/en/1534/roman/references_general/references_general.html#reference-file-types

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ddavis-stsci would you address this issue?

| :ref:`LINEARITY <linearity_reffile>` | :ref:`linearity <linearity_step>` |
+--------------------------------------------------+---------------------------------------------+
| :ref:`MASK <mask_reffile>` | :ref:`dq_init <dq_init_step>` |
+--------------------------------------------------+---------------------------------------------+
| :ref:`PHOTOM <photom_reffile>` | :ref:`photom <photom_step>` |
+--------------------------------------------------+---------------------------------------------+
| :ref:`READNOISE <readnoise_reffile>` | :ref:`jump_detection <jump_step>` |
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same as above with GAIN.

@ddavis-stsci ddavis-stsci force-pushed the rcal-954_dsd branch 2 times, most recently from 4a38d2d to 11a48cd Compare December 10, 2024 21:29
@ddavis-stsci
Copy link
Collaborator Author

Since there seem to be no more comment I'm merging this. Any issues can be handled in a future ticket.

@ddavis-stsci ddavis-stsci merged commit e2d5fb9 into spacetelescope:main Dec 11, 2024
29 of 30 checks passed
@ddavis-stsci ddavis-stsci deleted the rcal-954_dsd branch December 11, 2024 16:46
@braingram
Copy link
Collaborator

Was this PR approved? I didn't approve it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Remove jump code from rcal tree
3 participants