Skip to content

Commit

Permalink
SweepFormula: Always use linestyle for sweep data
Browse files Browse the repository at this point in the history
Experience has shown that users never want to have markers for sweep data.
  • Loading branch information
t-b committed Nov 18, 2024
1 parent 98785f8 commit 263422f
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 2 deletions.
2 changes: 2 additions & 0 deletions Packages/MIES/MIES_SweepFormula_Helpers.ipf
Original file line number Diff line number Diff line change
Expand Up @@ -621,6 +621,8 @@ static Function/WAVE SFH_GetSweepsForFormulaImpl(string graph, WAVE/WAVE selectD
colorGroup = GetUniqueInteger()
JWN_SetNumberInWaveNote(rangedSweepData, SF_META_COLOR_GROUP, colorGroup)

JWN_SetNumberInWaveNote(rangedSweepData, SF_META_TRACE_MODE, TRACE_DISPLAY_MODE_LINES)

EnsureLargeEnoughWave(output, indexShouldExist = index)
output[index] = rangedSweepData
index += 1
Expand Down
20 changes: 18 additions & 2 deletions Packages/tests/Basic/UTF_SweepFormula_Operations.ipf
Original file line number Diff line number Diff line change
Expand Up @@ -1577,8 +1577,8 @@ End
static Function TestOperationData()

variable i, j, numChannels, sweepNo, sweepCnt, numResultsRef, clampMode
string str, strSelect, epochStr, name, trace, wvList
string win, device
string str, strSelect, epochStr, name, trace, wvList, traces, traceInfos
string win, device, winBase
variable mode = DATA_ACQUISITION_MODE
variable numSweeps = 2
variable dataSize = 10
Expand Down Expand Up @@ -1911,6 +1911,22 @@ static Function TestOperationData()
PASS()
endtry

// check that we use line style even for a couple of points
str = "data(select(selrange([2, 6]), selsweeps(0), selchannels(AD6)))"
winBase = ExecuteSweepFormulaCode(win, str)
win = winBase + "#Graph0"

traces = TraceNameList(win, ";", 1 + 2)
CHECK_EQUAL_VAR(ItemsInList(traces), 1)

trace = StringFromList(0, traces)
CHECK_PROPER_STR(trace)

traceInfos = TraceInfo(win, trace, 0)
CHECK_PROPER_STR(traceInfos)

CHECK(GrepString(traceInfos, "\bmode\(x\)=0\b"))

// workaround permanent waves being present
wvList = GetListOfObjects(GetDataFolderDFR(), "data*")
CallFunctionForEachListItem_TS(KillOrMoveToTrashPath, wvList)
Expand Down

0 comments on commit 263422f

Please sign in to comment.