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

Draft
wants to merge 43 commits into
base: main
Choose a base branch
from
Draft

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?

@marialainez
Copy link
Collaborator Author

The idea with this new scheme is that first one sequencer is launched with option --no-dl1ab. This sequencer will be launched once by the crontab. Then sequencer_catB_tailcuts will be launched several times. It has to be launched every x minutes to give time for the catB.closed files and the .json config files with the appropriate tailcuts to be created. Then, a second sequencer (without the option --no-dl1ab) is launched also every x minutes. This sequencer should start from step dl1ab and it should first check if the catB.closed files and the .json config files for the tailcuts exist for a given run. Once it has checked that these files exist, it will proceed with the dl1ab step and dl2 if option --no-dl2 is not given.

@marialainez marialainez marked this pull request as draft January 23, 2025 16:01
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