ctaplot/io/io.py
def read_lst_dl2_data(filename, key='dl2/event/telescope/parameters/LST_LSTCam'):
    """
    Read lst dl1 data and return a dataframe with right keys for gammaboard

    Parameters
    ----------
    filename: path
    key: dataset path in file

    Returns
    -------
    `pandas.DataFrame`
    """

    data = pd.read_hdf(filename, key=key)

    data = data.rename(columns={
        "mc_alt": "mc_altitude",
        "mc_az": "mc_azimuth",
        "reco_alt": "reco_altitude",
        "reco_az": "reco_azimuth",
        "gammaness": "reco_gammaness",
    })

    if data['mc_energy'].min() > 0.1 and data['mc_energy'].max() < 10:
        # energy is probably in log(GeV)
        data['reco_energy'] = 10 ** (data['reco_energy'] - 3)
        data['mc_energy'] = 10**(data['mc_energy'] - 3)

    return data

    Read lst dl1 data and return a dataframe with right keys for gammaboard

    Parameters
    ----------
    filename: path
    key: dataset path in file

    Returns
    -------
    `pandas.DataFrame`
    
Read lst dl1 data and return a dataframe with right keys for gammaboard
Parameters

path
key: dataset path in file

Returns


Read lst dl1 data and return a dataframe with right keys for gammaboard Parameters path key : dataset path in file Returns
def read_lst_dl2_data(filename, key='dl2/event/telescope/parameters/LST_LSTCam'):
    data = pd.read_hdf(filename, key=key)
    data = data.rename(columns={
        "mc_alt": "mc_altitude",
        "mc_az": "mc_azimuth",
        "reco_alt": "reco_altitude",
        "reco_az": "reco_azimuth",
        "gammaness": "reco_gammaness",
    })
    if data['mc_energy'].min() > 0.1 and data['mc_energy'].max() < 10:
        data['reco_energy'] = 10 ** (data['reco_energy'] - 3)
        data['mc_energy'] = 10**(data['mc_energy'] - 3)
    return data
def read_lst_dl2_data ( filename , key = 'dl2/event/telescope/parameters/LST_LSTCam' ) : data = pd . read_hdf ( filename , key = key ) data = data . rename ( columns = { "mc_alt" : "mc_altitude" , "mc_az" : "mc_azimuth" , "reco_alt" : "reco_altitude" , "reco_az" : "reco_azimuth" , "gammaness" : "reco_gammaness" , } ) if data [ 'mc_energy' ] . min ( ) > 0.1 and data [ 'mc_energy' ] . max ( ) < 10 : data [ 'reco_energy' ] = 10 ** ( data [ 'reco_energy' ] - 3 ) data [ 'mc_energy' ] = 10 ** ( data [ 'mc_energy' ] - 3 ) return data
Read lst dl1 data and return a dataframe with right keys for gammaboard
Parameters
Read lst dl1 data and return a dataframe with right keys for gammaboard Parameters
"""
    Read lst dl1 data and return a dataframe with right keys for gammaboard

    Parameters
    ----------
    filename: path
    key: dataset path in file

    Returns
    -------
    `pandas.DataFrame`
    """ # energy is probably in log(GeV)
filename
key