File MIES_AnalysisBrowser_SweepBrowser.ipf

SB Visualization of sweep data in the analysis browser


static wave SB_GetSweepBrowserMapFromGraph(string win)
dfref SB_GetSweepBrowserFolder(string win)
variable SB_TranslateSBMapIndexToABMapIndex(string win, variable sbIndex)
dfref SB_GetSweepDataFolder(WaveText sweepMap, variable sweepNo = defaultValue, variable index = defaultValue)

Return the sweep data folder.

static dfref SB_GetSweepDataPathFromIndex(dfref sweepBrowserDFR, variable mapIndex)
variable SB_GetIndexFromSweepDataPath(string win, dfref dataDFR)
static variable SB_SetUserData(string win)

set graph userdata similar to DB_SetUserData()


win – name of main window or external subwindow in SweepBrowser

static wave SB_GetSweepPropertyFromNumLBN(string graph, variable mapIndex, string key)

Return numeric labnotebook entries.

  • graph – sweep browser graph

  • mapIndex – index into the sweep browser map, equal to the index into the popup menu (0-based)

  • key – labnotebook key


wave with the setting for each headstage or an invalid wave reference if the setting does not exist

string SB_GetListOfExperiments(string graph)

Return a list of experiments from which the sweeps in the sweep browser graph originated from.


graph – sweep browser name

wave SB_GetChannelInfoFromGraph(string graph, string channel, string experiment = defaultValue)

Return a text wave with information about the channel waves of the sweep browser graph of all or a specific experiment.

The returned textwave will have multiple columns with different information on each wave.


  • One entry for each wave


  • 0: channel number

  • 1: absolute path to the wave

  • 2: headstage

variable channelNumber, headstage, numWaves, i
string graph   = "SweepBrowser1" // name of an existing sweep browser graph
string channel = "DA"
WAVE/T wv =  SB_GetChannelInfoFromGraph(graph, channel)

numWaves = DimSize(wv, ROWS)
for(i = 0; i < numWaves; i += 1)
    WAVE data     = $(wv[i][%path])
    channelNumber = str2num(wv[i][%channel])
    headstage     = str2num(wv[i][%headstage])

    printf "Channel %d acquired by headstage %d is stored in %s\r", channelNumber, headstage, NameOfWave(data)

  • graph – name of main window or external subwindow in SweepBrowser

  • channel – type of the channel, one of XOP_CHANNEL_NAMES

  • experiment – [optional, defaults to all] name of the experiment the channel wave should originate from

variable SB_UpdateSweepPlot(string win)
variable SB_AddToSweepBrowser(dfref sweepBrowser, string fileName, string dataFolder, string device, variable sweep)
dfref SB_OpenSweepBrowser(variable mode = defaultValue)
string SB_GetSweepList(string win)
wave SB_GetPlainSweepList(string win)

Returns a numeric wave with all sweep numbers.

Can contain duplicates!

wave SB_GetLogbookWave(string win, variable logbookType, variable logbookWaveType, variable sweepNumber = defaultValue, string dataFolder = defaultValue, string device = defaultValue)

Generic getter for the labnotebook waves.


Use case 1:

  • No optional parameters given: Returns a wave reference wave with all labnotebook waves from all displayed sweeps, ordered by index

Use case 2:

  • sweepNumber given: Return the labnotebook wave of that sweep only

Use case 3:

  • dataFolder and device given: Return the labnotebook for the given nwb/pxp data folder and device combination


Use case 1:

  • sweepNumber given: Return one of the four results waves from the sweeps nwb/pxp data folder

Use case 2:

  • datafolder given: Return one of the four results waves from the given datafolder sweeps nwb/pxp data folder

  • win – panel

  • logbookType – one of LogbookTypes

  • logbookWaveType – one of LabnotebookWaveTypes

  • sweepNumber – [optional] sweep number

  • dataFolder – [optional] nwb/pxp data folder (aka experiment)

  • device – [optional] device of the experiment


valid labnotebook wave or a null wave in case it does not exist

variable SB_PopupMenuSelectSweep(WMPopupAction *pa)
variable SB_ButtonProc_ExportTraces(WMButtonAction *ba)
variable SB_AddSweepToGraph(string win, variable index)