Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Incorrect format of acq_time column #131

Open
mateuszpawlik opened this issue Dec 10, 2024 · 4 comments
Open

Incorrect format of acq_time column #131

mateuszpawlik opened this issue Dec 10, 2024 · 4 comments

Comments

@mateuszpawlik
Copy link

I get the following warning. The format seems to be correct according to https://bids-specification.readthedocs.io/en/stable/common-principles.html#units YYYY-MM-DDThh:mm:ss[.000000][Z]

[WARNING] TSV_VALUE_INCORRECT_TYPE_NONREQUIRED A value in a column did match the acceptable type for that column headers specified format.
		acq_time
		/sub-01/ses-01/sub-01_ses-01_scans.tsv - '2022-12-16T14:44:43.955625Z'
@mateuszpawlik
Copy link
Author

FYI @barbarastrasser

@effigies
Copy link
Contributor

This is bids-standard/bids-specification#1968 and needs to be fixed in the schema.

@mateuszpawlik
Copy link
Author

The validator actually listed two entries:

/sub-01/ses-01/sub-01_ses-01_scans.tsv - '2022-12-16T14:44:43.955625Z'
/sub-02/ses-01/sub-02_ses-01_scans.tsv - '2022-12-07T09:36:08.944089Z'

I missed that before, but could the warning be because of:

No specific precision is required for fractional seconds, but the precision SHOULD be consistent across the dataset.

@effigies
Copy link
Contributor

No, the problem is actually the Z. The specification permits Z, but when it was coded up in the schema, the regex says [A-Z]{2,4} to accept timezone codes. This was a mistake, as that's not ISO8601 compatible.

We intended to adopt a subset of RFC3339 that let you use local time or UTC and not permit offsets at all, but the above-linked issue convinced me that there are good reasons to permit people to use local offsets.

I'm opening a PR to adopt RFC3339 fully.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants