def lv1_consts(key=None):
    """
    defines consts used while reading Sciamachy level 0 data
    """
    consts = {}
    consts['mds_size'] = 1247

    consts['max_clusters'] = 64
    consts['uvn_channels'] = 5
    consts['swir_channels'] = 3
    consts['all_channels'] = consts['uvn_channels'] + consts['swir_channels']
    consts['channel_pixels'] = 1024
    consts['all_pixels'] = consts['all_channels'] * consts['channel_pixels']

    consts['num_pmd'] = 7
    consts['num_frac_polv'] = 12
    consts['num_spec_coeffs'] = 5

    if key is None:
        return consts
    if key in consts:
        return consts[key]

    raise KeyError('level 1b constant {} is not defined'.format(key))