1 Commits

Author SHA1 Message Date
2f2e854d07 Add encoding to read/write 2025-10-10 13:24:43 +00:00
3 changed files with 6 additions and 6 deletions

View File

@@ -3,7 +3,7 @@ run-name: ${{ gitea.actor }} is building THE AppImage 🚀 # a lot of exciteme
on: on:
push: push:
branches: branches:
- main - master
jobs: jobs:
Explore-Gitea-Actions: Explore-Gitea-Actions:

View File

@@ -476,7 +476,7 @@ class ExperimentContainer(QtCore.QObject):
self.data.y = self.data.y * scale_y + shift_y self.data.y = self.data.y * scale_y + shift_y
self.data.y_err = self.data.y_err * scale_y self.data.y_err = self.data.y_err * scale_y
self.update({'scale': scaling_factor, 'shift': shift_factor}) self.update({'shift': scaling_factor, 'scale': shift_factor})
def get_namespace(self, i: int = None, j: int = None) -> dict: def get_namespace(self, i: int = None, j: int = None) -> dict:
if (i is None) and (j is None): if (i is None) and (j is None):

View File

@@ -106,7 +106,7 @@ class HomoDipolar(Coupling):
name = 'Homonuclear Dipolar' name = 'Homonuclear Dipolar'
parameter = ['r'] parameter = ['r']
unit = ['nm'] unit = ['m']
choice = [ choice = [
(r'\gamma', 'nucleus', {k: k for k in gamma}), (r'\gamma', 'nucleus', {k: k for k in gamma}),
('Spin', 'spin', OrderedDict([('1/2', 0.5), ('1', 1), ('3/2', 1.5), ('2', 2), ('5/2', 2.5), ('3', 3)])), ('Spin', 'spin', OrderedDict([('1/2', 0.5), ('1', 1), ('3/2', 1.5), ('2', 2), ('5/2', 2.5), ('3', 3)])),
@@ -128,7 +128,7 @@ class HomoDipolar(Coupling):
raise KeyError(f'Unknown nucleus {nucleus}') raise KeyError(f'Unknown nucleus {nucleus}')
try: try:
coupling = mu0 / (4*pi) * hbar_joule * gamma_full[nucleus]**2 / ((r*1e-9) + 1e-34)**3 coupling = mu0 / (4*pi) * hbar_joule * gamma_full[nucleus]**2 / (r+1e-34)**3
except ZeroDivisionError: except ZeroDivisionError:
return 1e318 return 1e318
@@ -143,7 +143,7 @@ class HeteroDipolar(Coupling):
name = 'Heteronuclear Dipolar' name = 'Heteronuclear Dipolar'
parameter = ['r'] parameter = ['r']
unit = ['nm'] unit = ['m']
choice = [ choice = [
(r'\gamma_{1}', 'nucleus1', {k: k for k in gamma}), (r'\gamma_{1}', 'nucleus1', {k: k for k in gamma}),
(r'\gamma_{2}', 'nucleus2', {k: k for k in gamma}), (r'\gamma_{2}', 'nucleus2', {k: k for k in gamma}),
@@ -172,7 +172,7 @@ class HeteroDipolar(Coupling):
raise KeyError(f'Unknown nucleus {nucleus2}') raise KeyError(f'Unknown nucleus {nucleus2}')
try: try:
coupling = mu0 / (4*pi) * hbar_joule * gamma_full[nucleus1]*gamma_full[nucleus2] / ((r*1e-9) + 1e-34)**3 coupling = mu0 / (4*pi) * hbar_joule * gamma_full[nucleus1]*gamma_full[nucleus2] / r**3
except ZeroDivisionError: except ZeroDivisionError:
return 1e318 return 1e318