pub struct DenseRunVariable {
pub name: String,
pub source: String,
pub values: Vec<f64>,
pub sampling_rate: f64,
pub run_info: Vec<RunInfo>,
pub entities: StringEntities,
}Expand description
A dense run variable with uniformly-sampled time series data.
Represents continuous signals such as physiological recordings (_physio.tsv.gz),
stimulus waveforms (_stim.tsv.gz), or confound regressors (_regressors.tsv).
Data is stored as a vector of f64 values at a fixed sampling rate.
Supports resampling to different rates via resample() and
TR-based downsampling via resample_to_tr().
Corresponds to PyBIDS’ DenseRunVariable class.
Fields§
§name: String§source: String§values: Vec<f64>§sampling_rate: f64§run_info: Vec<RunInfo>§entities: StringEntitiesImplementations§
Source§impl DenseRunVariable
impl DenseRunVariable
pub fn new( name: &str, source: &str, values: Vec<f64>, sampling_rate: f64, run_info: Vec<RunInfo>, ) -> Self
pub fn len(&self) -> usize
pub fn is_empty(&self) -> bool
Sourcepub fn resample_to_tr(&self) -> Self
pub fn resample_to_tr(&self) -> Self
Resample to TR-based sampling rate.
Sourcepub fn to_rows(&self) -> Vec<StringEntities> ⓘ
pub fn to_rows(&self) -> Vec<StringEntities> ⓘ
Convert to tabular rows.
Source§impl DenseRunVariable
impl DenseRunVariable
Sourcepub fn build_entity_index(&self) -> Vec<(f64, StringEntities)>
pub fn build_entity_index(&self) -> Vec<(f64, StringEntities)>
Build entity index with timestamps for each sample.
Trait Implementations§
Source§impl Clone for DenseRunVariable
impl Clone for DenseRunVariable
Source§fn clone(&self) -> DenseRunVariable
fn clone(&self) -> DenseRunVariable
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for DenseRunVariable
impl RefUnwindSafe for DenseRunVariable
impl Send for DenseRunVariable
impl Sync for DenseRunVariable
impl Unpin for DenseRunVariable
impl UnsafeUnpin for DenseRunVariable
impl UnwindSafe for DenseRunVariable
Blanket Implementations§
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
Mutably borrows from an owned value. Read more