Page 1 of 1

stimulation listener vs/ signal display

Posted: Thu Jul 21, 2011 8:28 am
by ntarrin
Hello,

We are working on the Mitsar driver and to measure the stimulations it sends, we use both signal display and stimulation listener.

The test I use sends 1 stimulation 80 and 12 stimulations 40. I can see this on the signal display, but the stimulation listener shows something like 2 stim 80 and between 16 and 19 stim 40 (see snapshot). Did someone ever notice this or am I missing something ?

Nicolas.

Re: stimulation listener vs/ signal display

Posted: Thu Jul 21, 2011 9:52 am
by jlegeny
Hi,

could it be possible that the window of the signal display is too small to fit all of the received stimulations and thus some of them overlap? In case of doubt I would believe the stimulation listener as the signal display box is getting quite old.

Jozef

Re: stimulation listener vs/ signal display

Posted: Thu Jul 21, 2011 1:19 pm
by ntarrin
The signal display window size is ok.

Re: stimulation listener vs/ signal display

Posted: Thu Jul 21, 2011 1:35 pm
by yrenard
Dear nicolas,

I would better trust the stimulation listener as the signal display is known to have a couple of issues with stimulation display. The problem is that you'd probably like to trust the signal display, right ? ;) Would you please dump the acquired streams in an OpenViBE file (not a GDF, an OpenViBE !) so I can give it a look to the stream structure ?

Yann

Re: stimulation listener vs/ signal display

Posted: Fri Jul 22, 2011 9:30 am
by ntarrin
Hi Yann,

Oh yes, I want to trust what best fits my needs :twisted:

Here is the dump (rename the txt in ov as the forum reject .ov files).
I attach also a snapshot of the driver and listener output, which shows two times the same stimulation.

Thanks for your help !

Nicolas.

Re: stimulation listener vs/ signal display

Posted: Fri Jul 22, 2011 3:19 pm
by yrenard
Dear Nicolas,

there is indeed a problem in this stream. At least one of the stimulations comes twice with exactly the same date but in two different stream chunks.

Where do this stream comes from ? Is it directly from the acquisition client box ?

Best,
Yann

Re: stimulation listener vs/ signal display

Posted: Tue Jul 26, 2011 9:23 am
by ntarrin
Hi Yann,

Yes, it's a very simple scenario, with the writer just after the acquisition client.

Nicolas.

Re: stimulation listener vs/ signal display

Posted: Mon Aug 08, 2011 4:14 pm
by yrenard
Dear Nicolas,

Have you traced what happens in the acquisition server driver ? There may be a mistake there. (look for setStimulationSet).

If there is no mistake, the problem may be caused by the drift correction. Try to disable the drift correction and send us a status update.

If that's not solved, well... we'll have to think about it a bit more :)

Yann

Re: stimulation listener vs/ signal display

Posted: Tue Sep 06, 2011 12:42 pm
by ntarrin
Hi,

I've re-checked the setStimulationSet in the driver, checked that drift correction was disabled, and I have the same trigger duplication in the stimulation listener... (see attached picture).

Below is the code where this is done in the driver, including the debug output.

Code: Select all

	for ( OpenViBE::uint32 iStimulation=0; iStimulation < l_ui32NbStimulations; iStimulation++ )
    {
		l_oStimulationSet.setStimulationIdentifier(iStimulation, OVTK_StimulationId_Label(m_vStimulationIdentifier[iStimulation]));
		l_oStimulationSet.setStimulationDate(iStimulation, ( uint64(m_vStimulationDate[iStimulation]) << 32) / m_oHeader.getSamplingFrequency());
        l_oStimulationSet.setStimulationDuration(iStimulation, 1);

		std::cout << "Trigger " << std::hex << m_vStimulationIdentifier[iStimulation] << " ";
	}

	// Drift correction from GUI
	if (m_ui32DriftCorrectionState)
	{
		m_rDriverContext.correctDriftSampleCount(m_rDriverContext.getSuggestedDriftCorrectionSampleCount());
	}

	// SEND SAMPLES & STIMULATIONS
	m_pCallback->setSamples(&m_vOutputSamples[0],(uint32) SAMPLES_NB);
    m_pCallback->setStimulationSet(l_oStimulationSet);

Re: stimulation listener vs/ signal display

Posted: Wed Sep 07, 2011 9:49 am
by yrenard
Dear Nicolas,

as you are a programmer, may I ask you that you also trace what happens in the setStimulationSet callback in the acqusition server (see line 847 of file ovasCAcquisitionServer.cpp). Or, if you don't want to investigate in the acquisiton server code, please provide the source code of your driver so someone on the forum can investigate your code.

Best regards,
Yann

Re: stimulation listener vs/ signal display

Posted: Thu Sep 15, 2011 3:23 pm
by ntarrin
Hi Yann,
I have put an output in the acquisition server (in OpenViBEToolkit::Tools::StimulationSet::append).

If I run the acquisition server alone, it gives the wright number of stimulations. But if I run a basic scenario in the designer (displaying signal and stims), the output in acquisition server shows duplicates. Any idea what could it be ?

Attached is the driver code.

Thanks for your help.
Nicolas.