You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Chaining alpha and beta decays together on a Carbon-9 nucleus should result in a Lithium-5 (three protons, two neutrons) and about half the time this is what happens. However, about half the time, what remains is a nucleus with four protons and two neutrons (technically a Beryllium-5). Inspecting the elements makes it clear that the daughter neutron from the beta decay is not present and one of the neutrons is duplicated. That is, the nucleus group in the SVG has two child proton groups with the same ID.
The fact that this happens intermittently could point to a race condition. Either way it's unclear how one proton would be generated twice in the SVG and the daughter neutron not at all, despite the Nucleus.particles object/array looking correct 100% of the time.
As a stopgap, the method Nucleus.prototype.restart() currently has a line that removes all child elements from the nucleon selector before redefining the child nodes:
This is not a clean solution. It fails to reuse SVG elements efficiently and, especially for larger nuclides, can result in a momentary but visible instance of the entire nuclide disappearing in order to be redrawn.
The text was updated successfully, but these errors were encountered:
To reproduce:
Chaining alpha and beta decays together on a Carbon-9 nucleus should result in a Lithium-5 (three protons, two neutrons) and about half the time this is what happens. However, about half the time, what remains is a nucleus with four protons and two neutrons (technically a Beryllium-5). Inspecting the elements makes it clear that the daughter neutron from the beta decay is not present and one of the neutrons is duplicated. That is, the nucleus group in the SVG has two child proton groups with the same ID.
The fact that this happens intermittently could point to a race condition. Either way it's unclear how one proton would be generated twice in the SVG and the daughter neutron not at all, despite the
Nucleus.particles
object/array looking correct 100% of the time.As a stopgap, the method
Nucleus.prototype.restart()
currently has a line that removes all child elements from the nucleon selector before redefining the child nodes:This is not a clean solution. It fails to reuse SVG elements efficiently and, especially for larger nuclides, can result in a momentary but visible instance of the entire nuclide disappearing in order to be redrawn.
The text was updated successfully, but these errors were encountered: