Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Supported by

stimulus-onset markers in SMI .idf file

Hi,
Quick version of my question: Is there a way to merge markers in an SMI logfile into the .idf data file? (I would ask SMI if they hadn't evaporated 2 years ago; I'm hoping someone here might be able to help.)

The longer version:
For my eyetracking/ERP study, I need to synchronize the .idf data file from SMI's iViewX with Brain Products actiCHamp EEG data. I had hoped to do this with a simultaneous TTL trigger to both devices. I can send the trigger to the actiCHamp easy as pie...but I can't find a way to send it to the iViewX (you can't even add a parallel port or digital I/O card to our brilliantly built SMI workstation).

Then I noticed in Edwin's Python book the clever idea of adding a PyGaze_log item as a marker right after each stimulus onset.

But then I looked at libsmi.py ...and saw that this puts a marker in the SMI logfile, not the .idf data file.

Hence my question: Is there a way to merge logfile markers into the .idf data file?

Any ideas (short of manually entering each of the 9600 stimuli based on its timestamp) will be greatly appreciated.
--Russell

PS If you know a way to get the iViewX workstation to receive the TTL trigger, that would be great too.

Comments

  • edited February 26

    Your sync question is tricky, because with SMI I don't think it's possible to sync the clocks. However, you can definitely send timestamped markers to iViewX directly. It's in fact fairly straight-forward by adding a few lines in your libsmi.py script:

    def send_message(self, msg):
        iViewXAPI.iV_SendImageMessage(c_char_p(msg))
        # print command to debug window is optional:
        print("message: ", msg)
    

    You can then used send_message in your script where you want to send a marker instead of the log function, and it will show up in your IDF file with the SMI timestamp.

    Hope this helps!

    I just sent this as a pull request to @Edwin too, so you might see it in the master branch soon.

    Thanked by 2Russell Edwin
Sign In or Register to comment.