cta-observatory / ctapipe_io_lst

ctapipe IO plugin for LST prototype data

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

event_source does not actually read the latest camera geometry ?

vuillaut opened this issue · comments

from pkg_resources import resource_filename
import os
from ctapipe.io import event_source
example_file_path = resource_filename(
    'protozfits',
    os.path.join(
        'tests',
        'resources',
        'example_LST_R1_10_evts.fits.fz'
    )
)

source = event_source(example_file_path)
event = next(iter(source))
event.inst.subarray.tel[0].camera                                                                                                                                                                                                                                
Out[1]: CameraGeometry(cam_id='LSTCam', pix_type='hexagonal', npix=1855, cam_rot=0.0 deg, pix_rot=100.893 deg)

@FrancaCassol Am I doing something wrong or missing something here?
But it seems that the geometry used with real data is still the first LSTCam one.

Maybe the deprecated inst contaier still contains old code? What is in source.subarray?

Hi @vuillaut,

the version of the geometry has been taken out from the name

Maybe the deprecated inst contaier still contains old code? What is in source.subarray?

In [22]: source.subarray(1).tel[1].camera                                                                                                                                                            
Out[22]: CameraGeometry(cam_id='LSTCam', pix_type='hexagonal', npix=1855, cam_rot=0.0 deg, pix_rot=100.893 deg)

I think in the next version of ctapipe, the camera will have a version attribute, let me check that

@vuillaut If you make a camera display with the cam, it looks correct and seems to be the version 4 (camera frame and correctly rotated pixels)

There is a CAM_VER in the camera description fits header

So there is no way to check what version of a geometry I am currently using in the code?

Look at source.geometry_version

Look at source.geometry_version

Ha thanks !!!
It is very confusing (at least to me) that the geometry does not know its own version...

yes, hopefully it will be improved as @maxnoe says

Can we close this with the implementation of CameraDescription implemented in #35?