I’m using the AllenSDK as part of my research and specifically want to use the Df/f trace data. When I plot out Df/f vs time (using get_dff_trace() and saving the timestamps and the trace data like the tutorial https://allensdk.readthedocs.io/en/latest/_static/examples/nb/brain_observatory.html)
I get a plot for a cell like this:
Some data about this specific experiment and cell that I’m referring to from it’s metadata file if you’re wondering:
‘age_days’: 108,
‘cre_line’: ‘Cux2-CreERT2/wt’,
‘device’: ‘Nikon A1R-MP multiphoton microscope’,
‘device_name’: ‘CAM2P.2’,
‘excitation_lambda’: ‘910 nanometers’,
‘experiment_container_id’: 511507650,
‘fov’: ‘400x400 microns (512 x 512 pixels)’,
‘genotype’: ‘Cux2-CreERT2/wt;Camk2a-tTA/wt;Ai93(TITL-GCaMP6f)/Ai93(TITL-GCaMP6f)’,
‘imaging_depth_um’: 175,
‘indicator’: ‘GCaMP6f’,
‘ophys_experiment_id’: 501794235,
‘pipeline_version’: ‘3.0’,
‘session_start_time’: datetime.datetime(2016, 2, 8, 14, 9, 15),
‘session_type’: ‘three_session_B’,
‘sex’: ‘male’,
‘specimen_name’: ‘Cux2-CreERT2;Camk2a-tTA;Ai93-222424’,
‘targeted_structure’: ‘VISp’
I understand that this plot graphs out all of session B, but is there any way I can splice the data to only show the df/f for static gratings? The stimulus epoch table that I get from this experiment does not line up with the timestamps from the df/f data (this goes from 747 to 113623 while the dff_trace timestamps go from around 0 to 4000)
stimulus epoch table:
stimulus start end
0 static_gratings 747 15198
1 natural_scenes 16102 30550
2 spontaneous 30700 39579
3 natural_scenes 39580 54028
4 static_gratings 54931 69378
5 natural_movie_one 70281 79310
6 natural_scenes 80213 96091
7 static_gratings 97370 113623
Also is there a way to determine at what specific time a stimulus is given relative to the timestamps from df/f trace, specifically for static gradients? My research mentor recommended that I get approximately 3 seconds before the “static gradient stimulus onset” and 3 seconds after of df/f in a process called “epoching”.
I apologize if any of this sounds confusing. I’ve just been learning about this over the past week and any clarifications would be helpful!