Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add ability to specify distances in angles alongside a system distance #1

Open
mileslucas opened this issue Sep 22, 2022 · 0 comments

Comments

@mileslucas
Copy link
Member

Frequently separations of, e.g., binary stars is given in angles, usually arcseconds or mas. We should add another part of the constructor parsing that allows passing distance as a keyword argument, which will automatically change any angular arguments for a. We could also check if R_planet or R_star are angles and adjust them, but that feels kind of weird- I think people are more likely to use stellar radii in those contexts.

MWE:
current required behavior

distance = inv(6.94e-3) * u"pc"

orbit = KeplerianOrbit(;
    period=52.98u"yr",
    tp=2020.20u"yr",
    ecc=0.074,
    Omega=202.4u"°",
    a=(0.169u"arcsecond" * distance) |> u"AU",
    incl=68.5u"°",
    omega=58.7u"°"
)

desired behavior

orbit = KeplerianOrbit(;
    period=52.98u"yr",
    tp=2020.20u"yr",
    ecc=0.074,
    Omega=202.4u"°",
    a=0.169u"arcsecond",
    distance,
    incl=68.5u"°",
    omega=58.7u"°"
)

in this case there will have to be some decisions made about defaults. First off, what should the unitless default for distance be? I think parsec is reasonable. Second off, how do we want to autoconvert from angles to distances. For instance, using AU makes sense for arcseconds and parsec, but maybe stellar radii is more appropriate for close planetary systems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant