smurfs.FFinder

class FFinder(smurfs, f_min=None, f_max=None)[source]

The FFinder object computes all frequencies according to the input parameters. After instantiating this object, use the run method to start the computation of frequencies.

Parameters
  • smurfsSmurfs object

  • f_min (Optional[float]) – Lower bound frequency that is considered

  • f_max (Optional[float]) – Upper bound frequency that is considered

run(snr=4, window_size=2, skip_similar=False, similar_chancel=True, extend_frequencies=0, improve_fit=True, mode='lmfit', frequency_detection=None)[source]

Starts the frequency extraction from a light curve. In general, it always uses the frequency of maximum power and removes it from the light curve. In general, this process is repeated until we reach a frequency that has a SNR below the lower SNR bound. It is possible to extend this process, by setting the extend_frequencies parameter. It then stops after extend_frequencies insignificant frequencies are found. If similar_chancel is set, the process also stops after 10 frequencies with a standard deviation of 0.05 were found in a row.

Parameters
  • snr (float) – Lower bound Signal to noise ratio

  • window_size (float) – Window size, to compute the SNR

  • skip_similar (bool) – If this is set and 10 frequencies with a standard deviation of 0.05 were found in a row, that region will be ignored for all further analysis.

  • similar_chancel – If this is set and skip_similar is False, the run chancels after 10 frequencies with a standard deviation of 0.05 were found in a row.

  • extend_frequencies (int) – Defines the number of insignificant frequencies, the analysis extends to.

  • improve_fit – If this is set, the combination of frequencies are fitted to the data set to improve the parameters

  • mode – Fitting mode. Can be either ‘lmfit’ or ‘scipy’

  • frequency_detection – If this value is not None and the ratio between the amplitude of the found frequency and the amplitude of the frequency in the original spectrum exceeds this value, this frequency is ignored.

Return type

DataFrame

Returns

Pandas dataframe, consisting of the results for the analysis. Consists of a Frequency object, frequency, amplitude, phase, snr, residual noise and a significance flag.

plot(ax=None, show=False, plot_insignificant=False, **kwargs)[source]

Plots the periodogram of the data set, including the found frequencies.

Parameters
  • ax (Optional[Axes]) – Axes object

  • show – Show flag, if True, pylab.show is called

  • plot_insignificant – If True, insignificant frequencies are shown

  • kwargs – kwargs for Periodogram.plot

improve_result()[source]

Improves the result by fitting the combined result to the original light curve

Return type

DataFrame