Skip to content

Better estimate uncompressed file size #1100

@effigies

Description

@effigies

Currently we estimate the memory usage of BOLD files by reading their input sizes, compressed or uncompressed.

https://github.com/poldracklab/fmriprep/blob/bb716985021885524c0b19f62e503e7070a5c800/fmriprep/workflows/bold/base.py#L875-L884

We can instead directly calculate the file size by reading the offset, dtype and dimensions from the NIFTI headers.

total_size_in_bytes = offset + dtype().itemsize * np.prod(img.shape)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions