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.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2a6b7d874f67804946dde5cb6f06c74ebaa46c23cebd0586bba568793e191aa7 |
|
MD5 | b3d922975c24b4040214867f788ab62b |
|
BLAKE2b-256 | 8e13f2297f433376ae88855641e135430840242c511319f2115973d7def2195d |
Close
Hashes for light_curve_python-0.3.2_beta.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a113e9c3088115a3b15090483962982bb5d96b83278687361dd226a8eecddddb |
|
MD5 | c1091807118dfb16c1c38fd60e9278a8 |
|
BLAKE2b-256 | a687a2568658e561fb8bb347523b883e1e04f43b3fc4c3cecd2f12802705ce45 |
Close
Hashes for light_curve_python-0.3.2_beta.0-cp39-cp39-macosx_10_7_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 894457d4f6760da5d0d69f310d5a195531f97ff1e810eb02568783fa2d888c0c |
|
MD5 | 7dade28f1753490c4bc1c49e6c991b8c |
|
BLAKE2b-256 | 79ec7cac74505935511f5f74694e05ef049f3a042cd17c37c4c112b2a8c1abf2 |
Close
Hashes for light_curve_python-0.3.2_beta.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c0c21e878928d3f541463a3034282058a2d032ce630ea8a0cc00860d4658ec8c |
|
MD5 | de4f81274f4c98f1460b01d7f36f4588 |
|
BLAKE2b-256 | e378464a5d64057203f33cbaf70cfdc2a16f116aa60d81a0226679b8be3ebc4d |
Close
Hashes for light_curve_python-0.3.2_beta.0-cp38-cp38-macosx_10_7_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 62c310ed2b96fe30f71aaccf35e5e729d0853124abc4a85a894c028a975b869b |
|
MD5 | 98031ffb00d481c3dd40b6d4cb67de09 |
|
BLAKE2b-256 | c690aea612871589cce0cb6e312d1c878064ec47e4b7b63e7f6d78613fb4a417 |
Close
Hashes for light_curve_python-0.3.2_beta.0-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6032580a461491a706a9cd5c8efbf1726356e437d64f6f34a3ee67dfc6656057 |
|
MD5 | 103de68d369530d3c02c32ff054e3b68 |
|
BLAKE2b-256 | 563f0ef7e4316e26b33cf02c9b4fd872c663a609042347ef37733363ab6aba08 |
Close
Hashes for light_curve_python-0.3.2_beta.0-cp37-cp37m-macosx_10_7_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b17afec53ad5d43f011a05fc663db12912a7a2d67fff3791eb7e86b0b0e2b616 |
|
MD5 | 5839b02865d904d1b7b7b53c98f4dc87 |
|
BLAKE2b-256 | f351a4b63f575f6b45a7fc6e2564592ce7f6e5c5654537880e55d4501b0b9ccc |
Close
Hashes for light_curve_python-0.3.2_beta.0-cp36-cp36m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8e4d3b23095be4062ef1bb37b79d9098b9103e5ccfc0b3072baace89d09dae9e |
|
MD5 | 849f8c43ce74f76680b2dca2626e26d5 |
|
BLAKE2b-256 | 07eddb036fe4851865dc25970c4d82afe55c1c1f9ce7e529fe06c4dd92fd4524 |
Close
Hashes for light_curve_python-0.3.2_beta.0-cp36-cp36m-macosx_10_7_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ee223d85de4fe064246bb1d997d4180fa638131513ff7e2a0b4c45f4b618986f |
|
MD5 | 0e0f002c60abf7d669591ceb56f5fb6c |
|
BLAKE2b-256 | e5d61685513a6de12b4eb7ca6bb4f2add41488f4d734cb5b0c91e7b56755e63f |