Skip to content

FIX: DIT Incorrectly Showing Live Data #239

Merged
zdomke merged 8 commits intomainfrom
zdomke/dit-timerange
Mar 17, 2026
Merged

FIX: DIT Incorrectly Showing Live Data #239
zdomke merged 8 commits intomainfrom
zdomke/dit-timerange

Conversation

@zdomke
Copy link
Copy Markdown
Collaborator

@zdomke zdomke commented Mar 16, 2026

Description

I encountered a problem where the Data Insight Tool was showing live data even if the plot's time range only included archived data. This could present a problem if someone wants to only export archived data. I noticed that the model was also never getting reset if the Live data was not within the plot's time range.

My solution is to move the model reset outside of the get_live_data function call. This should have been the route from the beginning.

Additionally, I moved the call for DataInsightTool.blockSignals(False) in DataInsightTool.update_pv_select_box() until after the new PVs are added to the combobox. This was occasionally causing many sequential calls to DataInsightTool.get_data() and resulted in a warning message being spit out multiple time:
[WARNING ] - Data Insight Tool: No data received from archiver

By blocking the signals for longer, I inadvertently prevented the call to get_data when curves are added for the first time. My solution here was to add an unopened flag to make a manual call to get_data when the DIT is opened for the first time (only if there is at least one curve to get data for).

Motivation

Encountered a problem when showing trace to a potential user. Decided that it was a bad look and should be fixed ASAP.

Screenshots

Problem Example

In this picture I set the plot's time range to 10am - 12pm (noon). After refreshing the data in the DIT we would expect it to only show data within that range. Instead we see data after 12pm, including live data at the bottom of the table.
Screenshot 2026-03-16 at 14 03 23

Pre-merge checklist

  • Code works interactively
  • Code contains descriptive docstrings
  • New/changed functions and methods are covered in the test suite where possible
  • Test suite passes locally
  • Test suite passes on GitHub Actions

@zdomke zdomke self-assigned this Mar 16, 2026
@zdomke
Copy link
Copy Markdown
Collaborator Author

zdomke commented Mar 16, 2026

I'm open to suggestions for changing the variable name unopened btw. I don't think it's a great name but I couldn't come up with a better one.

@zdomke zdomke marked this pull request as ready for review March 16, 2026 21:42
@zdomke zdomke force-pushed the zdomke/dit-timerange branch from b616f2e to bd66ab7 Compare March 16, 2026 21:45
@zdomke zdomke merged commit e1878bf into main Mar 17, 2026
4 checks passed
@zdomke zdomke deleted the zdomke/dit-timerange branch March 17, 2026 21:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants