Changeset 277 for trunk/doc/spike2.txt
- Timestamp:
- 11/03/08 19:45:04 (5 years ago)
- Files:
-
- 1 modified
-
trunk/doc/spike2.txt (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/doc/spike2.txt
r271 r277 3 3 ========================= 4 4 5 The spike2 module offers an easy way for reading data from CED's Spike2 Son files into the NeuroTools enviroment.5 The ``spike2`` module offers an easy way for reading data from CED's Spike2 Son files into the NeuroTools environment. 6 6 7 The main interaction with with Spike2 files is provided by the SON Library which was written by: 8 Antonio Gonzalez 9 Department of Neuroscience 10 Karolinska Institutet 11 Antonio.Gonzalez@cantab.net 12 http://www.neuro.ki.se/broberger/ 7 The main interaction with with Spike2 files is provided by the SON Library which was written by:: 13 8 14 The spike2 module integrates the SON library such that the loading function directly returns NeuroTools.signals objects. 9 Antonio Gonzalez 10 Department of Neuroscience 11 Karolinska Institutet 12 Antonio.Gonzalez at cantab.net 13 http://www.neuro.ki.se/broberger/ 14 15 The ``spike2`` module integrates the SON library such that the loading function directly returns ``NeuroTools.signals`` objects. 15 16 This makes it very easy to apply certain analysis routines on simulated and real experimental data. 16 17 … … 19 20 ---------------- 20 21 21 Usually SON files contain data from multiple channels. The channels can contain analog signals, like membrane potential traces or discrete data like markers. The spike2 module knows which type of channel you are loading and thus returns the appropriate NeuroTools.signalobject.22 Usually SON files contain data from multiple channels. The channels can contain analog signals, like membrane potential traces or discrete data like markers. The ``spike2`` module knows which type of channel you are loading and thus returns the appropriate ``NeuroTools.signals`` object. 22 23 23 24 Here some examples how one can simply load the data. For the following example we assume that the SON file contains the membrane potential trace in channel 1, the markers in channel 2 and in channel 3 is data that we dont want to use: 24 25 25 To load the spike2module you could do the following::26 To load the ``spike2`` module you could do the following:: 26 27 27 28 >>> import NeuroTools.spike2.spike2channels as spike2 … … 33 34 [1,2,3] 34 35 35 since we don t need channel 3 we can use the channels parameter to specify which channel to load::36 since we don't need channel 3 we can use the channels parameter to specify which channel to load:: 36 37 37 38 >>> just_needed_channels = spike2.load(filename, channels=[1,2]) … … 46 47 <class 'NeuroTools.spike2.spike2channels.Marker'> 47 48 48 what can I now do with it? I.e. the Adc channel type is inherited from signals.AnalogSignaland thus you could plot an event_triggered_average on the marker times (please note that the markers are in seconds, we need them in milliseconds therefore the factor 1000)::49 what can I now do with it? I.e. the Adc channel type is inherited from ``signals.AnalogSignal`` and thus you could plot an event_triggered_average on the marker times (please note that the markers are in seconds, we need them in milliseconds therefore the factor 1000):: 49 50 50 51 >>> vm = just_needed_channels[1] … … 56 57 >>> vm_sclices = vm.slice_by_events(marker.times*1000.,t_min=100,t_max=1000) 57 58 58 For further examples of what to do with NeuroTools.signals objects, please refer to documentation of the signals modules.59 For further examples of what to do with ``NeuroTools.signals`` objects, please refer to the documentation for the ``signals`` module. 59 60 60 61
