-
Notifications
You must be signed in to change notification settings - Fork 0
Description
Hierarchy
Using the FITS hierarchical grouping standard, you can think of a set of HDUs of as a "folder-like" file structure, where the groups are like directories and the HDUs are like files within them. The nature of the GROUPING tables allows the actual HDUs to be stored in the same file as the group, or in a separate file or even a distant file with a URL. Think of this like each HDU can be physically in the folder, or just a symbolic link to it is in the folder. As a folder structure this looks like:
- PRIMARY
- Observation/
- EVENTS
- GTI
- MONITORING
- IRF/
- IRF1
- IRF2
- ...
- IRFn
In more detail, this would look like:
- PRIMARY (contains common metadata)
- GROUPING (GRPNAME=observation, EXTVER=0) : Observation Grouping table
- EVENTS
- GTI (optional)
- MONITORING* tables (optional), e.g. POINTING
- PROVENANCE (optional)
- GROUPING (GRPNAME=IRF, EXTVER=1): the extra columns in the group should correspond to the hierarchy of HDUCLASn (maybe even name them HDUCLASn to be consistent) This is instrument dependent.
- IRF1_SOI0†
- IRF1_SOI_n_
- IRF2_SOI0
- IRF2_SOI_n_
- ....
- IRF1_SOI0_UNCERT1 (optional)
- IRF_1_SOIn+IRF_UNCERT2 (optional)
- ...
- IRF_VALIDITY1 (optional)
- IRF_VALIDITY1 (optional)
†: Note that the HDU names (EXTNAME,EXTVER) for all the IRFs need some thought, as they must be unique. One idea is to use the IRF component name and use HDUVERS to disambiguate them, just incrementing. For the format, it doesn't matter, but the implementer has to decide on a convention
The different sub-types of IRF HDUs: IRF, IRF_UNCERT, IRF_VALIDITY are separated for memory reasons: you would not want to load all that in one HDU each time, since the validity/uncertainty/etc are no all needed.
Grouping the IRFs for CTAO
in CTAO, we have IRFs for each SOI and for each EventType.
So the IRF grouping table looks something like, or we say exactly like (open question):
- HDUCLAS1 is "RESPONSE"
- HDUCLAS2 is the SOI number [int], and there must be extra columns of START, STOP associated with it
- HDUCLAS3 is the irf component: [EFF_AREA, EDISP, PSF, BGK, RAD_MAX*]
- HDUCLAS4 is the event_type_group ["event_type_group_n"]
- HDUCLAS5 is the storage type ([BG3D, ..., RAD_MAX]) (get from gammapy)
- HDUCLAS6 is the spatial selection ['NONE', 'RAD_MAX'].
(*) Note that RAD_MAX is not really an IRF, but we want to be able to associate it with each SOI bin, so having it in the hierarchy and IRF grouping table is convenient, at the expense of "purity of data model"
The the IRF grouping table would look something like this (but with 7 HDUCLASn columns, and TSTART, TSTOP for the SOI)
MEMBER_NAME | MEMBER_VERSION | ... | HDUCLAS2 | TSTART | TSTOP | HDUCLAS3 | HDUCLAS4 | HDUCLAS5 | HDUCLAS6 |
---|---|---|---|---|---|---|---|---|---|
effective_area | 0 | ... | 0 | 523323.121 | 523323.256 | EFF_AREA | 2 | EffArea3D | None |
effective_area | 1 | ... | 0 | 523323.121 | 523323.256 | EFF_AREA | 2 | EffArea3D | RAD_MAX |
effective_area | 2 | ... | 1 | 523323.121 | 523323.256 | EFF_AREA | 2 | EffArea3D | None |