Feature extractor from noisy time series
Project description
light-curve
processing toolbox for Python
This package provides a collection of light curve feature extractions classes.
Feature evaluators
Most of the classes implement various feature evaluators useful for astrophysical sources classification and characterisation using their light curves.
import light_curve as lc
import numpy as np
# Time values can be non-evenly separated but must be an ascending array
t = np.linspace(0.0, 1.0, 101)
perfect_m = 1e3 * t + 1e2
err = np.sqrt(perfect_m)
m = perfect_m + np.random.normal(0, err)
# Half-amplitude of magnitude
amplitude = lc.Amplitude()
# Fraction of points beyond standard deviations from mean
beyond_std = lc.BeyondNStd(nstd=1)
# Slope, its error and reduced chi^2 of linear fit
linear_fit = lc.LinearFit()
# Feature extractor, it will evaluate all features in more efficient way
extractor = lc.Extractor(amplitude, beyond_std, linear_fit)
# Array with all 5 extracted features
result = extractor(t, m, err)
print('\n'.join(f'{name} = {value:.2f}' for name, value in zip(extractor.names, result)))
dm-dt map
Class DmDt
provides dm–dt mapper (based on Mahabal et al. 2011, Soraisam et al. 2020).
import numpy as np
from light_curve import DmDt
from numpy.testing import assert_array_equal
dmdt = DmDt.from_borders(min_lgdt=0, max_lgdt=np.log10(3), max_abs_dm=3, lgdt_size=2, dm_size=4, norm=[])
t = np.array([0, 1, 2], dtype=np.float32)
m = np.array([0, 1, 2], dtype=np.float32)
desired = np.array(
[
[0, 0, 2, 0],
[0, 0, 0, 1],
]
)
actual = dmdt.points(t, m)
assert_array_equal(actual, desired)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distributions
Close
Hashes for light_curve_python-0.3.0_beta.1.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | d7516f333dd3153a568b8c2ddc13e79bbf73642d11feae2b917bf3e6c66bc7e9 |
|
MD5 | c9205a59b02611f15c9010da5ad3e7f3 |
|
BLAKE2b-256 | 62854fd954672f4e718e319cc1bd90ea2f9aae34ddc75d51e4a5d4316b2d9a8f |
Close
Hashes for light_curve_python-0.3.0_beta.1-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9bac02a41d66234a1054a0bcae7076f661bed03d6282e4d6a7a12596a25bc758 |
|
MD5 | 73dd2e34a859268494f7fa6d03701734 |
|
BLAKE2b-256 | b44eddbf99839192e88ac727f19a75d83cb28f169a463fa009339ff692d65893 |
Close
Hashes for light_curve_python-0.3.0_beta.1-cp39-cp39-macosx_10_7_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 23760cadb47fc3e3bd408334567454a6420f5a87ef84d752ea1d21f5365a9092 |
|
MD5 | 3191dbf3d1e94334563a599847f4d60c |
|
BLAKE2b-256 | f8c5a439e30ca6b1443f786055125358403d096e213fdf37aa5cf0a617230658 |
Close
Hashes for light_curve_python-0.3.0_beta.1-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0bc88e9af94b4595c86432dfa3afaeca6ac6e9c92ca356b6693d108eefd3db72 |
|
MD5 | ac4ba2319f6fdf1d70649780ae98ae74 |
|
BLAKE2b-256 | 403b309668cf88ef1182559f542007f5a2e3fb01a4faa428697b616424432e20 |
Close
Hashes for light_curve_python-0.3.0_beta.1-cp38-cp38-macosx_10_7_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 436bf46c877dae2c2f682b3073b795ac9c0e41ad21d7419e665d8b2bec8ede81 |
|
MD5 | 3ba99911ae153a07df5b2a73af9837c8 |
|
BLAKE2b-256 | 98091ae8bbac05dff9249546adac2c66fa62eb313799c4e9cff89b92e7bedf4d |
Close
Hashes for light_curve_python-0.3.0_beta.1-cp37-cp37m-manylinux_2_5_x86_64.manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 95c92932d9b38f60b35507de9862be2a14e1bf37cd72174cf585141229661762 |
|
MD5 | eda38263309d8cb2ee5313ccc7c20823 |
|
BLAKE2b-256 | 70843a9084f7543ef7f96ba8f5c0d71083bc96b6f098d864ebf1e83f3c587946 |
Close
Hashes for light_curve_python-0.3.0_beta.1-cp37-cp37m-macosx_10_7_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9d2e726d3c209ae0915f76fada3a7cc24211947cb93a19c971a3b38252ce65cb |
|
MD5 | eae726c5eb14cf05cb17124e140ccdb1 |
|
BLAKE2b-256 | 1a96d5a5e7d028c823450c97b656c49a2a9657dd389d1f244cb59cf5f522cb29 |
Close
Hashes for light_curve_python-0.3.0_beta.1-cp36-cp36m-manylinux_2_5_x86_64.manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1674e51cbeb51841e108bf1da6d1b87fff76bab128c464c92c4d6ef84e31b529 |
|
MD5 | 6a4658a7f3ee5551172ee98eb1fff7ac |
|
BLAKE2b-256 | e27027ed733a11b79fb4636023c042bea9d0c16c327e7e5aeef2038c1c24f4ef |
Close
Hashes for light_curve_python-0.3.0_beta.1-cp36-cp36m-macosx_10_7_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6ac921615ba63a8425438abbd3ffc91c90c06d9f6025b88542d6f45161645f73 |
|
MD5 | 2e602de360f3e280c3f9ee8b7b576043 |
|
BLAKE2b-256 | 24bde4a33c8c03062d937ef296f9869b046eb0cdf8db19fcff4a4139a943f9d6 |