U
    d»{j¯  ã                   @   s@   d dl Z d dlZd dlmZ d dlmZ dgZG dd„ dƒZdS )é    N)ÚBinnedTimeSeries)Ú
TimeSeriesÚBasePeriodogramc                   @   s*   e Zd Zejddd„ƒZeddd„ƒZdS )r   Nc                 C   s   d S )N© )ÚselfÚtÚyÚdyr   r   úc/var/www/html/bwave/python/venv/lib/python3.8/site-packages/astropy/timeseries/periodograms/base.pyÚ__init__   s    zBasePeriodogram.__init__c           	      K   sž   |dkrt dƒ‚|| }t |¡ }t|tƒrP|| }|t |¡ M }|| }n|}t|tƒrf|j}nt|tƒrx|j}nt	dƒ‚| || || fd|i|—ŽS )aø  
        Initialize a periodogram from a time series object.

        If a binned time series is passed, the time at the center of the bins is
        used. Also note that this method automatically gets rid of NaN/undefined
        values when initializing the periodogram.

        Parameters
        ----------
        signal_column_name : str
            The name of the column containing the signal values to use.
        uncertainty : str or float or `~astropy.units.Quantity`, optional
            The name of the column containing the errors on the signal, or the
            value to use for the error, if a scalar.
        **kwargs
            Additional keyword arguments are passed to the initializer for this
            periodogram class.
        Nz7signal_column_name should be set to a valid column namezIInput time series should be an instance of TimeSeries or BinnedTimeSeriesr	   )
Ú
ValueErrorÚnpÚisnanÚ
isinstanceÚstrr   Útimer   Ztime_bin_centerÚ	TypeError)	ÚclsZ
timeseriesZsignal_column_nameZuncertaintyÚkwargsr   Zkeepr	   r   r   r   r
   Úfrom_timeseries   s"    



ÿzBasePeriodogram.from_timeseries)N)NN)Ú__name__Ú
__module__Ú__qualname__ÚabcÚabstractmethodr   Úclassmethodr   r   r   r   r
   r      s      ÿ)	r   Únumpyr   Zastropy.timeseries.binnedr   Zastropy.timeseries.sampledr   Ú__all__r   r   r   r   r
   Ú<module>   s
   