def _load_camera_geometry_from_hessio_file(tel_id, filename): import hessio # warning, non-rentrant! hessio.file_open(filename) events = hessio.move_to_next_event() next(events) # load at least one event to get all the headers pix_x, pix_y = hessio.get_pixel_position(tel_id) optical_foclen = hessio.get_optical_foclen(tel_id) hessio.close_file() return CameraGeometry.guess(pix_x * u.m, pix_y * u.m, optical_foclen)