pub struct DmDt<T>where
T: Float,{
pub dt_grid: Grid<T>,
pub dm_grid: Grid<T>,
}
Expand description
dm–dt map plotter
Fields§
§dt_grid: Grid<T>
§dm_grid: Grid<T>
Implementations§
Source§impl<T> DmDt<T>where
T: Float,
impl<T> DmDt<T>where
T: Float,
Sourcepub fn from_grids<Gdt, Gdm>(dt_grid: Gdt, dm_grid: Gdm) -> Self
pub fn from_grids<Gdt, Gdm>(dt_grid: Gdt, dm_grid: Gdm) -> Self
Create new DmDt
Sourcepub fn from_lgdt_dm_limits(
min_lgdt: T,
max_lgdt: T,
lgdt_size: usize,
max_abs_dm: T,
dm_size: usize,
) -> Self
pub fn from_lgdt_dm_limits( min_lgdt: T, max_lgdt: T, lgdt_size: usize, max_abs_dm: T, dm_size: usize, ) -> Self
Create new DmDt with logarithmic dt grid and linear dm grid
dt grid will have borders [10^min_lgdt, 10^max_lgdt)
, dm grid will have borders
[-max_abs_dm, max_abs_dm)
Sourcepub fn points(&self, t: &[T], m: &[T]) -> Array2<u64>
pub fn points(&self, t: &[T], m: &[T]) -> Array2<u64>
Represents each pair of (t, m) points as a unity value in dm-dt map
t
must be an ascending slice
Sourcepub fn gausses<Erf>(&self, t: &[T], m: &[T], err2: &[T]) -> Array2<T>where
T: ErfFloat,
Erf: ErrorFunction<T>,
pub fn gausses<Erf>(&self, t: &[T], m: &[T], err2: &[T]) -> Array2<T>where
T: ErfFloat,
Erf: ErrorFunction<T>,
Represents each pair of (t, m, err2) points as a Gaussian distribution in dm-dt map
t
must be an ascending slice.
Each observation is assumed to happen at time moment t_i
and have Gaussian distribution of
its magnitude N(m_i, err2_i)
. Each pair of observations
(t_1, m_1, err2_1), (t_2, m_2, err2_2)
is represented by 1-D Gaussian in the dm-dt space
having constant dt
and dm ~ N(m2-m1, err2_1 + err2_2)
. This distribution is integrated
over each cell using Erf
struct implementing ErrorFunction.
Sourcepub fn cond_prob<Erf>(&self, t: &[T], m: &[T], err2: &[T]) -> Array2<T>where
T: ErfFloat,
Erf: ErrorFunction<T>,
pub fn cond_prob<Erf>(&self, t: &[T], m: &[T], err2: &[T]) -> Array2<T>where
T: ErfFloat,
Erf: ErrorFunction<T>,
Conditional probability p(m2-m1|t2-t1)
Technically it is optimized version of DmDt::gausses() normalized by DmDt::dt_points but
with better performance. Mathematically it represents the distribution of conditional
probability p(m2-m1|t2-t1)
, see
Soraisam et al. 2020 for details.
Trait Implementations§
Source§impl<'de, T> Deserialize<'de> for DmDt<T>where
T: Float + Deserialize<'de>,
impl<'de, T> Deserialize<'de> for DmDt<T>where
T: Float + Deserialize<'de>,
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Auto Trait Implementations§
impl<T> Freeze for DmDt<T>where
T: Freeze,
impl<T> RefUnwindSafe for DmDt<T>where
T: RefUnwindSafe,
impl<T> Send for DmDt<T>
impl<T> Sync for DmDt<T>
impl<T> Unpin for DmDt<T>where
T: Unpin,
impl<T> UnwindSafe for DmDt<T>where
T: UnwindSafe + RefUnwindSafe,
Blanket Implementations§
Source§impl<Src, Scheme> ApproxFrom<Src, Scheme> for Srcwhere
Scheme: ApproxScheme,
impl<Src, Scheme> ApproxFrom<Src, Scheme> for Srcwhere
Scheme: ApproxScheme,
Source§fn approx_from(src: Src) -> Result<Src, <Src as ApproxFrom<Src, Scheme>>::Err>
fn approx_from(src: Src) -> Result<Src, <Src as ApproxFrom<Src, Scheme>>::Err>
Source§impl<Dst, Src, Scheme> ApproxInto<Dst, Scheme> for Srcwhere
Dst: ApproxFrom<Src, Scheme>,
Scheme: ApproxScheme,
impl<Dst, Src, Scheme> ApproxInto<Dst, Scheme> for Srcwhere
Dst: ApproxFrom<Src, Scheme>,
Scheme: ApproxScheme,
Source§type Err = <Dst as ApproxFrom<Src, Scheme>>::Err
type Err = <Dst as ApproxFrom<Src, Scheme>>::Err
Source§fn approx_into(self) -> Result<Dst, <Src as ApproxInto<Dst, Scheme>>::Err>
fn approx_into(self) -> Result<Dst, <Src as ApproxInto<Dst, Scheme>>::Err>
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T, Dst> ConvAsUtil<Dst> for T
impl<T, Dst> ConvAsUtil<Dst> for T
Source§impl<T> ConvUtil for T
impl<T> ConvUtil for T
Source§fn approx_as<Dst>(self) -> Result<Dst, Self::Err>where
Self: Sized + ApproxInto<Dst>,
fn approx_as<Dst>(self) -> Result<Dst, Self::Err>where
Self: Sized + ApproxInto<Dst>,
Source§fn approx_as_by<Dst, Scheme>(self) -> Result<Dst, Self::Err>
fn approx_as_by<Dst, Scheme>(self) -> Result<Dst, Self::Err>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more