Getting Started
This tool was created to be an easy-access library for pynwb.
Creating an NWB
To create our NWB object, we’ll use this generic one
1from simply_nwb import SimpleNWB
2import pendulum
3from pynwb.file import Subject
4
5
6def nwb_gen():
7 return SimpleNWB.create_nwb(
8 # Required
9 session_description="Mouse cookie eating session",
10 # Subtract 1 year so we don't run into the 'NWB start time is at a greater date than current' issue
11 session_start_time=pendulum.now().subtract(years=1),
12 experimenter=["Schmoe, Joe"],
13 lab="Felsen Lab",
14 experiment_description="Gave a mouse a cookie",
15
16 # Optional
17 identifier="cookie_0",
18 subject=Subject(**{
19 "subject_id": "1",
20 "age": "P90D", # ISO-8601 for 90 days duration
21 "strain": "TypeOfMouseGoesHere", # If no specific used, 'Wild Strain'
22 "description": "Mouse#2 idk",
23 "sex": "M", # M - Male, F - Female, U - unknown, O - other
24 # NCBI Taxonomy link or Latin Binomial (e.g.'Rattus norvegicus')
25 "species": "http://purl.obolibrary.org/obo/NCBITaxon_10116",
26 }),
27 session_id="session0",
28 institution="CU Anschutz",
29 keywords=["mouse"],
30
31 # related_publications="DOI::LINK GOES HERE FOR RELATED PUBLICATIONS"
32 )
Transform Functions
Transformations take raw data and turn it into a format more easy to manipulate. Some are even required to transform them into usable data, and can take a while to process.
See the Examples for how to use specific transforms.