Group LabnotebookQueryFunctions

group LabnotebookQueryFunctions

The labnotebook querying functions can be categorized into the following categories:

Return the stored settings of a single sweep. The functions return a wave with LABNOTEBOOK_LAYER_COUNT rows, where the first NUM_HEADSTAGES hold headstage dependent data and the row returned by GetIndexForHeadstageIndepData() the headstage independent data.

Return the headstage independent data of a single sweep. Trimmed down a special default value in case the setting could not be found.

If you want to query the information on a per-channel basis the following functions are helpful. They also take care of unassociated channels automatically.

Return the data of one of the sweeps of a repeated acquistion cycle (RAC). The functions return only the first valid setting searching the sweeps from the end to the begin of the RAC.

Return the data of all sweeps of a repeated acquistion cycle (RAC) with the following functions:

All the above functions are concerned with querying data from the labnotebook where the sweep number is known. In case you are looking for data from an arbitrary sweep use one of the following functions:

Functions

variable GetLastSettingIndep(wave numericalValues, variable sweepNo, string setting, variable entrySourceType, variable defValue = defaultValue)

Return a headstage independent setting from the numerical labnotebook.

See also

GetLastSetting()

Returns

the headstage independent setting or defValue

string GetLastSettingTextIndep(WaveText textualValues, variable sweepNo, string setting, variable entrySourceType, string defValue = defaultValue)

Return a headstage independent setting from the textual labnotebook.

See also

GetLastSetting()

Returns

the headstage independent setting or defValue

variable GetLastSettingIndepRAC(wave numericalValues, variable sweepNo, string setting, variable entrySourceType, variable defValue = defaultValue)

Return a headstage independent setting from the numerical labnotebook of the sweeps in the same RA cycle.

See also

GetLastSetting()

Returns

the headstage independent setting or defValue

variable GetLastSettingIndepSCI(wave numericalValues, variable sweepNo, string setting, variable headstage, variable entrySourceType, variable defValue = defaultValue)

Return a headstage independent setting from the numerical labnotebook of the sweeps in the same RA cycle.

See also

GetLastSetting()

Returns

the headstage independent setting or defValue

string GetLastSettingTextIndepRAC(wave numericalValues, WaveText textualValues, variable sweepNo, string setting, variable entrySourceType, string defValue = defaultValue)

Return a headstage independent setting from the numerical labnotebook of the sweeps in the same RA cycle.

Returns

the headstage independent setting or defValue

std::tuple<WaveOrNull, variable> GetLastSettingChannel(wave numericalValues, WaveTextOrNull textualValues, variable sweepNo, string setting, variable channelNumber, variable channelType, variable entrySourceType)

Return a numerical or text setting for the given channel.

It also returns headstage independent entries when the given channel refers to an active channel.

Returns

the wave containing the setting and the index into it.

wave GetLastSetting(wave values, variable sweepNo, string setting, variable entrySourceType)

Return a numeric/textual wave with the latest value of a setting from the numerical/labnotebook labnotebook for the given sweep number.

Parameters
  • values – numerical/textual labnotebook

  • sweepNo – sweep number

  • setting – name of the setting to query

  • entrySourceType – type of the labnotebook entry, one of DataAcqModes. If you don’t care about the entry source type pass UNKNOWN_MODE.

Returns

a free wave with LABNOTEBOOK_LAYER_COUNT rows. In case the setting could not be found an invalid wave reference is returned.

wave GetLastSettingNoCache(wave values, variable sweepNo, string setting, variable entrySourceType, variable *first = defaultValue, variable *last = defaultValue, variable *rowIndex = defaultValue)

Return a wave with the latest value of a setting from the numerical/textual labnotebook for the given sweep number. Uncached version, general users should prefer GetLastSetting().

Parameters
  • values – numerical/textual labnotebook

  • sweepNo – sweep number

  • setting – name of the setting to query

  • entrySourceType – type of the labnotebook entry, one of DataAcqModes

  • first[inout] [optional] Can be used to query and return the labnotebook row range. Useful for routines which must make a lot of queries to the same sweep and want to avoid the overhead of calculating first and last. Passing LABNOTEBOOK_GET_RANGE will set the calculated values of first and last after the function returns. Passing a value greater or equal zero will use these values instead.

  • last[inout] [optional] see first

  • rowIndex[out] [optional] return the row where the setting could be found, otherwise it is set to LABNOTEBOOK_MISSING_VALUE

Returns

a free wave with LABNOTEBOOK_LAYER_COUNT rows. In case the setting could not be found an invalid wave reference is returned.

wave GetLastSettingTextRAC(wave numericalValues, WaveText textualValues, variable sweepNo, string setting, variable entrySourceType)

Return the last textual value of the sweeps in the same RA cycle.

See also

GetLastSetting()

wave GetLastSettingRAC(wave numericalValues, variable sweepNo, string setting, variable entrySourceType)

Return the last numerical value of the sweeps in the same RA cycle.

See also

GetLastSetting()

wave GetLastSettingIndepEachRAC(wave numericalValues, variable sweepNo, string setting, variable entrySourceType, variable defValue = defaultValue)

Return the last numerical value for the given setting of each sweep in the same RA cycle.

