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
If one runs the following small script using sse or seba (python script.py --SeBa), the seba version does not properly set the stellar properties in the code, whereas sse does.
from amuse.datamodel import Particles
from amuse.units import units, constants
def run_bug(use_sse=False):
if use_sse:
from amuse.community.sse.interface import Sse
code = Sse()
else:
from amuse.community.seba.interface import SeBa
code = SeBa()
def new_option_parser():
from optparse import OptionParser
result = OptionParser()
result.add_option("--SeBa", action="store_false",
dest="use_sse", default=True,
help="stellar code to use [%default]")
return result
if name in ('main'):
o, arguments = new_option_parser().parse_args()
run_bug(use_sse=o.use_sse)
The fix hasn't been merged yet, so it's a bit early to close this I'd say. Did you try Claude's code in #1125 and find it to fix the problem? If so, could you leave a review there, or at least a comment saying so?
If one runs the following small script using sse or seba (python script.py --SeBa), the seba version does not properly set the stellar properties in the code, whereas sse does.
from amuse.datamodel import Particles
from amuse.units import units, constants
def run_bug(use_sse=False):
if use_sse:
from amuse.community.sse.interface import Sse
code = Sse()
else:
from amuse.community.seba.interface import SeBa
code = SeBa()
def new_option_parser():
from optparse import OptionParser
result = OptionParser()
result.add_option("--SeBa", action="store_false",
dest="use_sse", default=True,
help="stellar code to use [%default]")
return result
if name in ('main'):
o, arguments = new_option_parser().parse_args()
run_bug(use_sse=o.use_sse)
output for the code:
%> python script.py
R= [10.0] RSun
R= [10.0] RSun
M= [20.0] MSun
M= [20.0] MSun
%> python script.py --SeBa
R= [10.0] RSun
R= [0.888249450314] RSun
M= [20.0] MSun
M= [0.0] MSun
Obviously the SeBa results (stellar radius, as well as mass) are incorrect.
Operating system: Linux Eilonwy 6.5.0-1027-oem #28-Ubuntu SMP PREEMPT_DYNAMIC Thu Jul 25 13:32:46 UTC 2024 x86_64 x86_64 x86_64 GNU/Linux
compiler: gcc (Ubuntu 13.3.0-6ubuntu2~24.04) 13.3.0
The text was updated successfully, but these errors were encountered: