How to do delta measurement in time

Support questions for Flow CSV Viewer and Editor.
Post Reply
davidday@deiaz.com
Posts: 3
Joined: Thu Jun 10, 2021 2:58 am

How to do delta measurement in time

Post by davidday@deiaz.com »

Hi,

A few questions:
- how to measure the delay of a signal in the editor 1.0.4?
- when two signals are on different trigger time, is there a way to move one of the signal to line up to the other signal? Attached a picture.

Thanks

David
Attachments
example of two signals at different trigger time.png
example of two signals at different trigger time.png (99.79 KiB) Viewed 16685 times
Waveworks
Posts: 175
Joined: Thu Sep 05, 2019 1:05 pm

Re: How to do delta measurement in time

Post by Waveworks »

Hello David, first of all thank you for buying the editor! There are no built-in functions for what you're asking for, but it can be achieved with some formula work.

With regard to how to measure delay, I assume you mean one variable's delay in relation to another? If not, please clarify! To measure y's delay in relation to x and assuming the start trigger conditions are x > 1 and y > 1, you could enter the following formulas:

Code: Select all

x_started = x > 1 or t > 0 and x_started[t-1]
y_started = y > 1 or t > 0 and y_started[t-1]
delay = x_started and not y_started
Then you select the delay variable and read its sum in the statistics line right under all the plots. In your case, you won't be able to refer to your variables with their display names, because they contain + and - characters. Upon loading the CSV, there will be messages in message view telling you how to refer to them.

With regard to delaying a variable (which is essentially moving it to the right), you can simply use the delay operator [t-...]:

Code: Select all

x_delayed = x[t-20000]
And if you want to fill out the first 20000 samples with something you add the if operator:

Code: Select all

x_delayed = x[t-20000] if t >= 20000 else 0
Hope this helps! /Gustaf
davidday@deiaz.com
Posts: 3
Joined: Thu Jun 10, 2021 2:58 am

Re: How to do delta measurement in time

Post by davidday@deiaz.com »

Gustaf,

They work as your instructions, then I saved/closed the csv file, but the delayed formulas are gone after I re open the same csv file

Thanks

David
Waveworks
Posts: 175
Joined: Thu Sep 05, 2019 1:05 pm

Re: How to do delta measurement in time

Post by Waveworks »

Glad it's working... almost! The CSV file format doesn't support formulas unfortunately, but you can do any of the following:
  • If you want to keep the formulas themselves, you need to add the file to a project and then save the project file. With your csv file in front, go to the Project menu and select Add <filename>.csv, then click Save All to save the project file. You only need to do this once. Now whatever formula you enter will be stored in the project file. Next time, open the project file first (if it doesn't open automatically on startup, which it should normally).
  • If you want to store the values that were computed by the formulas in the CSV file, right-click each formula variable name (they all have a little right arrow by them) and select Convert To Values. Now when you save the CSV file, the new variables will appear as additional columns in the CSV file, and as a result also show next time you open the file.
davidday@deiaz.com
Posts: 3
Joined: Thu Jun 10, 2021 2:58 am

Re: How to do delta measurement in time

Post by davidday@deiaz.com »

Hi Gufta,

They are working, thanks. How do you annotate on the graph for reader to know specific information?

Thanks

David
Waveworks
Posts: 175
Joined: Thu Sep 05, 2019 1:05 pm

Re: How to do delta measurement in time

Post by Waveworks »

Hi again David,

There is no specific annotation functionality in the editor, I'm afraid. What I usually do is to add a string variable called "note" where I enter such comments, so the comments are saved in an additional column in the CSV file. Enter a new formula note = "" and press Shift-Enter to make it a data variable straight away. Now you can place the cursor on a sample that you want to annotate and enter a comment (press F2 or double-click in the Value column). These comments appear as spikes in the graph, and by moving the mouse over the spike, you can read the comment - see screenshot below.
screen.png
screen.png (32.05 KiB) Viewed 16650 times
Best regards
Gustaf
Post Reply