Exoplanet and astronomy time-series tools in pure Rust. Each tool is a small crate of its own, tested for accuracy and speed against the Python packages astronomers already use.
Status: version 0.1. The API may still change before 1.0.
Depend on the rustellar crate and turn on the tools you need as features,
or depend on a tool's own crate directly:
[dependencies]
rustellar = { version = "0.1", features = ["tls", "vet"] }| Crate | Feature | What it does |
|---|---|---|
rustellar |
Brings in the tools below by feature | |
rustellar-core |
always on | Light curves, folding, time types |
rustellar-model |
model |
Transit light curves (Mandel & Agol 2002), exposure averaging |
rustellar-fit |
fit |
Least-squares transit fit |
rustellar-bls |
bls |
Box least squares transit search |
rustellar-detrend |
detrend |
Detrending filters (biweight and others) |
rustellar-mcmc |
mcmc |
Ensemble MCMC, diagnostics and transit posteriors |
rustellar-ls |
ls |
Lomb-Scargle periodogram, peaks, false-alarm probabilities |
rustellar-tls |
tls |
Transit least squares |
rustellar-vet |
vet |
Vetting candidates: aliases, odd and even depths, coverage |
Run the tests (all features, so the umbrella crate's tools are included too):
cargo test --workspace --all-featuresThe longer comparisons against other packages take minutes each, so they are skipped by default. Run them with:
cargo test --workspace --release -- --ignoredCI has no GPU, so if you change the GPU code, run the GPU tests locally on a
machine with an NVIDIA GPU. These cargo aliases are defined in
.cargo/config.toml. If no GPU is found the tests fail instead of being
skipped, so a passing run means the GPU really was tested:
cargo gpu-test
cargo gpu-test --test cuda -- --ignoredThe second runs the longer GPU comparisons. To see line coverage of
rustellar-bls including its GPU code (needs
cargo-llvm-cov):
cargo gpu-coverageThe same for rustellar-tls:
cargo gpu-test-tls
cargo gpu-coverage-tlsRun the benchmarks:
cargo bench -p rustellar-model
cargo bench -p rustellar-bls
cargo bench -p rustellar-detrend
cargo bench -p rustellar-tls
cargo bench -p rustellar-ls
cargo bench -p rustellar-fit
cargo bench -p rustellar-vetTo check a crate's accuracy and speed against the Python packages (this
produces the tables in each crate's README; see
rustellar-benchmarks, which is not
published):
cargo validate list # list the suites and how long each takes
cargo validate accuracy tls --quick # a quick check of one crate
cargo validate speed fit mcmc # speed tables (run on an idle machine)
cargo validate all --quick # a quick run of everything
cargo validate-gpu accuracy tls # the searches on an NVIDIA GPU
cargo validate speed --save --repeat 3
cargo validate diff 0.1.0 0.2.0 # what changed between two releasesResults for each release are saved in crates/rustellar-benchmarks/results/.
The reference data the tests compare against lives in the crates'
tests/reference folders. To keep the published packages small, they
contain only the unit tests, which generate their own data. Reference
data, integration tests and benchmarks are excluded, so any test that
reads a reference file goes in tests/, and the full suite only runs from
a clone of this repository.
MIT or Apache-2.0.