Skip to content

make SOHWidget to use processor like WaveformWidget

Lan Dam requested to merge sohwidget_use_processor2 into master

#61 (closed)

  • Make SOHWidget to use processor like WaveformWidget
  • Fix bug in apply_convert_factor(). Create 'needConvert' key to only apply convertFactor for the new created plotting data
  • Create 'needProcess' key to stop processor from running twice for mass position to save resources.
  • Clear axes.texts only before recreate them
  • Not have ax.sampleLbl for up/down plot because value not change. And actually there are 2 label needed, the recalculation in set_lim doesn't calculate value separately for up and down.

The following is the workflow of data:

orgData which is data in tracesInfo: unchanged

First time:

  1. Data which is for plotting: not created yet, needConvert up, needProcess up, fullData down
  2. Get chan_db_info
  3. Process:
    • If already process (massPos), don’t need to process, use the data already created.
    • Trim orgData according to min_x, max_x
    • If trimmed orgData is empty, fullData flag is up
    • If spr <= 1: data = trimmed orgData, down-sample trimmed data, needConvert flag is up
    • If spr >1:
      • If data is small, no need to be downsampled, fullData flag is up
      • Clear data before down-sampling trimmed orgdata to assign to data needConvert flag is up for any new data created
  4. Plotting: apply_convert_factor to the data and set needConvert flag down

Zooming:

  1. Reset mass position channels to run process for them
  2. Process:
    • If already process (massPos), don’t need to process, use the data already created.
    • Trim orgData according to min_x, max_x
    • If fullData flag is up, don’t need to process.
    • If spr <= 1: data = trimmed orgData, down-sample trimmed data, needConvert flag is up
    • If spr >1
      • If size > RECAL_SIZE_LIMIT: use same data, needConvert flag remain down
      • E.ii above: data need to be down sampled, needConvert flag up
  3. Plotting: apply_convert_factor to the data with needConvert flag up and set needConvert flag down
Edited by Lan Dam

Merge request reports

Loading