src/pys5p/ckd_io1.py
def noise(self, bands='78'):
        """
        Returns noise CKD, SWIR only

        Notes
        -----
        * SWIR row 257 is excluded.
        * The noise CKD has no error attached to it.
        """
        if len(bands) > 2:
            raise ValueError('read per band or channel, only')
        if '7' not in bands and '8' not in bands:
            raise ValueError('noise CKD is only available for SWIR')

        ckd = None
        long_name = 'SWIR noise CKD'

        # try the Static CKD product, first
        for band in bands:
            dsname = f'/BAND{band}/readout_noise_swir'
            if dsname not in self.fid:
                continue

            if not ckd:
                ckd = S5Pmsm(self.fid[dsname], data_sel=np.s_[:-1, :])
                ckd.set_long_name(long_name)
            else:
                buff = S5Pmsm(self.fid[dsname], data_sel=np.s_[:-1, :])
                ckd.concatenate(buff, axis=1)

        if ckd is not None:
            ckd.set_fillvalue()
            return ckd

        # try the dynamic CKD products
        ckd_file = self.ckd_dir / 'OCAL' / 'ckd.readnoise.detector4.nc'
        with h5py.File(ckd_file, 'r') as fid:
            for band in bands:
                dsname = f'/BAND{band}/readout_noise_swir'

                if not ckd:
                    ckd = S5Pmsm(fid[dsname],
                                 datapoint=True, data_sel=np.s_[:-1, :])
                    ckd.set_long_name(long_name)
                else:
                    buff = S5Pmsm(fid[dsname],
                                  datapoint=True, data_sel=np.s_[:-1, :])
                    ckd.concatenate(buff, axis=1)

        ckd.set_fillvalue()
        return ckd

        Returns noise CKD, SWIR only

        Notes
        -----
        * SWIR row 257 is excluded.
        * The noise CKD has no error attached to it.
        
Returns noise CKD, SWIR only
Notes

SWIR row 257 is excluded.
The noise CKD has no error attached to it.
Returns noise CKD SWIR only Notes SWIR row 257 is excluded . The noise CKD has no error attached to it .
def noise(self, bands='78'):
        if len(bands) > 2:
            raise ValueError('read per band or channel, only')
        if '7' not in bands and '8' not in bands:
            raise ValueError('noise CKD is only available for SWIR')
        ckd = None
        long_name = 'SWIR noise CKD'
        for band in bands:
            dsname = f'/BAND{band}/readout_noise_swir'
            if dsname not in self.fid:
                continue
            if not ckd:
                ckd = S5Pmsm(self.fid[dsname], data_sel=np.s_[:-1, :])
                ckd.set_long_name(long_name)
            else:
                buff = S5Pmsm(self.fid[dsname], data_sel=np.s_[:-1, :])
                ckd.concatenate(buff, axis=1)
        if ckd is not None:
            ckd.set_fillvalue()
            return ckd
        ckd_file = self.ckd_dir / 'OCAL' / 'ckd.readnoise.detector4.nc'
        with h5py.File(ckd_file, 'r') as fid:
            for band in bands:
                dsname = f'/BAND{band}/readout_noise_swir'
                if not ckd:
                    ckd = S5Pmsm(fid[dsname],
                                 datapoint=True, data_sel=np.s_[:-1, :])
                    ckd.set_long_name(long_name)
                else:
                    buff = S5Pmsm(fid[dsname],
                                  datapoint=True, data_sel=np.s_[:-1, :])
                    ckd.concatenate(buff, axis=1)
        ckd.set_fillvalue()
        return ckd
def noise ( self , bands = '78' ) : if len ( bands ) > 2 : raise ValueError ( 'read per band or channel, only' ) if '7' not in bands and '8' not in bands : raise ValueError ( 'noise CKD is only available for SWIR' ) ckd = None long_name = 'SWIR noise CKD' for band in bands : dsname = f'/BAND{band}/readout_noise_swir' if dsname not in self . fid : continue if not ckd : ckd = S5Pmsm ( self . fid [ dsname ] , data_sel = np . s_ [ : - 1 , : ] ) ckd . set_long_name ( long_name ) else : buff = S5Pmsm ( self . fid [ dsname ] , data_sel = np . s_ [ : - 1 , : ] ) ckd . concatenate ( buff , axis = 1 ) if ckd is not None : ckd . set_fillvalue ( ) return ckd ckd_file = self . ckd_dir / 'OCAL' / 'ckd.readnoise.detector4.nc' with h5py . File ( ckd_file , 'r' ) as fid : for band in bands : dsname = f'/BAND{band}/readout_noise_swir' if not ckd : ckd = S5Pmsm ( fid [ dsname ] , datapoint = True , data_sel = np . s_ [ : - 1 , : ] ) ckd . set_long_name ( long_name ) else : buff = S5Pmsm ( fid [ dsname ] , datapoint = True , data_sel = np . s_ [ : - 1 , : ] ) ckd . concatenate ( buff , axis = 1 ) ckd . set_fillvalue ( ) return ckd
Returns noise CKD, SWIR only
Notes
Returns noise CKD SWIR only Notes
"""
        Returns noise CKD, SWIR only

        Notes
        -----
        * SWIR row 257 is excluded.
        * The noise CKD has no error attached to it.
        """ # try the Static CKD product, first # try the dynamic CKD products
self
bands