Replies: 1 comment 1 reply
-
Hi Scott, I'll post the different variants depending on when you want to read the epoch info. 1.) After data acquisition This returns a 2D textwave with all epochs. You can adapt the shortname regular expression to only return epoch info from matching ones. // BEGIN change me
string device = "ITC..." // title of the DAEphys panel
variable sweepNo = 12
variable headstage = 1
string shortname = "*"
// END change me
WAVE numericalValues = GetLBNumericalValues(device)
WAVE textualValues = GetLBTextualValues(device)
variable channelType = XOP_CHANNEL_TYPE_DAC
variable channelNumber = AFH_GetDACFromHeadstage(headstage)
WAVE epochs = EP_GetEpochs(numericalValues, textualValues, sweepNo, channelType, channelNumber, shortname) 2.) When the data is loaded via the analysis browser into a sweep browser // BEGIN change me
string sweepBrowser = "SB_..." // name of the sweep browser
variable sweepNo = 12
variable headstage = 1
string shortname = "*"
variable mapIndex = 0 // if you only have data from one experiment
// in the sweepbrowser this can be left at zero
// END change me
//
DFREF dfr = SB_GetSweepBrowserFolder(sweepBrowser)
WAVE sweepMap = GetSweepBrowserMap(dfr)
string expFolder = sweepMap[mapIndex][%DataFolder]
string device = sweepMap[mapIndex][%Device]
WAVE numericalValues = GetAnalysLBNumericalValues(expFolder, device)
WAVE textualValues = GetAnalysLBTextualValues(expFolder, device)
variable channelType = XOP_CHANNEL_TYPE_DAC
variable channelNumber = AFH_GetDACFromHeadstage(headstage)
WAVE epochs = EP_GetEpochs(numericalValues, textualValues, sweepNo, channelType, channelNumber, shortname) 3.) From an NWB file This does not use the labnotebook directly, but reads the info from the pynwb epoch table. This has entries with a name, start/stop times and a reference to the timeseries it refers to. path = "someFile.nwb"
with NWBHDF5IO(path, mode='r', load_namespaces=True) as io:
nwbfile = io.read()
epochInfo = nwbfile.epochs 4.) The option of reading the labnotebook in pure python is the most complicated one, which I'm skipping for now. Ping me if you really want to dive into that. |
Beta Was this translation helpful? Give feedback.
-
Hello,
Looking for some help getting the epoch information from the labnotebook. Can you provide some insight on the process for extracting and organizing the epoch information.
Thanks
Scott
Beta Was this translation helpful? Give feedback.
All reactions