nimare.results.MetaResult
- class MetaResult(estimator, mask, maps=None, tables=None)[source]
Bases:
objectBase class for meta-analytic results.
- Parameters
estimator (
Estimator) – The Estimator used to generate the maps in the MetaResult.mask (Niimg-like or
nilearn.input_data.base_masker.BaseMasker) – Mask for converting maps between arrays and images.maps (None or
dictofnumpy.ndarray, optional) – Maps to store in the object. The maps must be provided as 1D numpy arrays. Default is None.tables (None or
dictofpandas.DataFrame, optional) – Pandas DataFrames to store in the object. Default is None.
- Variables
Methods
copy()Return copy of result object.
get_map(name[, return_type])Get stored map as image or array.
save_maps([output_dir, prefix, prefix_sep, ...])Save results to files.
save_tables([output_dir, prefix, ...])Save result tables to TSV files.
- get_map(name, return_type='image')[source]
Get stored map as image or array.
- Parameters
name (
str) – Name of the map. Used to index self.maps.return_type ({'image', 'array'}, optional) – Whether to return a niimg (‘image’) or a numpy array. Default is ‘image’.
- save_maps(output_dir='.', prefix='', prefix_sep='_', names=None)[source]
Save results to files.
- Parameters
output_dir (
str, optional) – Output directory in which to save results. If the directory doesn’t exist, it will be created. Default is current directory.prefix (
str, optional) – Prefix to prepend to output file names. Default is None.prefix_sep (
str, optional) – Separator to add between prefix and default file names. Default is _.names (None or
listofstr, optional) – Names of specific maps to write out. If None, save all maps. Default is None.
- save_tables(output_dir='.', prefix='', prefix_sep='_', names=None)[source]
Save result tables to TSV files.
- Parameters
output_dir (
str, optional) – Output directory in which to save results. If the directory doesn’t exist, it will be created. Default is current directory.prefix (
str, optional) – Prefix to prepend to output file names. Default is None.prefix_sep (
str, optional) – Separator to add between prefix and default file names. Default is _.names (None or
listofstr, optional) – Names of specific tables to write out. If None, save all tables. Default is None.