Skip to content
Snippets Groups Projects
Algorithm.py 1.1 KiB
Newer Older
  • Learn to ignore specific revisions
  • """Algorithm Interface."""
    
        """Base class for geomag algorithms
    
        Parameters
        ----------
        channels: array_like
            the list of channels to be processed.
    
        Notes
        -----
        An algorithm processes a stream of timeseries to produce new timeseries.
    
        def __init__(self, channels=None):
            self._channels = channels
            pass
    
    
            """Process a stream of data.
    
    
            Parameters
            ----------
            stream : obspy.core.Stream
                input data
    
            Returns
            -------
            obspy.core.Stream
                resulting data
            """
            return stream.copy()
    
            """Get input channels
    
            Returns
            -------
            array_like
                list of channels the algorithm needs to operate.
            """
    
            return self._channels
    
        def get_output_channels(self):
    
            """Get output channels
    
            Returns
            -------
            array_like
                list of channels the algorithm will be returning.
            """