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 4dbf0ec391b877f21402aed9e8351fe8f7468d14 authored by D019 Rig on 19 December 2019, 23:25:22 UTC, committed by D019 Rig on 19 December 2019, 23:25:22 UTC
Update Calibration
1 parent 4cac1d4
  • Files
  • Changes
  • cb6e09d
  • /
  • Tools
  • /
  • Program_Maestro_and_CX
  • /
  • v410
  • /
  • cxdata_src_V410
  • /
  • pertmgr.h
Raw File Download

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:4dbf0ec391b877f21402aed9e8351fe8f7468d14
directory badge
swh:1:dir:7cb7f028037ea1fe6743e8c4ed8776a4befa1faa
content badge
swh:1:cnt:6491df30b128154694a0363d559a6ad1a8c5b0f3

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 ...
pertmgr.h
//===================================================================================================================== 
//
// pertmgr.h : Constants and other declarations for PERTMGR.C
//
// ****** FOR DESCRIPTION, REVISION HISTORY, ETC, SEE IMPLEMENTATION FILE ******
//
//===================================================================================================================== 

#if !defined(PERTMGR_H__INCLUDED_)
#define PERTMGR_H__INCLUDED_

#include "wintypes.h"                     // some typical Windows typedefs that we need 
#include "cxobj_ifc_mex.h"                // common Maestro/CXDRIVER object definitions
#include "cxtrialcodes_mex.h"             // Maestro/CXDRIVER trial codes

                                       
//===================================================================================================================== 
// UNIFORMRNG:  Constants and state information for a pseudo-random number generator that returns a sequence of 
// uniformly distributed floating-point values in (0.0 .. 1.0), endpoints excluded.
//===================================================================================================================== 
#define   URNG_TABLESZ      32            // size of shuffle table
#define   URNG_M            2147483647    // parameters of interal linear congruential generator I' = A*I % M, using 
#define   URNG_A            16807         // Schrage's method (Q,R) to avoid integer overflow
#define   URNG_Q            127773
#define   URNG_R            2836
#define   URNG_NDIV         (1 + (URNG_M - 1)/URNG_TABLESZ)
#define   URNG_DSCALE       (1.0/URNG_M)

typedef struct uniformRNGObj
{
   int shuffle[URNG_TABLESZ];             // the shuffle table
   int lastOut;                           // the last integer spit out of shuffle table
   int curr;                              // current value I of the linear congruential generator
} UNIFORMRNG, *PUNIFORMRNG;

 
//===================================================================================================================== 
// GAUSSRNG:  State information for a pseudo-random number generator that returns a sequence of normally distributed
// floating-point values with zero mean and unit variance.
//===================================================================================================================== 

typedef struct gaussianRNGObj
{
   UNIFORMRNG uniformRNG;                 // uniform random-number generator from which gaussian distrib seq derived
   BOOL bGotNext;                         // since algorithm generates two numbers at a time, we only have to process
   double dNext;                          // the algorithm on every other call to Generate()
} GAUSSRNG, *PGAUSSRNG;


//===================================================================================================================== 
// MPERTMGR:  All information needed to process any and all perturbations presented during a single Maestro trial
//===================================================================================================================== 
//
typedef struct maestroPertObj          // encapsulation of a single perturbation waveform:
{
   int iTgt;                           //   index (in trial target map) of the affected target
   int idCmpt;                         //   id of affected trajectory component (one of PERT_ON_** constants)
   int iStart;                         //   start time (during trial) in ms
   float fAmp;                         //   perturbation amplitude
   PERT def;                           //   parameters defining the unit-amplitude perturbation

   UNIFORMRNG uniformRNG;              //   private random# generator for a uniform noise pert (PERT_ISNOISE)
   GAUSSRNG gaussRNG;                  //   private random# generator for a gaussian noise pert (PERT_ISGAUSS)
   double dLastRandom;                 //   last random# generated -- since noise perts only update once in a while
} MPERTOBJ, *PMPERTOBJ;

typedef struct maestroPertMgr
{
   int      nPerts;                    // the list of perturbations currently in effect
   MPERTOBJ perts[MAX_TRIALPERTS]; 
} MPERTMGR, *PMPERTMGR;




//===================================================================================================================== 
// "Public" functions defined in this module
//===================================================================================================================== 
VOID seedUniformRNG( PUNIFORMRNG pUnif, int seed );
double getUniformRNG( PUNIFORMRNG pUnif );

VOID seedGaussRNG( PGAUSSRNG pGauss, int seed );
double getGaussRNG( PGAUSSRNG pGauss );

VOID resetPertManager( PMPERTMGR pPertMgr );
BOOL processPertCodes( PMPERTMGR pPertMgr, TRIALCODE* pCodes );
VOID perturbTarget( PMPERTMGR pPertMgr, int iTgt, int iTime, 
   double winVelH, double winVelV, double patVelH, double patVelV, 
   double* pWinOffsetH, double* pWinOffsetV, double* pPatOffsetH, double* pPatOffsetV );


#endif   // !defined(PERTMGR_H__INCLUDED_)



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–2026, 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— Content policy— Contact— JavaScript license information— Web API