src/pys5p/lv2_io.py
def __h5_geo_bounds(self, extent, data_sel):
        """
        read bounds of latitude/longitude from operational products using HDF5
        """
        indx = None
        if extent is not None:
            if len(extent) != 4:
                raise ValueError('parameter extent must have 4 elements')

            lats = self.fid['/PRODUCT/latitude'][0, ...]
            lons = self.fid['/PRODUCT/longitude'][0, ...]

            indx = ((lons >= extent[0]) & (lons <= extent[1])
                    & (lats >= extent[2]) & (lats <= extent[3])).nonzero()
            data_sel = np.s_[indx[0].min():indx[0].max(),
                             indx[1].min():indx[1].max()]

        gid = self.fid['/PRODUCT/SUPPORT_DATA/GEOLOCATIONS']
        if data_sel is None:
            lat_bounds = gid['latitude_bounds'][0, ...]
            lon_bounds = gid['longitude_bounds'][0, ...]
        else:
            data_sel0 = (0,) + data_sel + (slice(None),)
            lat_bounds = gid['latitude_bounds'][data_sel0]
            lon_bounds = gid['longitude_bounds'][data_sel0]

        return (data_sel, lon_bounds, lat_bounds)

        read bounds of latitude/longitude from operational products using HDF5
        
read bounds of latitude/longitude from operational products using HDF5
read bounds of latitude / longitude from operational products using HDF5
def __h5_geo_bounds(self, extent, data_sel):
        indx = None
        if extent is not None:
            if len(extent) != 4:
                raise ValueError('parameter extent must have 4 elements')
            lats = self.fid['/PRODUCT/latitude'][0, ...]
            lons = self.fid['/PRODUCT/longitude'][0, ...]
            indx = ((lons >= extent[0]) & (lons <= extent[1])
                    & (lats >= extent[2]) & (lats <= extent[3])).nonzero()
            data_sel = np.s_[indx[0].min():indx[0].max(),
                             indx[1].min():indx[1].max()]
        gid = self.fid['/PRODUCT/SUPPORT_DATA/GEOLOCATIONS']
        if data_sel is None:
            lat_bounds = gid['latitude_bounds'][0, ...]
            lon_bounds = gid['longitude_bounds'][0, ...]
        else:
            data_sel0 = (0,) + data_sel + (slice(None),)
            lat_bounds = gid['latitude_bounds'][data_sel0]
            lon_bounds = gid['longitude_bounds'][data_sel0]
        return (data_sel, lon_bounds, lat_bounds)
def __h5_geo_bounds ( self , extent , data_sel ) : indx = None if extent is not None : if len ( extent ) != 4 : raise ValueError ( 'parameter extent must have 4 elements' ) lats = self . fid [ '/PRODUCT/latitude' ] [ 0 , ... ] lons = self . fid [ '/PRODUCT/longitude' ] [ 0 , ... ] indx = ( ( lons >= extent [ 0 ] ) & ( lons <= extent [ 1 ] ) & ( lats >= extent [ 2 ] ) & ( lats <= extent [ 3 ] ) ) . nonzero ( ) data_sel = np . s_ [ indx [ 0 ] . min ( ) : indx [ 0 ] . max ( ) , indx [ 1 ] . min ( ) : indx [ 1 ] . max ( ) ] gid = self . fid [ '/PRODUCT/SUPPORT_DATA/GEOLOCATIONS' ] if data_sel is None : lat_bounds = gid [ 'latitude_bounds' ] [ 0 , ... ] lon_bounds = gid [ 'longitude_bounds' ] [ 0 , ... ] else : data_sel0 = ( 0 , ) + data_sel + ( slice ( None ) , ) lat_bounds = gid [ 'latitude_bounds' ] [ data_sel0 ] lon_bounds = gid [ 'longitude_bounds' ] [ data_sel0 ] return ( data_sel , lon_bounds , lat_bounds )
read bounds of latitude/longitude from operational products using HDF5
read bounds of latitude / longitude from operational products using HDF5
"""
        read bounds of latitude/longitude from operational products using HDF5
        """
self
extent
data_sel