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.
Installation
python3 -mpip install light-curve-python
Note that in the future the package will be renamed to light-curve
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)))
Print feature classes list
import light_curve as lc
print(lc._FeatureEvaluator.__subclasses__())
Read feature docs
import light_curve as lc
help(lc.BazinFit)
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.2_beta.2.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 40fee8c30ee8d9b833233e66ed806e0bfc95470c0dbfa31b186fe9289a2cf9f0 |
|
MD5 | 4275539ce2ba7a7b9238515d4acf40a4 |
|
BLAKE2b-256 | 3799c1323f60183776366f7e92bf23126316146265f296f2f814251788ef72b9 |
Close
Hashes for light_curve_python-0.3.2_beta.2-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 30093110ed4bcc4dc43a9ed19a98519b2499906e45e00d58a408511e25a8b95b |
|
MD5 | bb507caec3b81ec0fe5015f84bff35fb |
|
BLAKE2b-256 | fe4e03e9e9e6b0064b53a4ce5f9b5b8b8a836175750c3ff649eeb09c340606f3 |
Close
Hashes for light_curve_python-0.3.2_beta.2-cp39-cp39-macosx_10_7_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8abc1b89983d8ec99e173f1fa1cd8614738d6e8dd6a5851efe7b4117b32d81ba |
|
MD5 | ebe9627bfd1b04f1ee2e39f38c0adeb4 |
|
BLAKE2b-256 | d3ade62e866a9b3e13a81dd7d421bc35e3d6a4d6b8374f77eef45eee347d9506 |
Close
Hashes for light_curve_python-0.3.2_beta.2-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9a0ed5cd5c49fd3896bf6e534000937a317d14bcf386a4dc40915ee21e1f7155 |
|
MD5 | 964abf8eb24b09750f80118ffa3b6c2f |
|
BLAKE2b-256 | d9c67581a6eb3e10f4e48407c29660c22f62c56ea434f5091d2bc6d597c60699 |
Close
Hashes for light_curve_python-0.3.2_beta.2-cp38-cp38-macosx_10_7_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 55f32fbe3197c60047137a32f7296989d17ac095a4860289d683aa3a7cba84d5 |
|
MD5 | 2309eeb0c542ec649c6c99fcbf8e2bf0 |
|
BLAKE2b-256 | cf172f13f02f73f86f13c1172edfd164edc216c171f36e0355ccf69cface12f3 |
Close
Hashes for light_curve_python-0.3.2_beta.2-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4d5316b0f9bf83ad4831edb675f35013bbb772fa06e2c32e187c23a9245fd37f |
|
MD5 | b631b0d7774f7b1cae9e390a17ff8f52 |
|
BLAKE2b-256 | 4624b10a048a837c1b47b6766d244253b29a7aed4bceaaba25141749771164e5 |
Close
Hashes for light_curve_python-0.3.2_beta.2-cp37-cp37m-macosx_10_7_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 449e44e9a9a866b1486e1903fdc85272f27d7b5900aaafba8972dbcdce2f83cb |
|
MD5 | 1d06f0b0c79dcc9d0b47da9ae8327c0a |
|
BLAKE2b-256 | 00c35f4d66bdcc6d27c3be5e82b1e5211821872bedb2654d852941a8813640d7 |
Close
Hashes for light_curve_python-0.3.2_beta.2-cp36-cp36m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2b2acdd5e0eebaa491632799a72384b3c6eb146182955d844f03227f4c6394a7 |
|
MD5 | 30dbd7e79be36d4c5dcebb8032601d13 |
|
BLAKE2b-256 | 6ac59ab4678268fed7fee86a12c9915039c50ddf8f63445721e2bc84562761fc |
Close
Hashes for light_curve_python-0.3.2_beta.2-cp36-cp36m-macosx_10_7_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 66ee868f3200fc456845085a9ab9d17a965768b35252332ed674871619c1091d |
|
MD5 | 8528b3eaff486df2665513625e585c8c |
|
BLAKE2b-256 | 83c5513320fbea64edbc101456b35bbf4d8355d5c50ce66a9e16337d59b51b0c |