Skip to content

Commit dace787

Browse files
committed
Bugfix: SweepSettings Key wave had duplicate key "Sampling Interval Multiplier"
In commit 061808a (LNB: Introduce channel type dependent sampling interval entries, 2024-01-09) a change was made that caused the key "Sampling Interval Multiplier" to appear twice in the SweepSettingsKey wave at index 26 and 38 (after that change) Fallout estimation: The writing to the value source wave in DC_DocumentChannelProperty uses FindDimLabel to determine the column, so it writes to 38. The copying in ED_createWaveNotes runs the indexing upwards, such that the last value written to the LBN is read from source index 38. Thus, there should be no side effects. Fix: Removed the entry at index 38 and increased SweepSettings wave version number.
1 parent 6801110 commit dace787

File tree

1 file changed

+75
-80
lines changed

1 file changed

+75
-80
lines changed

Packages/MIES/MIES_WaveDataFolderGetters.ipf

Lines changed: 75 additions & 80 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,8 @@ static StrConstant TP_SETTINGS_LABELS = "bufferSize;resistanceTol;sendToAllHS;ba
3232
static StrConstant LOGBOOK_SUFFIX_SORTEDKEYS = "_sorted"
3333
static StrConstant LOGBOOK_SUFFIX_SORTEDKEYSINDICES = "_indices"
3434

35+
static Constant SWEEP_SETTINGS_WAVE_VERSION = 41
36+
3537
/// @brief Return a wave reference to the corresponding Logbook keys wave from an values wave input
3638
threadsafe Function/WAVE GetLogbookValuesFromKeys(WAVE keyWave)
3739

@@ -2389,8 +2391,6 @@ threadsafe Function/WAVE GetLBNidCache(WAVE numericalValues)
23892391
return wv
23902392
End
23912393

2392-
static Constant SWEEP_SETTINGS_WAVE_VERSION = 40
2393-
23942394
/// @brief Uses the parameter names from the `sourceKey` columns and
23952395
/// write them as dimension into the columns of dest.
23962396
static Function SetSweepSettingsDimLabels(WAVE dest, WAVE/T sourceKey)
@@ -2511,31 +2511,30 @@ End
25112511
/// - 35: Multi Device mode
25122512
/// - 36: Background Testpulse
25132513
/// - 37: Background DAQ
2514-
/// - 38: Sampling interval multiplier
2515-
/// - 39: TP during ITI
2516-
/// - 40: Amplifier change via I=0
2517-
/// - 41: Skip analysis functions
2518-
/// - 42: Repeat sweep on async alarm
2519-
/// - 43: Set Cycle Count
2520-
/// - 44: Stimset cycle ID
2521-
/// - 45: Digitizer Hardware Type, one of @ref HardwareDACTypeConstants
2522-
/// - 46: Fixed frequency acquisition
2523-
/// - 47: Headstage Active, binary flag that indicates the enabled headstage(s), the index is the headstage number
2524-
/// - 48: Clamp Mode
2525-
/// - 49: Igor Pro bitness
2526-
/// - 50: DA ChannelType, one of @ref DaqChannelTypeConstants
2527-
/// - 51: AD ChannelType, one of @ref DaqChannelTypeConstants
2528-
/// - 52: oodDAQ member, true if headstage takes part in oodDAQ mode, false otherwise
2529-
/// - 53: Autobias % (DAEphys->Settings->Amplifier)
2530-
/// - 54: Autobias Interval (DAEphys->Settings->Amplifier)
2531-
/// - 55: TP after DAQ
2532-
/// - 56: Epochs version
2533-
/// - 57: Get/Set Inter-trial interval
2534-
/// - 58: Double precision data
2535-
/// - 59: Save amplifier settings
2536-
/// - 60: Require amplifier
2537-
/// - 61: Skip Ahead
2538-
/// - 62: TP power spectrum
2514+
/// - 38: TP during ITI
2515+
/// - 39: Amplifier change via I=0
2516+
/// - 40: Skip analysis functions
2517+
/// - 41: Repeat sweep on async alarm
2518+
/// - 42: Set Cycle Count
2519+
/// - 43: Stimset cycle ID
2520+
/// - 44: Digitizer Hardware Type, one of @ref HardwareDACTypeConstants
2521+
/// - 45: Fixed frequency acquisition
2522+
/// - 46: Headstage Active, binary flag that indicates the enabled headstage(s), the index is the headstage number
2523+
/// - 47: Clamp Mode
2524+
/// - 48: Igor Pro bitness
2525+
/// - 49: DA ChannelType, one of @ref DaqChannelTypeConstants
2526+
/// - 50: AD ChannelType, one of @ref DaqChannelTypeConstants
2527+
/// - 51: oodDAQ member, true if headstage takes part in oodDAQ mode, false otherwise
2528+
/// - 52: Autobias % (DAEphys->Settings->Amplifier)
2529+
/// - 53: Autobias Interval (DAEphys->Settings->Amplifier)
2530+
/// - 54: TP after DAQ
2531+
/// - 55: Epochs version
2532+
/// - 56: Get/Set Inter-trial interval
2533+
/// - 57: Double precision data
2534+
/// - 58: Save amplifier settings
2535+
/// - 59: Require amplifier
2536+
/// - 60: Skip Ahead
2537+
/// - 61: TP power spectrum
25392538
Function/WAVE GetSweepSettingsKeyWave(string device)
25402539

