nLabs-nScope / nLab

GNU General Public License v3.0
9 stars 2 forks source link

Null in CSV file using Save Traces #88

Closed ndm736 closed 2 months ago

ndm736 commented 2 months ago

When using the Save Traces button to create a screenshot png image and csv file of data in the active plot, there null values between the newest and oldest data points in the csv. If the Save Traces button is used after the mode changes to Stop using the Single option, there are no null because the oldest data point is at time 0 and the newest is all the way on the right.

This might confuse the user if they don't use Single before using Save Traces.

Should Save Traces put the oldest data point at 0s in the .csv instead of the left most data point, or should Save Traces put the data into the .csv as the data is shown on the screen at the moment the button is pressed?

davidjmeyer commented 2 months ago

I thought about this, and decided on the current behavior of saving the data on the screen as shown for two reasons:

  1. We save a PNG at the same time, and it made sense to me that the CSV should match
  2. I cannot guarantee the timings between sweeps, so it's not the case that the end of the previous sweep is directly before the beginning of the current sweep. That means unwrapping the data would include a time gap of unknown duration.