Skip to content

TP results plotting looks different for TP during DAQ and TP during ITI #336

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
timjarsky opened this issue Oct 25, 2019 · 5 comments · May be fixed by #2408
Open

TP results plotting looks different for TP during DAQ and TP during ITI #336

timjarsky opened this issue Oct 25, 2019 · 5 comments · May be fixed by #2408
Assignees
Labels
bug Something isn't working Issue Review 2025 Review of all open issues oscilloscope Testpulse

Comments

@timjarsky
Copy link
Collaborator

The plotting of the TP resistance values in the oscilloscope window get combined into a single time point.

image

zoomed view:
image

@t-b
Copy link
Collaborator

t-b commented Apr 7, 2020

@timjarsky
I'm looking into that.

The reason for the bunches are that we set the timestamps before iterating over all TPs for TP during DAQ, see

tpInput.readTimeStamp = ticks * TICKS_TO_SECONDS
.

Now setting it in the loop will not make things much better as that will not differ much from the current value. The code is pretty fast already. And we should actually not use the time of pushing the TP data to evaluation but the time of acquisition. But getting the DAQ starting time of a single TP chunk is not something we already have.

Let's chat about that tomorrow.

@t-b t-b removed their assignment Jun 5, 2020
@timjarsky
Copy link
Collaborator Author

TP during DAQ start times are grouped because the analysis time is used, not the acquisition time. Switch to using acquisition time. Calculate acquisition time from the high-precision start point of each sweep.

@timjarsky timjarsky added the bug Something isn't working label Dec 7, 2022
@timjarsky timjarsky added the Issue Review 2025 Review of all open issues label Jan 6, 2025
@timjarsky
Copy link
Collaborator Author

Reminder for Tim - calculating the chunk acquisition time is simple math. It's already written for TP storage, so this will have a minor impact on speed.

@MichaelHuth
Copy link
Collaborator

MichaelHuth commented Apr 24, 2025

Idea how to get times precisely:

  • Save time whenever a DAQ starts in a global from GetISO8601TimeStamp
  • adapt ED_MarkSweepStart to use this time
  • calculate TP time with DAQ start time + TP_Nr * TP_time_length
  • TP_Nr is the TP in the current acquisition wave (NI loops use TP Nr directly, for ITC/Sutter use mod(tp_count, tp_block-size)
  • verify that DAQ start time updates after a tp block for ITC/Sutter

@MichaelHuth
Copy link
Collaborator

MichaelHuth commented Apr 25, 2025

  • For ITC determine starttime in TFH_FifoLoop on acq start and return always fifopos and time together on readout update in mainthread global, tgId is per device
  • drop tpInput.readTimestamp aka "now" (in thread) aka %NOW (in TPResults / TPStorage)
  • calc tpInput.timestamp based on UTC time with date2secs(-1,-1,-1) adjust
  • TP_FitResistance use non UTC timestamp for x values in fit

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working Issue Review 2025 Review of all open issues oscilloscope Testpulse
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants