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

ZTF alerts aux: reprocessing scripts #259

Merged
merged 2 commits into from
Oct 26, 2023

Conversation

Theodlz
Copy link
Collaborator

@Theodlz Theodlz commented Oct 25, 2023

This PR ads 2 scripts that are useful if one wants to reprocess lots of alerts, to reconstruct the full light curves found in the ZTF_alerts_aux table.

We already have a branch with code to do that from the Kafka alert stream, but this allows you to do the same using the tarballs available online or any set of alert files.

@Theodlz Theodlz self-assigned this Oct 25, 2023
@Theodlz Theodlz changed the title ZTF alerts aux reprocessing ZTF alerts aux: reprocessing scripts Oct 25, 2023
Copy link
Collaborator

@mcoughlin mcoughlin left a comment

Choose a reason for hiding this comment

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

Just curious if any of the functions defined here should be in some kind of utility file.

return doc, prv_candidates, fp_hists


def process_file(argument_list: Sequence):
Copy link
Collaborator

Choose a reason for hiding this comment

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

Should these go in dedicated functions?

Copy link
Collaborator

Choose a reason for hiding this comment

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

i.e. different files.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Hi @mcoughlin. All of these methods already exist but as class methods (which is what they should really be for nightly processing). Of course, it'd be better if they were in a spot where both the class and a script could use them, but I'd rather not modify the nightly processing class, and have a duplicate here, given that this script will basically run just once, and then be removed from the repo.

Basically, this is for me to try and see if a script like this (with one thread per day of alerts being processed) is quicker than N threads that all submit to a dask cluster. If they turn out to be much quicker, then I'll leave that script here and find a cleaner solution to avoid the duplication.

@Theodlz Theodlz merged commit 49ed915 into skyportal:main Oct 26, 2023
2 checks passed
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