dev (#275)
All checks were successful
Build AppImage / Explore-Gitea-Actions (push) Successful in 1m38s
All checks were successful
Build AppImage / Explore-Gitea-Actions (push) Successful in 1m38s
closes issues #267 #274, #255, #256 Co-authored-by: Dominik Demuth <dominik.demuth@physik.tu-darmstadt.de> Reviewed-on: #275
This commit is contained in:
@ -300,10 +300,12 @@ class ExperimentContainer(QtCore.QObject):
|
||||
self._relations.pop(relation_type)
|
||||
|
||||
def _update_actions(self):
|
||||
self.actions.update({'sort': self._data.sort,
|
||||
'cut': self._data.cut,
|
||||
'norm': self._data.normalize,
|
||||
'center': self.center})
|
||||
self.actions.update({
|
||||
'sort': self._data.sort,
|
||||
'cut': self._data.cut,
|
||||
'norm': self._data.normalize,
|
||||
'center': self.center,
|
||||
})
|
||||
|
||||
@plot_update
|
||||
def update(self, opts: dict):
|
||||
@ -311,9 +313,11 @@ class ExperimentContainer(QtCore.QObject):
|
||||
|
||||
def get_properties(self) -> dict:
|
||||
props = OrderedDict()
|
||||
props['General'] = OrderedDict([('Name', self.name),
|
||||
('Value', str(self.value)),
|
||||
('Group', str(self.group))])
|
||||
props['General'] = OrderedDict([
|
||||
('Name', self.name),
|
||||
('Value', str(self.value)),
|
||||
('Group', str(self.group)),
|
||||
])
|
||||
props['Symbol'] = OrderedDict()
|
||||
props['Line'] = OrderedDict()
|
||||
|
||||
@ -480,10 +484,12 @@ class ExperimentContainer(QtCore.QObject):
|
||||
else:
|
||||
prefix = f'g[{i}].s[{j}].'
|
||||
|
||||
namespace = {prefix + 'x': (self.x, 'x values'),
|
||||
prefix + 'y': [self.y, 'y values'],
|
||||
prefix + 'y_err': (self.y_err, 'y error values'),
|
||||
prefix + 'value': (self.value, str(self.value))}
|
||||
namespace = {
|
||||
prefix + 'x': (self.x, 'x values'),
|
||||
prefix + 'y': [self.y, 'y values'],
|
||||
prefix + 'y_err': (self.y_err, 'y error values'),
|
||||
prefix + 'value': (self.value, str(self.value)),
|
||||
}
|
||||
|
||||
if len(self._fits) == 1:
|
||||
namespace.update({
|
||||
|
@ -385,6 +385,6 @@ class ValueModel(QtCore.QAbstractTableModel):
|
||||
@staticmethod
|
||||
def as_string(value) -> str:
|
||||
if isinstance(value, complex):
|
||||
return f'{value.real:.8g}{value.imag:+.8g}j'
|
||||
return f'{value.real:.13g}{value.imag:+.13g}j'
|
||||
else:
|
||||
return f'{value:.8g}'
|
||||
return f'{value:.13g}'
|
||||
|
Reference in New Issue
Block a user