25412540
variable versionOfNewWave = SWEEP_SETTINGS_WAVE_VERSION
@@ -2557,7 +2556,7 @@ Function/WAVE GetSweepSettingsKeyWave(string device)
25572556
if(WaveExists(wv))
25582557
Redimension/N=(-1, 63) wv
25592558
else
2560-
Make/T/N=(3, 63) newDFR:$newName/WAVE=wv
2559+
Make/T/N=(3, 62) newDFR:$newName/WAVE=wv
25612560
endif
25622561

25632562
wv = ""
@@ -2718,105 +2717,101 @@ Function/WAVE GetSweepSettingsKeyWave(string device)
27182717
wv[%Units][37] = LABNOTEBOOK_BINARY_UNIT
27192718
wv[%Tolerance][37] = LABNOTEBOOK_NO_TOLERANCE
27202719

2721-
wv[%Parameter][38] = "Sampling interval multiplier"
2722-
wv[%Units][38] = ""
2723-
wv[%Tolerance][38] = "1"
2720+
wv[%Parameter][38] = "TP during ITI"
2721+
wv[%Units][38] = LABNOTEBOOK_BINARY_UNIT
2722+
wv[%Tolerance][38] = LABNOTEBOOK_NO_TOLERANCE
27242723

2725-
wv[%Parameter][39] = "TP during ITI"
2724+
wv[%Parameter][39] = "Amplifier change via I=0"
27262725
wv[%Units][39] = LABNOTEBOOK_BINARY_UNIT
27272726
wv[%Tolerance][39] = LABNOTEBOOK_NO_TOLERANCE
27282727

2729-
wv[%Parameter][40] = "Amplifier change via I=0"
2728+
wv[%Parameter][40] = "Skip analysis functions"
27302729
wv[%Units][40] = LABNOTEBOOK_BINARY_UNIT
27312730
wv[%Tolerance][40] = LABNOTEBOOK_NO_TOLERANCE
27322731

2733-
wv[%Parameter][41] = "Skip analysis functions"
2732+
wv[%Parameter][41] = "Repeat sweep on async alarm"
27342733
wv[%Units][41] = LABNOTEBOOK_BINARY_UNIT
27352734
wv[%Tolerance][41] = LABNOTEBOOK_NO_TOLERANCE
27362735

2737-
wv[%Parameter][42] = "Repeat sweep on async alarm"
2738-
wv[%Units][42] = LABNOTEBOOK_BINARY_UNIT
2739-
wv[%Tolerance][42] = LABNOTEBOOK_NO_TOLERANCE
2736+
wv[%Parameter][42] = "Set Cycle Count"
2737+
wv[%Units][42] = ""
2738+
wv[%Tolerance][42] = "1"
27402739

2741-
wv[%Parameter][43] = "Set Cycle Count"
2740+
wv[%Parameter][43] = STIMSET_ACQ_CYCLE_ID_KEY
27422741
wv[%Units][43] = ""
27432742
wv[%Tolerance][43] = "1"
27442743

2745-
wv[%Parameter][44] = STIMSET_ACQ_CYCLE_ID_KEY
2744+
wv[%Parameter][44] = "Digitizer Hardware Type"
27462745
wv[%Units][44] = ""
27472746
wv[%Tolerance][44] = "1"
27482747

2749-
wv[%Parameter][45] = "Digitizer Hardware Type"
2750-
wv[%Units][45] = ""
2748+
wv[%Parameter][45] = "Fixed frequency acquisition"
2749+
wv[%Units][45] = "kHz"
27512750
wv[%Tolerance][45] = "1"
27522751

2753-
wv[%Parameter][46] = "Fixed frequency acquisition"
2754-
wv[%Units][46] = "kHz"
2755-
wv[%Tolerance][46] = "1"
2752+
wv[%Parameter][46] = "Headstage Active"
2753+
wv[%Units][46] = LABNOTEBOOK_BINARY_UNIT
2754+
wv[%Tolerance][46] = LABNOTEBOOK_NO_TOLERANCE
27562755

2757-
wv[%Parameter][47] = "Headstage Active"
2758-
wv[%Units][47] = LABNOTEBOOK_BINARY_UNIT
2756+
wv[%Parameter][47] = CLAMPMODE_ENTRY_KEY
2757+
wv[%Units][47] = ""
27592758
wv[%Tolerance][47] = LABNOTEBOOK_NO_TOLERANCE
27602759

2761-
wv[%Parameter][48] = CLAMPMODE_ENTRY_KEY
2760+
wv[%Parameter][48] = "Igor Pro bitness"
27622761
wv[%Units][48] = ""
27632762
wv[%Tolerance][48] = LABNOTEBOOK_NO_TOLERANCE
27642763

