Closed hannorein closed 1 year ago
I think all the complications came from trying to allow for lists of arbitrary shapes. I don't think there's any problem at all with using vec_3d as a rebx_type, and I do think that would actually give a much nicer interface...
That makes sense. I guess before we had spin, there was little reason to give priority to a 3 vector, over say, a 3x3 matrix. But now there might be an argument to be made to add Vec3d. Well, not urgent...
Too many things to work on, too little time! :) This would be nice to get in for this effect. I have an all day meeting tomorrow at AAS...this might be the perfect mindless work for parts of it that don't really apply to the DDA :)
Do you want me to do it? I have one more day before teaching starts ;-)
No you’ve done a ton! I’m at AAS all week. I can do it
On Sat, Jan 7, 2023 at 11:48 AM Hanno Rein @.***> wrote:
Do you want me to do it? I have one more day before teaching starts ;-)
— Reply to this email directly, view it on GitHub https://github.com/dtamayo/reboundx/pull/92#issuecomment-1374589923, or unsubscribe https://github.com/notifications/unsubscribe-auth/AA2ABF2Y6I2O7PNJQP2VJHDWRHB7XANCNFSM6AAAAAATUBMVJM . You are receiving this because you commented.Message ID: @.***>
-- Daniel Tamayo Assistant Professor Harvey Mudd College Chair, AAS Division on Dynamical Astronomy Pronouns: he/him/él
Don't merge this yet! I've been playing around to simplify the python syntax when working with vectors. The changes here are a bit of a hack, but they allow the user to set and get params that are 3-vectors in a nicer way:
Instead of
This would allow you to do
Similarly, getter returns a Vec3d:
No changes on the c side are necessary but one could implement the same hack there.
We've talked about this sort of thing many times before. So I'm probably ignoring a ton of side effects.
Can you remind me, what was the reason not to implement a three vector type as an option for a param?
Side note: Unfortunately numpy doesn't convert Vec3d to a sensible numpy array when using
np.array(v)
, so it can't easily be used in assignments. I have narrowed down the issue, but can't seem to find a workaround. The getter could just return a python list instead of a Vec3d to fix that.