Skip to content

Commit

Permalink
WIP: UNassoc channels
Browse files Browse the repository at this point in the history
  • Loading branch information
t-b committed May 31, 2019
1 parent 3f844a0 commit d38452e
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 4 deletions.
6 changes: 5 additions & 1 deletion Packages/MIES/MIES_NeuroDataWithoutBorders.ipf
Original file line number Diff line number Diff line change
Expand Up @@ -910,7 +910,11 @@ static Function NWB_AppendSweepLowLevel(locationID, nwbVersion, panelTitle, ITCD

switch(params.channelType)
case ITC_XOP_CHANNEL_TYPE_ADC:
path = "/acquisition/timeseries"
if(nwbVersion == 1)
path = "/acquisition/timeseries"
elseif(nwbVersion == 2)
path = "/acquisition"
endif
break
case ITC_XOP_CHANNEL_TYPE_DAC:
path = "/stimulus/presentation"
Expand Down
11 changes: 8 additions & 3 deletions Packages/Testing-MIES/UTF_TestNWBExportV2.ipf
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,7 @@ static Function TestTimeSeries(fileID, device, groupID, channel, sweep, pxpSweep
DFREF pxpSweepsDFR

variable channelGroupID, num_samples, starting_time, session_start_time, actual, scale, scale_ref
variable clampMode, gain, gain_ref, resolution, conversion
variable clampMode, gain, gain_ref, resolution, conversion, headstage
string stimulus, stimulus_expected, channelName, str, path
string electrode_name, electrode_name_ref, key, unit_ref, unit, base_unit_ref

Expand All @@ -254,8 +254,13 @@ static Function TestTimeSeries(fileID, device, groupID, channel, sweep, pxpSweep

// @TODO FIXME HACKY
string headstageDesc = IPNWB#ReadTextDataSetAsString(channelGroupID, "electrode/description")
variable headstage = str2num(RemovePrefix(headstageDesc, startStr="Headstage "))
CHECK(headstage >= 0 && headstage < NUM_HEADSTAGES)
if(!cmpstr(headstageDesc, "PLACEHOLDER"))
headstage = NaN
else
headstage = str2num(RemovePrefix(headstageDesc, startStr="Headstage "))
CHECK(headstage >= 0 && headstage < NUM_HEADSTAGES)
endif

params.electrodeNumber = headstage

channelName = GetChannelNameFromChannelType(groupID, device, channel, sweep, params)
Expand Down

0 comments on commit d38452e

Please sign in to comment.