> For the complete documentation index, see [llms.txt](https://docs.neuroinfodb.org/squirrel/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.neuroinfodb.org/squirrel/specifications/specification-v1.0/data/subjects/studies/series.md). Agents can also search and read this documentation through its [MCP server](https://docs.neuroinfodb.org/squirrel/~gitbook/mcp).

# series

JSON array

An array of series. Basic series information is stored in the main `squirrel.json` file. Extended information including series parameters such as DICOM tags are stored in a `params.json` file in the series directory.

<figure><img src="https://mermaid.ink/img/pako:eNqVlEFrgzAUx7-KZBQU6ijDXRz0tF3G2GC9DS-v5tlmVSNJ3Cql332JMWl1PbQezPsnv39e8h56IDmnSFKyEdBsg7fPrA70IzhX4evq472PojheUlAQmlf0dEL0fAP5DjYYDuN0lTVYshpl6KMJgfsGBauwVjI8iyeUSRxTlivGaxBdONGRhfvZeLkRvG2ghrKTOnGvAifdvgMq2_U35jq1C9y604ZRLWV6o2G8QPC1RPED5jAyPBcXWFYrvayv2MMj5WmbyKTW5TCZ--H_sr0Uk6ELPNIb4nvTHgGVLFhpOmRCh9j3bHZCTUkMKEdtns3OumKwk7TwSQf9ROR8vuP9OQZhPU5NHO4axuBia3BqZPBXUF2JgT--Ycr0riiKua6V4DuMKcgtCAFd-jA2jbLcYpxU4RbrqBTXGCd239FrvNZjm-x5fFws5taR3iVJMsTxL6NqmybNnsxJhaICRvWf4WB2yojaYoUZSXVIsYC2VBnJ6qNG20bXHl8oU1yQtIBS4pxAq_iqq3OSKtGig54Z6B9N5Sn9mX5x7vTxD8AkkTU?type=png" alt=""><figcaption></figcaption></figure>

### JSON variables

:blue\_circle: Primary key\
:red\_circle: Required\
:yellow\_circle: Computed (squirrel writer/reader should handle these variables)

<table data-full-width="true"><thead><tr><th width="260" align="right">Variable</th><th width="131">Type</th><th width="101">Default</th><th>Description</th></tr></thead><tbody><tr><td align="right"><code>BidsEntity</code></td><td>string</td><td></td><td><a href="https://bids.neuroimaging.io/">BIDS</a> entity (anat, func, dwi, etc)</td></tr><tr><td align="right"><code>BidsPhaseEncodingDirection</code></td><td>string</td><td></td><td>BIDS phase encoding direction</td></tr><tr><td align="right"><code>BidsRun</code></td><td>string</td><td></td><td>BIDS run number</td></tr><tr><td align="right"><code>BidsSuffix</code></td><td>string</td><td></td><td>BIDS suffix (T1w, T2w, etc)</td></tr><tr><td align="right"><code>BidsTask</code></td><td>string</td><td></td><td>BIDS task name</td></tr><tr><td align="right"><code>Description</code></td><td>string</td><td></td><td>Description of the series</td></tr><tr><td align="right"><code>Protocol</code></td><td>string</td><td><span data-gb-custom-inline data-tag="emoji" data-code="1f534">🔴</span></td><td>Protocol name. If blank, the library writes the <code>Description</code> as the protocol.</td></tr><tr><td align="right"><code>Run</code></td><td>number</td><td><code>1</code></td><td>The run identifies order of acquisition in cases of multiple identical series.</td></tr><tr><td align="right"><code>SeriesDatetime</code></td><td>datetime</td><td><span data-gb-custom-inline data-tag="emoji" data-code="1f534">🔴</span></td><td>Datetime of the series, usually taken from the DICOM header</td></tr><tr><td align="right"><code>SeriesNumber</code></td><td>number</td><td><span data-gb-custom-inline data-tag="emoji" data-code="1f534">🔴</span> <span data-gb-custom-inline data-tag="emoji" data-code="1f535">🔵</span></td><td>Series number. Must be unique within the study. May be sequential, correspond to NiDB assigned series number, or taken from DICOM header</td></tr><tr><td align="right"><code>SeriesUID</code></td><td>string</td><td></td><td>From the SeriesInstanceUID DICOM tag</td></tr><tr><td align="right"><code>BehavioralFileCount</code></td><td>number</td><td><span data-gb-custom-inline data-tag="emoji" data-code="1f7e1">🟡</span></td><td>Total number of beh files (including files in subdirs)</td></tr><tr><td align="right"><code>BehavioralSize</code></td><td>number</td><td><span data-gb-custom-inline data-tag="emoji" data-code="1f7e1">🟡</span></td><td>Size of beh data, in bytes</td></tr><tr><td align="right"><code>FileCount</code></td><td>number</td><td><span data-gb-custom-inline data-tag="emoji" data-code="1f7e1">🟡</span></td><td>Total number of files (including files in subdirs)</td></tr><tr><td align="right"><code>SequenceNumber</code></td><td>number</td><td><span data-gb-custom-inline data-tag="emoji" data-code="1f7e1">🟡</span></td><td>Sequential number of the series within the study. Used for the directory name when <code>SeriesDirectoryFormat</code> is <code>seq</code></td></tr><tr><td align="right"><code>Size</code></td><td>number</td><td><span data-gb-custom-inline data-tag="emoji" data-code="1f7e1">🟡</span></td><td>Size of the data, in bytes</td></tr><tr><td align="right"><code>VirtualPath</code></td><td>string</td><td><span data-gb-custom-inline data-tag="emoji" data-code="1f7e1">🟡</span></td><td>Relative path to the data within the package.</td></tr><tr><td align="right"><a href="https://docs.neuroinfodb.org/squirrel/specifications/specification-v1.0/data/subjects/studies/series/params.md">params</a></td><td>JSON file</td><td></td><td>Stored separately in <code>data/&#x3C;SubjectID>/&#x3C;StudyNum>/&#x3C;SeriesNum>/params.json</code></td></tr></tbody></table>

### Directory structure

Files associated with this section are stored in the following directory. `SubjectID`, `StudyNum`, `SeriesNum` are the actual subject ID, study number, and series number. For example `/data/S1234ABC/1/1`.

> `/data/<SubjectID>/<StudyNum>/<SeriesNum>`

Behavioral data is stored in

> `/data/<SubjectID>/<StudyNum>/<SeriesNum>/beh`


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.neuroinfodb.org/squirrel/specifications/specification-v1.0/data/subjects/studies/series.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
