Fix UI spacing & final tau timescale
parent
db276576b3
commit
a57adf9a3b
6
app.py
6
app.py
|
@ -58,7 +58,9 @@ class AppWindow(QtWidgets.QMainWindow, Ui_MainWindow):
|
||||||
timestep = (mem['x_data'][-1] - mem['x_data'][0]) / len(mem['x_data'])
|
timestep = (mem['x_data'][-1] - mem['x_data'][0]) / len(mem['x_data'])
|
||||||
mem['timestep'] = timestep
|
mem['timestep'] = timestep
|
||||||
self.spin_timestep.setValue(timestep)
|
self.spin_timestep.setValue(timestep)
|
||||||
print(timestep)
|
def set_timestep(x):
|
||||||
|
mem['timestep'] = x
|
||||||
|
self.spin_timestep.valueChanged.connect(lambda v: set_timestep(v))
|
||||||
self.raw_data_graph.plot() # Graph new stuff
|
self.raw_data_graph.plot() # Graph new stuff
|
||||||
|
|
||||||
# self.groups_graph.clear() # Clear old stuff
|
# self.groups_graph.clear() # Clear old stuff
|
||||||
|
@ -78,6 +80,8 @@ class AppWindow(QtWidgets.QMainWindow, Ui_MainWindow):
|
||||||
self.graph_tabs.setCurrentIndex(0)
|
self.graph_tabs.setCurrentIndex(0)
|
||||||
|
|
||||||
# Load from persistent storage & bind write actions
|
# Load from persistent storage & bind write actions
|
||||||
|
# NOTE: This is incomplete, but can very easily finished if someone can figure out what's wrong.
|
||||||
|
# Currently using https://github.com/RaRe-Technologies/sqlitedict for local db handling.
|
||||||
|
|
||||||
# path_hash = md5(filename.encode('utf-8')).hexdigest()
|
# path_hash = md5(filename.encode('utf-8')).hexdigest()
|
||||||
|
|
||||||
|
|
|
@ -282,6 +282,7 @@ def fit_peaks(
|
||||||
for peak_data in peaks_cut:
|
for peak_data in peaks_cut:
|
||||||
x_data = np.arange(len(peak_data)) # just placeholder indices
|
x_data = np.arange(len(peak_data)) # just placeholder indices
|
||||||
# x_data = np.arange(0, len(peak_data)*mem['timestep'], mem['timestep'])
|
# x_data = np.arange(0, len(peak_data)*mem['timestep'], mem['timestep'])
|
||||||
|
print(x_data)
|
||||||
if not use_advanced:
|
if not use_advanced:
|
||||||
peak_index = np.argmax(peak_data, axis=0)
|
peak_index = np.argmax(peak_data, axis=0)
|
||||||
else:
|
else:
|
||||||
|
@ -314,7 +315,7 @@ def get_time_constants(equation_data):
|
||||||
for r in equation_data:
|
for r in equation_data:
|
||||||
row = []
|
row = []
|
||||||
for e in r:
|
for e in r:
|
||||||
tau = e['popt'][3]
|
tau = e['popt'][3]*mem['timestep']
|
||||||
row.append(tau)
|
row.append(tau)
|
||||||
tau_data.append(row)
|
tau_data.append(row)
|
||||||
|
|
||||||
|
|
|
@ -19,13 +19,13 @@
|
||||||
<widget class="QScrollArea" name="scrollArea">
|
<widget class="QScrollArea" name="scrollArea">
|
||||||
<property name="minimumSize">
|
<property name="minimumSize">
|
||||||
<size>
|
<size>
|
||||||
<width>280</width>
|
<width>286</width>
|
||||||
<height>0</height>
|
<height>0</height>
|
||||||
</size>
|
</size>
|
||||||
</property>
|
</property>
|
||||||
<property name="maximumSize">
|
<property name="maximumSize">
|
||||||
<size>
|
<size>
|
||||||
<width>280</width>
|
<width>286</width>
|
||||||
<height>16777215</height>
|
<height>16777215</height>
|
||||||
</size>
|
</size>
|
||||||
</property>
|
</property>
|
||||||
|
@ -39,9 +39,9 @@
|
||||||
<property name="geometry">
|
<property name="geometry">
|
||||||
<rect>
|
<rect>
|
||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>-240</y>
|
||||||
<width>261</width>
|
<width>270</width>
|
||||||
<height>926</height>
|
<height>928</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<layout class="QVBoxLayout" name="verticalLayout_2">
|
<layout class="QVBoxLayout" name="verticalLayout_2">
|
||||||
|
@ -49,14 +49,14 @@
|
||||||
<widget class="QGroupBox" name="groupBox_5">
|
<widget class="QGroupBox" name="groupBox_5">
|
||||||
<property name="minimumSize">
|
<property name="minimumSize">
|
||||||
<size>
|
<size>
|
||||||
<width>239</width>
|
<width>248</width>
|
||||||
<height>0</height>
|
<height>0</height>
|
||||||
</size>
|
</size>
|
||||||
</property>
|
</property>
|
||||||
<property name="maximumSize">
|
<property name="maximumSize">
|
||||||
<size>
|
<size>
|
||||||
<width>239</width>
|
<width>248</width>
|
||||||
<height>16777215</height>
|
<height>64</height>
|
||||||
</size>
|
</size>
|
||||||
</property>
|
</property>
|
||||||
<property name="title">
|
<property name="title">
|
||||||
|
@ -75,7 +75,7 @@
|
||||||
<item row="0" column="1">
|
<item row="0" column="1">
|
||||||
<widget class="QDoubleSpinBox" name="spin_timestep">
|
<widget class="QDoubleSpinBox" name="spin_timestep">
|
||||||
<property name="decimals">
|
<property name="decimals">
|
||||||
<number>6</number>
|
<number>10</number>
|
||||||
</property>
|
</property>
|
||||||
<property name="minimum">
|
<property name="minimum">
|
||||||
<double>0.000000000000000</double>
|
<double>0.000000000000000</double>
|
||||||
|
@ -94,14 +94,14 @@
|
||||||
<widget class="QGroupBox" name="groupBox">
|
<widget class="QGroupBox" name="groupBox">
|
||||||
<property name="minimumSize">
|
<property name="minimumSize">
|
||||||
<size>
|
<size>
|
||||||
<width>239</width>
|
<width>248</width>
|
||||||
<height>278</height>
|
<height>306</height>
|
||||||
</size>
|
</size>
|
||||||
</property>
|
</property>
|
||||||
<property name="maximumSize">
|
<property name="maximumSize">
|
||||||
<size>
|
<size>
|
||||||
<width>239</width>
|
<width>248</width>
|
||||||
<height>278</height>
|
<height>306</height>
|
||||||
</size>
|
</size>
|
||||||
</property>
|
</property>
|
||||||
<property name="font">
|
<property name="font">
|
||||||
|
@ -198,7 +198,7 @@
|
||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>211</width>
|
<width>211</width>
|
||||||
<height>91</height>
|
<height>111</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<layout class="QFormLayout" name="formLayout">
|
<layout class="QFormLayout" name="formLayout">
|
||||||
|
@ -360,13 +360,13 @@
|
||||||
<widget class="QGroupBox" name="groupBox_4">
|
<widget class="QGroupBox" name="groupBox_4">
|
||||||
<property name="minimumSize">
|
<property name="minimumSize">
|
||||||
<size>
|
<size>
|
||||||
<width>239</width>
|
<width>248</width>
|
||||||
<height>165</height>
|
<height>165</height>
|
||||||
</size>
|
</size>
|
||||||
</property>
|
</property>
|
||||||
<property name="maximumSize">
|
<property name="maximumSize">
|
||||||
<size>
|
<size>
|
||||||
<width>239</width>
|
<width>248</width>
|
||||||
<height>165</height>
|
<height>165</height>
|
||||||
</size>
|
</size>
|
||||||
</property>
|
</property>
|
||||||
|
@ -505,13 +505,13 @@
|
||||||
<widget class="QGroupBox" name="groupBox_2">
|
<widget class="QGroupBox" name="groupBox_2">
|
||||||
<property name="minimumSize">
|
<property name="minimumSize">
|
||||||
<size>
|
<size>
|
||||||
<width>239</width>
|
<width>248</width>
|
||||||
<height>376</height>
|
<height>350</height>
|
||||||
</size>
|
</size>
|
||||||
</property>
|
</property>
|
||||||
<property name="maximumSize">
|
<property name="maximumSize">
|
||||||
<size>
|
<size>
|
||||||
<width>239</width>
|
<width>248</width>
|
||||||
<height>351</height>
|
<height>351</height>
|
||||||
</size>
|
</size>
|
||||||
</property>
|
</property>
|
||||||
|
@ -523,11 +523,18 @@
|
||||||
</font>
|
</font>
|
||||||
</property>
|
</property>
|
||||||
<property name="title">
|
<property name="title">
|
||||||
<string>INITIAL FIT CONFIG</string>
|
<string>INITIAL FIT CONFIG (timescale: ticks)</string>
|
||||||
</property>
|
</property>
|
||||||
<layout class="QVBoxLayout" name="verticalLayout">
|
<layout class="QVBoxLayout" name="verticalLayout">
|
||||||
<item>
|
<item>
|
||||||
<widget class="QGraphicsView" name="equation_view"/>
|
<widget class="QGraphicsView" name="equation_view">
|
||||||
|
<property name="maximumSize">
|
||||||
|
<size>
|
||||||
|
<width>16777215</width>
|
||||||
|
<height>66</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<layout class="QFormLayout" name="formLayout_3">
|
<layout class="QFormLayout" name="formLayout_3">
|
||||||
|
|
Loading…
Reference in New Issue