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

Enable users to run and re-run one step of Calibrations #1877

Open
wants to merge 26 commits into
base: develop
Choose a base branch
from

Conversation

profxj
Copy link
Collaborator

@profxj profxj commented Dec 4, 2024

A script and related to code to run to one step of the calibrations and stop.

This is mainly useful to re-run a bad calibration step.

Docs included and a test in the DevSuite in an accompanying PR.

Part of the motivation here is to enable a future Dashboard.

Copy link
Collaborator

@debora-pe debora-pe left a comment

Choose a reason for hiding this comment

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

Hi @profxj . Thanks for doing this. I have a few comments (minor), but I also tested the code and works great.
We should run the test.

pypeit/pypeit.py Outdated Show resolved Hide resolved
pypeit/calibrations.py Show resolved Hide resolved
@@ -793,7 +865,8 @@ def get_flats(self):
calib_key = illum_calib_key if pixel_calib_key is None else pixel_calib_key
setup = illum_setup if pixel_setup is None else pixel_setup
calib_id = illum_calib_id if pixel_calib_id is None else pixel_calib_id
if cal_file.exists() and self.reuse_calibs:

if cal_file.exists() and self.reuse_calibs and not force == 'remake':
Copy link
Collaborator

Choose a reason for hiding this comment

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

Is the force=reload option missing here?

Copy link
Collaborator

Choose a reason for hiding this comment

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

Oof. I forgot how complicated the flat file is...

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I think this is ok..

pypeit/calibrations.py Show resolved Hide resolved
pypeit/scripts/run_to_calibstep.py Outdated Show resolved Hide resolved
Copy link
Collaborator

@kbwestfall kbwestfall left a comment

Choose a reason for hiding this comment

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

A few relatively minor comments from me.

pypeit/calibrations.py Outdated Show resolved Hide resolved
pypeit/calibrations.py Show resolved Hide resolved
pypeit/calibrations.py Show resolved Hide resolved
@@ -793,7 +865,8 @@ def get_flats(self):
calib_key = illum_calib_key if pixel_calib_key is None else pixel_calib_key
setup = illum_setup if pixel_setup is None else pixel_setup
calib_id = illum_calib_id if pixel_calib_id is None else pixel_calib_id
if cal_file.exists() and self.reuse_calibs:

if cal_file.exists() and self.reuse_calibs and not force == 'remake':
Copy link
Collaborator

Choose a reason for hiding this comment

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

Oof. I forgot how complicated the flat file is...

pypeit/calibrations.py Outdated Show resolved Hide resolved
pypeit/scripts/run_to_calibstep.py Outdated Show resolved Hide resolved
pypeit/scripts/run_to_calibstep.py Outdated Show resolved Hide resolved
pypeit/scripts/run_to_calibstep.py Outdated Show resolved Hide resolved
pypeit/scripts/run_to_calibstep.py Outdated Show resolved Hide resolved
pypeit/scripts/run_to_calibstep.py Outdated Show resolved Hide resolved
Copy link
Collaborator

@debora-pe debora-pe left a comment

Choose a reason for hiding this comment

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

Thanks @profxj .
I still have a few minor comments, but I'm approving.

pypeit/pypeit.py Outdated Show resolved Hide resolved
pypeit/scripts/run_to_calibstep.py Show resolved Hide resolved
pypeit/scripts/run_to_calibstep.py Show resolved Hide resolved
pypeit/calibrations.py Show resolved Hide resolved
Copy link
Collaborator

@kbwestfall kbwestfall 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 addressing the comments!

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 this pull request may close these issues.

3 participants