File MIES_AcquisitionStateHandling.ipf

AS Acquisition state handling

Functions

string AS_StateToString(variable acqState)

Get the acquisition state as string.

variable AS_HandlePossibleTransition(string device, variable newAcqState, variable call = defaultValue)

Takes care of (possible) acquisition state transitions.

We track the acquisition state so that we can perform actions for state transitions when required.

Parameters:
  • device – device

  • newAcqState – One of AcquisitionStates

  • call – [optional, defaults to false] Call analysis function which is connected to the state transition.

static variable AS_CheckStateTransition(variable oldAcqState, variable newAcqState)

Check the acquisition state transition between old and new.

The following graph shows the allowed transitions for all states.

variable AS_GetSweepNumber(string device, variable allowFallback = defaultValue)

Return the sweep number of the currently active sweep.

The ITI between sweeps belongs to the earlier sweep. The main use is to add a labnotebook entry during data acquisition. The similiar named function AFH_GetLastSweepAcquired() returns the last acquired sweep in comparison.

static variable AS_RecordStateTransition(variable oldAcqState, variable newAcqState)
wave AS_GenerateEncounteredTransitions()

Return a wave with all encountered state transitions.

Requires that they were recorded with AS_RecordStateTransition().