pyroSAR/S1/auxil.py
def match(self, timestamp, osvtype='POE'):
        """
        return the corresponding OSV file for the provided time stamp.
        The file returned is one which covers the acquisition time and, if multiple exist,
        the one which was published last.
        In case a list of options is provided as osvtype, the file of higher accuracy (i.e. POE over RES) is returned.

        Parameters
        ----------
        timestamp: str
            the time stamp in the format 'YYYmmddTHHMMSS'
        osvtype: {'POE', 'RES'} or list
            the type of orbit files required; either 'POE', 'RES' or a list of both

        Returns
        -------
        str
            the best matching orbit file (overlapping time plus latest publication date)
        """
        # list all locally existing files of the defined type
        if osvtype in ['POE', 'RES']:
            locals = self.getLocals(osvtype)
            # filter the files to those which contain data for the defined time stamp
            files = [x for x in locals if self.date(x, 'start') <= timestamp <= self.date(x, 'stop')]
            if len(files) > 0:
                # select the file which was published last
                best = self.sortByDate(files, 'publish')[-1]
                return best
            elif len(files) == 1:
                return files[0]
            return None
        elif sorted(osvtype) == ['POE', 'RES']:
            best = self.match(timestamp, 'POE')
            if not best:
                best = self.match(timestamp, 'RES')
            return best

        return the corresponding OSV file for the provided time stamp.
        The file returned is one which covers the acquisition time and, if multiple exist,
        the one which was published last.
        In case a list of options is provided as osvtype, the file of higher accuracy (i.e. POE over RES) is returned.

        Parameters
        ----------
        timestamp: str
            the time stamp in the format 'YYYmmddTHHMMSS'
        osvtype: {'POE', 'RES'} or list
            the type of orbit files required; either 'POE', 'RES' or a list of both

        Returns
        -------
        str
            the best matching orbit file (overlapping time plus latest publication date)
        
return the corresponding OSV file for the provided time stamp.
The file returned is one which covers the acquisition time and, if multiple exist,
the one which was published last.
In case a list of options is provided as osvtype, the file of higher accuracy  is returned.

Parameters



Returns

str
the best matching orbit file (overlapping time plus latest publication date)
return the corresponding OSV file for the provided time stamp . The file returned is one which covers the acquisition time and if multiple exist the one which was published last . In case a list of options is provided as osvtype the file of higher accuracy is returned . Parameters Returns str the best matching orbit file ( overlapping time plus latest publication date )
def match(self, timestamp, osvtype='POE'):
        if osvtype in ['POE', 'RES']:
            locals = self.getLocals(osvtype)
            files = [x for x in locals if self.date(x, 'start') <= timestamp <= self.date(x, 'stop')]
            if len(files) > 0:
                best = self.sortByDate(files, 'publish')[-1]
                return best
            elif len(files) == 1:
                return files[0]
            return None
        elif sorted(osvtype) == ['POE', 'RES']:
            best = self.match(timestamp, 'POE')
            if not best:
                best = self.match(timestamp, 'RES')
            return best
def match ( self , timestamp , osvtype = 'POE' ) : if osvtype in [ 'POE' , 'RES' ] : locals = self . getLocals ( osvtype ) files = [ x for x in locals if self . date ( x , 'start' ) <= timestamp <= self . date ( x , 'stop' ) ] if len ( files ) > 0 : best = self . sortByDate ( files , 'publish' ) [ - 1 ] return best elif len ( files ) == 1 : return files [ 0 ] return None elif sorted ( osvtype ) == [ 'POE' , 'RES' ] : best = self . match ( timestamp , 'POE' ) if not best : best = self . match ( timestamp , 'RES' ) return best
return the corresponding OSV file for the provided time stamp.
return the corresponding OSV file for the provided time stamp .
"""
        return the corresponding OSV file for the provided time stamp.
        The file returned is one which covers the acquisition time and, if multiple exist,
        the one which was published last.
        In case a list of options is provided as osvtype, the file of higher accuracy (i.e. POE over RES) is returned.

        Parameters
        ----------
        timestamp: str
            the time stamp in the format 'YYYmmddTHHMMSS'
        osvtype: {'POE', 'RES'} or list
            the type of orbit files required; either 'POE', 'RES' or a list of both

        Returns
        -------
        str
            the best matching orbit file (overlapping time plus latest publication date)
        """ # list all locally existing files of the defined type # filter the files to those which contain data for the defined time stamp # select the file which was published last
self
timestamp
osvtype