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.3_beta.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1ac03c09bd22dc7fafc1b2d784dfb0c94a98e55ef6381a142a10e4b63b3be475 |
|
MD5 | c409240aee81eb3f28ce075fb4193e07 |
|
BLAKE2b-256 | 1a99c9156f01939fa1e84a21b4dc0e6260764a3b479fddf7bf17ca49532a0295 |
Close
Hashes for light_curve_python-0.3.3_beta.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3f5b2069587a7d30ba21096e0affb332e5ee3cfc17cfc7484e3e509ffad0dad2 |
|
MD5 | b42110963ee7dbe393c501874baacc0e |
|
BLAKE2b-256 | 828607be59abe9cbb35f47bb6346224123c12892870fa58fdbcec94ee81fa64b |
Close
Hashes for light_curve_python-0.3.3_beta.0-cp39-cp39-macosx_10_7_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 49271d053bc7017a99d57ac97e5a6853a3f55c15906866b709243c7aaf0e239b |
|
MD5 | 5a2e5f05caff406b01accc36e9da7349 |
|
BLAKE2b-256 | 82840c260f58c55f4a0befecf858fbd07ea288687d199f7981355b2651902198 |
Close
Hashes for light_curve_python-0.3.3_beta.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9030732b2305f28cc912706dee302fa19108d762dd86e1b98a31a8a68e73417d |
|
MD5 | f11eda9a191123c9eb92a5b10b6cc0ff |
|
BLAKE2b-256 | b1b70067938ceb5e1fb2ae8fed7ddc06e6fc68603fb1915cd4a1b3c7bdb2c2df |
Close
Hashes for light_curve_python-0.3.3_beta.0-cp38-cp38-macosx_10_7_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2df0bcc53fe6792828e8dbfd36a63d5b638bb2f1f74d0195dc7fe44fb659205b |
|
MD5 | bcfee3ec6830c82df37ffa858c014b6f |
|
BLAKE2b-256 | 238a5775a6391b47d486645437296bdfdee419e876cbc5bd486f910948056585 |
Close
Hashes for light_curve_python-0.3.3_beta.0-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7f31e94a1cfacf3f931c82cbde3e51b1c2d8648f5748d237bf164825d2125748 |
|
MD5 | 30aee6d5f8b79a10f42415e3c9031adc |
|
BLAKE2b-256 | d41fc83b85473bf90cf00b67dbea3e6214caa0ad735b2430d43c6722f8a99876 |
Close
Hashes for light_curve_python-0.3.3_beta.0-cp37-cp37m-macosx_10_7_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b447de35176fc1976dffb072cfc019ca4ad7915e0234f786d043248039dbb1a0 |
|
MD5 | 2ecf4aa3a6de1a3fecf62c9e448a0cab |
|
BLAKE2b-256 | d76743fb1f7ac28b98416e6bef2796a9d9a714909eb48e1eb355aed5cb358a93 |
Close
Hashes for light_curve_python-0.3.3_beta.0-cp36-cp36m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1d29bb81059b73f8e14f0ff4d6f8037dea578aef9f59c98930bd7379525ceaaa |
|
MD5 | 9f7373804a21b4a63cec2ee0492d86df |
|
BLAKE2b-256 | a7b94fb46e3790e5695f9d9bbb0228007dba132d20c428e3d0c8bea011d43034 |
Close
Hashes for light_curve_python-0.3.3_beta.0-cp36-cp36m-macosx_10_7_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a40f35d51d440191003cf4e234f4dff9365d64b67c295daa535e0b4b33168848 |
|
MD5 | 3c9a57a8a21739b8f92b0bc88969087d |
|
BLAKE2b-256 | df1aeb107579d05061dd5094518dcb7002c850bdbd674230889caa16f951a7e3 |