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

Improve graph window #335

Merged
merged 40 commits into from
Oct 9, 2024
Merged
Show file tree
Hide file tree
Changes from 37 commits
Commits
Show all changes
40 commits
Select commit Hold shift + click to select a range
6a6bef6
Add docstrings
DanicaSTFC Aug 29, 2024
89442d6
Edit plots and methods
DanicaSTFC Sep 11, 2024
c69a147
Add statistics
DanicaSTFC Sep 12, 2024
948acac
Add superclass and xlabels
DanicaSTFC Sep 12, 2024
a26adfd
Restructure code
DanicaSTFC Sep 13, 2024
e4fae29
Add pandas and dataframe
DanicaSTFC Sep 13, 2024
bedaf07
Many edits, bulk graphs working well
DanicaSTFC Sep 16, 2024
6c812fc
Improve layout
DanicaSTFC Sep 16, 2024
2f70f10
Add selection of parameters
DanicaSTFC Sep 17, 2024
de0abac
Add mean and std in data frame and create statistical analysis tab
DanicaSTFC Sep 17, 2024
4abb119
Add attempt for stat tab
DanicaSTFC Sep 18, 2024
942ac92
Add mean and std plots for objective min
DanicaSTFC Sep 18, 2024
f58b501
Add statistical analysis on the subpoints and sub size, with the new …
DanicaSTFC Sep 18, 2024
4e009c3
Remove plt and fix group plotting
DanicaSTFC Sep 23, 2024
3af9cf8
Restructure parent class widgets
DanicaSTFC Sep 24, 2024
21e38b3
Edit widgets and methods
DanicaSTFC Sep 24, 2024
3404a1d
Add option to select parameters in single tab
DanicaSTFC Sep 24, 2024
eb363e2
Edit widgets names
DanicaSTFC Sep 24, 2024
b931a50
Improve labels in single and bulk tab
DanicaSTFC Sep 25, 2024
cf493c0
Add checkbox collapse plots
DanicaSTFC Sep 26, 2024
8d70cb0
Add random colours to collapsed plots and make the code compact
DanicaSTFC Sep 27, 2024
6002d6b
Improve labelling code
DanicaSTFC Sep 27, 2024
e8975fa
Add option to see std and mean in the same plot for all data
DanicaSTFC Sep 30, 2024
ab088f0
Improve color scheme and lines
DanicaSTFC Oct 1, 2024
0ac013f
Use numpy reader instead of point cloud converter to read data
DanicaSTFC Oct 1, 2024
d4be220
Add option to edit fontsize in settings
DanicaSTFC Oct 1, 2024
a14e9bc
Fix sizing
DanicaSTFC Oct 1, 2024
67ca5ce
Add docstrings to base class
DanicaSTFC Oct 2, 2024
586796b
Add docstrings and remove non necessary attributes
DanicaSTFC Oct 2, 2024
52ee645
Add more docstrings
DanicaSTFC Oct 2, 2024
dbf8472
Add docstrings to manipulate results files
DanicaSTFC Oct 2, 2024
88618bc
Edit help text
DanicaSTFC Oct 2, 2024
f6cf877
Use template font
DanicaSTFC Oct 2, 2024
e70bd13
Improve docstring
DanicaSTFC Oct 7, 2024
81ebb56
Add docstrings to windows
DanicaSTFC Oct 7, 2024
c2c1642
Edit changelog
DanicaSTFC Oct 7, 2024
2ef5c52
Edit changelog
DanicaSTFC Oct 7, 2024
6cd93ce
Edit results file
DanicaSTFC Oct 8, 2024
fba4fb1
Delete unused imports
DanicaSTFC Oct 8, 2024
4157a38
Merge branch 'master' into improve-graph-window
DanicaSTFC Oct 9, 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
8 changes: 8 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# ChangeLog

## v24.1.0
Enhancements:
* Improve graphs window #335
* Option to edit the app fontsize in settings #335

Dependencies:
* Add pandas #335

