mirror of
https://github.com/gwm17/spspy.git
synced 2024-11-22 18:18:52 -05:00
Fix bug in spsplot where updated target did not result in updated reaction.
This commit is contained in:
parent
78a3476d2d
commit
8ca50ee621
|
@ -45,6 +45,8 @@ class SPSPlot:
|
||||||
def update_reactions(self) -> None:
|
def update_reactions(self) -> None:
|
||||||
for datum in self.data.values():
|
for datum in self.data.values():
|
||||||
datum.rxn.update_parameters(self.beamEnergy, self.spsAngle, self.magneticField)
|
datum.rxn.update_parameters(self.beamEnergy, self.spsAngle, self.magneticField)
|
||||||
|
if datum.rxn.targetMaterial.name in self.targets:
|
||||||
|
datum.rxn.targetMaterial = self.targets[datum.rxn.targetMaterial.name]
|
||||||
for ex in datum.excitations:
|
for ex in datum.excitations:
|
||||||
ex.kineticEnergy = datum.rxn.calculate_ejectile_KE(ex.excitation)
|
ex.kineticEnergy = datum.rxn.calculate_ejectile_KE(ex.excitation)
|
||||||
ex.rho = datum.rxn.convert_ejectile_KE_2_rho(ex.kineticEnergy)
|
ex.rho = datum.rxn.convert_ejectile_KE_2_rho(ex.kineticEnergy)
|
||||||
|
|
|
@ -182,6 +182,7 @@ class SPSPlotGUI(QMainWindow):
|
||||||
targDia.new_target.connect(self.sps.add_target)
|
targDia.new_target.connect(self.sps.add_target)
|
||||||
if targDia.exec():
|
if targDia.exec():
|
||||||
self.update_target_table()
|
self.update_target_table()
|
||||||
|
self.sps.update_reactions()
|
||||||
self.update_plot() #in case a reaction is using the target
|
self.update_plot() #in case a reaction is using the target
|
||||||
|
|
||||||
def handle_run(self) -> None:
|
def handle_run(self) -> None:
|
||||||
|
|
Loading…
Reference in New Issue
Block a user