Skip to content

Commit 29cddf8

Browse files
committed
HasLBNEntrySourceTypeCapability: Fix it
We have a test LabnotebookUpgradeDoesNotModifyDefaultWaves which checks that the labnotebook waves are not changed with the upgrade procedure when they have cleared wave notes. This test now fails as HasLBNEntrySourceTypeCapability returns 0 for a values wave with only NaNs. But in this case it does support the entry source type capability. So let's fix it.
1 parent c39e1f5 commit 29cddf8

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

Packages/MIES/MIES_MiesUtilities_Logbook.ipf

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1719,15 +1719,11 @@ Function HasLBNEntrySourceTypeCapability(WAVE values)
17191719
return 0
17201720
endif
17211721

1722-
if(!DimSize(values, ROWS))
1722+
// wave with no rows or only NaNs
1723+
if(!DimSize(values, ROWS) || !HasOneValidEntry(values))
17231724
return 1
17241725
endif
17251726

1726-
if(IsNumericWave(values))
1727-
WaveStats/Q/M=1/RMD=[][entryCol][] values
1728-
return !IsNaN(V_max)
1729-
endif
1730-
17311727
Duplicate/FREE/RMD=[][entryCol][] values, entrySourceTypeValues
17321728
return HasOneValidEntry(entrySourceTypeValues)
17331729
End

0 commit comments

Comments
 (0)