File MIES_WaveBuilderPanel.ipf

WBP Panel for creating stimulus sets

Parameters for WBP_TranslateControlContents()

static const double FROM_PANEL_TO_WAVE = 0x1
static const double FROM_WAVE_TO_PANEL = 0x2

Unnamed Group

string WBP_GetAnalysisFunctions_V3()

Wrapper functions to be used in GUI recreation macros This avoids having to hardcode the parameter values.


variable WB_OpenStimulusSetInWaveBuilder()
string WBP_CreateWaveBuilderPanel()
variable WBP_StartupSettings()
static variable WBP_AddEpochHLTraces(dfref dfr, variable epochHLType, variable epoch, variable numEpochs)

Add epoch highlightning traces Uses fill-to-next on specially created waves added before and after the current trace.

static variable WBP_DisplaySetInPanel()
static variable WBP_UpdateDependentControls(string checkBoxCtrl, variable checked)

Reponsible for adjusting controls which depend on other controls.

Must be called before the changed settings are written into the parameter waves.

static variable WBP_UpdatePanelIfAllowed()
static variable WBP_ParameterWaveToPanel(variable stimulusType)

Passes the data from the WP wave to the panel.

static variable WBP_SetControl(string win, string control, variable value = defaultValue, string str = defaultValue)

Generic wrapper for setting a control’s value.

variable WBP_ButtonProc_DeleteSet(WMButtonAction *ba)
variable WBP_CheckProc(WMCheckboxAction *cba)
variable WBP_InitialTabHook(WMTabControlAction *tca)

Additional initialhook called in ACL_DisplayTab

variable WBP_FinalTabHook(WMTabControlAction *tca)

Additional finalhook called in ACL_DisplayTab

variable WBP_ButtonProc_SaveSet(WMButtonAction *ba)
static variable WBP_GetWaveTypeFromControl(string control)
static variable WBP_ExtractRowNumberFromControl(string control)

Returns the row index into the parameter wave of the parameter represented by the named control.

All entries are per epoch type and per epoch number except when the $suffix is ALL which denotes that it is a setting for the full stimset.


control – name of the control, the expected format is $str_$sep$row_$suffix where $str may contain any characters but $suffix is not allowed to include the substring _$sep.

variable WBP_UpdateControlAndWave(string control, variable var = defaultValue, string str = defaultValue)

Update the named control and pass its new value into the parameter wave.

variable WBP_SetVarProc_UpdateParam(WMSetVariableAction *sva)
static variable WBP_LowPassDeltaLimits()
static variable WBP_HighPassDeltaLimits()
static variable WBP_ChangeWaveType()
variable WBP_GetStimulusType()
variable WBP_PopMenuProc_WaveType(WMPopupAction *pa)
string WBP_GetListOfWaves()
variable WBP_SetVarProc_SetSearchString(WMSetVariableAction *sva)
variable WBP_PopMenuProc_WaveToLoad(WMPopupAction *pa)
string WBP_ReturnListSavedSets()
variable WBP_IsBuiltinStimset(string setName)

Return true if the given stimset is a builtin, false otherwise.

static variable WBP_LoadSet(string setName)
static variable SetAnalysisFunctionIfFuncExists(string win, string ctrl, string stimset, string funcList, string func)
static variable WBP_UpdateEpochControls()
variable WBP_SetVarProc_EpochToEdit(WMSetVariableAction *sva)
variable WBP_PopupMenu_LoadSet(WMPopupAction *pa)
static variable WBP_CutOffCrossOver()
static variable WBP_ReturnPulseDurationMax()

Checks to see if the pulse duration in square pulse stimulus trains is too long.

dfref WBP_GetFolderPath()
string WBP_ReturnFoldersList()
variable WBP_PopMenuProc_FolderSelect(WMPopupAction *pa)
variable WBP_CheckProc_PreventUpdate(WMCheckboxAction *cba)
variable WBP_PopupMenu(WMPopupAction *pa)
static string WBP_ConvertDeltaLblToCtrlNames(string allControls, string dimLabel)

Convert from the row index of a delta related control to a list of control names.

static variable WBP_AdjustDeltaControls(string control)

Depending on the delta operation the visibility of related controls is adjusted.


control – delta operation control name

variable WBP_ButtonProc_NewSeed(WMButtonAction *ba)
variable WBP_PopupMenu_AnalysisFunctions(WMPopupAction *pa)
static variable WBP_UpgradePRNG()
static variable WBP_AnaFuncsToWPT()
string WBP_GetAnalysisFunctions(variable versionBitMask)

