1
0
Fork 0
mirror of https://github.com/gwm17/spspy.git synced 2024-11-22 18:18:52 -05:00

Compare commits

..

No commits in common. "c866c07abce9de36e425f090efb4457a8c54d61d" and "3971b797d6673cc5ff4a2c5dcf777c23110c6bcf" have entirely different histories.

3 changed files with 4 additions and 6 deletions

View File

@ -13,7 +13,7 @@ class TargetLayer:
thickness: float = 0.0 #ug/cm^2
def __str__(self) -> str:
return "".join([f"{global_nuclear_data.get_data(z, a,).prettyIsotopicSymbol}<sub>{s}</sub>" for z, a, s in self.compound_list])
return "".join([f"{global_nuclear_data.get_data(z, a,).prettyIsotopicSymbol}<sub>{s}<\sub>" for z, a, s in self.compound_list])
#integrate energy loss starting from the final energy and running backwards to initial energy
#catima does not natively provide this type of method

View File

@ -7,7 +7,6 @@ import numpy as np
from enum import Enum
INVALID_PEAK_ID: int = -1
DEG2RAD: float = np.pi / 180.0
class PeakType(Enum):
CALIBRATION = "Calibration"
@ -59,7 +58,6 @@ class Spanc:
print("Cannot create reaction with non-existant target ", targetName)
return
key = f"Rxn{len(self.reactions)}"
params.spsAngle *= DEG2RAD
rxn = Reaction(params, target=self.targets[targetName])
self.reactions[key] = rxn
@ -67,7 +65,7 @@ class Spanc:
if rxnName in self.reactions:
rxn = self.reactions[rxnName]
rxn.params.beamEnergy = beamEnergy
rxn.params.spsAngle = spsAngle * DEG2RAD
rxn.params.spsAngle = spsAngle
rxn.params.magneticField = magneticField
def add_calibration(self, data: Peak) -> None:

View File

@ -1,4 +1,4 @@
from .Spanc import Spanc, PeakType, DEG2RAD
from .Spanc import Spanc, PeakType
from .Fitter import convert_fit_points_to_arrays, convert_resid_points_to_arrays
from .ui.MPLCanvas import MPLCanvas
from .ui.ReactionDialog import ReactionDialog
@ -311,7 +311,7 @@ class SpancGUI(QMainWindow):
self.reactionTable.setCellWidget(row, 1, QLabel(str(rxn)))
self.reactionTable.setItem(row, 2, QTableWidgetItem(str(rxn.params.beamEnergy)))
self.reactionTable.setItem(row, 3, QTableWidgetItem(str(rxn.params.magneticField)))
self.reactionTable.setItem(row, 4, QTableWidgetItem(str(rxn.params.spsAngle / DEG2RAD)))
self.reactionTable.setItem(row, 4, QTableWidgetItem(str(rxn.params.spsAngle)))
self.reactionTable.resizeColumnsToContents()
self.reactionTable.resizeRowsToContents()