File MIES_AnalysisBrowser_SweepBrowser.ipf

SB Visualization of sweep data in the analysis browser

Functions

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

Return the sweep data folder for either a given index or sweepNo If a sweepNo is given then the result for the first sweep found with that number is returned.

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()

Parameters:

win – name of main window or external subwindow in SweepBrowser

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

Return numeric labnotebook entries.

Parameters:
  • graph – sweep browser graph

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

  • key – labnotebook key

Returns:

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.

Parameters:

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.

Rows:

  • One entry for each wave

Columns:

  • 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)
endfor

Parameters:
  • 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_GetSweepsFromDevice(string win, string device)

Gets sweep numbers for a given device.

wave SB_GetDeviceList(string win)

Gets the unique devices for which data was loaded into the sweepbrowser.

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

Generic getter for the labnotebook waves.

LBT_LABNOTEBOOK:

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

LBT_RESULTS:

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

Parameters:
  • 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

Returns:

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)
wave SB_GetSweepMap(string win)