src/pys5p/ckd_io.py
def __get_spectral_channel(bands: str):
        """
        Check bands is valid: single band or belong to one channel

        Parameters
        ----------
        bands : str
           Tropomi bands [1..8] or channels ['12', '34', '56', '78'],
           default: '78'
        """
        band2channel = ['UNKNOWN', 'UV', 'UV', 'VIS', 'VIS',
                        'NIR', 'NIR', 'SWIR', 'SWIR']

        if 0 < len(bands) > 2:
            raise ValueError('read per band or channel, only')

        if len(bands) == 2:
            if band2channel[int(bands[0])] != band2channel[int(bands[1])]:
                raise ValueError('bands should be of the same channel')

        return band2channel[int(bands[0])]

        Check bands is valid: single band or belong to one channel

        Parameters
        ----------
        bands : str
           Tropomi bands [1..8] or channels ['12', '34', '56', '78'],
           default: '78'
        
Check bands is valid: single band or belong to one channel
Parameters


Check bands is valid : single band or belong to one channel Parameters
def __get_spectral_channel(bands: str):
        band2channel = ['UNKNOWN', 'UV', 'UV', 'VIS', 'VIS',
                        'NIR', 'NIR', 'SWIR', 'SWIR']
        if 0 < len(bands) > 2:
            raise ValueError('read per band or channel, only')
        if len(bands) == 2:
            if band2channel[int(bands[0])] != band2channel[int(bands[1])]:
                raise ValueError('bands should be of the same channel')
        return band2channel[int(bands[0])]
def __get_spectral_channel ( bands : str ) : band2channel = [ 'UNKNOWN' , 'UV' , 'UV' , 'VIS' , 'VIS' , 'NIR' , 'NIR' , 'SWIR' , 'SWIR' ] if 0 < len ( bands ) > 2 : raise ValueError ( 'read per band or channel, only' ) if len ( bands ) == 2 : if band2channel [ int ( bands [ 0 ] ) ] != band2channel [ int ( bands [ 1 ] ) ] : raise ValueError ( 'bands should be of the same channel' ) return band2channel [ int ( bands [ 0 ] ) ]
Check bands is valid: single band or belong to one channel
Parameters
Check bands is valid : single band or belong to one channel Parameters
"""
        Check bands is valid: single band or belong to one channel

        Parameters
        ----------
        bands : str
           Tropomi bands [1..8] or channels ['12', '34', '56', '78'],
           default: '78'
        """
bands
str