Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor periodogram and multi-color implementation #87

Draft
wants to merge 11 commits into
base: refactor-ts
Choose a base branch
from
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

### Added

--
- `m_chi2` attribute and `get_m_chi2` method for `TimeSeries`
- `take_mut` dependency

### Changed

Expand Down
2 changes: 2 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ num-traits = "^0.2"
paste = "1"
schemars = "^0.8"
serde = { version = "1", features = ["derive"] }
take_mut = "0.2.2"
thiserror = "1"
thread_local = "1.1"
unzip3 = "1"
Expand All @@ -66,6 +67,7 @@ clap = { version = "3.2.6", features = ["std", "color", "suggestions", "derive",
criterion = "0.4"
hyperdual = "1.1"
light-curve-common = "0.1.0"
ndarray = { version = "^0.15", features = ["approx-0_5"] }
plotters = { version = "0.3.5", default-features = false, features = ["errorbar", "line_series", "ttf"] }
plotters-bitmap = "0.3.3"
rand = "0.7"
Expand Down
9 changes: 9 additions & 0 deletions src/data/data_sample.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,15 @@ where
std2: Option<T>,
}

impl<'a, T> PartialEq for DataSample<'a, T>
where
T: Float,
{
fn eq(&self, other: &Self) -> bool {
self.sample == other.sample
}
}

macro_rules! data_sample_getter {
($attr: ident, $getter: ident, $func: expr, $method_sorted: ident) => {
// This lint is false-positive in macros
Expand Down
3 changes: 1 addition & 2 deletions src/data/mod.rs
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
mod data_sample;
pub use data_sample::DataSample;

mod multi_color_time_series;
pub(crate) mod multi_color_time_series;
pub use multi_color_time_series::MultiColorTimeSeries;

mod sorted_array;
pub use sorted_array::SortedArray;

mod time_series;

pub use time_series::TimeSeries;
Loading