File MIES_MiesUtilities_GUI.ipf

This file holds MIES utility functions for GUI.

Functions

string GetSpecialControlLabel(variable channelType, variable controlType)

Return the dimension label for the special, aka non-unique, controls.

string GetPanelControl(variable channelIndex, variable channelType, variable controlType)

Returns the name of a control from the DA_EPHYS panel.

Constants are defined at ChannelTypeAndControlConstants

variable GetNextTraceIndex(string graph)

Helper function for CreateTiledChannelGraph and friends.

Return the next trace index for a graph which uses our trace data storage wave.

string GetTraceNamePrefix(variable traceIndex)

Return a trace name prefix suitable for GetNextTraceIndex()

std::tuple<RGBColor> GetHeadstageColor(variable headstage, variable channelType = defaultValue, variable channelNumber = defaultValue, variable isSplitted = defaultValue)

Return the color of the given headstage.

Parameters:
  • headstage – Headstage, Use “NaN” for non-associated channels

  • channelType – [optional, empty by default] The channel type for non-associated channels, currently only XOP_CHANNEL_TYPE_TTL is evaluated

  • channelNumber – [optional, empty by default] For plotting “TTL” channels only, GUI channel number

  • isSplitted – [optional, default 1] For plotting “TTL” channels only, Flag if the color for a splitted or unsplitted channel should be returned

variable TimeAlignMainWindow(string graph, PostPlotSettings *pps)

Time Alignment for the BrowserSettingsPanel.

This function should work for any given reference trace in pps.timeAlignRefTrace in the popup menu. (DB and SB)

Parameters:
  • graph – graph with sweep traces

  • pps – settings

string TimeAlignGetAllTraces(string graph)

return a list of all traces relevant for TimeAlignment

variable TimeAlignHandleCursorDisplay(string win)

Adds or removes the cursors from the graphs depending on the panel settings.

Parameters:

win – main DB/SB graph or any subwindow panel.

variable TimeAlignUpdateControls(string win)

Enable/Disable TimeAlignment Controls and Cursors.

variable TimeAlignCursorMovedHook(WMWinHookStruct *s)
wave GetAllSweepTraces(string graphs, variable region = defaultValue, variable channelType = defaultValue, variable prefixTraces = defaultValue)

Get a textwave of all traces from a list of graphs.

Parameters:
  • graphs – semicolon separated list of graph names

  • region – [optional] return only traces with the specified region userdata entry

  • channelType – [optional] return only the traces with the given channel type

  • prefixTraces – [optional, defaults to true] prefix the traces names with the graph name and a #

Returns:

graph::trace named patterns

wave GetSweepUserData(string graph, string key, variable channelType = defaultValue, variable region = defaultValue)
static variable CalculateFeatureLoc(wave wv, variable mode, variable level, variable first, variable last)

Find the given feature in the given wave range first and last are in x coordinates and clipped to valid values.

variable TimeAlignmentIfReq(string graphtrace, variable mode, variable level, variable pos1x, variable pos2x, variable force = defaultValue)

Perform time alignment of features in the sweep traces.

Parameters:
  • graphtrace – reference trace in the form of graph::trace

  • mode – time alignment mode

  • level – level input to the FindLevel operation in

  • pos1x – specify start range for feature position

  • pos2x – specify end range for feature position

  • force – [optional, defaults to false] redo time aligment regardless of wave note

variable EqualizeVerticalAxesRanges(string graph, variable ignoreAxesWithLevelCrossing = defaultValue, variable level = defaultValue, variable rangePerClampMode = defaultValue)

Equalize all vertical axes ranges so that they cover the same range.

Parameters:
  • graph – graph

  • ignoreAxesWithLevelCrossing – [optional, defaults to false] ignore all vertical axis which cross the given level in the visible range

  • level – [optional, defaults to zero] level to be used for ignoreAxesWithLevelCrossing=1

  • rangePerClampMode – [optional, defaults to false] use separate Y ranges per clamp mode

variable UpdateSweepPlot(string win)
variable UpdateSettingsPanel(string win)

update of panel elements and related displayed graphs in BSP

wave GetPlainSweepList(string win)
wave GetTraceInfos(string graph, WaveText addFilterKeys = defaultValue, WaveText addFilterValues = defaultValue)

Return the graph user data as 2D text wave.

Only returns infos for sweep traces without duplicates. Duplicates are present with oodDAQ display mode.

Parameters:
  • graph[in] Name of graph

  • addFilterKeys[in] [optional, default = $””] additional keys for filtering

  • addFilterValues[in] [optional, default = $””] additional values for filtering, must have same size as keys

variable RemoveSweepFromGraph(string win, variable index)

Remove the given sweep from the Databrowser/Sweepbrowser.

Needs a manual call to PostPlotTransformations() afterwards.

Parameters:
  • win – graph

  • index – overlay sweeps listbox index

variable AddSweepToGraph(string win, variable index, BufferedDrawInfo *bdi = defaultValue)

Add the given sweep to the Databrowser/Sweepbrowser.

Needs a manual call to PostPlotTransformations() afterwards.

Parameters:
  • win – graph

  • index – overlay sweeps listbox index

  • bdi – [optional, default = n/a] BufferedDrawInfo structure, when given buffered draw is used.

variable UpdateSweepInGraph(string win, variable index)

Update the given sweep in the Databrowser/Sweepbrowser plot.

Needs a manual call to PostPlotTransformations() afterwards.

Parameters:
  • win – graph

  • index – overlay sweeps listbox index

variable StoreWindowCoordinatesHook(WMWinHookStruct *s)

Generic window hooks for storing the window coordinates in the JSON settings file.