# BrainStateDiff: Mouse Widefield Calcium Imaging Responses to 78 Natural Images (DANDI 002040)

## Facts

- Provider: Sheng, Kaiwen
- License: CC-BY-4.0 (https://api.dandiarchive.org/api/dandisets/002040/versions/draft/)
- Stored at: Amazon S3, s3://dandiarchive/dandisets/002040 (us-east-2)
- Access: public, readable without an account
- Category: Neuroscience
- Source: https://dandiarchive.org/dandiset/002040/draft
- Page: https://scigantic.com/archive/e78a03e0-843e-5033-9a63-3e1379373cb5
- Keywords: Neuroscience, calcium imaging, benchmark, AWS Open Data

## About

Preprocessed widefield calcium imaging trial clips from mouse visual cortex, released with the BrainStateDiff modelling code, which uses diffusion models to predict cortical responses to visual stimuli from brain state. Two three-month-old mice (mouse1 male, mouse2 female) viewed 78 natural images. Each clip holds the first 28 frames of a trial, 20 prestimulus and 8 response frames, at 96 x 96 pixels with a 0.024 s frame interval (about 41.67 Hz). The original training, validation and test partitions are kept, with 64, 8 and 8 trials per image per mouse, for 12,480 trials in total. The Dandiset holds 6 NWB files (9.4 GB), one per mouse per split (sub-mouse1/sub-mouse1_desc-train_ophys.nwb and so on); trial movies are stored in a processing table with within-trial relative frame times and the split assignment, without intertrial chronology. A compact benchmark for neural encoding and generative models. Draft Dandiset. Licensed CC BY 4.0; cite Sheng and DANDI 002040.

## Load the data

```python
import boto3
from botocore import UNSIGNED
from botocore.client import Config
s3 = boto3.client('s3', region_name='us-east-2', config=Config(signature_version=UNSIGNED))
s3.list_objects_v2(Bucket='dandiarchive', Prefix='dandisets/002040/', Delimiter='/')
```

Lists the files with anonymous access. Runs on any machine, with no cloud account.

## Data structure

Example file: `dandisets/002040/draft/assets.jsonld`

Path pattern: `{prefix}/{YYYYMM}/{seg2}/{filename}`

## Open it

- In a hosted notebook with the data mounted: https://scigantic.com/archive/e78a03e0-843e-5033-9a63-3e1379373cb5
- Full record as JSON (schema card included): https://api.scigantic.com/api/archives/e78a03e0-843e-5033-9a63-3e1379373cb5
- Over MCP: `get_schema_card` with id `e78a03e0-843e-5033-9a63-3e1379373cb5` at https://api.scigantic.com/mcp

## Related topics

- [Neuroscience datasets](https://scigantic.com/topics/neuroscience)
- [Benchmark datasets](https://scigantic.com/topics/benchmark)
- [Calcium imaging datasets](https://scigantic.com/topics/calcium-imaging)
