Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Interactive Plotter #329

Open
wants to merge 38 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
a008ecc
push for draft PR
vcatlett May 29, 2024
6252db0
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] May 29, 2024
1975c80
changes
vcatlett Jun 5, 2024
606798a
Merge branch 'interactive-plotter' of github.com:vcatlett/dysh into i…
vcatlett Jun 5, 2024
a8993f7
home changes
vcatlett Jun 14, 2024
f6d3f89
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Jun 14, 2024
0c6c2b8
plotter tests
vcatlett Jun 14, 2024
96f3673
fix merge
vcatlett Jun 14, 2024
bc1f69d
add second ROI
vcatlett Jun 21, 2024
fcb942b
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Jun 21, 2024
5734afe
Remove plot dev folder
vcatlett Jul 1, 2024
30fe563
revert to single ROI
vcatlett Jul 1, 2024
63aad54
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Jul 1, 2024
555b57c
Merge branch 'main' into interactive-plotter
vcatlett Jul 1, 2024
e684fba
add more docs
vcatlett Jul 1, 2024
c54d88b
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Jul 1, 2024
3b0bca2
Merge remote-tracking branch 'upstream/main' into interactive-plotter
vcatlett Jul 29, 2024
0983f19
change spectrum.plot() to call new plotter
vcatlett Jul 30, 2024
24df6d6
attempt to fix requirements
vcatlett Jul 30, 2024
66a0da8
revert attempt at dependency fix
vcatlett Jul 30, 2024
7f4386a
compile requirements.txt with Python 3.9
vcatlett Jul 30, 2024
be61275
Merge branch 'main' into plot-devel
vcatlett Jul 30, 2024
53f5e4e
downgrade pytest-cov
vcatlett Jul 30, 2024
f7dbd9a
clear pip cache
vcatlett Jul 30, 2024
b71603c
purge pip cache in workflow
vcatlett Jul 30, 2024
a69ad7f
purge before pip installing requirements.txt
vcatlett Jul 30, 2024
7937529
small plotter change
vcatlett Jul 30, 2024
2e55445
Merge branch 'plot-devel' of github.com:vcatlett/dysh into plot-devel
vcatlett Jul 30, 2024
dea02ed
undo pip purge stuff
vcatlett Jul 30, 2024
15e3ef4
fix pyqt5-qt dependency
vcatlett Jul 30, 2024
e5126b6
pinned different pyqt5-qt for Windows. pls work
vcatlett Jul 30, 2024
f56eb9f
new ipython communication test
vcatlett Aug 5, 2024
6e9ff4d
refactoring mess
vcatlett Aug 5, 2024
8f38d2f
Merge branch 'main' into plot-PR-devel
vcatlett Aug 21, 2024
0065231
update .gitignore
vcatlett Aug 21, 2024
9c265bc
update requirements.txt
vcatlett Aug 21, 2024
c92cc6a
Merge branch 'main' into plot-PR-devel
vcatlett Sep 4, 2024
53c46c8
cleanup plotting
vcatlett Sep 4, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ docs/jupyter_execute/
docs/jupyter_cache/
notebooks/examples/data/*.fits
notebooks/examples/output/*
src/dysh/plot/.dev

# Byte-compiled / optimized / DLL files
__pycache__/
Expand Down
1 change: 1 addition & 0 deletions docs/source/design/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,4 @@ Stuff about the overall design

sdfits_loaders
structure
plotter/index
34 changes: 34 additions & 0 deletions docs/source/design/plotter/dev_status.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
*****************
Design and Status
*****************

The plotter is based off of `PyQt` with `PyQtGraph`.

Plot Types
==========
Each type of plot will be defined by its own plot class with a specific `PyQtGraph` widget.

`SingleSpectrum`
--------------

A `SingleSpectrum` plot will display a single frquency-vs-intensity `spectrum` object.

Waterfall
---------

This plot type has not been implemented.

Selection Areas
===============

Different plot types may require different types of selection.

Single-Point selection
----------------------

On spectra, users may one to be able to click on individual points to create a selection. This feature has not been implemented yet.

Rectangular Region of Interest (ROI)
------------------------------------

A selection object on the plot is defined as a rectangular Region of Interest (ROI).
11 changes: 11 additions & 0 deletions docs/source/design/plotter/index.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
***********************
The Interactive Plotter
***********************

Stuff about the interactive plotter

.. toctree::
:maxdepth: 2

renderer
dev_status
31 changes: 31 additions & 0 deletions docs/source/design/plotter/renderer.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
*******************
Choosing a Renderer
*******************

There are several different situations in which one might use the plotter, and it must render and be interactive in all of them.

.. mermaid::

flowchart TD
A[Detect Renderer] --> B[Script]
A[Detect Renderer] --> C[iPython]
A[Detect Renderer] --> D[Notebook]

B --> E[SpectrumSelectApp]
C --> |new thread| E[SpectrumSelectApp]
D --> F[SingleSpectrum]

Scripting
=========

If a user wants the interactive plotter to appear during or after a script execution, it must appear as a pop-up window.

iPython
=======

The plotter must appear when called during an iPython session, and it must stay open and respond while new commands are entered.

Notebooks
=========

The plotter must render beneath a notebook cell when it is called. The plot need only update when the cell is re-run.
1 change: 1 addition & 0 deletions docs/source/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ Contents
whatsnew/0.3.rst
background/index
getting_started/index
design/index
examples/index
modules/index
for_beta_testers/index
Expand Down
12 changes: 10 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,15 @@ nb = [
"jupyter",
"jupyterlab",
]
all = ["dysh[dev,nb]"]
gui = [
"pyqt5",
"pyqt5-qt5==5.15.14 ; platform_system != \"Windows\"",
"pyqt5-qt5==5.15.2 ; platform_system == \"Windows\"",
"pyqtgraph",
"qt_material",
"screeninfo",
]
all = ["dysh[dev,nb,gui]"]

[project.urls]
Documentation = "https://github.com/GreenBankObservatory/dysh#readme"
Expand Down Expand Up @@ -188,7 +196,7 @@ filterwarnings = [

[tool.pip-tools]
src_files = ["pyproject.toml"]
extra = ["nb", "dev"]
extra = ["nb", "dev", "gui"]
resolver = "backtracking"
output_file= "requirements.txt"
no_strip_extras = true
Expand Down
Loading
Loading