bids.variables.DenseRunVariable¶
-
class
DenseRunVariable
(name, values, run_info, source, sampling_rate)[source]¶ A dense representation of a single column.
- Parameters
name (
str
) – The name of the column.values (
numpy.ndarray
) – The values/amplitudes to store.run_info (
list
) – A list of RunInfo objects carrying information about all runs represented in the Variable.source ({'events', 'physio', 'stim', 'regressors', 'scans', 'sessions', 'participants', 'beh'}) – The type of BIDS variable file the data were extracted from.
sampling_rate (
float
) – Optional sampling rate (in Hz) to use. Must match the sampling rate used to generate the values. If None, the collection’s sampling rate will be used.
Methods
apply
(self, func[, groupby])Applies the passed function to the groups defined by the groupby argument.
clone
(self[, data])Clone (deep copy) the current column, optionally replacing its data and/or any other attributes.
filter
(self[, filters, query, strict, inplace])Returns a copy of the current Variable with only rows that match the filters retained.
get_grouper
(self[, groupby])Return a list suitable for use in groupby calls.
matches_entities
(self, entities[, strict])Checks whether current Variable’s entities match the input.
merge
(variables[, name])Merge/concatenate a list of variables along the row axis.
resample
(self, sampling_rate[, inplace, kind])Resample the Variable to the specified sampling rate.
split
(self, grouper)Split the current DenseRunVariable into multiple columns.
to_df
(self[, condition, entities, timing, …])Convert to a DataFrame, with columns for name and entities.
-
__init__
(self, name, values, run_info, source, sampling_rate)[source]¶ Initialize self. See help(type(self)) for accurate signature.
Methods
__init__
(self, name, values, run_info, …)Initialize self.
apply
(self, func[, groupby])Applies the passed function to the groups defined by the groupby argument.
clone
(self[, data])Clone (deep copy) the current column, optionally replacing its data and/or any other attributes.
filter
(self[, filters, query, strict, inplace])Returns a copy of the current Variable with only rows that match the filters retained.
get_grouper
(self[, groupby])Return a list suitable for use in groupby calls.
matches_entities
(self, entities[, strict])Checks whether current Variable’s entities match the input.
merge
(variables[, name])Merge/concatenate a list of variables along the row axis.
resample
(self, sampling_rate[, inplace, kind])Resample the Variable to the specified sampling rate.
split
(self, grouper)Split the current DenseRunVariable into multiple columns.
to_df
(self[, condition, entities, timing, …])Convert to a DataFrame, with columns for name and entities.