Return a list of analysis functions including NONE, usable for popup menues.

See also


string WBP_GetNoiseTypes()

Return a list of noise types, usable for popup menues.

string WBP_GetNoiseBuildResolution()

Return a list of build resolutions , usable for popup menues.

variable WBP_ButtonProc_OpenAnaFuncs(WMButtonAction *ba)
variable WBP_SetVarCombineEpochFormula(WMSetVariableAction *sva)
static string WBP_TranslateControlContents(string control, variable direction, string data)

Convert a control entry for the panel or the wave.

Useful if the visualization is different from the stored data.

static variable WBP_ClearFolders()
variable WBP_MainWindowHook(WMWinHookStruct *s)

Wavebuilder panel window hook.

The epoch selection is done on the mouseup event if there exists no marquee. This allows to still use the zooming capability.

string WBP_GetFFTSpectrumPanel()
variable WBP_ShowFFTSpectrumIfReq(wave segmentWave, variable sweep)
static std::tuple<RGBColor> WBP_GetSweepColor(variable sweep)

Return distinct colors the sweeps of the wavebuilder.

These are backwards compared to the trace colors

static variable WBP_DeleteAnalysisParameter(string name)

Delete the given analysis parameter.


name – name of the parameter

string WBP_GetParameterTypes()

Return a list of all possible analysis parameter types.

static string WBP_GetAnalysisParameters()

Return the analysis parameters.

static string WBP_GetAnalysisGenericFunction()
string WBP_GetAnalysisParameterNames()

Return the analysis parameter names for the currently selected stimset.

static variable WBP_UpdateParameterWave()

Fill the listwave from the stimset analysis parameters extracted from its WPT.

static variable WBP_ToggleAnalysisParamGUI()

Toggle the analysis parameter GUI.


one if the panel was killed, zero if it was created

variable WBP_ButtonProc_DeleteParam(WMButtonAction *ba)
variable WBP_ButtonProc_AddParam(WMButtonAction *ba)
variable WBP_ButtonProc_OpenAnaParamGUI(WMButtonAction *ba)
variable WBP_ListBoxProc_AnalysisParams(WMListboxAction *lba)
variable WBP_ButtonProc_LoadSet(WMButtonAction *ba)
string WBP_RegenerateEpochParameterNamesCode()

Function to regenerate code for GetEpochParameterNames()

static wave WBP_ListControlsPerStimulusType(variable epochType)

Return a list of all parameter names of the given epochType.

string WBP_GetDeltaModes()
string WBP_GetTriggerTypes()
string WBP_GetPulseTypes()


static const string panel = "WaveBuilder"
static const string WaveBuilderGraph = "WaveBuilder#WaveBuilderGraph"
static const string AnalysisParamGUI = "WaveBuilder#AnalysisParamGUI"
static const string DEFAULT_SET_PREFIX = "StimulusSetA"
static const string SEGWVTYPE_CONTROL_REGEXP = ".*_S[[:digit:]]+"
static const string WP_CONTROL_REGEXP = ".*_P[[:digit:]]+"
static const string WPT_CONTROL_REGEXP = ".*_T[[:digit:]]+"
static const string SEGWVTYPE_ALL_CONTROL_REGEXP = "^.*_ALL$"
static const double WBP_WAVETYPE_WP = 0x1
static const double WBP_WAVETYPE_WPT = 0x2
static const double WBP_WAVETYPE_SEGWVTYPE = 0x4
static const string HIDDEN_CONTROLS_CUSTOM_COMBINE = "SetVar_WaveBuilder_P0;SetVar_WaveBuilder_P1;SetVar_WaveBuilder_P2;SetVar_WaveBuilder_P3;SetVar_WB_DurDeltaMult_P52;SetVar_WB_AmpDeltaMult_P50;popup_WaveBuilder_op_P70;popup_WaveBuilder_op_P71;popup_WaveBuilder_op_P72;setvar_explDeltaValues_T11;setvar_explDeltaValues_T12_DD02;setvar_explDeltaValues_T13"
static const string HIDDEN_CONTROLS_SQUARE_PULSE = "popup_WaveBuilder_op_P71;setvar_explDeltaValues_T12_DD02"
static const double EPOCH_HL_TYPE_LEFT = 0x01
static const double EPOCH_HL_TYPE_RIGHT = 0x02