Importing Piezoelectric events and optogenetic events #61
-
Hi Peter I tried to go through the tutorial, but i dont understand very well what do i need to do in order to import stimulation events such as Piezo, Airpuffs, Laser etc, to calculate PSTHs, do I need to enter the "basename.events.mat in the Session_gui to be detected by CellExpllorer? Jesus |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments 4 replies
-
Below steps describes the procedure:
Replace the intervals above with your specific stimulation events.
This will generate an events file in the basepath: tutorial_session.stimulation.events.mat. These two steps should be repeated for each of your types of events (Piezo, Airpuffs, Laser) to generate multiple events file, e.g.
Now, your cell_metrics should contain the PSTH fields: cell_metrics.events.stimulation, and timestamps are saved to cell_metrics.general.events.stimulation |
Beta Was this translation helpful? Give feedback.
-
Dear Peter firsts i define the events as suggested but not sure if i am doing correctly These time stamps are the stimulation onset in seconds, Right? basename = 'Piezo_session'; later when i try to create a customize plot i click in menu spikes/open_spike_data_dialog/add_plot or sometimes is missaligned i wonder what i might be doing wrong Thank you very much in advance Jesus |
Beta Was this translation helpful? Give feedback.
-
Hi Jesus Try to generate the events file and rerun ProcessCellMetrics. This will automatically generate the PSTH If it is not generated, check the ProcessCellMetrics log as it should tell you why it was not done. You can also try to generate the PSTH directly, by providing an event struct, and the spikes struct: If you want a PSTH with spike raster, you should define it in the spikes menu. Check this tutorial for help: https://cellexplorer.org/tutorials/plotting-spike-data/#create-and-modify-spike-plots-in-cellexplorer The two most important things to do is select spikes from the X-data menu, and provide the name of your events: |
Beta Was this translation helpful? Give feedback.
-
For all this type of analysis I recommend using rounded sampling rates, so use 30000Hz instead of 30030Hz. I don't know what could case the misalignment, the code for importing events and manipulations is the same (except perhaps for alignment, e.g. onset, offset, and center, but that does not seem to be the issue here). Perhaps you could validate the timestamps with NeuroScope2? Open the session in NeuroScop2, navigate your events/manipulation events, and see if they align properly. |
Beta Was this translation helpful? Give feedback.
Below steps describes the procedure:
Replace the intervals above with your specific stimulation events.
This will generate an events file in the basepath: tutorial_session.stimulation.events.mat. These two steps should be repeated for each of your types of events (Piezo, Airpuffs, Laser) to generate multiple events file, e.g.
tutorial_session.Piezo.ev…