= Functions for Basic e-phys = ''Authors: Konstantinos Nasiotis'' <> {{attachment:functionsIntro.png||width="700"}} After performing the spike sorting and the conversion to the LFPs users have access to these invaluable types of information. LFPs can be analyzed using the extensive library of methods that have been used in EEG and MEG research already present in Brainstorm. These signal processing libraries include preprocessing, artifact removal, time-frequency, connectivity, statistics and several other tools that are essential for analyzing electrophysiological data. Spiking activity can be analyzed in a set of functions that is present in the Electrophysiology library (Run->Electrophysiology), and help researchers understand their selectivity and interaction with the LFPs. For the purpose of the tutorial, the timings around the presentation of the Images are selected as the segment of interest of the recordings. To import those segments, users should right click on the Link to raw file (On the LFP file)-> Import Recordings. This will create 863 new entries in the database, since each event type (Stim On: …) was presented 108 times (Stim On -1/4 107 times). {{attachment:importDatabase.png||width="700"}} All event types should be imported, as in the screenshot below: {{attachment:importedTrials.png||width="700"}} Now that the trials are appropriately imported along with the spiking events in the database, users can use the functions that utilize them '''''Note''''': ''As stated earlier on this tutorial, in order for the spiking functions to work, they should be named with the convention: “Spikes Channel ChannelLabel”. If the spike sorting is performed within Brainstorm, this should be done automatically. Users that import their own spiking events should organize their events in a compatible to Brainstorm way.'' == Tuning Curves == The tuning curve is the most basic method of getting insights about neuronal selectivity in electrophysiology. Different conditions of a stimulus presentation are expected to elicit different number of spikes. Those conditions that each neuron is more “tuned” to, are expected to be recognized from a plot that shows that neuron’s number of spikes for each condition. The tuning curves can be derived straight __from the link to the raw file__, since the events are already linked to that file after the spike-sorting step. Users just need to drag and drop the Link to raw file to the process box, then click Run-> Electrophysiology->Tuning Curves. A new window will appear that allows users to select the neurons and the conditions that should be displayed. ----