spiceitup 1.3.4__tar.gz → 2.0.1__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {spiceitup-1.3.4/spiceitup.egg-info → spiceitup-2.0.1}/PKG-INFO +7 -5
- {spiceitup-1.3.4 → spiceitup-2.0.1}/README.md +5 -3
- {spiceitup-1.3.4 → spiceitup-2.0.1}/pyproject.toml +0 -0
- {spiceitup-1.3.4 → spiceitup-2.0.1}/setup.py +6 -11
- spiceitup-2.0.1/spiceitup/__init__.py +7 -0
- spiceitup-2.0.1/spiceitup/__main__.py +7 -0
- {spiceitup-1.3.4 → spiceitup-2.0.1}/spiceitup/layout/flow_layout.py +6 -6
- {spiceitup-1.3.4 → spiceitup-2.0.1}/spiceitup/layout/flow_layout_edited.py +6 -6
- {spiceitup-1.3.4 → spiceitup-2.0.1}/spiceitup/layout/flow_layout_old.py +6 -6
- {spiceitup-1.3.4/spiceitup/docs → spiceitup-2.0.1/spiceitup/logs}/__init__.py +0 -0
- {spiceitup-1.3.4 → spiceitup-2.0.1}/spiceitup/logs/log.py +2 -2
- {spiceitup-1.3.4/spiceitup/images → spiceitup-2.0.1/spiceitup/main}/__init__.py +0 -0
- {spiceitup-1.3.4 → spiceitup-2.0.1}/spiceitup/main/footer.py +7 -7
- {spiceitup-1.3.4 → spiceitup-2.0.1}/spiceitup/main/header.py +17 -16
- {spiceitup-1.3.4 → spiceitup-2.0.1}/spiceitup/main/menu.py +17 -17
- {spiceitup-1.3.4 → spiceitup-2.0.1}/spiceitup/main/menu_bar.py +10 -9
- {spiceitup-1.3.4 → spiceitup-2.0.1}/spiceitup/main/w.py +4 -4
- {spiceitup-1.3.4 → spiceitup-2.0.1}/spiceitup/main/winc.py +24 -24
- spiceitup-1.3.4/spiceitup/__main__.py → spiceitup-2.0.1/spiceitup/main_call.py +11 -9
- {spiceitup-1.3.4/spiceitup/layout → spiceitup-2.0.1/spiceitup/plot}/__init__.py +0 -0
- {spiceitup-1.3.4 → spiceitup-2.0.1}/spiceitup/plot/plot_line.py +8 -8
- {spiceitup-1.3.4 → spiceitup-2.0.1}/spiceitup/plot/plot_map.py +11 -9
- {spiceitup-1.3.4/spiceitup/logs → spiceitup-2.0.1/spiceitup/processing}/__init__.py +0 -0
- {spiceitup-1.3.4 → spiceitup-2.0.1}/spiceitup/processing/dh.py +4 -4
- {spiceitup-1.3.4 → spiceitup-2.0.1}/spiceitup/processing/fit.py +2 -2
- {spiceitup-1.3.4/spiceitup/main → spiceitup-2.0.1/spiceitup/processing/threads}/__init__.py +0 -0
- {spiceitup-1.3.4 → spiceitup-2.0.1}/spiceitup/processing/threads/run_thread.py +9 -9
- {spiceitup-1.3.4 → spiceitup-2.0.1}/spiceitup/processing/threads/thread_worker.py +1 -1
- {spiceitup-1.3.4/spiceitup/plot → spiceitup-2.0.1/spiceitup/processing/threads/workers}/__init__.py +0 -0
- {spiceitup-1.3.4 → spiceitup-2.0.1}/spiceitup/processing/threads/workers/compute_average.py +3 -3
- {spiceitup-1.3.4 → spiceitup-2.0.1}/spiceitup/processing/threads/workers/generate_fit_maps.py +3 -3
- {spiceitup-1.3.4 → spiceitup-2.0.1}/spiceitup/processing/threads/workers/load_plot_map.py +3 -3
- {spiceitup-1.3.4 → spiceitup-2.0.1}/spiceitup/processing/threads/workers/make_process_available.py +1 -1
- {spiceitup-1.3.4 → spiceitup-2.0.1}/spiceitup/processing/threads/workers/out_of_sync.py +4 -4
- {spiceitup-1.3.4 → spiceitup-2.0.1}/spiceitup/processing/threads/workers/update_levels.py +2 -2
- {spiceitup-1.3.4 → spiceitup-2.0.1}/spiceitup/processing/threads/workers/update_profile.py +3 -3
- {spiceitup-1.3.4 → spiceitup-2.0.1}/spiceitup/run.py +44 -34
- {spiceitup-1.3.4/spiceitup/processing → spiceitup-2.0.1/spiceitup/settings}/__init__.py +0 -0
- {spiceitup-1.3.4 → spiceitup-2.0.1}/spiceitup/settings/const.py +6 -9
- {spiceitup-1.3.4 → spiceitup-2.0.1}/spiceitup/style/style.css +0 -0
- {spiceitup-1.3.4 → spiceitup-2.0.1}/spiceitup/style/style_debug.css +0 -0
- {spiceitup-1.3.4/spiceitup/processing/threads → spiceitup-2.0.1/spiceitup/toolbox}/__init__.py +0 -0
- {spiceitup-1.3.4 → spiceitup-2.0.1}/spiceitup/toolbox/clickable_qlabel.py +2 -2
- {spiceitup-1.3.4 → spiceitup-2.0.1}/spiceitup/toolbox/multithreading.py +3 -3
- {spiceitup-1.3.4 → spiceitup-2.0.1}/spiceitup/toolbox/show_icons.py +2 -2
- {spiceitup-1.3.4 → spiceitup-2.0.1}/spiceitup/toolbox/small_pyqtgraph.py +2 -2
- {spiceitup-1.3.4 → spiceitup-2.0.1}/spiceitup/toolbox/small_pyqtgraph2.py +2 -2
- {spiceitup-1.3.4 → spiceitup-2.0.1}/spiceitup/toolbox/test.py +3 -3
- {spiceitup-1.3.4/spiceitup/processing/threads/workers → spiceitup-2.0.1/spiceitup/utils}/__init__.py +0 -0
- {spiceitup-1.3.4 → spiceitup-2.0.1}/spiceitup/utils/internal_utils.py +11 -11
- {spiceitup-1.3.4 → spiceitup-2.0.1/spiceitup.egg-info}/PKG-INFO +7 -5
- spiceitup-2.0.1/spiceitup.egg-info/SOURCES.txt +65 -0
- {spiceitup-1.3.4 → spiceitup-2.0.1}/spiceitup.egg-info/requires.txt +1 -1
- spiceitup-1.3.4/MANIFEST.in +0 -1
- spiceitup-1.3.4/spiceitup/__pycache__/__main__.cpython-313.pyc +0 -0
- spiceitup-1.3.4/spiceitup/__pycache__/run.cpython-313.pyc +0 -0
- spiceitup-1.3.4/spiceitup/debug.log +0 -19
- spiceitup-1.3.4/spiceitup/docs/Qt_cursors.png +0 -0
- spiceitup-1.3.4/spiceitup/docs/code_conventions.txt +0 -38
- spiceitup-1.3.4/spiceitup/docs/codimd_backup/2023_06_13.md +0 -112
- spiceitup-1.3.4/spiceitup/docs/codimd_backup/2023_07_07.md +0 -111
- spiceitup-1.3.4/spiceitup/docs/codimd_backup/2023_09_26.md +0 -109
- spiceitup-1.3.4/spiceitup/docs/codimd_backup/2023_11_28.md +0 -114
- spiceitup-1.3.4/spiceitup/docs/codimd_backup/2024_06_26.md +0 -110
- spiceitup-1.3.4/spiceitup/docs/codimd_backup/2024_07_12.md +0 -110
- spiceitup-1.3.4/spiceitup/docs/codimd_backup/2024_08_29_TBC.md +0 -121
- spiceitup-1.3.4/spiceitup/docs/layout.drawio +0 -1
- spiceitup-1.3.4/spiceitup/docs/layout.png +0 -0
- spiceitup-1.3.4/spiceitup/docs/menu_layout.ods +0 -0
- spiceitup-1.3.4/spiceitup/docs/microsoft365_backup/SPICE_Quicklook_Tasks_20240912.xlsx +0 -0
- spiceitup-1.3.4/spiceitup/docs/microsoft365_backup/SPICE_Quicklook_Tasks_20241002.xlsx +0 -0
- spiceitup-1.3.4/spiceitup/docs/microsoft365_backup/SPICE_Quicklook_Tasks_20241007.xlsx +0 -0
- spiceitup-1.3.4/spiceitup/docs/microsoft365_backup/SPICE_Quicklook_Tasks_20241021.xlsx +0 -0
- spiceitup-1.3.4/spiceitup/docs/microsoft365_backup/SPICE_Quicklook_Tasks_20241102.xlsx +0 -0
- spiceitup-1.3.4/spiceitup/docs/microsoft365_backup/SPICE_Quicklook_Tasks_20241118.xlsx +0 -0
- spiceitup-1.3.4/spiceitup/docs/microsoft365_backup/SPICE_Quicklook_Tasks_20241129.xlsx +0 -0
- spiceitup-1.3.4/spiceitup/docs/microsoft365_backup/SPICE_Quicklook_Tasks_20241209.xlsx +0 -0
- spiceitup-1.3.4/spiceitup/docs/microsoft365_backup/SPICE_Quicklook_Tasks_20250120.xlsx +0 -0
- spiceitup-1.3.4/spiceitup/docs/microsoft365_backup/SPICE_Quicklook_Tasks_20250123.xlsx +0 -0
- spiceitup-1.3.4/spiceitup/docs/microsoft365_backup/SPICE_Quicklook_Tasks_20250217.xlsx +0 -0
- spiceitup-1.3.4/spiceitup/docs/plots_layout.ods +0 -0
- spiceitup-1.3.4/spiceitup/docs/user_manual/fit_maps.png +0 -0
- spiceitup-1.3.4/spiceitup/docs/user_manual/screenshot_2025/1.png +0 -0
- spiceitup-1.3.4/spiceitup/docs/user_manual/screenshot_2025/2.png +0 -0
- spiceitup-1.3.4/spiceitup/docs/user_manual/screenshot_2025/3.png +0 -0
- spiceitup-1.3.4/spiceitup/docs/user_manual/screenshot_2025/4.png +0 -0
- spiceitup-1.3.4/spiceitup/docs/user_manual/screenshot_2025/5.png +0 -0
- spiceitup-1.3.4/spiceitup/docs/user_manual/screenshot_2025/6.png +0 -0
- spiceitup-1.3.4/spiceitup/docs/user_manual/screenshot_2025/7.png +0 -0
- spiceitup-1.3.4/spiceitup/docs/user_manual/screenshot_2025/8.png +0 -0
- spiceitup-1.3.4/spiceitup/docs/user_manual/screenshot_2025/9.png +0 -0
- spiceitup-1.3.4/spiceitup/docs/user_manual/screenshot_2025/Screenshot 2025-02-13 115310.png +0 -0
- spiceitup-1.3.4/spiceitup/docs/user_manual/screenshot_2025/fit_maps.png +0 -0
- spiceitup-1.3.4/spiceitup/docs/user_manual/screenshot_2025/footer.png +0 -0
- spiceitup-1.3.4/spiceitup/docs/user_manual/screenshot_2025/full.png +0 -0
- spiceitup-1.3.4/spiceitup/docs/user_manual/screenshot_2025/full.xcf +0 -0
- spiceitup-1.3.4/spiceitup/docs/user_manual/screenshot_2025/lambda.png +0 -0
- spiceitup-1.3.4/spiceitup/docs/user_manual/screenshot_2025/left_menu.png +0 -0
- spiceitup-1.3.4/spiceitup/docs/user_manual/screenshot_2025/ppt1/3D_1.png +0 -0
- spiceitup-1.3.4/spiceitup/docs/user_manual/screenshot_2025/ppt1/3D_2.png +0 -0
- spiceitup-1.3.4/spiceitup/docs/user_manual/screenshot_2025/ppt1/footer.png +0 -0
- spiceitup-1.3.4/spiceitup/docs/user_manual/screenshot_2025/ppt1/lambda.png +0 -0
- spiceitup-1.3.4/spiceitup/docs/user_manual/screenshot_2025/ppt1/lambda_y.png +0 -0
- spiceitup-1.3.4/spiceitup/docs/user_manual/screenshot_2025/ppt1/left_menu.png +0 -0
- spiceitup-1.3.4/spiceitup/docs/user_manual/screenshot_2025/ppt1/ppt1.png +0 -0
- spiceitup-1.3.4/spiceitup/docs/user_manual/screenshot_2025/ppt1/profile.png +0 -0
- spiceitup-1.3.4/spiceitup/docs/user_manual/screenshot_2025/ppt1/red_bars.png +0 -0
- spiceitup-1.3.4/spiceitup/docs/user_manual/screenshot_2025/ppt1/x.png +0 -0
- spiceitup-1.3.4/spiceitup/docs/user_manual/screenshot_2025/ppt1/x_y.png +0 -0
- spiceitup-1.3.4/spiceitup/docs/user_manual/screenshot_2025/ppt1/y.png +0 -0
- spiceitup-1.3.4/spiceitup/docs/user_manual/screenshot_2025/ppt1.pdf +0 -0
- spiceitup-1.3.4/spiceitup/docs/user_manual/screenshot_2025/ppt_screenshots.pptx +0 -0
- spiceitup-1.3.4/spiceitup/docs/user_manual/screenshot_2025/several_x_y.png +0 -0
- spiceitup-1.3.4/spiceitup/docs/user_manual/screenshot_2025/x.png +0 -0
- spiceitup-1.3.4/spiceitup/docs/user_manual/screenshot_2025/y.png +0 -0
- spiceitup-1.3.4/spiceitup/docs/user_manual/several_x_y.png +0 -0
- spiceitup-1.3.4/spiceitup/docs/user_manual/user_documentation.docx +0 -0
- spiceitup-1.3.4/spiceitup/docs/user_manual/user_documentation.pdf +0 -0
- spiceitup-1.3.4/spiceitup/docs/user_manual/user_manual.pptx +0 -0
- spiceitup-1.3.4/spiceitup/docs/user_manual/~$er_documentation.docx +0 -0
- spiceitup-1.3.4/spiceitup/docs/windows_installation.pdf +0 -0
- spiceitup-1.3.4/spiceitup/images/icon.png +0 -0
- spiceitup-1.3.4/spiceitup/images/info.png +0 -0
- spiceitup-1.3.4/spiceitup/images/info2.png +0 -0
- spiceitup-1.3.4/spiceitup/images/info_old.png +0 -0
- spiceitup-1.3.4/spiceitup/layout/__pycache__/flow_layout.cpython-313.pyc +0 -0
- spiceitup-1.3.4/spiceitup/logs/__pycache__/log.cpython-313.pyc +0 -0
- spiceitup-1.3.4/spiceitup/logs/show_debug_console.sh +0 -5
- spiceitup-1.3.4/spiceitup/main/__pycache__/footer.cpython-313.pyc +0 -0
- spiceitup-1.3.4/spiceitup/main/__pycache__/header.cpython-313.pyc +0 -0
- spiceitup-1.3.4/spiceitup/main/__pycache__/menu.cpython-313.pyc +0 -0
- spiceitup-1.3.4/spiceitup/main/__pycache__/menu_bar.cpython-313.pyc +0 -0
- spiceitup-1.3.4/spiceitup/main/__pycache__/w.cpython-313.pyc +0 -0
- spiceitup-1.3.4/spiceitup/main/__pycache__/winc.cpython-313.pyc +0 -0
- spiceitup-1.3.4/spiceitup/plot/__pycache__/plot_line.cpython-313.pyc +0 -0
- spiceitup-1.3.4/spiceitup/plot/__pycache__/plot_map.cpython-313.pyc +0 -0
- spiceitup-1.3.4/spiceitup/pres_notes.txt +0 -4
- spiceitup-1.3.4/spiceitup/processing/__pycache__/dh.cpython-313.pyc +0 -0
- spiceitup-1.3.4/spiceitup/processing/__pycache__/fit.cpython-313.pyc +0 -0
- spiceitup-1.3.4/spiceitup/processing/threads/__pycache__/run_thread.cpython-313.pyc +0 -0
- spiceitup-1.3.4/spiceitup/processing/threads/__pycache__/thread_worker.cpython-313.pyc +0 -0
- spiceitup-1.3.4/spiceitup/processing/threads/workers/__pycache__/compute_average.cpython-313.pyc +0 -0
- spiceitup-1.3.4/spiceitup/processing/threads/workers/__pycache__/generate_fit_maps.cpython-313.pyc +0 -0
- spiceitup-1.3.4/spiceitup/processing/threads/workers/__pycache__/load_plot_map.cpython-313.pyc +0 -0
- spiceitup-1.3.4/spiceitup/processing/threads/workers/__pycache__/make_process_available.cpython-313.pyc +0 -0
- spiceitup-1.3.4/spiceitup/processing/threads/workers/__pycache__/out_of_sync.cpython-313.pyc +0 -0
- spiceitup-1.3.4/spiceitup/processing/threads/workers/__pycache__/update_levels.cpython-313.pyc +0 -0
- spiceitup-1.3.4/spiceitup/processing/threads/workers/__pycache__/update_profile.cpython-313.pyc +0 -0
- spiceitup-1.3.4/spiceitup/processing/threads/workers/how_to_add_a_worker.txt +0 -26
- spiceitup-1.3.4/spiceitup/settings/__init__.py +0 -0
- spiceitup-1.3.4/spiceitup/settings/__pycache__/const.cpython-313.pyc +0 -0
- spiceitup-1.3.4/spiceitup/settings/recent_files.txt +0 -10
- spiceitup-1.3.4/spiceitup/settings/states/.gitkeep +0 -0
- spiceitup-1.3.4/spiceitup/settings/states/__init__.py +0 -0
- spiceitup-1.3.4/spiceitup/settings/states/test.json +0 -1
- spiceitup-1.3.4/spiceitup/settings/states/test2.json +0 -1
- spiceitup-1.3.4/spiceitup/settings/states/test3.json +0 -1
- spiceitup-1.3.4/spiceitup/settings/states/weird_state.json +0 -1
- spiceitup-1.3.4/spiceitup/style/__init__.py +0 -0
- spiceitup-1.3.4/spiceitup/toolbox/__init__.py +0 -0
- spiceitup-1.3.4/spiceitup/toolbox/__pycache__/binning.cpython-313.pyc +0 -0
- spiceitup-1.3.4/spiceitup/toolbox/__pycache__/clickable_qlabel.cpython-313.pyc +0 -0
- spiceitup-1.3.4/spiceitup/toolbox/icones_claude.png +0 -0
- spiceitup-1.3.4/spiceitup/toolbox/icons.png +0 -0
- spiceitup-1.3.4/spiceitup/toolbox/images/__init__.py +0 -0
- spiceitup-1.3.4/spiceitup/toolbox/images/map_x_y.png +0 -0
- spiceitup-1.3.4/spiceitup/toolbox/images/test.jpg +0 -0
- spiceitup-1.3.4/spiceitup/utils/__init__.py +0 -0
- spiceitup-1.3.4/spiceitup/utils/__pycache__/internal_utils.cpython-313.pyc +0 -0
- spiceitup-1.3.4/spiceitup.egg-info/SOURCES.txt +0 -179
- {spiceitup-1.3.4 → spiceitup-2.0.1}/setup.cfg +0 -0
- {spiceitup-1.3.4/spiceitup → spiceitup-2.0.1/spiceitup/layout}/__init__.py +0 -0
- {spiceitup-1.3.4 → spiceitup-2.0.1}/spiceitup/toolbox/binning.py +0 -0
- {spiceitup-1.3.4 → spiceitup-2.0.1}/spiceitup/toolbox/filter2D_tests.py +0 -0
- {spiceitup-1.3.4 → spiceitup-2.0.1}/spiceitup/toolbox/level_methods.py +0 -0
- {spiceitup-1.3.4 → spiceitup-2.0.1}/spiceitup/toolbox/pyqtgraph_examples.py +0 -0
- {spiceitup-1.3.4 → spiceitup-2.0.1}/spiceitup/toolbox/pyqtgraph_plot_example.py +0 -0
- {spiceitup-1.3.4 → spiceitup-2.0.1}/spiceitup/toolbox/scipy_fit.py +0 -0
- {spiceitup-1.3.4 → spiceitup-2.0.1}/spiceitup/toolbox/scipy_fit_gaussian.py +0 -0
- {spiceitup-1.3.4 → spiceitup-2.0.1}/spiceitup/toolbox/signal_thread_ex.py +0 -0
- {spiceitup-1.3.4 → spiceitup-2.0.1}/spiceitup/utils/special_chars.py +0 -0
- {spiceitup-1.3.4 → spiceitup-2.0.1}/spiceitup.egg-info/dependency_links.txt +0 -0
- {spiceitup-1.3.4 → spiceitup-2.0.1}/spiceitup.egg-info/entry_points.txt +0 -0
- {spiceitup-1.3.4 → spiceitup-2.0.1}/spiceitup.egg-info/top_level.txt +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: spiceitup
|
|
3
|
-
Version:
|
|
3
|
+
Version: 2.0.1
|
|
4
4
|
Summary: Quicklook tool for level 2 SPICE imaging
|
|
5
5
|
Home-page: https://git.ias.u-psud.fr/spice/data_quicklook
|
|
6
6
|
Author: David Picard
|
|
@@ -9,7 +9,7 @@ Classifier: Programming Language :: Python :: 3
|
|
|
9
9
|
Classifier: License :: OSI Approved :: MIT License
|
|
10
10
|
Requires-Python: >=3.7
|
|
11
11
|
Description-Content-Type: text/markdown
|
|
12
|
-
Requires-Dist:
|
|
12
|
+
Requires-Dist: PyQt6
|
|
13
13
|
Requires-Dist: sunraster
|
|
14
14
|
Requires-Dist: pyqtgraph
|
|
15
15
|
Requires-Dist: qdarkgraystyle
|
|
@@ -25,7 +25,7 @@ Dynamic: requires-dist
|
|
|
25
25
|
Dynamic: requires-python
|
|
26
26
|
Dynamic: summary
|
|
27
27
|
|
|
28
|
-
# SPICE data quicklook in
|
|
28
|
+
# SPICE data quicklook in PyQt6 / PyQtGraph
|
|
29
29
|
|
|
30
30
|
This graphical user interface (GUI) allows you to have a quick look in the SPICE data (provide level 2 '.fits' files in input). You will be able to navigate dynamically in the data thanks to sliders which update the maps I(x,y) ; I(lambda,y), the curve I(lambda) and more.
|
|
31
31
|
|
|
@@ -58,7 +58,9 @@ Run with `spiceitup`
|
|
|
58
58
|
`pip install numpy --upgrade`
|
|
59
59
|
|
|
60
60
|
#### B.2) Run the app
|
|
61
|
-
`
|
|
61
|
+
`cd spiceitup`
|
|
62
|
+
`python3 run.py`
|
|
63
|
+
or use an IDE like pycharm (which will install the requirements automatically), open this folder as a project and run `run.py`
|
|
62
64
|
|
|
63
65
|
#### B.3) Troubleshooting
|
|
64
66
|
Error known:
|
|
@@ -68,7 +70,7 @@ In this case, try to do: `sudo apt-get install --reinstall libxcb-xinerama0`
|
|
|
68
70
|
|
|
69
71
|
**spiceitup: command not found**
|
|
70
72
|
In this case check if spiceitup is here: `$(python -m site --user-base)/bin"`
|
|
71
|
-
Then add it to
|
|
73
|
+
Then add it to \$PATH: `export PATH="$PATH:$(python -m site --user-base)/bin"`
|
|
72
74
|
Run again `spiceitup`
|
|
73
75
|
|
|
74
76
|
**No module spiceitup**
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# SPICE data quicklook in
|
|
1
|
+
# SPICE data quicklook in PyQt6 / PyQtGraph
|
|
2
2
|
|
|
3
3
|
This graphical user interface (GUI) allows you to have a quick look in the SPICE data (provide level 2 '.fits' files in input). You will be able to navigate dynamically in the data thanks to sliders which update the maps I(x,y) ; I(lambda,y), the curve I(lambda) and more.
|
|
4
4
|
|
|
@@ -31,7 +31,9 @@ Run with `spiceitup`
|
|
|
31
31
|
`pip install numpy --upgrade`
|
|
32
32
|
|
|
33
33
|
#### B.2) Run the app
|
|
34
|
-
`
|
|
34
|
+
`cd spiceitup`
|
|
35
|
+
`python3 run.py`
|
|
36
|
+
or use an IDE like pycharm (which will install the requirements automatically), open this folder as a project and run `run.py`
|
|
35
37
|
|
|
36
38
|
#### B.3) Troubleshooting
|
|
37
39
|
Error known:
|
|
@@ -41,7 +43,7 @@ In this case, try to do: `sudo apt-get install --reinstall libxcb-xinerama0`
|
|
|
41
43
|
|
|
42
44
|
**spiceitup: command not found**
|
|
43
45
|
In this case check if spiceitup is here: `$(python -m site --user-base)/bin"`
|
|
44
|
-
Then add it to
|
|
46
|
+
Then add it to \$PATH: `export PATH="$PATH:$(python -m site --user-base)/bin"`
|
|
45
47
|
Run again `spiceitup`
|
|
46
48
|
|
|
47
49
|
**No module spiceitup**
|
|
File without changes
|
|
@@ -1,19 +1,11 @@
|
|
|
1
1
|
import os
|
|
2
|
-
|
|
2
|
+
from pathlib import Path
|
|
3
3
|
from importlib_metadata import entry_points
|
|
4
4
|
from setuptools import setup, find_packages
|
|
5
5
|
|
|
6
|
-
def load_requirements(filename):
|
|
7
|
-
with open('/srv/data_quicklook/' + filename, 'r') as f:
|
|
8
|
-
return [
|
|
9
|
-
line.strip()
|
|
10
|
-
for line in f
|
|
11
|
-
if line.strip() and not line.startswith('#')
|
|
12
|
-
]
|
|
13
|
-
|
|
14
6
|
setup(
|
|
15
7
|
name='spiceitup',
|
|
16
|
-
version='
|
|
8
|
+
version='2.0.1',
|
|
17
9
|
description='Quicklook tool for level 2 SPICE imaging',
|
|
18
10
|
long_description=open('README.md').read(),
|
|
19
11
|
long_description_content_type='text/markdown',
|
|
@@ -22,8 +14,11 @@ setup(
|
|
|
22
14
|
url='https://git.ias.u-psud.fr/spice/data_quicklook',
|
|
23
15
|
packages=find_packages(),
|
|
24
16
|
include_package_data=True,
|
|
17
|
+
package_data={
|
|
18
|
+
"spiceitup": ["style/*.css"],
|
|
19
|
+
},
|
|
25
20
|
install_requires=[
|
|
26
|
-
"
|
|
21
|
+
"PyQt6",
|
|
27
22
|
"sunraster",
|
|
28
23
|
"pyqtgraph",
|
|
29
24
|
"qdarkgraystyle",
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
from
|
|
2
|
-
from
|
|
1
|
+
from PyQt6.QtCore import QPoint, QRect, QSize, Qt
|
|
2
|
+
from PyQt6.QtWidgets import (QApplication, QLayout, QPushButton, QSizePolicy, QWidget, QGridLayout)
|
|
3
3
|
|
|
4
4
|
class FlowLayout(QLayout):
|
|
5
5
|
|
|
@@ -71,10 +71,10 @@ class FlowLayout(QLayout):
|
|
|
71
71
|
|
|
72
72
|
for item in self.itemList:
|
|
73
73
|
wid = item.widget()
|
|
74
|
-
spaceX = self.spacing() + wid.style().layoutSpacing(QSizePolicy.PushButton,
|
|
75
|
-
QSizePolicy.PushButton, Qt.Horizontal)
|
|
76
|
-
spaceY = self.spacing() + wid.style().layoutSpacing(QSizePolicy.PushButton,
|
|
77
|
-
QSizePolicy.PushButton, Qt.Vertical)
|
|
74
|
+
spaceX = self.spacing() + wid.style().layoutSpacing(QSizePolicy.ControlType.PushButton,
|
|
75
|
+
QSizePolicy.ControlType.PushButton, Qt.Orientation.Horizontal)
|
|
76
|
+
spaceY = self.spacing() + wid.style().layoutSpacing(QSizePolicy.ControlType.PushButton,
|
|
77
|
+
QSizePolicy.ControlType.PushButton, Qt.Orientation.Vertical)
|
|
78
78
|
nextX = x + item.sizeHint().width() + spaceX
|
|
79
79
|
if nextX - spaceX > rect.right() and lineHeight > 0:
|
|
80
80
|
x = rect.x()
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
from
|
|
2
|
-
from
|
|
1
|
+
from PyQt6.QtCore import QPoint, QRect, QSize, Qt
|
|
2
|
+
from PyQt6.QtWidgets import (QApplication, QLayout, QPushButton, QSizePolicy, QWidget, QGridLayout)
|
|
3
3
|
|
|
4
4
|
class FlowLayout(QLayout):
|
|
5
5
|
q_plot_size = None
|
|
@@ -78,10 +78,10 @@ class FlowLayout(QLayout):
|
|
|
78
78
|
|
|
79
79
|
for item in self.itemList:
|
|
80
80
|
wid = item.widget()
|
|
81
|
-
spaceX = self.spacing() + wid.style().layoutSpacing(QSizePolicy.PushButton,
|
|
82
|
-
QSizePolicy.PushButton, Qt.Horizontal)
|
|
83
|
-
spaceY = self.spacing() + wid.style().layoutSpacing(QSizePolicy.PushButton,
|
|
84
|
-
QSizePolicy.PushButton, Qt.Vertical)
|
|
81
|
+
spaceX = self.spacing() + wid.style().layoutSpacing(QSizePolicy.ControlType.PushButton,
|
|
82
|
+
QSizePolicy.ControlType.PushButton, Qt.Orientation.Horizontal)
|
|
83
|
+
spaceY = self.spacing() + wid.style().layoutSpacing(QSizePolicy.ControlType.PushButton,
|
|
84
|
+
QSizePolicy.ControlType.PushButton, Qt.Orientation.Vertical)
|
|
85
85
|
nextX = x + self.q_plot_size.width() + spaceX #nextX = x + item.sizeHint().width() + spaceX
|
|
86
86
|
if nextX - spaceX > rect.right() and lineHeight > 0:
|
|
87
87
|
x = rect.x()
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
from
|
|
2
|
-
from
|
|
1
|
+
from PyQt6.QtCore import QPoint, QRect, QSize, Qt
|
|
2
|
+
from PyQt6.QtWidgets import (QApplication, QLayout, QPushButton, QSizePolicy, QWidget, QGridLayout)
|
|
3
3
|
|
|
4
4
|
class FlowLayout(QLayout):
|
|
5
5
|
q_plot_size = None
|
|
@@ -76,10 +76,10 @@ class FlowLayout(QLayout):
|
|
|
76
76
|
|
|
77
77
|
for item in self.itemList:
|
|
78
78
|
wid = item.widget()
|
|
79
|
-
spaceX = self.spacing() + wid.style().layoutSpacing(QSizePolicy.PushButton,
|
|
80
|
-
QSizePolicy.PushButton, Qt.Horizontal)
|
|
81
|
-
spaceY = self.spacing() + wid.style().layoutSpacing(QSizePolicy.PushButton,
|
|
82
|
-
QSizePolicy.PushButton, Qt.Vertical)
|
|
79
|
+
spaceX = self.spacing() + wid.style().layoutSpacing(QSizePolicy.ControlType.PushButton,
|
|
80
|
+
QSizePolicy.ControlType.PushButton, Qt.Orientation.Horizontal)
|
|
81
|
+
spaceY = self.spacing() + wid.style().layoutSpacing(QSizePolicy.ControlType.PushButton,
|
|
82
|
+
QSizePolicy.ControlType.PushButton, Qt.Orientation.Vertical)
|
|
83
83
|
nextX = x + item.sizeHint().width() + spaceX
|
|
84
84
|
if nextX - spaceX > rect.right() and lineHeight > 0:
|
|
85
85
|
x = rect.x()
|
|
File without changes
|
|
File without changes
|
|
@@ -3,12 +3,12 @@
|
|
|
3
3
|
from datetime import datetime
|
|
4
4
|
from functools import partial
|
|
5
5
|
|
|
6
|
-
from
|
|
7
|
-
from
|
|
6
|
+
from PyQt6.QtCore import Qt
|
|
7
|
+
from PyQt6.QtWidgets import *
|
|
8
8
|
|
|
9
|
-
from
|
|
10
|
-
from
|
|
11
|
-
from
|
|
9
|
+
from logs.log import Log
|
|
10
|
+
from processing.threads.run_thread import RunThread
|
|
11
|
+
from settings.const import Const
|
|
12
12
|
|
|
13
13
|
class Footer(QFrame):
|
|
14
14
|
main = None
|
|
@@ -18,7 +18,7 @@ class Footer(QFrame):
|
|
|
18
18
|
def __init__(self, main):
|
|
19
19
|
super(Footer, self).__init__()
|
|
20
20
|
self.main = main
|
|
21
|
-
self.setFrameShape(QFrame.StyledPanel)
|
|
21
|
+
self.setFrameShape(QFrame.Shape.StyledPanel)
|
|
22
22
|
|
|
23
23
|
l_footer = QVBoxLayout(self)
|
|
24
24
|
self.f_container = QFrame()
|
|
@@ -180,7 +180,7 @@ class Footer(QFrame):
|
|
|
180
180
|
title = 'At ' + now.strftime('%H:%M:%S') + ' - ' + title
|
|
181
181
|
q_title = QLabel()
|
|
182
182
|
q_pc = QLabel('')
|
|
183
|
-
q_pc.setAlignment(Qt.AlignCenter)
|
|
183
|
+
q_pc.setAlignment(Qt.AlignmentFlag.AlignCenter)
|
|
184
184
|
pb = QProgressBar()
|
|
185
185
|
pb.setFixedHeight(Const.progress_bar_height)
|
|
186
186
|
pb.setTextVisible(False)
|
|
@@ -2,18 +2,19 @@
|
|
|
2
2
|
# -*- coding: utf-8 -*-
|
|
3
3
|
import datetime
|
|
4
4
|
|
|
5
|
-
from
|
|
6
|
-
from
|
|
7
|
-
from
|
|
8
|
-
from
|
|
9
|
-
from
|
|
10
|
-
from
|
|
5
|
+
from PyQt6.QtCore import Qt
|
|
6
|
+
from PyQt6.QtGui import QPixmap, QKeySequence
|
|
7
|
+
from settings.const import Const
|
|
8
|
+
from PyQt6.QtWidgets import *
|
|
9
|
+
from processing.dh import DataHandling
|
|
10
|
+
from utils.internal_utils import *
|
|
11
11
|
import os
|
|
12
12
|
import pyqtgraph as pg
|
|
13
|
-
|
|
14
|
-
from
|
|
15
|
-
from
|
|
16
|
-
from
|
|
13
|
+
|
|
14
|
+
from logs.log import Log
|
|
15
|
+
from processing.threads.run_thread import RunThread
|
|
16
|
+
from toolbox.clickable_qlabel import ClickableQLabel
|
|
17
|
+
from main.winc import WindowsContainer
|
|
17
18
|
|
|
18
19
|
|
|
19
20
|
class Header(QFrame):
|
|
@@ -26,10 +27,10 @@ class Header(QFrame):
|
|
|
26
27
|
def __init__(self, main):
|
|
27
28
|
super(Header, self).__init__()
|
|
28
29
|
self.main = main
|
|
29
|
-
self.setFrameShape(QFrame.StyledPanel)
|
|
30
|
+
self.setFrameShape(QFrame.Shape.StyledPanel)
|
|
30
31
|
|
|
31
32
|
self.w_fits_file_name = QLabel('Please load SPICE data (FITS file level 2)')
|
|
32
|
-
self.w_fits_file_name.setTextInteractionFlags(QtCore.Qt.TextSelectableByMouse)
|
|
33
|
+
self.w_fits_file_name.setTextInteractionFlags(QtCore.Qt.TextInteractionFlag.TextSelectableByMouse)
|
|
33
34
|
hbox = QHBoxLayout(self)
|
|
34
35
|
img_i = ClickableQLabel()
|
|
35
36
|
img_i.setPixmap(QPixmap('images/info.png'))
|
|
@@ -66,7 +67,7 @@ class Header(QFrame):
|
|
|
66
67
|
return
|
|
67
68
|
else: # from recent files (or loaded automatically in debug mode)
|
|
68
69
|
self.data_path = data_file_path
|
|
69
|
-
QApplication.setOverrideCursor(Qt.WaitCursor)
|
|
70
|
+
QApplication.setOverrideCursor(Qt.CursorShape.WaitCursor)
|
|
70
71
|
|
|
71
72
|
if not os.path.exists(self.data_path):
|
|
72
73
|
self.cancel_file()
|
|
@@ -118,8 +119,8 @@ class Header(QFrame):
|
|
|
118
119
|
WindowsContainer.generateWindows, with_cancel=False)
|
|
119
120
|
# Handle recent files
|
|
120
121
|
append_it = True # will append the file path in the recent files
|
|
121
|
-
if os.path.exists(Const.recent_files_path):
|
|
122
|
-
file = open(Const.recent_files_path, 'r')
|
|
122
|
+
if os.path.exists(self.main.project_path + '/' + Const.recent_files_path):
|
|
123
|
+
file = open(self.main.project_path + '/' + Const.recent_files_path, 'r')
|
|
123
124
|
if self.data_path in file.read():
|
|
124
125
|
append_it = False
|
|
125
126
|
file.close()
|
|
@@ -135,7 +136,7 @@ class Header(QFrame):
|
|
|
135
136
|
a_new = self.main.m_menu_bar.subm_recent_files.addAction(now + ' ' + self.data_path)
|
|
136
137
|
a_new.setShortcut('Ctrl+L')
|
|
137
138
|
a_new.triggered.connect(lambda: self.a_load_fits(self.data_path))
|
|
138
|
-
file = open(Const.recent_files_path, 'a')
|
|
139
|
+
file = open(self.main.project_path + '/' + Const.recent_files_path, 'a')
|
|
139
140
|
file.write('\n' + now + ' ' + self.data_path)
|
|
140
141
|
file.close()
|
|
141
142
|
|
|
@@ -2,13 +2,13 @@
|
|
|
2
2
|
# -*- coding: utf-8 -*-
|
|
3
3
|
from functools import partial
|
|
4
4
|
|
|
5
|
-
from
|
|
6
|
-
from
|
|
7
|
-
from
|
|
8
|
-
from
|
|
9
|
-
from
|
|
10
|
-
from
|
|
11
|
-
from
|
|
5
|
+
from settings.const import Const
|
|
6
|
+
from utils.internal_utils import *
|
|
7
|
+
from PyQt6.QtWidgets import *
|
|
8
|
+
from PyQt6.QtCore import *
|
|
9
|
+
from processing.threads.run_thread import RunThread
|
|
10
|
+
from logs.log import Log
|
|
11
|
+
from main.winc import WindowsContainer
|
|
12
12
|
|
|
13
13
|
class Menu(QFrame):
|
|
14
14
|
main = None # widget windows visualization (main widget)
|
|
@@ -44,7 +44,7 @@ class Menu(QFrame):
|
|
|
44
44
|
|
|
45
45
|
def __init__(self, main):
|
|
46
46
|
super(Menu, self).__init__()
|
|
47
|
-
self.setFrameShape(QFrame.StyledPanel)
|
|
47
|
+
self.setFrameShape(QFrame.Shape.StyledPanel)
|
|
48
48
|
self.main = main
|
|
49
49
|
|
|
50
50
|
l_menu = QVBoxLayout(self)
|
|
@@ -63,7 +63,7 @@ class Menu(QFrame):
|
|
|
63
63
|
self.c_gradient_theme.addItems(capitalized_themes)
|
|
64
64
|
self.c_gradient_theme.currentIndexChanged.connect(self.a_updateGradientTheme)
|
|
65
65
|
c_gt_index = self.c_gradient_theme.findText(Const.gradient_default_theme.capitalize(),
|
|
66
|
-
Qt.MatchFixedString)
|
|
66
|
+
Qt.MatchFlag.MatchFixedString)
|
|
67
67
|
if c_gt_index >= 0:
|
|
68
68
|
self.c_gradient_theme.setCurrentIndex(c_gt_index)
|
|
69
69
|
else:
|
|
@@ -76,7 +76,7 @@ class Menu(QFrame):
|
|
|
76
76
|
set_tooltip(self.c_plot_bg, tooltip_str)
|
|
77
77
|
self.c_plot_bg.addItems(Const.bg_colors.keys())
|
|
78
78
|
self.c_plot_bg.currentIndexChanged.connect(self.a_updatePlotBg)
|
|
79
|
-
c_bg_index = self.c_plot_bg.findText(Const.default_bg_color, Qt.MatchFixedString)
|
|
79
|
+
c_bg_index = self.c_plot_bg.findText(Const.default_bg_color, Qt.MatchFlag.MatchFixedString)
|
|
80
80
|
if c_bg_index >= 0:
|
|
81
81
|
self.c_plot_bg.setCurrentIndex(c_bg_index)
|
|
82
82
|
else:
|
|
@@ -210,7 +210,7 @@ class Menu(QFrame):
|
|
|
210
210
|
tooltip_str = 'Rescale the abscissa of the second map I(lambda, y)'
|
|
211
211
|
set_tooltip(f_lambda_rescaling, tooltip_str)
|
|
212
212
|
l_lambda_rescaling = QHBoxLayout(f_lambda_rescaling)
|
|
213
|
-
self.s_lambda_rescaling = QSlider(Qt.Horizontal)
|
|
213
|
+
self.s_lambda_rescaling = QSlider(Qt.Orientation.Horizontal)
|
|
214
214
|
self.s_lambda_rescaling.setMinimum(1) # scale = 1
|
|
215
215
|
self.s_lambda_rescaling.setMaximum(Const.max_lambda_rescaling)
|
|
216
216
|
self.s_lambda_rescaling.setValue(Const.default_lambda_rescaling)
|
|
@@ -230,7 +230,7 @@ class Menu(QFrame):
|
|
|
230
230
|
tooltip_str = 'Rescale the abscissa of the first map I(x, y)'
|
|
231
231
|
set_tooltip(f_x_rescaling, tooltip_str)
|
|
232
232
|
l_x_rescaling = QHBoxLayout(f_x_rescaling)
|
|
233
|
-
self.s_x_rescaling = QSlider(Qt.Horizontal)
|
|
233
|
+
self.s_x_rescaling = QSlider(Qt.Orientation.Horizontal)
|
|
234
234
|
self.s_x_rescaling.setMinimum(1) # scale = 1
|
|
235
235
|
self.s_x_rescaling.setMaximum(Const.max_x_rescaling)
|
|
236
236
|
self.s_x_rescaling.setValue(Const.default_x_rescaling)
|
|
@@ -248,7 +248,7 @@ class Menu(QFrame):
|
|
|
248
248
|
|
|
249
249
|
f_plot_size = QFrame()
|
|
250
250
|
l_plot_size = QHBoxLayout(f_plot_size)
|
|
251
|
-
self.main.s_plot_size = QSlider(Qt.Horizontal)
|
|
251
|
+
self.main.s_plot_size = QSlider(Qt.Orientation.Horizontal)
|
|
252
252
|
self.main.s_plot_size.setMinimum(Const.min_plot_size)
|
|
253
253
|
self.main.s_plot_size.setMaximum(Const.max_plot_size)
|
|
254
254
|
self.main.s_plot_size.setValue(Const.default_plot_size)
|
|
@@ -272,7 +272,7 @@ class Menu(QFrame):
|
|
|
272
272
|
self.q_font_size_title = QLabel('Text font size: ')
|
|
273
273
|
l_font_size.addWidget(self.q_font_size_title)
|
|
274
274
|
self.q_font_size = QLabel('') # updated by update_font_size_label()
|
|
275
|
-
self.q_font_size.setAlignment(Qt.AlignCenter)
|
|
275
|
+
self.q_font_size.setAlignment(Qt.AlignmentFlag.AlignCenter)
|
|
276
276
|
self.update_font_size_label()
|
|
277
277
|
self.q_font_size_min_indicator = QLabel(str(Const.min_font_size_pc) + ' %')
|
|
278
278
|
l_font_size.addWidget(self.q_font_size_min_indicator)
|
|
@@ -592,13 +592,13 @@ class Menu(QFrame):
|
|
|
592
592
|
xy_map = plot_bloc['x_y']
|
|
593
593
|
y_range_str = '[' + str(xy_map.fit_maps_y_min) + '; ' + str(xy_map.fit_maps_y_max) + ']'
|
|
594
594
|
qm = QMessageBox()
|
|
595
|
-
ret = qm.Yes
|
|
595
|
+
ret = qm.StandardButton.Yes
|
|
596
596
|
if not self.main.is_generate_maps_warned:
|
|
597
597
|
self.main.is_generate_maps_warned = True
|
|
598
598
|
ret = qm.question(self, '', 'Before generating fit maps, you can adjust the y bounds in order ' +
|
|
599
599
|
'to aim a specific region and save time, use the grey horizontal bars in I(' + self.main.dh.x_or_t + ',y) maps. ' +
|
|
600
|
-
'\nGenerate fit maps with current y bounds anyway?', qm.Yes | qm.No)
|
|
601
|
-
if ret == qm.Yes:
|
|
600
|
+
'\nGenerate fit maps with current y bounds anyway?', qm.StandardButton.Yes | qm.StandardButton.No)
|
|
601
|
+
if ret == qm.StandardButton.Yes:
|
|
602
602
|
self.main.fit_maps_are_generating[win_key] = True
|
|
603
603
|
RunThread('GenerateFitMaps', self.main, plot_bloc,
|
|
604
604
|
'Generating ' + str(xy_map.w.win_key) + '\'s fit maps, y ∈ ' + y_range_str,
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
from functools import partial
|
|
2
2
|
import json
|
|
3
|
-
from
|
|
4
|
-
from
|
|
3
|
+
from utils.internal_utils import *
|
|
4
|
+
from PyQt6.QtWidgets import *
|
|
5
|
+
from PyQt6.QtGui import QAction
|
|
5
6
|
from pylab import *
|
|
6
|
-
from
|
|
7
|
+
from logs.log import Log
|
|
7
8
|
import os
|
|
8
|
-
from
|
|
9
|
+
from settings.const import Const
|
|
9
10
|
|
|
10
11
|
class MenuBar(QMenuBar):
|
|
11
12
|
main = None
|
|
@@ -60,7 +61,7 @@ class MenuBar(QMenuBar):
|
|
|
60
61
|
|
|
61
62
|
def a_load_state(self):
|
|
62
63
|
q_state_file = QFileDialog.getOpenFileName(self, 'Open file',
|
|
63
|
-
Const.default_data_path_state, '*.json')
|
|
64
|
+
self.main.project_path + '/' + Const.default_data_path_state, '*.json')
|
|
64
65
|
state_path = q_state_file[0]
|
|
65
66
|
if state_path == '': # cancel
|
|
66
67
|
return
|
|
@@ -122,7 +123,7 @@ class MenuBar(QMenuBar):
|
|
|
122
123
|
file.close()
|
|
123
124
|
|
|
124
125
|
def a_clear_recent_files(self):
|
|
125
|
-
os.remove(Const.recent_files_path)
|
|
126
|
+
os.remove(self.main.project_path + '/' + Const.recent_files_path)
|
|
126
127
|
self.subm_recent_files.clear()
|
|
127
128
|
self.set_no_recent_file_action()
|
|
128
129
|
show_message('Recent files history cleared', 'Recent files history has been cleared.')
|
|
@@ -135,13 +136,13 @@ class MenuBar(QMenuBar):
|
|
|
135
136
|
no_recent_files = True
|
|
136
137
|
content = ''
|
|
137
138
|
|
|
138
|
-
if os.path.exists(Const.recent_files_path):
|
|
139
|
-
file = open(Const.recent_files_path, "r")
|
|
139
|
+
if os.path.exists(self.main.project_path + '/' + Const.recent_files_path):
|
|
140
|
+
file = open(self.main.project_path + '/' + Const.recent_files_path, "r")
|
|
140
141
|
content = file.read()
|
|
141
142
|
no_recent_files = '.fits' not in content
|
|
142
143
|
file.close()
|
|
143
144
|
else:
|
|
144
|
-
file = open(Const.recent_files_path, "w")
|
|
145
|
+
file = open(self.main.project_path + '/' + Const.recent_files_path, "w")
|
|
145
146
|
file.close()
|
|
146
147
|
|
|
147
148
|
if no_recent_files:
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
#!/usr/bin/env python3
|
|
2
2
|
# -*- coding: utf-8 -*-
|
|
3
|
-
from
|
|
3
|
+
from PyQt6.QtWidgets import *
|
|
4
4
|
|
|
5
|
-
from
|
|
6
|
-
from
|
|
7
|
-
from
|
|
5
|
+
from utils.internal_utils import *
|
|
6
|
+
from logs.log import Log
|
|
7
|
+
from settings.const import Const
|
|
8
8
|
|
|
9
9
|
class Window():
|
|
10
10
|
main = None
|
|
@@ -2,21 +2,21 @@
|
|
|
2
2
|
# -*- coding: utf-8 -*-
|
|
3
3
|
from functools import partial
|
|
4
4
|
|
|
5
|
-
from
|
|
6
|
-
from
|
|
5
|
+
from processing.threads.run_thread import RunThread
|
|
6
|
+
from main.w import Window
|
|
7
7
|
import time
|
|
8
|
-
from
|
|
9
|
-
from
|
|
10
|
-
from
|
|
11
|
-
from
|
|
12
|
-
from
|
|
13
|
-
from
|
|
8
|
+
from settings.const import Const
|
|
9
|
+
from utils.internal_utils import *
|
|
10
|
+
from PyQt6.QtWidgets import *
|
|
11
|
+
from PyQt6.QtCore import *
|
|
12
|
+
from PyQt6.QtGui import *
|
|
13
|
+
from layout.flow_layout import FlowLayout
|
|
14
14
|
#from pylab import *
|
|
15
15
|
import pyqtgraph as pg
|
|
16
|
-
from
|
|
17
|
-
from
|
|
18
|
-
from
|
|
19
|
-
from
|
|
16
|
+
from plot.plot_map import PlotMap
|
|
17
|
+
from plot.plot_line import PlotLine
|
|
18
|
+
from toolbox.clickable_qlabel import ClickableQLabel
|
|
19
|
+
from logs.log import Log
|
|
20
20
|
|
|
21
21
|
|
|
22
22
|
class WindowsContainer(QFrame):
|
|
@@ -30,7 +30,7 @@ class WindowsContainer(QFrame):
|
|
|
30
30
|
|
|
31
31
|
def __init__(self, main):
|
|
32
32
|
super(WindowsContainer, self).__init__()
|
|
33
|
-
self.setFrameShape(QFrame.StyledPanel)
|
|
33
|
+
self.setFrameShape(QFrame.Shape.StyledPanel)
|
|
34
34
|
self.main = main
|
|
35
35
|
self.vbox = QVBoxLayout(self)
|
|
36
36
|
self.f_plots = QFrame()
|
|
@@ -196,12 +196,12 @@ class WindowsContainer(QFrame):
|
|
|
196
196
|
set_tooltip(q_x_y_label, tooltip_str)
|
|
197
197
|
q_x_y_label.setFont(Const.css_plot_font)
|
|
198
198
|
q_x_y_label.setStyleSheet(Const.css_borders + ' ' + Const.css_plot_title)
|
|
199
|
-
q_x_y_label.setAlignment(Qt.AlignCenter)
|
|
199
|
+
q_x_y_label.setAlignment(Qt.AlignmentFlag.AlignCenter)
|
|
200
200
|
f_bottom_plot1 = QFrame()
|
|
201
201
|
l_bottom_plot1 = QVBoxLayout(f_bottom_plot1)
|
|
202
202
|
q_label_lambda = QLabel('') # updated in PlotMap()
|
|
203
203
|
q_label_lambda.setStyleSheet('color: ' + Const.slider_cursor_color + ';')
|
|
204
|
-
q_label_lambda.setAlignment(Qt.AlignCenter)
|
|
204
|
+
q_label_lambda.setAlignment(Qt.AlignmentFlag.AlignCenter)
|
|
205
205
|
l_bottom_plot1.addWidget(q_label_lambda)
|
|
206
206
|
|
|
207
207
|
f_x_y_options = QFrame()
|
|
@@ -252,12 +252,12 @@ class WindowsContainer(QFrame):
|
|
|
252
252
|
set_tooltip(q_lambda_y_label, tooltip_str)
|
|
253
253
|
q_lambda_y_label.setFont(Const.css_plot_font)
|
|
254
254
|
q_lambda_y_label.setStyleSheet(Const.css_borders + ' ' + Const.css_plot_title)
|
|
255
|
-
q_lambda_y_label.setAlignment(Qt.AlignCenter)
|
|
255
|
+
q_lambda_y_label.setAlignment(Qt.AlignmentFlag.AlignCenter)
|
|
256
256
|
f_bottom_plot2 = QFrame()
|
|
257
257
|
l_bottom_plot2 = QVBoxLayout(f_bottom_plot2)
|
|
258
258
|
q_label_x = QLabel('') # updated in PlotMap()
|
|
259
259
|
q_label_x.setStyleSheet('color: ' + Const.slider_cursor_color + ';')
|
|
260
|
-
q_label_x.setAlignment(Qt.AlignCenter)
|
|
260
|
+
q_label_x.setAlignment(Qt.AlignmentFlag.AlignCenter)
|
|
261
261
|
l_bottom_plot2.addWidget(q_label_x)
|
|
262
262
|
|
|
263
263
|
f_lambda_y_options = QFrame()
|
|
@@ -305,7 +305,7 @@ class WindowsContainer(QFrame):
|
|
|
305
305
|
tooltip_str = 'This is the I(lambda) histogram, it\'s computed according to the blue cross positions in the' + \
|
|
306
306
|
' previous maps, related values of ' + self.main.dh.x_or_t + ' and y are displayed in green here'
|
|
307
307
|
set_tooltip(q_lambda_I_label, tooltip_str)
|
|
308
|
-
q_lambda_I_label.setAlignment(Qt.AlignCenter)
|
|
308
|
+
q_lambda_I_label.setAlignment(Qt.AlignmentFlag.AlignCenter)
|
|
309
309
|
q_lambda_I_label.setFont(Const.css_plot_font)
|
|
310
310
|
q_lambda_I_label.setStyleSheet('color: ' + Const.green_text +
|
|
311
311
|
'; ' + Const.css_borders + ' ' + Const.css_plot_title)
|
|
@@ -313,12 +313,12 @@ class WindowsContainer(QFrame):
|
|
|
313
313
|
q_lambda_I_title = QLabel('') # below plot, updated in get_gaussian_fit()
|
|
314
314
|
tooltip_str = 'Gaussian formula used to compute the fit'
|
|
315
315
|
set_tooltip(q_lambda_I_title, tooltip_str)
|
|
316
|
-
q_lambda_I_title.setAlignment(Qt.AlignCenter)
|
|
316
|
+
q_lambda_I_title.setAlignment(Qt.AlignmentFlag.AlignCenter)
|
|
317
317
|
q_lambda_I_title.setStyleSheet('color: white;')
|
|
318
318
|
q_fit_label = QLabel('') # updated in PlotLine()
|
|
319
319
|
tooltip_str = 'Gaussian fit parameters that are retrieved'
|
|
320
320
|
set_tooltip(q_fit_label, tooltip_str)
|
|
321
|
-
q_fit_label.setAlignment(Qt.AlignCenter)
|
|
321
|
+
q_fit_label.setAlignment(Qt.AlignmentFlag.AlignCenter)
|
|
322
322
|
q_fit_label.setStyleSheet('color: ' + Const.fit_text_color + ';')
|
|
323
323
|
|
|
324
324
|
x_index = round(self.main.dh.get_dim(win_key, self.main.dh.x_or_t) / 2.)
|
|
@@ -335,7 +335,7 @@ class WindowsContainer(QFrame):
|
|
|
335
335
|
q_fit_1_label = QLabel(self.fit_labels['fit_1'] + ' ' + self.main.dh.I_unit)
|
|
336
336
|
q_fit_1_label.setFont(Const.css_plot_font)
|
|
337
337
|
q_fit_1_label.setStyleSheet(Const.css_borders + ' ' + Const.css_plot_title)
|
|
338
|
-
q_fit_1_label.setAlignment(Qt.AlignCenter)
|
|
338
|
+
q_fit_1_label.setAlignment(Qt.AlignmentFlag.AlignCenter)
|
|
339
339
|
#Log.p_ms('fit_1...', self.first_time_ms)
|
|
340
340
|
w.plots['fit_1'] = PlotMap(w, self.main, 'fit_1', q_fit_1_label)
|
|
341
341
|
#Log.p_ms('fit_1 done.', self.first_time_ms)
|
|
@@ -343,7 +343,7 @@ class WindowsContainer(QFrame):
|
|
|
343
343
|
q_fit_2_label = QLabel(self.fit_labels['fit_2'] + ' km/s')
|
|
344
344
|
q_fit_2_label.setFont(Const.css_plot_font)
|
|
345
345
|
q_fit_2_label.setStyleSheet(Const.css_borders + ' ' + Const.css_plot_title)
|
|
346
|
-
q_fit_2_label.setAlignment(Qt.AlignCenter)
|
|
346
|
+
q_fit_2_label.setAlignment(Qt.AlignmentFlag.AlignCenter)
|
|
347
347
|
#Log.p_ms('fit_2...', self.first_time_ms)
|
|
348
348
|
w.plots['fit_2'] = PlotMap(w, self.main, 'fit_2', q_fit_2_label)
|
|
349
349
|
#Log.p_ms('fit_2 done.', self.first_time_ms)
|
|
@@ -351,7 +351,7 @@ class WindowsContainer(QFrame):
|
|
|
351
351
|
q_fit_3_label = QLabel(self.fit_labels['fit_3'] + ' km/s')
|
|
352
352
|
q_fit_3_label.setFont(Const.css_plot_font)
|
|
353
353
|
q_fit_3_label.setStyleSheet(Const.css_borders + ' ' + Const.css_plot_title)
|
|
354
|
-
q_fit_3_label.setAlignment(Qt.AlignCenter)
|
|
354
|
+
q_fit_3_label.setAlignment(Qt.AlignmentFlag.AlignCenter)
|
|
355
355
|
#Log.p_ms('fit_3...', self.first_time_ms)
|
|
356
356
|
w.plots['fit_3'] = PlotMap(w, self.main, 'fit_3', q_fit_3_label)
|
|
357
357
|
#Log.p_ms('fit_3 done.', self.first_time_ms)
|
|
@@ -386,7 +386,7 @@ class WindowsContainer(QFrame):
|
|
|
386
386
|
for i in range(3):
|
|
387
387
|
plot_key = 'fit_' + str(i + 1)
|
|
388
388
|
self.main.qs_fit_label[win_key][plot_key] = QLabel(not_generated_text)
|
|
389
|
-
self.main.qs_fit_label[win_key][plot_key].setAlignment(Qt.AlignCenter)
|
|
389
|
+
self.main.qs_fit_label[win_key][plot_key].setAlignment(Qt.AlignmentFlag.AlignCenter)
|
|
390
390
|
self.main.qs_fit_label[win_key][plot_key].setStyleSheet(Const.css_borders + ' ' + Const.css_plot_title)
|
|
391
391
|
self.main.qs_fit_label[win_key][plot_key].setVisible(False)
|
|
392
392
|
l_grid.addWidget(self.main.qs_fit_label[win_key][plot_key], 6, i, 1, 1)
|