Skip to main content
  • Home
  • Development
  • Documentation
  • Donate
  • Operational login
  • Browse the archive

swh logo
SoftwareHeritage
Software
Heritage
Archive
Features
  • Search

  • Downloads

  • Save code now

  • Add forge now

  • Help

Revision 8ed0bc61f74cbe8b9d07278a25fd9f49c0af3f2b authored by Kellen Vu on 03 November 2022, 01:23:38 UTC, committed by Kellen Vu on 03 November 2022, 01:23:38 UTC
Fixes a bug where eyeCalibration.mlapp was trying to get the sample rate from the wrong smr channel. I tested this in D243b, and it should work for other computers, but let me know if it doesn't.
1 parent 1611f97
  • Files
  • Changes
  • cd980e7
  • /
  • Experiment Protocols
  • /
  • Experiment_Sriram_Oct2019_Alzheimers.s2s
Raw File Download
Permalinks

To reference or cite the objects present in the Software Heritage archive, permalinks based on SoftWare Hash IDentifiers (SWHIDs) must be used.
Select below a type of object currently browsed in order to display its associated SWHID and permalink.

  • revision
  • directory
  • content
revision badge
swh:1:rev:8ed0bc61f74cbe8b9d07278a25fd9f49c0af3f2b
directory badge Iframe embedding
swh:1:dir:73ffcf87dce87be96f418e9499e77c2335fd199b
content badge Iframe embedding
swh:1:cnt:aed478d9ace22baa5e79ab717cc69cbf77aced10
Citations

This interface enables to generate software citations, provided that the root directory of browsed objects contains a citation.cff or codemeta.json file.
Select below a type of object currently browsed in order to generate citations for them.

  • revision
  • directory
  • content
Generate software citation in BibTex format (requires biblatex-software package)
Generating citation ...
Generate software citation in BibTex format (requires biblatex-software package)
Generating citation ...
Generate software citation in BibTex format (requires biblatex-software package)
Generating citation ...
Experiment_Sriram_Oct2019_Alzheimers.s2s
'--------------------------------------------------------------------------------
' IMPORT RIG-SPECIFIC PARAMETERS AND UNIVERSAL PARAMETERS
'--------------------------------------------------------------------------------
#include "C:\\Users\\Public\\RaymondLabCode\\Experiment Protocols\\RigChoice.s2s"
#include "C:\\Users\\Public\\RaymondLabCode\\Experiment Protocols\\Parameters_Universal.s2s"

'--------------------------------------------------------------------------------
' MAIN PROGRAM
'--------------------------------------------------------------------------------
ToolbarConfig();

' 0 = GAP A
' 1 = Gap B
' 2 = test
' 3 = train Short
' 4 = Train Long
' 5 = Dark Resting
' 9 = quit experiment

const Order%[] := {0, 1, 2,
                   0, 1, 2,
                   0, 1, 2,
                   0, 1, 3, 2,
                   0, 1, 3, 2,
                   0, 1, 4, 2,
                   0, 1, 4, 2,
                   0, 1, 2,
                   0, 1, 2,
                   0, 1, 5,
                   0, 1, 2,
                   0, 9};

