periodogram#
- elk.stats.periodogram(time, flux, flux_err, frequencies, n_bootstrap=100, max_peaks=25, freq_thresh=5)[source]#
Generate a bootstrapped Lomb-Scargle periodogram and various associated statistics
- Parameters
- time
ndarray Times of observations
- flux
ndarray Flux for each observations
- flux_err
ndarray Errors on the fluxes
- frequencies
ndarray Frequencies at which to evaluate the periodogram
- n_bootstrapint, optional
How many bootstraps to perform, by default 100
- max_peaksint, optional
Fixed number of max peaks to return, by default 25. If None is given then the number of peaks that exist will be returned rather than truncated/padded to this fixed number.
- freq_threshint, optional
Threshold for high vs. low frequency, by default 5 days since this represents a threshold of how different stars vary McQuillan+2012.
- time
- Returns
- med
ndarray Median power at each frequency
- percentiles
ndarray 1 and 2-sigma power at each frequency (in order of 2-, 1-, 1+, 2+) with shape (4, len(frequencies))
- lsp_statsdict
Dictionary of various statistics related to the periodogram. Keys are: [“max_power”, “freq_at_max_power”, “peak_freqs”, “power_at_peaks”, “n_peaks”, “ratio_of_power_at_high_v_low_freq”]. Many of these are self explanatory but we note that peak_freqs and power_at_peaks will always have a length of max_peaks may need to be masked to just take the first n_peaks. (This feature is useful when saving to a FITS file with a required fixed column width).
- med