BCDA-APS / gemviz

Data visualization for tiled
https://bcda-aps.github.io/gemviz/
Other
4 stars 0 forks source link

plot data #166

Closed prjemian closed 1 year ago

prjemian commented 1 year ago
prjemian commented 1 year ago

Inspired by progress in mdaviz.

This screen would be used to select data fields for 1-D line plotting from a single stream of a BlueskyRun as received from tiled.

image

The screen could be wrapped in a QTabWIdget, with one tab for each stream with plottable (numeric) data in the selected run. Yet to be worked out... Or a QComboBox could be used to select the stream with plottable (numeric) data. I like the first because the internal data structures of this model would not need to be reconstructed if the stream is changed from a pop-up menu.

prjemian commented 1 year ago

Thinking to rename this model/view to something more generic, such as XYMonTable and XYMonView. With a more general handling of column names, it could be used both here and in mdaviz.

prjemian commented 1 year ago

Refer to each data to be plotted as a field, which avoids other names in use (such as signal).

image

prjemian commented 1 year ago

image

prjemian commented 1 year ago

Pre-selected columns, additional columns (of text): image

prjemian commented 1 year ago

Plot selection (a transient activity) is better done in a modal dialog than a panel on the main window.

prjemian commented 1 year ago

Plot field selection dialog now: image

prjemian commented 1 year ago

The first plot! image

prjemian commented 1 year ago

@rodolakis : As we discussed, this PR is huge. Since you have used the ChartView widget in mdaviz, review of that code is acceptable to some extent. We'll add issues to modify from this point.

Please make a review so that this PR can be merged. We'll come back to other issues later this week.

prjemian commented 1 year ago

The corners advise the QTableView widget what part of the table needs to be redrawn. That way, out does not have to rebuild the entire table, a task which might be expensive.

On Mon, Sep 18, 2023, 12:13 PM Fanny Rodolakis @.***> wrote:

@.**** commented on this pull request.

In gemviz/select_fields_tablemodel.py https://github.com/BCDA-APS/gemviz/pull/166#discussion_r1329051358:

  • if self.columnNumber(v) in self.uniqueSelectionColumns:
  • if r != row and column_name == v:
  • self.selections[r] = None
  • changes = True
  • return changes
  • def updateCheckboxes(self):
  • """Update checkboxes to agree with self.selections."""
  • if len(self.selections) > 0:
  • top, bottom = min(self.selections), max(self.selections)
  • else:
  • top, bottom = 0, self.rowCount() - 1
  • left, right = min(self.checkboxColumns), max(self.checkboxColumns)
  • logger.debug("corners: (%d,%d) (%d,%d)", top, left, bottom, right)
  • Re-evaluate the checkboxes bounded by the two corners (inclusive).

That is the only part of the code that I did not understand, what are you doing with the corners?

In gemviz/select_fields_tablemodel.py https://github.com/BCDA-APS/gemviz/pull/166#discussion_r1329051970:

  • if self.columnNumber(v) in self.uniqueSelectionColumns:
  • if r != row and column_name == v:
  • self.selections[r] = None
  • changes = True
  • return changes
  • def updateCheckboxes(self):
  • """Update checkboxes to agree with self.selections."""
  • if len(self.selections) > 0:
  • top, bottom = min(self.selections), max(self.selections)
  • else:
  • top, bottom = 0, self.rowCount() - 1
  • left, right = min(self.checkboxColumns), max(self.checkboxColumns)
  • logger.debug("corners: (%d,%d) (%d,%d)", top, left, bottom, right)
  • Re-evaluate the checkboxes bounded by the two corners (inclusive).

(I skipped it in mdaviz)

— Reply to this email directly, view it on GitHub https://github.com/BCDA-APS/gemviz/pull/166#pullrequestreview-1631606225, or unsubscribe https://github.com/notifications/unsubscribe-auth/AARMUMCZ5XIGW57PR4Z7P6DX3B6K3ANCNFSM6AAAAAA4SLEDCE . You are receiving this because you were assigned.Message ID: @.***>