var expmtIndx := 0;
'--------------------------------------------------------------------------------
' Toolbar Callbacks
'--------------------------------------------------------------------------------
Func ToolbarIdle%()
  'This function calls repeatedly whenever nothing else is happening
  'if runexpmt=1, it is used to run a full expmt automatically.  -HP
  'expmtMode: 0=habit, 1=0x, 2=2x, 3=ipsi stim, 4=contra stim
  'test: 0=wait, 1=test, 2=train

  ' Check a valid sampling view is running
  var currView := ViewKind();
  if  currView <> 0 then
      return 1;
  endif;

  ' Keep sine wave from drifting
  if MaxTime() > (prevTime + 1/sinHzChair) then
    if driftFix = 1 then
      driftFix%();
    endif;
  endif;


  'If an experiment is running:
  if runExpmt% = 1 then

      'Check the time. Seconds is the current time - compare it to the goal time of each segment
      if  MaxTime() > goalTime then

        SampleKey(str$(Order%[expmtIndx]));
        docase
          ' GAP A
          case Order%[expmtIndx] = 0 then
            SampleKey("x");
            goalTime := MaxTime() + 5;
            ToolbarInit%(); Yield();

          ' GAP B
          case Order%[expmtIndx] = 1 then
            goalTime := MaxTime() + 5;
            ToolbarInit%(); Yield();
            runFlash(); Yield();
            ToolbarInit%(); Yield();

          ' TEST
          case Order%[expmtIndx] = 2 then
            SampleKey("x");
            SampleKey("X");
            goalTime := MaxTime() + testLength;

            ToolbarStimOff%();
            ToolbarLightOff%();

            if expmtMode = 5 then
              ToolbarStepOn%();
            else
              ToolbarSineStart%();
            endif;

          ' TRAIN SHORT
          case Order%[expmtIndx] = 3 then
            SampleKey("X");
            goalTime := MaxTime() + runLength;

            docase
              '3 = ipsi, 4 = contra
              case expmtMode = 3 or expmtMode = 4 then
                ToolbarSineStart%();
                ToolbarStimOn%();
              '1 = x0, 2 = x2
              case expmtMode = 1 or expmtMode = 2 then
                ToolbarSineStart%();
                ToolbarLightOn%();
              '5 = step
              case expmtMode = 5 then
                ToolbarStepOff%(); Yield();
                ToolbarLightOn%(); Yield();
                ToolbarStepOn%();
            endcase;

            ' TEST

          ' TRAIN LONG
          case Order%[expmtIndx] = 4 then
            SampleKey("X");
            goalTime := MaxTime() + runLength*2;

            docase
              '3 = ipsi, 4 = contra
              case expmtMode = 3 or expmtMode = 4 then
                ToolbarSineStart%();
                ToolbarStimOn%();
              '1 = x0, 2 = x2
              case expmtMode = 1 or expmtMode = 2 then
                ToolbarSineStart%();
                ToolbarLightOn%();
              '5 = step
              case expmtMode = 5 then
                ToolbarStepOff%(); Yield();
                ToolbarLightOn%(); Yield();
                ToolbarStepOn%();
            endcase;

          ' DARK RESTING
          case Order%[expmtIndx] = 5 then
            SampleKey("X");
            goalTime := MaxTime() + runLength

          ' QUIT EXPMT
          case Order%[expmtIndx] = 9 then
            ToolbarQuitExpmt%();
            Return(1);

        endcase;
        expmtIndx := expmtIndx + 1;
      endif;
  endif;
  Return(1);
End

'--------------------------------------------------------------------------------
'Configure expmt settings window
'--------------------------------------------------------------------------------
Func ToolbarConfigExpmt%()
  DlgCreate("Experiment settings");  'Start new dialog
  DlgInteger(1,"Number of run-test blocks",0,100,0,0,1);
  DlgInteger(2,"Number of tests per block",1,100,0,0,1);    'set to 0 if not using Chair
  DlgReal(3,"Run length (s)",0,5000);
  DlgReal(4,"Test length (s)",0,5000);
  DlgList(5,"Expmt mode", "habit|x0|x2|ipsi|contra|steps");
  DlgInteger(6,"Light flash on?)",0,1,0,0,"0|1");
  DlgReal(7,"Test stim and bilat (0 or 1)",0,1);

  DlgShow(nBlocks%, nTestreps%, runLength, testLength, expmtMode, flashon%,testStim);

  docase
  case expmtMode = 0 then     'habit
      sinPhDrum := 90;
      sinPhChair := 90;
      sinAmpChair := 10;
      sinAmpDrum := 0;
  case expmtMode = 1 then     'x0
      sinPhDrum := 90;
      sinPhChair := 90;
      sinAmpChair := 10;
      sinAmpDrum := 10;
  case expmtMode = 2 then     'x2
      sinPhDrum := -90;
      sinPhChair := 90;
      sinAmpChair := 10;
      sinAmpDrum := 10;
  case expmtMode = 3  then     'ipsi
      sinPhChair := 90;
      sinAmpDrum := 0;
  case expmtMode = 4 then      'contra
      sinPhChair := -90;
      sinAmpDrum := 0;
  case expmtMode = 5 then      'steps
      StepConfigWindow%();
  endcase;


  if testStim > 0 then
      ToolbarPulseConfig%()
  endif;

  SetSequencerValues();
  Return(1);
End
The diff you're trying to view is too large. Only the first 1000 changed files have been loaded.
Showing with 0 additions and 0 deletions (0 / 0 diffs computed)
swh spinner

Computing file changes ...

back to top

Software Heritage — Copyright (C) 2015–2025, The Software Heritage developers. License: GNU AGPLv3+.
The source code of Software Heritage itself is available on our development forge.
The source code files archived by Software Heritage are available under their own copyright and licenses.
Terms of use: Archive access, API— Contact— JavaScript license information— Web API