-
Notifications
You must be signed in to change notification settings - Fork 268
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
Irf maker and cut optimiser #2473
base: main
Are you sure you want to change the base?
Conversation
ctapipe/irf/optimise.py
Outdated
def __init__(self, gh_cuts=None, offset_lim=None): | ||
self.gh_cuts = gh_cuts | ||
if gh_cuts: | ||
self.gh_cuts.meta["extname"] = "GH_CUTS" |
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.
extname is the name of a FITS extension. You should't set this in the metadata of the table, but only when writing out, it's the name
argument of write
.
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.
I got
TypeError: write_table_fits() got an unexpected keyword argument 'name'
when I tried self.gh_cuts.write(out_name, name="GH_CUTS", format="fits", overwrite=overwrite)
and I don't find anything about a name
argument to table.write
, do you mean I should manage the fits file more directly and just cast the tables to hdus?
ctapipe/irf/select.py
Outdated
|
||
quality_criteria = List( | ||
default_value=[ | ||
("multiplicity 4", "np.count_nonzero(tels_with_trigger,axis=1) >= 4"), |
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.
Do we really want a multiplicity cut of 4 by default? I would remove that and only require the valid reconstruction.
643a841
to
7c2efc7
Compare
52b968c
to
9ea15e3
Compare
As we are planning to produce IRFs on events that were not used to select the GH cut, it makes sense to split the procedure generating IRFs into two tools. Because this splitting results in a large restructuring of the the previous PR on generating IRFs (#2315) that was basically working properly, I open a new PR to preserve the discussion on the old attempt and let its more or less functional code serve as easy reference.