esi-neuroscience / syncopy

Systems Neuroscience Computing in Python: user-friendly analysis of large-scale electrophysiology data
BSD 3-Clause "New" or "Revised" License
48 stars 14 forks source link

datamethods: to_analog #53

Open pantaray opened 4 years ago

pantaray commented 4 years ago

Not really a problem per se, more like a missing feature? Please elaborate We need a method to convert a DiscreteData object into an AnalogData object (e.g., to perform spectral analysis on spikes/saccades). Implement a new function in datatype/data_methods.py

to_analog(samplerate=..., peak_value=1, dtype=float32, filename=None)

where samplerate denotes the desired sample-rate of the constructed AnalogData object, peak_value means the "on"-value of events (e.g., construct a binary time-series of the form 00001000100) and filename can be optionally provided to circumvent creation of a tmp object and directly write to a user-defined location.

dfsp-spirit commented 1 year ago

Hard to tell how urgent this is and where we want to go with it once we have it (e.g., spike LFP coherence). Needs more info from PF.

Also check Fieldtrip, e.g. Spikefields. And elephant.