calculation
- QhX.calculation.get_full_width(x: ndarray, y: ndarray, peak: ndarray, height: float = 0.5) tuple [source]
Calculate the error of the determined period using the FWHM method and determine quantiles. This function calculates the error of the determined period using the Full Width at Half Maximum (FWHM) method. It is part of a post-mortem analysis to estimate the period uncertainty based on the Mean Noise Power Level (MNPL) in the vicinity of the peak. The function detects the FWHM of a peak and then calculates the points between the 25th and 75th quantile to find MNPL.
Parameters:
x (np.ndarray): An array containing the x-axis values (e.g., time).
y (np.ndarray): An array containing the corresponding y-axis values (e.g., intensity).
peak (np.ndarray): An array containing the indices of determined peaks.
height (float, optional): The fraction of the peak’s maximum height to define the FWHM. Default is 0.5.
Returns:
tuple: A tuple containing six arrays of results:
er1: An array of lower x-values for quantiles.
er3: An array of upper x-values for quantiles.
quantiles: An array of quantiles (25th and 75th percentile) calculated from peak data.
phmax: An array of half the peak’s maximum height.
x_lows: An array of lower x-values corresponding to the FWHM.
x_highs: An array of upper x-values corresponding to the FWHM.
- QhX.calculation.periods(lcID, data, ngrid, plot=False, save=False, peakHeight=0.6, prominence=0.7, minfq=None, maxfq=None, xlim=None)[source]
Perform period determination for the output of hybrid2d data. This function analyzes correlation data to determine periods of a light curve.
Parameters:
lcID (int): ID of the light curve.
data (numpy.ndarray): Auto-correlation matrix.
ngrid (int): Number of values for controlling WWZ execution (see inp_param function).
plot (bool): True if a plot is desired, False otherwise.
save (bool): True to save the plot, False otherwise.
peakHeight (float): Maximum peak height for peak detection.
prominence (float): Prominence threshold for peak determination.
minfq (float, optional): Minimum frequency for analysis. Default is None.
maxfq (float, optional): Maximum frequency for analysis. Default is None.
xlim (tuple, optional): Set the x-axis limits for the plot. Default is None.
Returns:
A tuple containing:
idx_peaks (list): Indices of detected peaks.
yax (numpy.ndarray): Processed data.
r_peaks (list): Detected periods.
r_peaks_err_upper (list): Upper errors of corresponding periods.
r_peaks_err_lower (list): Lower errors of corresponding periods.
- QhX.calculation.signif_johnson(numlc, peak, idx_peaks, yax, tt, yy, ntau, ngrid, f=2, peakHeight=0.6, minfq=None, maxfq=None, algorithm='wwz', method='linear', use_mag_errors=False, err_mag=None)[source]
Assess the significance of detected peaks in light curve data using the Johnson method, with an option to incorporate magnitude errors into the analysis.
Parameters and returns are the same as described before.