diff --git a/CHANGELOG.md b/CHANGELOG.md index 865ecff09..588a59ab8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,7 +4,8 @@ ### Fixed - Fixed invalid CSS properties in documentation assistant toggle that prevented proper positioning on displays ≥1400px wide. @rly [#2151](https://github.com/NeurodataWithoutBorders/pynwb/pull/2151) -- +- Expanded documentation for the 'age' parameter to include age range examples and clarify usage. @rly [#2161](https://github.com/NeurodataWithoutBorders/pynwb/pull/2161) + ## PyNWB 3.1.3 (December 9, 2025) diff --git a/src/pynwb/file.py b/src/pynwb/file.py index c2fd317ca..d3c044785 100644 --- a/src/pynwb/file.py +++ b/src/pynwb/file.py @@ -78,8 +78,14 @@ class Subject(NWBContainer): { "name": "age", "type": (str, timedelta), - "doc": 'The age of the subject. The ISO 8601 Duration format is recommended, e.g., "P90D" for 90 days old.' - 'A timedelta will automatically be converted to The ISO 8601 Duration format.', + "doc": ( + 'The age of the subject. The ISO 8601 Duration format is recommended, e.g., "P90D" for 90 days old.' + 'A timedelta will automatically be converted to The ISO 8601 Duration format. ' + 'If the precise age is unknown, an age range can be given by "[lower bound]/[upper bound]" e.g. ' + '"P10D/P20D" would mean that the age is in between 10 and 20 days. If only the lower bound is known, ' + 'then including only the slash after that lower bound can be used to indicate a missing bound. ' + 'For instance, "P90Y/" would indicate that the age is 90 years or older.' + ), "default": None, }, { @@ -1152,4 +1158,4 @@ def ElectrodeTable(name='electrodes', description='metadata about extracellular electrodes'): warn("The ElectrodeTable convenience function is deprecated. Please create a new instance of " "the ElectrodesTable class instead.", DeprecationWarning) - return ElectrodesTable() \ No newline at end of file + return ElectrodesTable()