Closed DavidT3 closed 1 month ago
So, the question of are there pattern and quality flags in Chandra that we can clean on is yes (predictably). The setup is slightly different to XMM and eROSITA both:
There is a 'STATUS' bit value that identifies various problems with the event (defined here, https://space.mit.edu/ASC/docs/acis_event_status_bits.html), which I suspect is very like eROSITA's flag setup. chandra_repro resets some of these values so they can be assessed again with updated calibrations, I don't yet know if it filters on them to create the level 2 event lists (that process is in the createL2 cookbook, but I'll check my generated files).
A 'FLTGRADE' entry, which is the 'event grade in flight system', which I guess is made redundant by the GRADE values.
Finally, the 'GRADE' value, which is the 'binned event grade in ACIS/ASCA/USER system' - they seem to be defined in the observer guideline documentation (https://cxc.cfa.harvard.edu/proposer/POG/html/ACIS.html#sec:GRADES:~:text=6.15-,Event,-Grades%20and%20Telemetry). Seem essentially the same as the XMM patterns. Some selected values I've seen in analysis examples are [0,2,3,4,6] - 0 is single event.
Those grade cuts seem to be applied to the produced evt2 files - I'll still let the user set tighter filters in the cleaning routine though.
HRC doesn't have grades of event as it turns out, I guess it is more of a CCD pixel thing - there may have to be three choices of command for cleaned_chandra_evts to populate.
Also just fundamentally different, need to look into the HRC cleaning process more.
There is a status bit value that appears similar in concept to the ACIS status bit - with the table of bit definitions here https://cxc.cfa.harvard.edu/contrib/juda/memos/status_bits/hrc_status_bits.html
Like ACIS, 0 value for status is good, so we'll keep that.
I am now entirely sure that ACIS grade and energy filtering work fine in the cleaned_chandra_evt function (still not so sure about the flare GTI filtering).
HRC is now working properly, and I can confirm that flare filtering is working for HRC data.
ACIS flaring GTI does do something, but think I have to check its efficacy. Would be nice to find a particularly badly flared observation to test on - perhaps by running it on the ACCEPT-1 observations
The cleaning is all working for sure - the worry I have is that the ACIS flare cleaning doesn't necessarily seem to do much, but that isn't something for this issue.
This is equivalent to the cleaned_evt_lists work flow of XMM - we've created the GTI files and now we need to actually use them. Also have to check if there are preferred flags and patterns for events that we should let the user choose.