src/pys5p/lv2_io.py
def __nc_dataset(self, name, data_sel, fill_as_nan):
        """
        read dataset from science products using netCDF4
        """
        if name in self.fid['/target_product'].variables.keys():
            group = '/target_product'
        elif name in self.fid['/instrument'].variables.keys():
            group = '/instrument'
        else:
            raise ValueError(f'dataset {name} for found')

        dset = self.fid[f'{group}/{name}']
        if dset.size == self.scanline * self.ground_pixel:
            res = dset[:].reshape(self.scanline, self.ground_pixel)
        else:
            res = dset[:]
        if data_sel is not None:
            res = res[data_sel]

        if fill_as_nan:
            return res.filled(np.nan)

        return res.data

        read dataset from science products using netCDF4
        
read dataset from science products using netCDF4
read dataset from science products using netCDF4
def __nc_dataset(self, name, data_sel, fill_as_nan):
        if name in self.fid['/target_product'].variables.keys():
            group = '/target_product'
        elif name in self.fid['/instrument'].variables.keys():
            group = '/instrument'
        else:
            raise ValueError(f'dataset {name} for found')
        dset = self.fid[f'{group}/{name}']
        if dset.size == self.scanline * self.ground_pixel:
            res = dset[:].reshape(self.scanline, self.ground_pixel)
        else:
            res = dset[:]
        if data_sel is not None:
            res = res[data_sel]
        if fill_as_nan:
            return res.filled(np.nan)
        return res.data
def __nc_dataset ( self , name , data_sel , fill_as_nan ) : if name in self . fid [ '/target_product' ] . variables . keys ( ) : group = '/target_product' elif name in self . fid [ '/instrument' ] . variables . keys ( ) : group = '/instrument' else : raise ValueError ( f'dataset {name} for found' ) dset = self . fid [ f'{group}/{name}' ] if dset . size == self . scanline * self . ground_pixel : res = dset [ : ] . reshape ( self . scanline , self . ground_pixel ) else : res = dset [ : ] if data_sel is not None : res = res [ data_sel ] if fill_as_nan : return res . filled ( np . nan ) return res . data
read dataset from science products using netCDF4
read dataset from science products using netCDF4
"""
        read dataset from science products using netCDF4
        """
self
name
data_sel
fill_as_nan