MIES icon indicating copy to clipboard operation
MIES copied to clipboard

Save precise start times per TP

Open MichaelHuth opened this issue 8 months ago • 6 comments

close #336

MichaelHuth avatar Apr 25 '25 13:04 MichaelHuth

@t-b I have adapted the ITC fifopos threaded push and readout now including acq start time - fingers crossed

MichaelHuth avatar Apr 28 '25 18:04 MichaelHuth

The CI failure could be due to me doing something on the machine.

t-b avatar Apr 29 '25 20:04 t-b

I've played around with it and the issue that the timestamp plot has bunches is resolved.

Review:

532e9f954 (DAC: Save time of acquisition start per device, 2025-04-25)

  • [x] Making HW_XX_StartAcq static and switchting to it should be its own commit

b8111bbd6 (ITC: Save AcquisitionStartTime on acquisition restart in ITC Fifoloop, 2025-04-28)

  • [x] Should be in the previous commit:
@@ -645,7 +650,7 @@ Function HW_StartAcq(variable hardwareType, variable deviceID, [variable trigger

     device = HW_GetMainDeviceName(hardwareType, deviceID, flags = flags)
     SVAR lastAcqStartTime = $GetLastAcquisitionStartTime(device)
-    lastAcqStartTime = GetIso8601TimeStamp(numFracSecondsDigits = 5)
+    lastAcqStartTime = HW_GetAcquisitionStartTimestamp()
  • [x] If HW_GetAcquisitionStartTimestamp accepts something like secondsSinceIgorEpoch as optional parametr you can avoid code duplication in HW_ITC_ReadFifoPos

  • [x] Please first instroduce HW_ITC_ReadFifoPos and then later add support for lastAcqStartTime. The current diff is too distracting.

e056da4d2 (Time: Add utility functions to convert time in secs UTC <-> Local, 2025-04-25)

Nice!

4a31f90a8 (SCOPE: Add code comment to TP loop in SCOPE_UpdateOscilloscopeData, 2025-04-25)

Good.

72d9e284e (SCOPE: Use precise timestamp per TP for tpInput data, 2025-04-25)

Very nicely solved.

72e02da9a (TP: Remove TPStorage field %TimeInSeconds, 2025-04-29)

  • [x] Function documentation for PUB_TPResult needs updating

f3369e67f (Debug: A variable was missed in a rename refactor in a debug code section, 2025-04-29)

Nice find. Please cite the commit introducing the compile error. Good thinking to add that define to the compilation test.

2b0dfa10f (Fix: LeftOverSweepTime - treat fifopos of NaN as finished sweep, 2025-04-30)

With a test, nice one!

5933a766b (TS: Use finite timeout only when threadqueue has run empty, 2025-04-30) 67038dcc5 (Fix: TS_GetNewestFromThreadQueue working only for finite values, 2025-04-30)

Nicely found and solved.

t-b avatar May 02 '25 11:05 t-b

@MichaelHuth I've fixed the test failure. The issue was that the saved stimsets were not in good shape. I don't know how you save them, but it looks like there is a special workflow only I know.

I did:

  • undo your stimset addition
  • Loadstimsets()
  • Add your new stimset again
  • savestimsets()
  • RewriteAnalysisFunctions_IGNORE()
  • Commit it

Code LGTM.

t-b avatar May 06 '25 17:05 t-b

I think I did:

  • Loadstimsets()
  • Add stimset by saving another existing with a different name, I think I chose the AFT13 mid sweep stimset as template
  • RewriteAnalysisFunctions_IGNORE()
  • savestimsets()

MichaelHuth avatar May 06 '25 18:05 MichaelHuth

@MichaelHuth Thanks. That approach is the good one and that should also have worked. But it was broken. See 5587a21183 (Tests/ChangeAnalysisFunctions_IGNORE: Fix it for test case AFT6b, 2025-05-07). The "funny" part is that the commit message introducing the bug says "Tests: Pefer ST_SetStimsetParameter over direct WPT access It is shorter and safer.".

t-b avatar May 07 '25 17:05 t-b

I did not observe Tp resistance values at the same x-axis position.

timjarsky avatar May 29 '25 23:05 timjarsky