The returned wave will have NaN for sweeps which do not have that entry. This is done in order to keep the indizes intact.

See also

GetLastSetting()

wave GetLastSettingTextIndepEachRAC(wave numericalValues, WaveText textualValues, variable sweepNo, string setting, variable entrySourceType, string defValue = defaultValue)

Return the last textual value for the given setting of each sweep in the same RA cycle.

The returned wave will have NaN for sweeps which do not have that entry. This is done in order to keep the indizes intact.

See also

GetLastSetting()

wave GetLastSettingEachRAC(wave numericalValues, variable sweepNo, string setting, variable headstage, variable entrySourceType)

Return the last numerical value for the given setting of each sweep for a given headstage in the same RA cycle.

The returned wave will have NaN for sweeps which do not have that entry. This is done in order to keep the indizes intact.

See also

GetLastSetting

wave GetLastSettingTextEachRAC(wave numericalValues, WaveText textualValues, variable sweepNo, string setting, variable headstage, variable entrySourceType)

Return the last textual value for the given setting of each sweep for a given headstage in the same RA cycle.

The returned wave will have NaN for sweeps which do not have that entry. This is done in order to keep the indizes intact.

See also

GetLastSetting()

wave GetLastSettingTextSCI(wave numericalValues, WaveText textualValues, variable sweepNo, string setting, variable headstage, variable entrySourceType)

Return the last textual value of the sweeps in the same stimset cycle.

See also

GetLastSetting()

wave GetLastSettingSCI(wave numericalValues, variable sweepNo, string setting, variable headstage, variable entrySourceType)

Return the last numerical value of the sweeps in the same stimset cycle.

See also

GetLastSetting()

wave GetLastSettingIndepEachSCI(wave numericalValues, variable sweepNo, string setting, variable headstage, variable entrySourceType, variable defValue = defaultValue)

Return the last numerical value for the given setting of each sweep in the same stimset cycle.

The returned wave will have NaN for sweeps which do not have that entry. This is done in order to keep the indizes intact.

See also

GetLastSetting()

wave GetLastSettingTextIndepEachSCI(wave numericalValues, WaveText textualValues, variable sweepNo, variable headstage, string setting, variable entrySourceType, string defValue = defaultValue)

Return the last textual value for the given setting of each sweep in the same stimset cycle.

The returned wave will have NaN for sweeps which do not have that entry. This is done in order to keep the indizes intact.

See also

GetLastSetting()

wave GetLastSettingEachSCI(wave numericalValues, variable sweepNo, string setting, variable headstage, variable entrySourceType)

Return the last numerical value for the given setting of each sweep for a given headstage in the same stimset cycle.

The returned wave will have NaN for sweeps which do not have that entry. This is done in order to keep the indizes intact.

See also

GetLastSetting

wave GetLastSettingTextEachSCI(wave numericalValues, WaveText textualValues, variable sweepNo, string setting, variable headstage, variable entrySourceType)

Return the last textual value for the given setting of each sweep for a given headstage in the same stimset cycle.

The returned wave will have NaN for sweeps which do not have that entry. This is done in order to keep the indizes intact.

See also

GetLastSetting()

wave GetSweepsWithSetting(wave labnotebookValues, string setting)

Return a wave with all sweep numbers which have a non-empty entry for setting.

Parameters
  • labnotebookValues – numerical/textual labnotebook

  • setting – name of the value to search

Returns

a 1D free wave with the matching sweep numbers. In case the setting could not be found an invalid wave reference is returned.

wave GetLastSweepWithSetting(wave numericalValues, string setting, variable *sweepNo)

Return the last numerical value of a setting from the labnotebook and the sweep it was set.

Parameters
  • numericalValues[in] numerical labnotebook

  • setting[in] name of the value to search

  • sweepNo[out] sweep number the value was last set

Returns

a free wave with LABNOTEBOOK_LAYER_COUNT rows. In case the setting could not be found an invalid wave reference is returned.

variable GetLastSweepWithSettingIndep(wave numericalValues, string setting, variable *sweepNo, variable defValue = defaultValue)

Return the last numerical value of a headstage independent setting from the labnotebook and the sweep it was set.

Parameters
  • numericalValues[in] numerical labnotebook

  • setting[in] name of the value to search

  • sweepNo[out] sweep number the value was last set

  • defValue[in] [optional, defaults to NaN] value to return in case nothing could be found

wave GetLastSweepWithSettingText(WaveText textualValues, string setting, variable *sweepNo)

Return the last textual value of a setting from the labnotebook and the sweep it was set.

Parameters
  • textualValues[in] textual labnotebook

  • setting[in] name of the value to search

  • sweepNo[out] sweep number the value was last set

Returns

a free wave with LABNOTEBOOK_LAYER_COUNT rows. In case the setting could not be found an invalid wave reference is returned.

string GetLastSweepWithSettingTextI(wave numericalValues, string setting, variable *sweepNo, string defValue = defaultValue)

Return the last textual value of a headstage independent setting from the labnotebook and the sweep it was set.

Parameters
  • numericalValues[in] numerical labnotebook

  • setting[in] name of the value to search

  • sweepNo[out] sweep number the value was last set

  • defValue[in] [optional, defaults to an empty string] value to return in case nothing could be found