-
Notifications
You must be signed in to change notification settings - Fork 28
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
ExposurePipeline
uses meta.filename
instead of actual filename
#818
Comments
@ddavis-stsci should the truth file be updated so the |
Thanks! So it sounds like this is a new issue introduced by #802 and not an issue with the truth file? To summarize, prior to #802 |
The first instance of this test failing with I see prior failures (358, 359, 360) of this test but those were not due to 357 passed with 1 failure of a different test. Is there an instance of this test failing with |
Thanks for the update.
Is preferring 'meta.filename' over the actual filename preferred? If so, does this match what happens when files are read from an association? Looking at the code it looks like for those files the filename would take precedence: romancal/romancal/pipeline/exposure_pipeline.py Lines 105 to 118 in 0437760
|
Brett you might want to close this issue. This is fixed in rcal-631 |
Thanks for pinging me on this.
This produces a file However, if I copy
it produces a file with what appears to be an incorrect filename
I will update the title of this issue to hopefully a more descriptive title. |
test_processing_pipeline_all_saturated
ExposurePipeline
uses meta.filename
instead of actual filename
You cannot just change the filename you need to update meta.filename to match. So you need to copy r0000101001001001001_01101_0001_WFI01_uncal.asdf to foo_uncal.asdf This is built into stpipe and is not something romancal controls. It looks like in stpipe you can use the input filename as a template for the output filename,
if meta.filename is not present. I haven't played with this. |
Thanks for the response. It appears that the output filename (used by stpipe) is set here in the romancal
For a non-association run where the filename (string) is provided as an input. Prior to #802 the input filename was stored to
prior to the input being overwritten as the opened model:
after the model is opened input_filename is assigned to input.meta.filename which meant that the above run of foo_uncal.asdf would produce a foo_cal.asdf file.
On the current main branch (after #802) the line that assigned
has no effect as input_filename is overwritten as None before it is used:
which results in this if conditional failing and input.meta.filename not being assigned:romancal/romancal/pipeline/exposure_pipeline.py Lines 117 to 118 in 46ce69e
So to summarize, prior to #802 the actual filename was used, after #802 I will follow this up with a PR that should hopefully help clarify this issue. |
I believe the changes in #802 are not compatible with the
test_processing_pipeline_all_saturated
regtest.Here's a recent regtest run with this PR where only the mentioned test was run and stdout was not captured:
https://plwishmaster.stsci.edu:8081/blue/organizations/jenkins/RT%2FRoman-Developers-Pull-Requests/detail/Roman-Developers-Pull-Requests/311/pipeline/205/#step-206-log-97
A few relevant log lines are:
Note the filename above does not match the output filename in the regression test:
romancal/romancal/regtest/test_wfi_pipeline.py
Line 438 in 0437760
which causes the error
This seems related to the input filename handling in exposure pipline where when provided with an
input
as a string,input
is overwritten as a datamodel:romancal/romancal/pipeline/exposure_pipeline.py
Lines 78 to 85 in 0437760
then added to
expos_file
:romancal/romancal/pipeline/exposure_pipeline.py
Lines 94 to 101 in 0437760
before this check:
romancal/romancal/pipeline/exposure_pipeline.py
Lines 105 to 109 in 0437760
which means that
meta.filename
is not overwritten here:romancal/romancal/pipeline/exposure_pipeline.py
Lines 117 to 118 in 0437760
and the
meta.filename
in the input file does not match the filename (r0000101001001001001_01101_0001_WFI01_ALL_SATURATED_uncal.asdf):making the output filename incorrect.
The text was updated successfully, but these errors were encountered: