def _get_coarse_dataset(self, key, info):
        """Get the coarse dataset refered to by `key` from the XML data."""
        angles = self.root.find('.//Tile_Angles')
        if key in ['solar_zenith_angle', 'solar_azimuth_angle']:
            elts = angles.findall(info['xml_tag'] + '/Values_List/VALUES')
            return np.array([[val for val in elt.text.split()] for elt in elts],
                            dtype=np.float)

        elif key in ['satellite_zenith_angle', 'satellite_azimuth_angle']:
            arrays = []
            elts = angles.findall(info['xml_tag'] + '[@bandId="1"]')
            for elt in elts:
                items = elt.findall(info['xml_item'] + '/Values_List/VALUES')
                arrays.append(np.array([[val for val in item.text.split()] for item in items],
                                       dtype=np.float))
            return np.nanmean(np.dstack(arrays), -1)
        else:
            return
def _get_coarse_dataset ( self , key , info ) : angles = self . root . find ( './/Tile_Angles' ) if key in [ 'solar_zenith_angle' , 'solar_azimuth_angle' ] : elts = angles . findall ( info [ 'xml_tag' ] + '/Values_List/VALUES' ) return np . array ( [ [ val for val in elt . text . split ( ) ] for elt in elts ] , dtype = np . float ) elif key in [ 'satellite_zenith_angle' , 'satellite_azimuth_angle' ] : arrays = [ ] elts = angles . findall ( info [ 'xml_tag' ] + '[@bandId="1"]' ) for elt in elts : items = elt . findall ( info [ 'xml_item' ] + '/Values_List/VALUES' ) arrays . append ( np . array ( [ [ val for val in item . text . split ( ) ] for item in items ] , dtype = np . float ) ) return np . nanmean ( np . dstack ( arrays ) , - 1 ) else : return
Get the coarse dataset refered to by `key` from the XML data.