syncopy
syncopy copied to clipboard
datamethods: to_analog
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.