spiceitup 1.2.2__tar.gz → 1.3.0__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.2.2 → spiceitup-1.3.0}/PKG-INFO +1 -1
- {spiceitup-1.2.2 → spiceitup-1.3.0}/setup.py +1 -1
- {spiceitup-1.2.2 → spiceitup-1.3.0}/spiceitup/__main__.py +3 -4
- {spiceitup-1.2.2 → spiceitup-1.3.0}/spiceitup/run.py +25 -26
- {spiceitup-1.2.2 → spiceitup-1.3.0}/spiceitup.egg-info/PKG-INFO +1 -1
- {spiceitup-1.2.2 → spiceitup-1.3.0}/README.md +0 -0
- {spiceitup-1.2.2 → spiceitup-1.3.0}/pyproject.toml +0 -0
- {spiceitup-1.2.2 → spiceitup-1.3.0}/setup.cfg +0 -0
- {spiceitup-1.2.2 → spiceitup-1.3.0}/spiceitup.egg-info/SOURCES.txt +0 -0
- {spiceitup-1.2.2 → spiceitup-1.3.0}/spiceitup.egg-info/dependency_links.txt +0 -0
- {spiceitup-1.2.2 → spiceitup-1.3.0}/spiceitup.egg-info/entry_points.txt +0 -0
- {spiceitup-1.2.2 → spiceitup-1.3.0}/spiceitup.egg-info/requires.txt +0 -0
- {spiceitup-1.2.2 → spiceitup-1.3.0}/spiceitup.egg-info/top_level.txt +0 -0
|
@@ -13,7 +13,7 @@ def load_requirements(filename):
|
|
|
13
13
|
|
|
14
14
|
setup(
|
|
15
15
|
name='spiceitup',
|
|
16
|
-
version='1.
|
|
16
|
+
version='1.3.0',
|
|
17
17
|
description='Quicklook tool for level 2 SPICE imaging',
|
|
18
18
|
long_description=open('README.md').read(),
|
|
19
19
|
long_description_content_type='text/markdown',
|
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
import sys
|
|
2
2
|
import warnings
|
|
3
|
-
|
|
4
|
-
from
|
|
5
|
-
from
|
|
3
|
+
import os
|
|
4
|
+
from .settings.const import Const
|
|
5
|
+
from .run import Main
|
|
6
6
|
from PyQt5.QtGui import *
|
|
7
7
|
from PyQt5.QtWidgets import *
|
|
8
8
|
|
|
9
|
-
|
|
10
9
|
def main():
|
|
11
10
|
warnings.filterwarnings("ignore")
|
|
12
11
|
# Used to prevent to show All-NaN RuntimeWarning
|
|
@@ -1,21 +1,20 @@
|
|
|
1
|
-
#!/usr/bin/env python3
|
|
2
|
-
# -*- coding: utf-8 -*-
|
|
3
1
|
import sys
|
|
4
2
|
import warnings
|
|
5
3
|
|
|
6
4
|
from os import path
|
|
7
|
-
from logs.log import Log
|
|
8
|
-
from plot.plot_map import PlotMap
|
|
9
|
-
from
|
|
5
|
+
from .logs.log import Log
|
|
6
|
+
from .plot.plot_map import PlotMap
|
|
7
|
+
from .settings.const import *
|
|
8
|
+
from .utils.internal_utils import *
|
|
10
9
|
from PyQt5.QtGui import *
|
|
11
10
|
from PyQt5.QtCore import *
|
|
12
11
|
from PyQt5.QtWidgets import *
|
|
13
|
-
from main.footer import Footer
|
|
14
|
-
from main.header import Header
|
|
15
|
-
from main.menu_bar import MenuBar
|
|
12
|
+
from .main.footer import Footer
|
|
13
|
+
from .main.header import Header
|
|
14
|
+
from .main.menu_bar import MenuBar
|
|
16
15
|
import qdarkgraystyle
|
|
17
|
-
from main.menu import Menu
|
|
18
|
-
from main.winc import WindowsContainer
|
|
16
|
+
from .main.menu import Menu
|
|
17
|
+
from .main.winc import WindowsContainer
|
|
19
18
|
|
|
20
19
|
class Main(QMainWindow):
|
|
21
20
|
windows = [] # list of Window objects, see Window.py
|
|
@@ -45,7 +44,7 @@ class Main(QMainWindow):
|
|
|
45
44
|
lambda_I_bar_moves = False # avoid recursive behavior when moving I(lambda)'s vertical bar
|
|
46
45
|
updating_levels = [] # contains RunThread instances related to running levels process
|
|
47
46
|
lambda_unit = True # Angstrom otherwise cube index
|
|
48
|
-
qs_fit_label = {}
|
|
47
|
+
qs_fit_label = {} # {'win_key': {'fit_1': QLabel(), 'fit_2': QLabel(), 'fit_3': QLabel()}, ...}
|
|
49
48
|
nb_available_bin = {} # {'win_key': <nb>} in order to hide fit if nb < 4
|
|
50
49
|
python_state = None # when not None, a state is being restored
|
|
51
50
|
|
|
@@ -66,8 +65,8 @@ class Main(QMainWindow):
|
|
|
66
65
|
self.m_menu_bar = MenuBar(self)
|
|
67
66
|
|
|
68
67
|
s1 = QSplitter(Qt.Horizontal)
|
|
69
|
-
#win_label.setStyleSheet("border: 1px solid black;")
|
|
70
|
-
|
|
68
|
+
# win_label.setStyleSheet("border: 1px solid black;")
|
|
69
|
+
|
|
71
70
|
s1.addWidget(self.f_menu)
|
|
72
71
|
s1.addWidget(self.f_winc)
|
|
73
72
|
s1.setSizes(split_w_pc(0.2))
|
|
@@ -76,18 +75,18 @@ class Main(QMainWindow):
|
|
|
76
75
|
s2.addWidget(s1)
|
|
77
76
|
s2.addWidget(self.f_footer)
|
|
78
77
|
s2.setSizes(split_h_pc(0.85))
|
|
79
|
-
|
|
78
|
+
|
|
80
79
|
s0 = QSplitter(Qt.Vertical)
|
|
81
80
|
s0.addWidget(self.f_header)
|
|
82
81
|
s0.addWidget(s2)
|
|
83
82
|
s0.setSizes(split_h_pc(0.05))
|
|
84
|
-
|
|
83
|
+
|
|
85
84
|
hbox.addWidget(s0)
|
|
86
85
|
|
|
87
86
|
QApplication.setStyle(QStyleFactory.create('Cleanlooks'))
|
|
88
87
|
|
|
89
88
|
self.setWindowTitle('SPICE-IT Quicklook')
|
|
90
|
-
|
|
89
|
+
|
|
91
90
|
"""def __del__(self):
|
|
92
91
|
for th in self.th:
|
|
93
92
|
th.quit()"""
|
|
@@ -132,7 +131,7 @@ class Main(QMainWindow):
|
|
|
132
131
|
for plot_key, plot in plot_bloc.items():
|
|
133
132
|
plots.append(plot)
|
|
134
133
|
return plots # list of PlotMap and/or PlotLine
|
|
135
|
-
|
|
134
|
+
|
|
136
135
|
def get_plots(self, given_plot_key):
|
|
137
136
|
plots = []
|
|
138
137
|
for win_key, plot_bloc in self.global_plots.items():
|
|
@@ -140,7 +139,7 @@ class Main(QMainWindow):
|
|
|
140
139
|
if given_plot_key == plot_key:
|
|
141
140
|
plots.append(plot)
|
|
142
141
|
return plots # list of PlotMap or PlotLine
|
|
143
|
-
|
|
142
|
+
|
|
144
143
|
def get_plot_bloc(self, given_plot):
|
|
145
144
|
"""plot_bloc is the parent element from a specific plot, it is a dict
|
|
146
145
|
which is a value-element of global_plots and containing all the PlotMaps
|
|
@@ -157,16 +156,16 @@ class Main(QMainWindow):
|
|
|
157
156
|
for key in keys:
|
|
158
157
|
plot_bloc[key].main_plot_item.setXLink(None)
|
|
159
158
|
plot_bloc[key].main_plot_item.setYLink(None)
|
|
160
|
-
|
|
159
|
+
|
|
161
160
|
def link_axes(self, between_windows=False):
|
|
162
161
|
previous_lambda_y = None
|
|
163
162
|
previous_x_y = None
|
|
164
|
-
|
|
163
|
+
|
|
165
164
|
self.unlink_axes()
|
|
166
165
|
for win_key, plot_bloc in self.global_plots.items():
|
|
167
166
|
# Zoom / Pane link
|
|
168
|
-
#plot_bloc['x_y'].main_plot_item.setYLink(plot_bloc['lambda_y'].main_plot_item)
|
|
169
|
-
#generates zoom issues
|
|
167
|
+
# plot_bloc['x_y'].main_plot_item.setYLink(plot_bloc['lambda_y'].main_plot_item)
|
|
168
|
+
# generates zoom issues
|
|
170
169
|
if between_windows:
|
|
171
170
|
if previous_lambda_y is not None: # not the first window
|
|
172
171
|
PlotMap.link_maps(previous_x_y, plot_bloc['x_y'])
|
|
@@ -199,22 +198,22 @@ class Main(QMainWindow):
|
|
|
199
198
|
elif plot_key == 'lambda_y':
|
|
200
199
|
factor = self.f_menu.s_lambda_rescaling.value()
|
|
201
200
|
return float(factor)
|
|
202
|
-
|
|
201
|
+
|
|
203
202
|
def initialization(self):
|
|
204
203
|
if not path.isdir(Const.default_data_path):
|
|
205
204
|
Log.p(Const.default_data_path + ' does not exist.', 'warn')
|
|
206
205
|
Const.default_data_path = ''
|
|
207
|
-
|
|
206
|
+
|
|
208
207
|
def applyStyle(self, app):
|
|
209
208
|
css_content = self.read_css()
|
|
210
209
|
if Const.debug_mode:
|
|
211
210
|
css_content += self.read_css(True)
|
|
212
211
|
qdgs_css = qdarkgraystyle.load_stylesheet().replace('opacity: 100;', '') # Fix tooltip Windows issue
|
|
213
212
|
app.setStyleSheet(qdgs_css + css_content)
|
|
214
|
-
|
|
213
|
+
|
|
215
214
|
def read_css(self, debug=False):
|
|
216
215
|
debug_str = '_debug' if debug else ''
|
|
217
|
-
file = open('style/style' + debug_str + '.css', mode='r')
|
|
216
|
+
file = open(BASE_DIR + '/style/style' + debug_str + '.css', mode='r')
|
|
218
217
|
css_content = file.read()
|
|
219
218
|
file.close()
|
|
220
219
|
return css_content
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|