nimare.io.convert_nimads_to_sleuth

convert_nimads_to_sleuth(studyset: str | Dict[str, Any] | Any, output_dir: str | Path, target: Literal['MNI', 'TAL'] | str = 'MNI', decimal_precision: int | None = 2, annotation: str | Dict[str, Any] | Any | None = None, export_metadata: List[Literal['authors', 'publication', 'year', 'doi', 'pmid', 'affiliations']] | None = None, *, annotation_columns: Sequence[str] | None = None, annotation_values: Dict[str, Sequence[Any]] | None = None, split_booleans: bool | None = True)[source]

Convert a NIMADS Studyset to Sleuth text file(s).

Parameters:
  • studyset (str or dict or nimare.nimads.Studyset) – Path to a Studyset JSON, a Studyset-like dictionary, or a Studyset object.

  • output_dir (str or pathlib.Path) – Directory for Sleuth output. Created if missing.

  • target (str, optional) – Target space for coordinates. Accepts “MNI” or “TAL”, but also commonly-used dataset target strings such as “ale_2mm” or “mni152_2mm”. These are normalized to either “MNI” or “TAL” internally. Default is “MNI”.

  • decimal_precision (int, optional) – Decimal places for output coordinates. Default is 2.

  • annotation (str or dict or nimare.nimads.Annotation, optional) – Optional annotation to split output files by annotation values.

  • export_metadata (list of {“authors”, “publication”, “year”, “doi”,) – “pmid”, “affiliations”}, optional Metadata fields to export as comments. Default is [“doi”, “pmid”].

  • annotation_columns (list of str, optional) – Restrict splitting to these annotation keys.

  • annotation_values (dict, optional) – Filter annotation splits to these values per key.

  • split_booleans (bool, optional) – When True, boolean columns produce _true/_false files. Default is True.

Raises:

InvalidStudysetError – On invalid inputs or schema/structure mismatch.