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

Application of Cat-B calibration (option1) #302

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

Conversation

marialainez
Copy link
Collaborator

In order to be able to process some nights "fast" with Cat-B calibration we have thought of this option. The idea is to launch first a sequencer with option --no-dl1ab, then the script onsite_create_cat_B_calibration "manually" and then another sequencer (without option --no-dl1ab). I have created a script that does all these steps by its own and it seems to be working. Tests are ongoing.

log.info(f"Going to level {level}")
else:
level -= 2
log.info(f"No images stored in dl1ab. Producing DL2. Going to level {level}")
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
log.info(f"No images stored in dl1ab. Producing DL2. Going to level {level}")
log.info(
f"No images stored in dl1ab. Skipping datachecks and producing DL2. Going to level {level}"
)

Comment on lines +192 to +202
if run_str[-4:] != "0000":
log.debug(f"{run_str} is not the first subrun of the run, so the script "
"onsite_create_cat_B_calibration_file will not be launched for this subrun.")

catB_calibration_file = get_catB_calibration_filename(int(run_str[:5]))
n = 0
n_max = 10
while not catB_calibration_file.exists() and n<=n_max:
time.sleep(120)
n += 1
return 0
Copy link
Member

Choose a reason for hiding this comment

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

Do you need the sleep part here if you plan to do it in two steps?

Comment on lines +193 to +202
log.debug(f"{run_str} is not the first subrun of the run, so the script "
"onsite_create_cat_B_calibration_file will not be launched for this subrun.")

catB_calibration_file = get_catB_calibration_filename(int(run_str[:5]))
n = 0
n_max = 10
while not catB_calibration_file.exists() and n<=n_max:
time.sleep(120)
n += 1
return 0
Copy link
Member

Choose a reason for hiding this comment

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

I think I'd simply return if subrun is not 0

Comment on lines +224 to +225
#elif program == cfg.get("lstchain", "catB_calibration"):
# level = 3 if exit_status == 0 else 4
Copy link
Member

Choose a reason for hiding this comment

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

why is it commented? do you plan to include a new cat B calibration line in the history file?

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.

2 participants