src/pys5p/l1b_patch.py
def prnu(self) -> None:
        """
        Patch pixel response non-uniformity correction.

        Patched dataset: 'radiance' ('radiance_error' and 'radiance_noise'?)

        Requires (naive approach):
        * reverse applied radiance calibration
        * reverse applied stray-light correction
        * reverse applied PRNU correction
        * apply (alternative) PRNU correction
        * apply (alternative) stray-light correction
        * apply (alternative) radiance calibration

        Alternative: neglect impact stray-light, but apply patch to correct for
        spectral features.

        Parameters
        ----------
        None

        Returns
        -------
        None

        Notes
        -----
        It is assumed that for the PRNU correction the CKD has to be multiplied
        with the pixel signals.
        """
        if not self.l1b_patched.is_file():
            shutil.copy(self.l1b_product, self.l1b_patched)

        # read original data
        with L1BioRAD(self.l1b_product) as l1b:
            band = l1b.select('STANDARD_MODE')
            data = l1b.get_msm_data('radiance')

        # read required CKD's

        # patch dataset 'radiance'

        # write patched dataset to new product
        with L1BioRAD(self.l1b_patched, readwrite=True) as l1b:
            res = l1b.select('STANDARD_MODE')
            if res != band:
                raise ValueError(_MSG_ERR_IO_BAND_)
            l1b.set_msm_data('radiance', data)

        Patch pixel response non-uniformity correction.

        Patched dataset: 'radiance' ('radiance_error' and 'radiance_noise'?)

        Requires (naive approach):
        * reverse applied radiance calibration
        * reverse applied stray-light correction
        * reverse applied PRNU correction
        * apply (alternative) PRNU correction
        * apply (alternative) stray-light correction
        * apply (alternative) radiance calibration

        Alternative: neglect impact stray-light, but apply patch to correct for
        spectral features.

        Parameters
        ----------
        None

        Returns
        -------
        None

        Notes
        -----
        It is assumed that for the PRNU correction the CKD has to be multiplied
        with the pixel signals.
        
Patch pixel response non-uniformity correction.

Requires (naive approach):
reverse applied radiance calibration
reverse applied stray-light correction
reverse applied PRNU correction
apply (alternative) PRNU correction
apply (alternative) stray-light correction
apply (alternative) radiance calibration

neglect impact stray-light, but apply patch to correct for
spectral features.

Parameters

None

Returns

None

Notes

It is assumed that for the PRNU correction the CKD has to be multiplied
with the pixel signals.
Patch pixel response non - uniformity correction . Requires ( naive approach ) : reverse applied radiance calibration reverse applied stray - light correction reverse applied PRNU correction apply ( alternative ) PRNU correction apply ( alternative ) stray - light correction apply ( alternative ) radiance calibration neglect impact stray - light but apply patch to correct for spectral features . Parameters None Returns None Notes It is assumed that for the PRNU correction the CKD has to be multiplied with the pixel signals .
def prnu(self) -> None:
        if not self.l1b_patched.is_file():
            shutil.copy(self.l1b_product, self.l1b_patched)
        with L1BioRAD(self.l1b_product) as l1b:
            band = l1b.select('STANDARD_MODE')
            data = l1b.get_msm_data('radiance')
        with L1BioRAD(self.l1b_patched, readwrite=True) as l1b:
            res = l1b.select('STANDARD_MODE')
            if res != band:
                raise ValueError(_MSG_ERR_IO_BAND_)
            l1b.set_msm_data('radiance', data)
def prnu ( self ) -> None : if not self . l1b_patched . is_file ( ) : shutil . copy ( self . l1b_product , self . l1b_patched ) with L1BioRAD ( self . l1b_product ) as l1b : band = l1b . select ( 'STANDARD_MODE' ) data = l1b . get_msm_data ( 'radiance' ) with L1BioRAD ( self . l1b_patched , readwrite = True ) as l1b : res = l1b . select ( 'STANDARD_MODE' ) if res != band : raise ValueError ( _MSG_ERR_IO_BAND_ ) l1b . set_msm_data ( 'radiance' , data )
Patch pixel response non-uniformity correction.
Patch pixel response non - uniformity correction .
"""
        Patch pixel response non-uniformity correction.

        Patched dataset: 'radiance' ('radiance_error' and 'radiance_noise'?)

        Requires (naive approach):
        * reverse applied radiance calibration
        * reverse applied stray-light correction
        * reverse applied PRNU correction
        * apply (alternative) PRNU correction
        * apply (alternative) stray-light correction
        * apply (alternative) radiance calibration

        Alternative: neglect impact stray-light, but apply patch to correct for
        spectral features.

        Parameters
        ----------
        None

        Returns
        -------
        None

        Notes
        -----
        It is assumed that for the PRNU correction the CKD has to be multiplied
        with the pixel signals.
        """ # read original data # read required CKD's # patch dataset 'radiance' # write patched dataset to new product
self