-
Notifications
You must be signed in to change notification settings - Fork 18
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
Add WFC3 notebook 'calwf3_with_v1.0_PCTE.ipynb' #100
Conversation
Check out this pull request on See visual diffs & provide feedback on Jupyter Notebooks. Powered by ReviewNB |
This notebook relies on an old version of `hstcal` and therefore an old version of `calwf3`. Every `hstcal` version > 2.5.0 and every corresponding `calwf3` version > 3.5.2 will employ the v2.0 PCTE correction. Since this notebook's purpose is to demonstrate how to use the v1.0 PCTE correction, we must ensure `hstcal` version 2.5.0 is installed and used. I don't believe this version (2.5.0) is offered on conda-forge.
changing environment creation command to use the `requirements.txt` file
PEP8 compliance
pinning the packages to the versions in my environment where the notebook runs successfully
removing version pins and adding `crds`
adding `crds bestref` to pull ref files and `crds sync` to pull necessary archived files
remove astropy sigma clip stats since it isn't used
hi @haticekaratay thank you for your help. I've finished working on this notebook and don't know how to fix whatever is going on with the |
@@ -21,23 +21,25 @@ | |||
"- Compare v1.0 and v2.0 products. \n", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for your work. I have a suggestion to increase code readability: consider using more descriptive variable names instead of 'cl_inputs' and 'cl'.
Reply via ReviewNB
@@ -21,23 +21,25 @@ | |||
"- Compare v1.0 and v2.0 products. \n", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@@ -21,23 +21,25 @@ | |||
"- Compare v1.0 and v2.0 products. \n", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The CI runs the execution twice, resulting in the error shown in the log here : https://github.com/spacetelescope/hst_notebooks/actions/runs/6883163300/job/18723158842?pr=100#step:8:621
The error occurs because the file `idv404axq_flt.fits' already exists. To prevent this, you can run calibration only if the file doesn't exist from the previous run.
if not os.path.exists('idv404axq_flt.fits'): calwf3('idv404axq_raw.fits')
Additionaly, there might also be a flag you can pass to this method in calwf3 to overwrite if file exists. It's something you can look into from the docs. Thanks!
Reply via ReviewNB
Hi @bjkuhn, Thank you for your work. I wanted to let you know that the error message you received for the However, I have also identified some other reasons why the execution steps are failing, which I listed in the review. If you are able to update the notebook accordingly, this should resolve the issue. Thanks again for your efforts. |
made better variable names and added logic to check if the FLT file already exists
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @bjkuhn, for updating the notebook as suggested in the review. We also resolved the issue in the CI related to the pre-requirements.sh
step in the actions.
Relevant Tickets
This notebook checklist has been made available to us by the Notebooks For All team.
Its purpose is to serve as a guide for both the notebook author and the technical reviewer highlighting critical aspects to consider when striving to develop an accessible and effective notebook.
The First Cell
<h1>
or# in markdown
).1., 2.,
etc. in Markdown).The Rest of the Cells
#
in Markdown) used in the notebook.Text
Code
Images
All images (jpg, png, svgs) have an image description. This could be
alt
property)alt
attribute with no value)Any text present in images exists in a text form outside of the image (this can be alt text, captions, or surrounding text.)
Visualizations
All visualizations have an image description. Review the previous section, Images, for more information on how to add it.
Visualization descriptions include
All visualizations and their parts have enough color contrast (color contrast checker) to be legible. Remember that transparent colors have lower contrast than their opaque versions.
All visualizations convey information with more visual cues than color coding. Use text labels, patterns, or icons alongside color to achieve this.
All visualizations have an additional way for notebook readers to access the information. Linking to the original data, including a table of the data in the same notebook, or sonifying the plot are all options.