Howdy, Stranger!

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

Supported by

[solved] Logger time function

edited April 2014 in OpenSesame

Can someone help me understand the time function that the logger produces? I need to know how many milliseconds from the start of an experiment it has been until each item.

Basically i am presenting stimuli with OpenSesame and recording GSR/SCR/EDA with NeuLog equipment and need to look at the change in GSR after each stimuli was presented. The problem is that the time function in the logger spits out a 6 or 7 digit long number and I cannot make heads or tails of it... any way to get the logger to tell me how many milliseconds since the start of an experiment that the stimuli was presented?

Thanks

Comments

  • edited 9:11PM

    All the timestamps are in milliseconds, but their starting value is back-end specific. So it's best to just see them as having no meaning in terms of time-since-experiment-start.

    What you could do is simply pick an item, perhaps a sketchpad somewhere at the start of the experiment, that you want to use as a starting point. Then you just subtract the time_[item name] variable of that item from the timestamps that you are interested in, and you have what you want: A time in milliseconds after a specific item.

    Cheers!
    Sebastiaan

  • edited 9:11PM

    By the way: I'm not familiar with the equipment you mention, but in general the most failproof procedure is to sent triggers to your data files (like you would in EEG and eye tracking). Usually via the parallel port (there's a plug-in for that!), or via the serial port (plug-in).

    By sending a trigger at the onset of a relevant stimulus, you don't have to bother with recalculating the timing afterwards.

  • edited 9:11PM

    Thank you so much! Sebastian, I was going to do that as a last ditch effort... Edwin (or Sebastian) the equipment I am using runs through USB, not parallel port... is there a plugin for that?

  • edited 9:11PM

    A device can communicate through the USB port in many different ways. A very common way is actually by simulating an old-fashioned serial port. So it all depends on your specific device.

    I would first look on the manufacturer's website (or contact them) to find out how you should communicate with the device. Does it simply emulate a serial port (easiest)? Is there a custom Python library (easy)? Or something else (probably less easy)? They surely have this information, and perhaps they even have some example Python code.

    Once you have this information, we can see how to include this in your OpenSesame experiment. That shouldn't be too difficult!

  • edited 9:11PM

    Sebastian, I had emailed the company and they say that there is no way for the hardware to communicate with other programs other than the company software (neulog.com and http://www.neulog.com/SoftwareandApplication.php).

    Basically it is a plug and play system with multiple sensors (things from rudimentary EKG to soil analysis). They have multiple ways of communicating with a computer (a USB module, an RF module, WiFi Module) all the sensors also have a flash memory that can hold up to 5 experiments.

    I will call the company when I do get a chance. I am not as tech savvy as you seem to be, what questions, specifically should I ask?

    Thank you again for your time!

  • edited 9:11PM

    It seems like the recording is not done by a hardware device, but by a program. This makes perfect sense, I think, for a modern set-up, although it's a bit unusual. So you probably have the sensors, which are connected to a computer that runs the NeuroLog software. On a separate computer you will have the experiment running. The question is how you can send triggers from the experiment PC to the NeuroLog PC. (This is just my guess of what the set-up looks like, of course.)

    But basically, assuming that they are not total idiots, I'm sure they will understand if you just explain to them what it is you want do. And they should be able to give you specific instructions.

  • edited 9:11PM

    Sebastian, I can't thank you enough for your patience and help. I called the company and left a message, but I doubt they will be helpful. (I can send you the file with my experiment, if that would help you)

    However, I was able to find THIS!: https://github.com/thearn/pyneulog

    Can you help me make heads and tails of this? Where do I put this in?
    Also, does it matter that I am using the legacy backend? (I was using psychopy, but the it was not displaying my stimuli quick enough)

    You have been SO HELPFUL! Thanks!!!!

  • edited 9:11PM

    Hi,

    You could upload your experiment to pastebin and post the link here (please don't send it by email). However, there's not much that I can do in terms of giving specific advice. You really need someone who is familiar with the NeuroLog system. It's not really an OpenSesame issue, it's more generally about using NeuroLog in a Python environment.

    If the company is not helpful, I would contact the pyneulog developer.

    Cheers!
    Sebastiaan

  • edited 9:11PM

    Hi Sebastiaan,

    I wrote to the developer of pyneulog and he wrote back to me

    "In the python code, try entering this:
    import serial
    and see if it gives an error or not. If it doesn't, then I can give you some code to run directly.

    If it does give an error, then I'd look and see if there is anyway to get third party python packages installed into OpenSesame python interpreter. I think their developers should be able to give some instructions on how to do that."

    When I entered "import serial" I did get an error message. I told the developer that there is the srbox item. Any suggestions?

This discussion has been closed.