Zapit-Optostim / zapit

General purpose optostimulation system
GNU Lesser General Public License v2.1
6 stars 1 forks source link

Rampdown might possibly be starting one cycle too soon #149

Open raacampbell opened 5 months ago

raacampbell commented 5 months ago

We asked for 800 ms plus 250 ms for Oli's figure and we get the following:

Screenshot 2024-02-06 at 22 52 37

The data are measured with a photodiode and it's possible the start of the rampdown is being missed due to saturation. Over all it is running for the correct time period but maybe we need to tweak how the ramp down happens.

This may be a minor bug or may be a measurement error.

Data from @omgauld001

raacampbell commented 5 months ago

I start in simu mode version 1.02 on dev. I load uniAndBilateral_5_conditions.yml then:

[~,~,W]=hZP.sendSamples('cond',2,'stimDurationSeconds',0.8); %Two pos
[~,~,W]=hZP.sendSamples('cond',3,'stimDurationSeconds',0.8); %One pos

The results look as expected.

One stim pos

image

Two stim pos:

Screenshot 2024-02-07 at 00 34 50

Possibly @omgauld001 had an older version with a bug? Or possibly the photodiode was saturated? The lack of the last pulses might be due to the fact that the laser cuts off at very low powers.

omgauld001 commented 5 months ago

We've been using version 1.0.2. in the matlab window it states 'Zapit is up to date'

omgauld001 commented 5 months ago

IMG_9704 This was a measurement taken in Aug 2023. The stim is 500 ms and then 250 ms rampdown. The rampdown starts at the right time, but again it seems like the last laser pulse is not delivered.

raacampbell commented 5 months ago

We've been using version 1.0.2. in the matlab window it states 'Zapit is up to date'

You probably are pulling from the dev branch, since master is v1.0.2 (https://github.com/Zapit-Optostim/zapit/releases). Just keep that in mind.

Looks like you had saturation originally and the failure to see the last pulse is just the laser not being able to produce a super-low power.