
    IR-e                     N    d dl Z d dlZd dlmZ d dlmZ dgZ G d d          ZdS )    N)BinnedTimeSeries)
TimeSeriesBasePeriodogramc                   J    e Zd Zej        dd            Ze	 dd            ZdS )r   Nc                     d S N )selftydys       Dlib/python3.11/site-packages/astropy/timeseries/periodograms/base.py__init__zBasePeriodogram.__init__   s        c                    |t          d          ||         }t          j        |           }t          |t                    r)||         }|t          j        |           z  }||         }n|}t          |t
                    r|j        }n,t          |t                    r|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   time_bin_center	TypeError)	cls
timeseriessignal_column_nameuncertaintykwargsr   keepr   r   s	            r   from_timeserieszBasePeriodogram.from_timeseries   s    , %VWWW)*|k3'' 	K(BRXb\\M!DDBBBj*-- 	?DD
$455 	-DD1  
 s4:qw8828888r   r   )NN)__name__
__module____qualname__abcabstractmethodr   classmethodr    r	   r   r   r   r      sY            >B,9 ,9 ,9 [,9 ,9 ,9r   )	r$   numpyr   astropy.timeseries.binnedr   astropy.timeseries.sampledr   __all__r   r	   r   r   <module>r+      sx    



     6 6 6 6 6 6 1 1 1 1 1 1
29 29 29 29 29 29 29 29 29 29r   