2765-
wv[%Parameter][49] = "Igor Pro bitness"
2764+
wv[%Parameter][49] = "DA ChannelType"
27662765
wv[%Units][49] = ""
2767-
wv[%Tolerance][49] = LABNOTEBOOK_NO_TOLERANCE
2766+
wv[%Tolerance][49] = "1"
27682767

2769-
wv[%Parameter][50] = "DA ChannelType"
2768+
wv[%Parameter][50] = "AD ChannelType"
27702769
wv[%Units][50] = ""
27712770
wv[%Tolerance][50] = "1"
27722771

2773-
wv[%Parameter][51] = "AD ChannelType"
2774-
wv[%Units][51] = ""
2775-
wv[%Tolerance][51] = "1"
2772+
wv[%Parameter][51] = "oodDAQ member"
2773+
wv[%Units][51] = LABNOTEBOOK_BINARY_UNIT
2774+
wv[%Tolerance][51] = LABNOTEBOOK_NO_TOLERANCE
27762775

2777-
wv[%Parameter][52] = "oodDAQ member"
2778-
wv[%Units][52] = LABNOTEBOOK_BINARY_UNIT
2779-
wv[%Tolerance][52] = LABNOTEBOOK_NO_TOLERANCE
2776+
wv[%Parameter][52] = AUTOBIAS_PERC_KEY
2777+
wv[%Units][52] = ""
2778+
wv[%Tolerance][52] = "0.1"
27802779

2781-
wv[%Parameter][53] = AUTOBIAS_PERC_KEY
2782-
wv[%Units][53] = ""
2780+
wv[%Parameter][53] = "Autobias Interval"
2781+
wv[%Units][53] = "s"
27832782
wv[%Tolerance][53] = "0.1"
27842783

2785-
wv[%Parameter][54] = "Autobias Interval"
2786-
wv[%Units][54] = "s"
2787-
wv[%Tolerance][54] = "0.1"
2784+
wv[%Parameter][54] = "TP after DAQ"
2785+
wv[%Units][54] = LABNOTEBOOK_BINARY_UNIT
2786+
wv[%Tolerance][54] = LABNOTEBOOK_NO_TOLERANCE
27882787

2789-
wv[%Parameter][55] = "TP after DAQ"
2790-
wv[%Units][55] = LABNOTEBOOK_BINARY_UNIT
2791-
wv[%Tolerance][55] = LABNOTEBOOK_NO_TOLERANCE
2788+
wv[%Parameter][55] = "Epochs version"
2789+
wv[%Units][55] = ""
2790+
wv[%Tolerance][55] = "1"
27922791

2793-
wv[%Parameter][56] = "Epochs version"
2794-
wv[%Units][56] = ""
2795-
wv[%Tolerance][56] = "1"
2792+
wv[%Parameter][56] = "Get/Set Inter-trial interval"
2793+
wv[%Units][56] = LABNOTEBOOK_BINARY_UNIT
2794+
wv[%Tolerance][56] = LABNOTEBOOK_NO_TOLERANCE
27962795

2797-
wv[%Parameter][57] = "Get/Set Inter-trial interval"
2796+
wv[%Parameter][57] = "Double precision data"
27982797
wv[%Units][57] = LABNOTEBOOK_BINARY_UNIT
27992798
wv[%Tolerance][57] = LABNOTEBOOK_NO_TOLERANCE
28002799

2801-
wv[%Parameter][58] = "Double precision data"
2800+
wv[%Parameter][58] = "Save amplifier settings"
28022801
wv[%Units][58] = LABNOTEBOOK_BINARY_UNIT
28032802
wv[%Tolerance][58] = LABNOTEBOOK_NO_TOLERANCE
28042803

2805-
wv[%Parameter][59] = "Save amplifier settings"
2804+
wv[%Parameter][59] = "Require amplifier"
28062805
wv[%Units][59] = LABNOTEBOOK_BINARY_UNIT
28072806
wv[%Tolerance][59] = LABNOTEBOOK_NO_TOLERANCE
28082807

2809-
wv[%Parameter][60] = "Require amplifier"
2810-
wv[%Units][60] = LABNOTEBOOK_BINARY_UNIT
2811-
wv[%Tolerance][60] = LABNOTEBOOK_NO_TOLERANCE
2812-
2813-
wv[%Parameter][61] = "Skip Ahead"
2814-
wv[%Units][61] = ""
2815-
wv[%Tolerance][61] = "1"
2808+
wv[%Parameter][60] = "Skip Ahead"
2809+
wv[%Units][60] = ""
2810+
wv[%Tolerance][60] = "1"
28162811

2817-
wv[%Parameter][62] = "TP power spectrum"
2818-
wv[%Units][62] = LABNOTEBOOK_BINARY_UNIT
2819-
wv[%Tolerance][62] = LABNOTEBOOK_NO_TOLERANCE
2812+
wv[%Parameter][61] = "TP power spectrum"
2813+
wv[%Units][61] = LABNOTEBOOK_BINARY_UNIT
2814+
wv[%Tolerance][61] = LABNOTEBOOK_NO_TOLERANCE
28202815

28212816
SetSweepSettingsDimLabels(wv, wv)
28222817
SetWaveVersion(wv, versionOfNewWave)

0 commit comments

Comments
 (0)