def initialize_hessio(filename,tel_id, file_closed):
    if file_closed:
        util_functions.load_hessio(filename)
        util_functions.nextevent_hessio()
    else:
        pass
    
    ld.mirror_area.append(h.get_mirror_area(tel_id))
    ld.mirror_number.append(h.get_mirror_number(tel_id))

    if file_closed:
        util_functions.close_hessio()
def initialize_telescope(filename, file_closed = True):
    ld.clear_lists_telescope()
    ld.clear_lists_camera()
    ld.clear_lists_optics()

    if 'simtel.gz' in filename:
        file_closed = TD.initialize_hessio(filename,file_closed)
        for tel in ld.telescope_id:
            CD.initialize_hessio(filename,tel,file_closed)
            OD.initialize_hessio(filename,tel,file_closed)
        util_functions.close_hessio()

    elif 'fits' in filename:
        file_closed = TD.initialize_fits(filename,file_closed)
        for tel in ld.telescope_id:
            CD.initialize_fits(filename,tel,file_closed)
            OD.initialize_fits(filename,tel,file_closed)
        util_functions.close_fits(file_closed)
def initialize_telescope(filename, file_closed=True):
    ld.clear_lists_telescope()
    ld.clear_lists_camera()
    ld.clear_lists_optics()

    if 'simtel.gz' in filename:
        file_closed = TD.initialize_hessio(filename, file_closed)
        for tel in ld.telescope_id:
            CD.initialize_hessio(filename, tel, file_closed)
            OD.initialize_hessio(filename, tel, file_closed)
        util_functions.close_hessio()

    elif 'fits' in filename:
        file_closed = TD.initialize_fits(filename, file_closed)
        for tel in ld.telescope_id:
            CD.initialize_fits(filename, tel, file_closed)
            OD.initialize_fits(filename, tel, file_closed)
        util_functions.close_fits(file_closed)
Esempio n. 4
0
def initialize_hessio(filename, tel_id, file_closed):
    if file_closed:
        util_functions.load_hessio(filename)
        util_functions.nextevent_hessio()
    else:
        pass

    px = h.get_pixel_position(tel_id)[0]
    py = h.get_pixel_position(tel_id)[1]
    ld.pixel_posX.append(px)
    ld.pixel_posY.append(py)
    ld.camera_class.append(guess_camera_geometry(px * u.m, py * u.m).cam_id)

    #to use this, one has to go through every event of the run...
    n_channel = h.get_num_channel(tel_id)
    ld.channel_num = n_channel
    #for chan in range(n_channel):
    #    ld.adc_samples.append(h.get_adc_sample(tel_id,chan).tolist())

    if file_closed:
        util_functions.close_hessio()
def initialize_hessio(filename,tel_id, file_closed):
    if file_closed:
        util_functions.load_hessio(filename)
        util_functions.nextevent_hessio()
    else:
        pass
    
    px = h.get_pixel_position(tel_id)[0]
    py = h.get_pixel_position(tel_id)[1]
    ld.pixel_posX.append(px)
    ld.pixel_posY.append(py)
    ld.camera_class.append(guess_camera_geometry(px*u.m,py*u.m).cam_id)
    
    #to use this, one has to go through every event of the run...
    n_channel = h.get_num_channel(tel_id)
    ld.channel_num = n_channel
    #for chan in range(n_channel):
    #    ld.adc_samples.append(h.get_adc_sample(tel_id,chan).tolist())
        
    if file_closed:
        util_functions.close_hessio()