osl_dynamics.config_api.wrappers.plot_power_maps_from_covariances#

osl_dynamics.config_api.wrappers.plot_power_maps_from_covariances(data, output_dir, parcellation_file=None, power_save_kwargs=None)#

Plot power maps calculated directly from the inferred covariances.

This function expects a model has already been trained and the following directory to exist:

  • <output_dir>/inf_params, which contains the inferred parameters.

This function will output files called covs_.png which contain plots of the power map of each state/mode taken directly from the inferred covariance matrices. The files will be saved to <output_dir>/inf_params.

This function also expects the data to be prepared in the same script that this wrapper is called from.

Parameters:
dataosl_dynamics.data.Data

Data object.

output_dirstr

Path to output directory.

parcellation_filestr, optional

Parcellation file used to parcellate the training data. If None, we use data.parcellation_file.

power_save_kwargsdict, optional

Keyword arguments to pass to osl_dynamics.analysis.power.save(). Defaults to:

{'filename': '<inf_params_dir>/covs_.png',
 'parcellation_file': data.parcellation_file,
 'plot_kwargs': {'symmetric_cbar': True}}