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

Romancal steps and suffix treatment #1344

Open
braingram opened this issue Jul 31, 2024 · 0 comments · May be fixed by #1347
Open

Romancal steps and suffix treatment #1344

braingram opened this issue Jul 31, 2024 · 0 comments · May be fixed by #1347

Comments

@braingram
Copy link
Collaborator

In many locations in the romancal code Step.suffix is set to a seemingly default value for a respective step:
https://github.com/search?q=repo%3Aspacetelescope%2Fromancal%20%22suffix%20%3D%22&type=code

To consider one example, AssignWcsStep sets it's suffix as follows:

if self.save_results:
try:
self.suffix = "assignwcs"
except AttributeError:
self["suffix"] = "assignwcs"

To allow files generated by the step (when save_results=True, when the suffix is used) to have the assignwcs suffix.

This could alternatively be handled by setting the suffix in the spec (as is done for several steps in jwst). This has a few benefits:

  • it provides automatic documentation of the expected suffix (see one example in jwst)
  • it is configurable by the user (who can override the suffix via strun options, config files, etc)
  • it does not require the try/except and other code above

Was this a design decision to not use the spec to define the suffix or is using the spec ok?

@braingram braingram linked a pull request Aug 2, 2024 that will close this issue
6 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant