feets package

Subpackages

Submodules

feets.core module

core functionalities of feets

exception feets.core.FeatureNotFound[source]

Bases: ValueError

exception feets.core.DataRequiredError[source]

Bases: ValueError

class feets.core.FeatureSpace(data=None, only=None, exclude=None, **kwargs)[source]

Bases: object

Wrapper class, to allow user select the features based on the available time series vectors (magnitude, time, error, second magnitude, etc.) or specify a list of features. The finally selected features for the execution plan are are those that satisfy all the filters.

Parameters:

data : array-like, optional, default None

available time series vectors, which will output all the features that need this data to be calculated.

only : array-like, optional, default None

List of features, which will output all the features in the list.

exclude : array-like, optional, default None

List of features, which will not output

kwargs

Extra configuration for the feature extractors. format is Feature_name={param1: value, param2: value, ...}

Examples

List of features as an input:

>>> fs = feets.FeatureSpace(only=['Std'])
>>> features, values = fs.extract(*lc)
>>> dict(zip(features, values))
{"Std": .42}

Available data as an input:

>>> fs = feets.FeatureSpace(data=['magnitude','time'])
>>> features, values = fs.extract(*lc)
>>> dict(zip(features, values))
{...}

List of features and available data as an input:

>>> fs = feets.FeatureSpace(
...     only=['Mean','Beyond1Std', 'CAR_sigma','Color'],
...     data=['magnitude', 'error'])
>>> features, values = fs.extract(*lc)
>>> dict(zip(features, values))
{"Beyond1Std": ..., "Mean": ...}

Excluding list as an input

>>> fs = feets.FeatureSpace(
...     only=['Mean','Beyond1Std','CAR_sigma','Color'],
...     data=['magnitude', 'error'],
...     exclude=["Beyond1Std"])
>>> features, values = fs.extract(**lc)
>>> dict(zip(features, values))
{"Mean": 23}

Attributes

data
excecution_plan_
exclude
features_
features_as_array_
features_by_data_
features_extractors_
kwargs
only
required_data_

Methods

dict_data_as_array(d)
extract([time, magnitude, error, …])
data
dict_data_as_array(d)[source]
excecution_plan_
exclude
extract(time=None, magnitude=None, error=None, magnitude2=None, aligned_time=None, aligned_magnitude=None, aligned_magnitude2=None, aligned_error=None, aligned_error2=None)[source]
features_
features_as_array_
features_by_data_
features_extractors_
kwargs
only
required_data_

feets.preprocess module

feets.preprocess.remove_noise(time, magnitude, error, error_limit=3, std_limit=5)[source]

Points within ‘std_limit’ standard deviations from the mean and with errors greater than ‘error_limit’ times the error mean are considered as noise and thus are eliminated.

feets.preprocess.align(time, time2, magnitude, magnitude2, error, error2)[source]

Synchronizes the light-curves in the two different bands.

Returns:

aligned_time

aligned_magnitude

aligned_magnitude2

aligned_error

aligned_error2

Module contents

feets: feATURE eXTRACTOR FOR tIME sERIES.

In time-domain astronomy, data gathered from the telescopes is usually represented in the form of light-curves. These are time series that show the brightness variation of an object through a period of time (for a visual representation see video below). Based on the variability characteristics of the light-curves, celestial objects can be classified into different groups (quasars, long period variables, eclipsing binaries, etc.) and consequently be studied in depth independentely.

In order to characterize this variability, some of the existing methods use machine learning algorithms that build their decision on the light-curves features. Features, the topic of the following work, are numerical descriptors that aim to characterize and distinguish the different variability classes. They can go from basic statistical measures such as the mean or the standard deviation, to complex time-series characteristics such as the autocorrelation function.

In this package we present a library with a compilation of some of the existing light-curve features. The main goal is to create a collaborative and open tool where every user can characterize or analyze an astronomical photometric database while also contributing to the library by adding new features. However, it is important to highlight that this library is not restricted to the astronomical field and could also be applied to any kind of time series.

Our vision is to be capable of analyzing and comparing light-curves from all the available astronomical catalogs in a standard and universal way. This would facilitate and make more efficient tasks as modelling, classification, data cleaning, outlier detection and data analysis in general. Consequently, when studying light-curves, astronomers and data analysts would be on the same wavelength and would not have the necessity to find a way of comparing or matching different features. In order to achieve this goal, the library should be run in every existent survey (MACHO, EROS, OGLE, Catalina, Pan-STARRS, etc) and future surveys (LSST) and the results should be ideally shared in the same open way as this library.