eloy.flux#
Differential photometry and flux optimization routines.
This module provides functions for computing differential fluxes, optimizing comparison star weights, and selecting optimal flux indices.
Functions#
|
Returns the weights computed using Broeg 2005. |
|
Returns differential fluxes. |
|
Automatically compute differential fluxes and optimal weights for 1D flux array. |
|
Automatically compute differential fluxes and optimal weights for 2D or 3D flux array. |
|
Select the optimal flux index based on a given criterion. |
Module Contents#
- eloy.flux.weights(fluxes: numpy.ndarray, tolerance: float = 0.001, max_iteration: int = 200, bins: int = 5)[source]#
Returns the weights computed using Broeg 2005.
- Parameters:
fluxes (np.ndarray) – Fluxes matrix with dimensions (star, flux) or (aperture, star, flux).
tolerance (float, optional) – Minimum standard deviation of weights difference to attain (weights are stable).
max_iteration (int, optional) – Maximum number of iterations to compute weights.
bins (int, optional) – Binning size (in number of points) to compute the white noise.
- Returns:
Broeg weights.
- Return type:
np.ndarray
- eloy.flux.diff(fluxes: numpy.ndarray, weights: numpy.ndarray = None)[source]#
Returns differential fluxes.
If weights are specified, they are used to produce an artificial light curve by which all flux are differentiated (see Broeg 2005).
- Parameters:
fluxes (np.ndarray) – Fluxes matrix with dimensions (star, flux) or (aperture, star, flux).
weights (np.ndarray, optional) – Weights matrix with dimensions (star) or (aperture, star).
- Returns:
Differential fluxes if weights is provided, else normalized fluxes.
- Return type:
np.ndarray
- eloy.flux.auto_diff_1d(fluxes, i=None)[source]#
Automatically compute differential fluxes and optimal weights for 1D flux array.
- Parameters:
fluxes (np.ndarray) – Fluxes array.
i (int or None, optional) – Index of the target star.
- Returns:
Tuple (differential fluxes, weights).
- Return type:
tuple
- eloy.flux.auto_diff(fluxes: numpy.array, i: int = None)[source]#
Automatically compute differential fluxes and optimal weights for 2D or 3D flux array.
- Parameters:
fluxes (np.ndarray) – Fluxes array.
i (int or None, optional) – Index of the target star.
- Returns:
Differential fluxes and weights.
- Return type:
tuple or tuple of arrays
- eloy.flux.optimal_flux(diff_fluxes, method='stddiff', sigma=4)[source]#
Select the optimal flux index based on a given criterion.
- Parameters:
diff_fluxes (np.ndarray) – Differential fluxes array.
method (str, optional) – Criterion method: “binned”, “stddiff”, or “stability”.
sigma (float, optional) – Sigma clipping threshold.
- Returns:
Index of the optimal flux.
- Return type:
int