Eventdisplay / Converters

Repository for Converters from Eventdisplay format into FITS / HDF5 / etc
BSD 3-Clause "New" or "Revised" License
1 stars 2 forks source link

NTels_reco_Xst is filled from variable tree element #3

Closed GernotMaier closed 1 year ago

GernotMaier commented 4 years ago

https://github.com/Eventdisplay/Converters/blob/84c8d56de7309b0fce63f1830e560b599025a999/DL2/generate_DL2_file.py#L96

The tree element NImages_Ttype is not read out correctly:

Would that be complicated to implement?

in c++ it would be

for( unsigned int i = 0; i < NImages_Ttype; i++ ) { if( TtypeID[i] == 10408418 ) NTels_reco_MST = NImages_Ttype[i]; else if( TtypeID[i]....).... }

TarekHC commented 4 years ago

Hi Gernot,

Can you please tell me the Ttype of each telescope type? In 3HB9-FD I can see the following ones:

TarekHC commented 4 years ago

Hi Gernot, sorry but I have an additional question: Is TtypeID constant over the whole file? meaning that each entry will always define the type of each telescope in the position [1, 2, ... NTtype].

GernotMaier commented 4 years ago

Here it is (isn't it logic?):

138704810: LST 10408618: FlashCam MST 10408418: NectarCam MST 201511619: ASTRI SST 201309316: GC-SST 909924: DC-SST 207308707: SC-MST

GernotMaier commented 4 years ago

Hi Gernot, sorry but I have an additional question: Is TtypeID constant over the whole file? meaning that each entry will always define the type of each telescope in the position [1, 2, ... NTtype].

Not sure I understand that correctly: there are max 3 telescope types per file, but it might be that that array has only a length of two and therefore e.g. TtypeID[0] might not always be the same number

TarekHC commented 4 years ago

Not sure I understand that correctly: there are max 3 telescope types per file, but it might be that that array has only a length of two and therefore e.g. TtypeID[0] might not always be the same number

My question is: within a file (fixed array) TtypeID will always be the same? Meaning: we read the first entry, and we already know which telescope will be used within all NImages_Ttype. Or does TtypeID change over a single file (fixed array)? So for some events TtypeID[0] refers to LSTs, and for some other events it refers to MSTs.

I'm asking because you are storing TtypeID for each event, which would be absurdly inefficient if they will always be the same (but I would guess it was probably easier to implement this way on the ED side).

GernotMaier commented 4 years ago

Unfortunately not, it is not always the same (although almost always).

On 16. Jun 2020, at 10:00, Tarek Hassan notifications@github.com wrote:

Not sure I understand that correctly: there are max 3 telescope types per file, but it might be that that array has only a length of two and therefore e.g. TtypeID[0] might not always be the same number

My question is: within a file (fixed array) TtypeID will always be the same? Meaning: we read the first entry, and we already know which telescope will be used within all NImages_Ttype. Or does TtypeID change over a single file (fixed array)? So for some events TtypeID[0] refers to LSTs, and for some other events it refers to MSTs.

I'm asking because you are storing TtypeID for each event, which would be absurdly inefficient if they will always be the same (but I would guess it was probably easier to implement this way on the ED side).

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe.


Dr Gernot Maier CTA Deutsches Elektronen-Synchrotron DESY Ein Forschungszentrum der Helmholtz-Gemeinschaft Platanenallee 6, D-15738 Zeuthen, Germany

Tel.: +49 33 7627 7598 Internet: www.desy.de/cta Besucheradresse: 1X07

TarekHC commented 4 years ago

Argh... I assumed it was always the same in https://github.com/Eventdisplay/Converters/pull/4

Can you tell me if the new code gives you any error? If it does, just comment that part.

GernotMaier commented 1 year ago

Closing this - old and outdated (likely).