python-neo icon indicating copy to clipboard operation
python-neo copied to clipboard

Can't find the marker channels in a .smrx file using the CedIO loader.

Open FloHofmann opened this issue 1 year ago • 9 comments

As the title suggests. I have recording data in from of .smrx files. Using a keyboard input, I trigger waveforms, which i feed back as ADC. I can find the waveforms easily in the block.segments.analogsignals but the marker for the trigger, which should be channel 30, I can't seem to find in the objects structure. Any suggestion as to where these marker channels could be located? Thanks for any help in advance

FloHofmann avatar Mar 20 '24 10:03 FloHofmann

Hi @FloHofmann

Can you share a short test file with these markers?

alejoe91 avatar Mar 20 '24 10:03 alejoe91

Hi, thanks for the quick response @alejoe91. Here is a file. Channel 4 contains the ADC inputs from the waveshape that was played with DAC 1. Channel 31 contains characters that trigger the waveshape Data-test.zip I hope the file transfer works this way

FloHofmann avatar Mar 20 '24 10:03 FloHofmann

In case it helps. I'm using Python 3.9.18, neo 0.12.0 and sonpy 1.9.5

Hi, thanks for the quick response @alejoe91. Here is a file. Channel 4 contains the ADC inputs from the waveshape that was played with DAC 1. Channel 31 contains characters that trigger the waveshape Data-test.zip I hope the file transfer works this way

FloHofmann avatar Mar 21 '24 08:03 FloHofmann

@FloHofmann why did you label this as documentation? I would say it's more an enhancement!

alejoe91 avatar Mar 21 '24 08:03 alejoe91

@FloHofmann why did you label this as documentation? I would say it's more an enhancement!

I was sure I was missing something in the documentation, leading to me not finding the needed channels. So I take from your replies, that there currently is no implementation for what I'm looking for?

FloHofmann avatar Mar 21 '24 09:03 FloHofmann

Honestly I'm not sure. Let me ping @samuelgarcia

alejoe91 avatar Mar 21 '24 09:03 alejoe91

Hi, Maybe your trigger is some in block.segments.events no ? I haven't coded te CEDIO that depend on sonpy internally so I do not known. Are you able to find this marker with puer sonpy approach ?

samuelgarcia avatar Mar 21 '24 11:03 samuelgarcia

Hi, Maybe your trigger is some in block.segments.events no ? I haven't coded te CEDIO that depend on sonpy internally so I do not known. Are you able to find this marker with puer sonpy approach ?

Hi, unfortunately, the block.segments.events is an empty dict in my case. I will have to try and find it with pure sonpy, so far I've not dealt with it myself.

FloHofmann avatar Mar 21 '24 14:03 FloHofmann

Hi, Maybe your trigger is some in block.segments.events no ? I haven't coded te CEDIO that depend on sonpy internally so I do not known. Are you able to find this marker with puer sonpy approach ?

I've tried the Sonpy approach now. Using the ReadMarkers() ( .ReadMarkers(30,1000,0,smrx.MaxTime(30)); 30 being the Channel Number of the Marker channel in my provided file, 1000 being an arbitrarily chosen number for MaxNumberMarkers) function returns a list of <sonpy.DigMark> objects that contain the sample as well as the marker codes.

So now the issue is just retrieving the codes from those DigMark object for which I'm still looking for a solution. Maybe you know how sonpy objects can be transformed into python lists?

FloHofmann avatar Apr 09 '24 09:04 FloHofmann