## v24.0.1
Bug fixes:
* Use RawInputDialog from the viewer package #314
Expand Down
1 change: 1 addition & 0 deletions recipe/dev_environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ dependencies:
- openpyxl
- python
- numpy
- pandas
- scipy
- ccpi::ccpi-viewer >=24.0.1
- ccpi::ccpi-dvc >=22.0.0
Expand Down
1 change: 1 addition & 0 deletions recipe/meta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ requirements:
- openpyxl
- python
- numpy
- pandas
- scipy
- ccpi-viewer >=24.0.1
- ccpi-dvc >=22.0.0
Expand Down
25 changes: 16 additions & 9 deletions src/idvc/dvc_interface.py
Original file line number Diff line number Diff line change
Expand Up @@ -487,13 +487,21 @@ def CreateHelpPanel(self):
"4. Limit the range of the vectors viewed by changing the 'Vector Range Min' and Vector Range Max'. Then, click 'View Pointcloud/Vectors' to apply the changes.\n"
"5. On the 2D viewer, the vectors are shown as 2D arrows, showing the displacements in the current plane. If the 'x', 'y' or 'z' keys are pressed click 'View Pointcloud/Vectors' to apply the changes.\n\n"
"Display Graphs:\n"
"Graphs are displayed in a new window (once you are done looking at the graphs you can either close or minimize this window). A tab is created for each run, showing a summary of the parameters.\n"
"1. Select an option from the list for the variable to compare.\n"
"2. Select the parameters to compare from the list.\n"
"3. Click on 'Plot Histograms'.\n"
"Note: This will automatically show the displacements including the translation that you set in the manual registration.\n"
"4. Optionally, go to 'Settings' and select 'Show displacement relative to reference point 0' to adjust the displacements to exclude the initial registration translation.\n"
"5. In the case of a bulk run, a particular variable can be selected and the graphs for this variable in each of the runs can be compared.\n\n"
"Graphs are displayed in a new window (once you are done looking at the graphs you can either close or minimize this window).\n"
"A tab is created to visualise a single run. Information on the run is displayed on the left.\n"
"1. Select an option for the result to plot.\n"
"2. Select the parameter to fix and its value.\n"
"3. Click on 'Plot'.\n"
"In the case of a bulk run, an additional tab enables comparison of the results. Information on the bulk run is displayed on the left.\n"
"1. Select an option for the result to plot.\n"
"2. Select the parameter to fix and its value. Alternatively, select 'None' to plot all values.\n"
"3. Click on 'Plot histograms'.\n"
"An additional tab includes quantatitative statistical analysis of the bulk run.\n"
"1. Select an option for the result to plot. Alternatively, select 'All'.\n"
"2. Select the parameter to fix and its value. Alternatively, select 'All' to plot all values. Optionally, collapse the plots.\n"
"3. Click on 'Plot'.\n"
"Note: As a default, the displacements include the translation set in the manual registration.\n"
"4. Optionally, go to 'Settings' and select 'Show displacement relative to reference point 0' to adjust the displacements to exclude the initial registration translation.\n\n"
"Results Files:\n"
"Select a folder and export a session to access the result files. Two tab-delimited text files are generated for each run at location <session_folder>\Results\<run_name>\dvc_result_*.\n"
"1. The status file (dvc_result_*.stat) contains an echo of the input file used for the analysis, information about the point cloud, dvc program version, run date/time, search statistics and timing.\n"
Expand Down Expand Up @@ -4959,8 +4967,7 @@ def show_run_pcs(self):
points_list = []
subvol_list = []
for folder in glob.glob(os.path.join(directory, "dvc_result_*")):
file_path = os.path.join(folder, os.path.basename(folder))
result = RunResults(file_path)
result = RunResults(folder)
self.result_list.append(result)
el = str(result.subvol_points)
if el not in points_list:
Expand Down
8 changes: 6 additions & 2 deletions src/idvc/idvc.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import PySide2
from PySide2 import QtWidgets, QtGui
from PySide2 import QtWidgets, QtGui, QtCore
DanicaSTFC marked this conversation as resolved.
Show resolved Hide resolved
import os, sys
import logging
import argparse
Expand All @@ -16,8 +16,12 @@ def main():
level = eval(f'logging.{args.debug.upper()}')
logging.basicConfig(level=level)
logging.info(f"iDVC: Setting debugging level to {args.debug.upper()}")

app = QtWidgets.QApplication([])
# Set a global font for the application
default_font_family = app.font().family()
font = QtGui.QFont(default_font_family, 12) # Replace with your preferred font and size
QtWidgets.QApplication.setFont(font)


file_dir = os.path.dirname(__file__)
owl_file = os.path.join(file_dir, "DVCIconSquare.png")
Expand Down
11 changes: 10 additions & 1 deletion src/idvc/ui/dialogs.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,13 @@ def __init__(self, parent, title="Settings"):
self.parent = parent



self.fontsize_label = QLabel("Fontsize: ")
self.fontsize_widget = QSpinBox()
self.fontsize_widget.setMaximum(25)
self.fontsize_widget.setMinimum(5)
self.fontsize_widget.setSingleStep(1)
self.fontsize_widget.setValue(12)
self.addWidget(self.fontsize_widget, self.fontsize_label, 'fontsize')
self.dark_checkbox = QCheckBox("Dark Mode")
# populate from settings
if self.parent.settings.value("dark_mode") is not None:
Expand Down Expand Up @@ -105,6 +111,9 @@ def __init__(self, parent, title="Settings"):


def onOk(self):
default_font_family = PySide2.QtWidgets.QApplication.font().family()
font = PySide2.QtGui.QFont(default_font_family, self.fontsize_widget.value())
PySide2.QtWidgets.QApplication.setFont(font)
#self.parent.settings.setValue("settings_chosen", 1)
if self.dark_checkbox.isChecked():
self.parent.settings.setValue("dark_mode", True)
Expand Down
Loading