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 bc6bc5271ca8c2cbf8107bdf243352e543f64b8e authored by Brian Angeles (Desktop) on 20 March 2023, 22:34:45 UTC, committed by Brian Angeles (Desktop) on 20 March 2023, 22:34:45 UTC
Added .gitignore file and removed RigChoice.s2s
As a first step to generalizing the code, we removed the need to
comment/uncomment the appropriate rig-specific parameters file and
replace it with a local rig_config.s2s file that is ignored by Git. This
way, changes can be made to this simple file without affecting the
Github repository at all.
1 parent 3d78fa7
  • Files
  • Changes
  • 9b50c67
  • /
  • Experiment Protocols
  • /
  • Experiment_Alex_Nov2019_GagnonPredictor.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:bc6bc5271ca8c2cbf8107bdf243352e543f64b8e
directory badge Iframe embedding
swh:1:dir:f9b72c50f80378cd6569bad22aef26e3c6a93d60
content badge Iframe embedding
swh:1:cnt:e65acb6f33700280db046e09a5c221c9a1a5c623
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_Alex_Nov2019_GagnonPredictor.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
'--------------------------------------------------------------------------------
' 0 = GAP A
' 1 = Gap B
' 2 = test
' 3 = train
' 9 = quit experiment

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

var expmtIndx := 0;
runLength := 3600; '1 Hour (60 minutes x 60 seconds)
testLength := 45;

ToolbarConfig();

'--------------------------------------------------------------------------------
' 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/((stepPeriod+245)/1000)) 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");
            goalTime := MaxTime() + testLength;
            stepPeriod := 1000;
            stepLength := 250;
            stepAmpChair := 10;
            stepAmpDrum := 0;
            ToolbarStepConfig%();

            toolbarStepOn%();


          ' TRAIN
          case Order%[expmtIndx] = 3 then
            SampleKey("X");
            goalTime := MaxTime() + runLength;
            stepPeriod := 10000;
            stepLength := 5000;
            stepAmpChair := 0;
            stepAmpDrum := -10;
            QueTime := 495;
            ToolbarStepConfig%();
            toolbarStepOn%();

          ' 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
  DlgReal(1,"Run length (s)",0,5000);
  DlgReal(2,"Test length (s)",0,5000);
  DlgInteger(3,"Light flash on?)",0,1,0,0,"0|1");

  DlgShow(runLength, testLength, flashon%,testStim);

  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