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.1.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 922aabacfcfec247fb434b528d002f823e9775a9daf277b187a1c9ad647e5765 |
|
MD5 | 6b47fc30126fe0ac56db22d72a643786 |
|
BLAKE2b-256 | 0e9db976b89f7ea1174147b1f872a9ec677aa071fbda6841ef56b21f7e2f31c0 |
Close
Hashes for light_curve_python-0.3.2_beta.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | de9793d046290ff1462b9bc4df1992463b0e5664e2fbbab7a9dca2c94e6f7c46 |
|
MD5 | 06f7cbd39b00af3977320fded7bf9c0a |
|
BLAKE2b-256 | 233718009336bd5d17fee5c351bc2b1cdd9b9a151e205d49c0b1505ae4841379 |
Close
Hashes for light_curve_python-0.3.2_beta.1-cp39-cp39-macosx_10_7_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ffd6ef3c5a9df3e04320e6370f9b6937007d5b9a13f28cb413a2bacd8e85100c |
|
MD5 | bef88fc2550b329c2e1bd13957026e46 |
|
BLAKE2b-256 | 84bc94697cea237aafcf4848b520e684b2b4bf2fe8e0e69b80f4250c84411420 |
Close
Hashes for light_curve_python-0.3.2_beta.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0dab504625bbbe7081edd40508eec6bc05509c8c8ce3b7c7f459bfb1f8960994 |
|
MD5 | 56e4005a0da915e90ed2f10e3394827f |
|
BLAKE2b-256 | 1a8a2d9b6937285b488de36d488981cf337fec10052cc1224001e1a7aa930947 |
Close
Hashes for light_curve_python-0.3.2_beta.1-cp38-cp38-macosx_10_7_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 248071f61f62369f21c17a1b820115fce5b964690d8392eb19ce865e5697b081 |
|
MD5 | 204145332b76fa3249ecac490a15a449 |
|
BLAKE2b-256 | 5256ec66cf540c4e624c833e9dc5306784e48b8141000e6f696dac66c3372360 |
Close
Hashes for light_curve_python-0.3.2_beta.1-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b14ebd014b05809ec0261c9d3c0092b7cbc35e1cc7857fc3eccb2e2ac675b219 |
|
MD5 | d1b6a9909ff4c0e5b0cca180a03986a3 |
|
BLAKE2b-256 | 1fd4bf8f6de82ed970bc731ccb963ba8523c93a56737e343a955b6be61207d04 |
Close
Hashes for light_curve_python-0.3.2_beta.1-cp37-cp37m-macosx_10_7_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1a0448c364fe2d74bf0c8428afc5ec961388f9f7a98d133af09a3c0445423d2a |
|
MD5 | 00ecc1740d37fd88c7d96fa185c8a457 |
|
BLAKE2b-256 | 4659f01296684c3d81161a527580a1b8371b13a3941430782d258e1535cb6d3d |
Close
Hashes for light_curve_python-0.3.2_beta.1-cp36-cp36m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | bb449424a4233c7b5159f55344022725bd175bbea6d6c6fbf8187f892a0fd99a |
|
MD5 | 8dc72435e47eaa8780935f2297d3257e |
|
BLAKE2b-256 | 8dcb0202c213219e5d9619010d0ef7d120ac6176b33e49994ceb775684c48df4 |
Close
Hashes for light_curve_python-0.3.2_beta.1-cp36-cp36m-macosx_10_7_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8df62e46230320f6656b093aab1e34c0fe17cdb434d45cc9fef038e1d44e2d5a |
|
MD5 | 305e8961820ab6ac47dfbd3b91808a3f |
|
BLAKE2b-256 | 89853508f07910be2337a35debf9b235b8e563ff1383fac5932955156a894837 |