dtamayo / reboundx

A library for adding additional forces to the REBOUND N-body integration package
GNU General Public License v3.0
80 stars 60 forks source link

Setting beta via sim.particles[i].beta does not work? #93

Closed Yeqzids closed 1 year ago

Yeqzids commented 1 year ago

I'm following this example to set the beta by

sim.particles[0].beta = 0.1

But if I try to print sim.particles[0].beta, I get the error of "'Particle' object has no attribute 'beta'".

If I follow this example instead and set beta by, e.g. ps["p1"].params["beta"] = 0.1, then all works as expected.

Why does the first way not work -- did I miss something there?

dtamayo commented 1 year ago

Oops! That should read sim.particles[0].params['beta'] = 0.1. Working on moving the continuous integration tests to github to catch things like that. Thanks, I'll update the example

Yeqzids commented 1 year ago

Thanks for the speedy response! Confirm that it's working now.