Get data along specified axis during calibration intervals

    Args
    ----
    data_df: pandas.DataFrame
        Pandas dataframe with lleo data
    cal_dict: dict
        Calibration dictionary

    Returns
    -------
    lower: pandas dataframe
        slice of lleo datafram containing points at -1g calibration position
    upper: pandas dataframe
        slice of lleo datafram containing points at -1g calibration position

    See also
    --------
    lleoio.read_data: creates pandas dataframe `data_df`
    read_cal: creates `cal_dict` and describes fields

def get_cal_data(data_df, cal_dict, param):
    '''Get data along specified axis during calibration intervals

    Args
    ----
    data_df: pandas.DataFrame
        Pandas dataframe with lleo data
    cal_dict: dict
        Calibration dictionary

    Returns
    -------
    lower: pandas dataframe
        slice of lleo datafram containing points at -1g calibration position
    upper: pandas dataframe
        slice of lleo datafram containing points at -1g calibration position

    See also
    --------
    lleoio.read_data: creates pandas dataframe `data_df`
    read_cal: creates `cal_dict` and describes fields
    '''

    param = param.lower().replace(' ','_').replace('-','_')

    idx_lower_start = cal_dict['parameters'][param]['lower']['start']
    idx_lower_end   = cal_dict['parameters'][param]['lower']['end']
    idx_upper_start = cal_dict['parameters'][param]['upper']['start']
    idx_upper_end   = cal_dict['parameters'][param]['upper']['end']

    idx_lower = (data_df.index >= idx_lower_start) & \
                (data_df.index <= idx_lower_end)

    idx_upper = (data_df.index >= idx_upper_start) & \
                (data_df.index <= idx_upper_end)

    return data_df[param][idx_lower], data_df[param][idx_upper]