[ENH] Age float change + handling of sessions.tsv ages #394
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
(1) Made adjustments to _get_age_from_tsv and age_to_months so that _get_age_from_tsv tries to pass a float (instead of an int) to age_to_months. The main goal behind this is to be able to give greater precision to age measures that are reported in years.
(2) Made adjustments to parse_bids_for_age_months and _get_age_from_tsv to have unique handling of age if a sessions.tsv is the source of age information. The previous functionality of _get_age_from_tsv when scans.tsv files were used was to try to grab age information from the first acquisition mentioned in the file. This current update instead has _get_age_from_tsv try to grab age from the first "anat" file in the scans.tsv. This change attempts to provide more precise age measures in the situation where many data elements (MRI, EEG, accelerometry, etc.) are collected at different times but still utilize the same scans.tsv file.