Closed rieder closed 1 year ago
The relevant lines are:
evolved_star = instance.particles.copy()[0]
evolved_star.temperature = instance.particles[0].temperature
So this should not result in an error - evolved_star.temperature
should not be a DerivedAttribute.
Ah but it is - it seems the copy of the SSE star now works exactly like a Particle of SSE instead of a standard AMUSE particle with all attributes of the SSE star copied to it as before. So the solution is to remove the second line above.
It's unexpected that printing the copied evolved_star
doesn't show the temperature
property, though it is still available with print(evolved_star.particle)
:
> print(evolved_star)
Particle(13167421731397204142, set=<4694462320>
, CO_core_mass=0.566294538385 MSun
, age=7000.0 Myr
, convective_envelope_mass=1e-10 MSun
, convective_envelope_radius=1e-10 RSun
, core_mass=0.566294538385 MSun
, core_radius=0.0132436589837 RSun
, end_time=7000.0 Myr
, epoch=3727.22312388 Myr
, initial_mass=0.566294538385 1.98892e+30 * kg
, luminosity=9.59615023773e-05 LSun
, main_sequence_lifetime=10000000000.0 Myr
, mass=0.566294538385 MSun
, radius=0.0132436589837 RSun
, spin=4.79426850652e-06 yr**-1
, stellar_type=Carbon/Oxygen White Dwarf)
> print(evolved_star.temperature)
4968.44327548 K
After merging #947, tests fail with
cannot set value of a DerivedAttribute
:Need to fix the tests to account for this.