gen_bids_like_filename#

petpal.utils.bids_utils.gen_bids_like_filename(sub_id: str, ses_id: str, suffix: str = 'pet', ext: str = '.nii.gz', **extra_desc) str#

Generates a filename following BIDS convention including subject and session information.

The function constructs filenames by appending additional descriptors and file suffix with extension.

Parameters:
  • sub_id (str) – The subject identifier.

  • ses_id (str) – The session identifier.

  • suffix (str, optional) – The suffix indicating the data type. Defaults to ‘pet’.

  • ext (str, optional) – The file extension. Defaults to ‘.nii.gz’.

  • **extra_desc – Additional keyword arguments for any extra descriptors.

Returns:

str – A BIDS-like formatted filename.