spatial-detrend
A Python library for detrending spatially correlated noise in Kepler lightcurves
Science Score: 26.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
○CITATION.cff file
-
✓codemeta.json file
Found codemeta.json file -
✓.zenodo.json file
Found .zenodo.json file -
○DOI references
-
○Academic publication links
-
○Academic email domains
-
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (14.3%) to scientific vocabulary
Repository
A Python library for detrending spatially correlated noise in Kepler lightcurves
Basic Info
- Host: GitHub
- Owner: xiaziyna
- License: other
- Language: Python
- Default Branch: main
- Size: 38.1 KB
Statistics
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
- Releases: 4
Metadata Files
README.md
spatial-detrend
Overview
Developed by Jamila Taaki (UIUC).
spatial-detrend is a Python library for detrending collections of lightcurves, using spatial (on the sensor) correlations of systematic/instrument noise. The spatial detrending method is described publication 'Robust Detrending of Spatially Correlated Systematics in Kepler Light Curves Using Low-Rank Methods'. The detrending method is built around a low-rank linear model, conditioned on a total-variation spatial constraint. Here systematics are estimated with iterative estimates.
This library is currently in an experimental stage and has been tailored for specific use-cases as detailed in our accompanying Astronomical Journal publication. It may not be highly generalizable across all kinds of datasets or astrophysical applications.
This library is compatible with Python 3.6 and later versions.
Example
A collection of lightcurves is denoted as Y, and the net systematics as L.
A low rank (K) linear systematics model is assumed for L, consisting of linear combinations of shared basis vectors V, weighted by coefficients C.
Each coefficient term c(x, y, k) corresponds to a single light curve (x, y) position and is the weighting for the k'th basis term v(k).
Lightcurves arranged by their (x, y) position exhibit spatial correlation. In our model, we condition the estimation of L on this property.
Installation
You can install spatial-detrend using pip:
bash
pip3 install spatial-detrend
Dependencies
Scipy, Numpy, Sklearn, Astropy (if using external data)
Use
1) Download a collection of Kepler SAP lightcurves from a single quarter (MAST archive is one way), put these in a folder i.e. 'q2data'
for quarter 2 lightcurves.
-- If wish to skip this step, prepped data available for quarters (6, 10, 14) for Kepler magnitude (12-13) stars, see note under Input data.
3) Use `spatialdetrend.preproc.keplerutil.openlcdatato extract data. Modify and use the scriptpreproc/preprocessdata.py
to callopenlcdataand perform filtering of the data.
4) Runpreproc/grid_data.pyto obtain a discretized sensor and gridded lightcurves (modify relevant parameters).
5) See the example provided for how to call the spatial detrending method with themethods.solve.solver` class and choose input parameters.
Input data
To use prepped data, use git lfs:
bash
$ git clone https://github.com/xiaziyna/spatial-detrend.git spatial-detrend
$ cd spatial-detrend
$ git lfs pull
Worked examples
See examples folder for a demo.
Organization
spatial-detrend/
examples/
detrend_example.py
README.md
setup.py
spatial_detrend/
data/
cal_flux_6.p
......
sort_6.p
methods/
simulate/
sim_signal.py
solve/
solver.py
solver_weights.py
util.py
preproc/
grid_data.py
kepler_util.py
preprocess_data.py
Citation
If you find this helpful please cite:
Jamila S. Taaki, Athol J. Kemball, and Farzad Kamalabadi. Robust detrending of spatially correlated systematics in Kepler light curves using low-rank methods. The Astronomical Journal, 2024
License
[spatial-detrend] is released under the GNU General Public License v3.0.
Owner
- Name: Jamila Taaki
- Login: xiaziyna
- Kind: user
- Repositories: 1
- Profile: https://github.com/xiaziyna
PhD student at UIUC
GitHub Events
Total
- Watch event: 4
Last Year
- Watch event: 4
Packages
- Total packages: 1
-
Total downloads:
- pypi 10 last-month
- Total dependent packages: 0
- Total dependent repositories: 0
- Total versions: 1
- Total maintainers: 1
pypi.org: spatial-detrend
A Python library to mitigate spatially-correlated systematic noise in Kepler light curves
- Homepage: https://github.com/xiaziyna/spatial-detrend
- Documentation: https://spatial-detrend.readthedocs.io/
- License: MIT License
-
Latest release: 0.1.0
published almost 3 years ago
Rankings
Maintainers (1)
Dependencies
- astropy *
- numpy *
- scipy *
- sklearn *