cta-observatory / cta-lstchain

LST prototype testbench chain
https://cta-observatory.github.io/cta-lstchain/
BSD 3-Clause "New" or "Revised" License
25 stars 77 forks source link

Write R1 already flatfielded #335

Open yrenier opened 4 years ago

yrenier commented 4 years ago

In the context of looking at stars in LST1 data ( https://indico.cta-observatory.org/event/2700/contributions/23482/attachments/17239/22795/pointing_300320_upload.pdf ), I would need waveform data with flat-fielding included. Presently (to my understanding) the flat-fielding is done in the R1->DL1 step, but at DL1 we would have much less photons (only the ones falling in one integration window). So we want to use R1 (to keep photons during the full readout window), that's why I implemented the flat fielding in the R0->R1 step (see #331 ).

kosack commented 4 years ago

Just to note: for CTA the R1 data model specifies that you must provide data that is already flat-fielded at the R1 stage, so what you are proposing is the right thing to do in any case (not just for star tracking). In the latest ctapipe (dev version) we already apply the FF and pedestal calibration in the R0→R1 stage for monte-Carlo (it's done when reading the MC data, in the SimTelEventSource).

yrenier commented 4 years ago

After a short call with @FrancaCassol, I learned the calibrated waveforms are present in DL0 (in event.dl0.tel[1].waveform ).

maxnoe commented 4 years ago

Let me reopen this with the point made by @kosack. If the flat fielding is currently happening at the "wrong" step, it should probably be moved.

FrancaCassol commented 4 years ago

Hi @kosack ,

Just to note: for CTA the R1 data model specifies that you must provide data that is already flat-fielded at the R1 stage, so what you are proposing is the right thing to do in any case (not just for star tracking). In the latest ctapipe (dev version) we already apply the FF and pedestal calibration in the R0→R1 stage for monte-Carlo (it's done when reading the MC data, in the SimTelEventSource).

yes, in LST we are conscient that the present status is not CTA compliant. The historical reason is that we would like for the moment to keep the waveforms for all the calibration steps: R0 (from EvB), R1 (after drs4 calibration), DL0 (after flat field calibration). But it is clear that we must change it in the future