MicroLIA.extract_features

Created on Thu Jan 12 14:30:12 2017

@author: danielgodinez

Module Contents

Functions

extract_all(→ Union[numpy.ndarray, ...)

This function will compute the statistics used to train the RF.

MicroLIA.extract_features.extract_all(time: numpy.typing.ArrayLike, mag: numpy.typing.ArrayLike, magerr: numpy.typing.ArrayLike, apply_weights: bool = True, feats_to_use: Optional[List[int]] = None, convert: bool = True, zp: float = 24, return_names: bool = False) Union[numpy.ndarray, Tuple[numpy.ndarray, List[str]]][source]

This function will compute the statistics used to train the RF. Amplitude dependent features are computed first, after which the mag/flux is normalized by the maximum value to compute the remanining features. By default a conversion from mag to flux is performed. If input is in flux or you wish to work in mag, set convert to False.

Parameters:

timearray

Time of observations

magarray

Magnitude array.

magerrarray

Corresponing photometric errors.

apply_weightsbool, optional

Whether to apply weights based on the magnitude errors. Defaults to True.

feats_to_usearray

Array containing indices of features to use. This will be used to index the columns in the data array. Defaults to None, in which case all columns in the data array are used.

convertboolean, optional

If False the features are computed with the input magnitudes, defaults to True to convert and compute in flux.

zpfloat

Zeropoint of the instrument, only used if convert=True. Defaults to 24.

return_namesbool

If True the first output will be the stats array, and the second will be the list of corresponding feature names. Defaults to False, in which case only the stats array is returned.

Returns:

array

All features to use for classification.