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) – Mandatory sampling rate (in Hz) to use. Must match the sampling rate used to generate the values.

Methods

apply(func[, groupby])

Applies the passed function to the groups defined by the groupby argument.

clone([data])

Clone (deep copy) the current column, optionally replacing its data and/or any other attributes.

filter([filters, query, strict, inplace])

Returns a copy of the current Variable with only rows that match the filters retained.

get_grouper([groupby])

Return a list suitable for use in groupby calls.

merge(variables[, name])

Merge/concatenate a list of variables along the row axis.

resample(sampling_rate[, inplace, kind])

Resample the Variable to the specified sampling rate.

split(grouper)

Split the current DenseRunVariable into multiple columns.

to_df([condition, entities, timing, ...])

Convert to a DataFrame, with columns for name and entities.

__init__(name, values, run_info, source, sampling_rate)[source]

Methods

__init__(name, values, run_info, source, ...)

apply(func[, groupby])

Applies the passed function to the groups defined by the groupby argument.

clone([data])

Clone (deep copy) the current column, optionally replacing its data and/or any other attributes.

filter([filters, query, strict, inplace])

Returns a copy of the current Variable with only rows that match the filters retained.

get_grouper([groupby])

Return a list suitable for use in groupby calls.

merge(variables[, name])

Merge/concatenate a list of variables along the row axis.

resample(sampling_rate[, inplace, kind])

Resample the Variable to the specified sampling rate.

split(grouper)

Split the current DenseRunVariable into multiple columns.

to_df([condition, entities, timing, ...])

Convert to a DataFrame, with columns for name and entities.