laion_fmri.discovery

Discovery API backed entirely by the LAION-fMRI S3 bucket.

All queries about what is in the dataset read directly from the S3 bucket via the AWS CLI. Local filesystem state is never consulted.

Functions

describe()

Print a human-readable summary of the S3 bucket contents.

get_rois([subject, category])

Return ROI names available for a subject in the S3 bucket.

get_subjects()

Return all subject BIDS IDs present in the S3 bucket.

inspect_bucket()

Print a diagnostic listing of the bucket for troubleshooting.

laion_fmri.discovery.describe()[source]

Print a human-readable summary of the S3 bucket contents.

laion_fmri.discovery.get_rois(subject=None, category=None)[source]

Return ROI names available for a subject in the S3 bucket.

The bucket layout is derivatives/rois/{subject}/{category}/... with three file types per ROI; only the volumetric .nii.gz files are used here as the source of truth (one per ROI per subject).

Hyphenated label values (e.g. label-FFA-1) are normalized to BIDS-clean form ("FFA1") before being returned.

Parameters:
  • subject (str or None) – BIDS subject ID. If None, uses the first subject in the bucket.

  • category (str or None) – Optional category filter ("face", "place", …).

Returns:

Sorted bidsified ROI names.

Return type:

list[str]

laion_fmri.discovery.get_subjects()[source]

Return all subject BIDS IDs present in the S3 bucket.

The bucket may be partially populated during development – some derivative trees may exist before others. This function returns the union of subjects found under any known derivative prefix.

Returns:

Sorted list of BIDS subject IDs (sub-*).

Return type:

list[str]

laion_fmri.discovery.inspect_bucket()[source]

Print a diagnostic listing of the bucket for troubleshooting.

Lists immediate top-level prefixes and probes the expected subject prefixes, showing how many subject folders exist under each. Use this when discovery returns unexpected results.