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

API for derived planetary parameters #301

Open
shbhuk opened this issue Mar 28, 2020 · 6 comments
Open

API for derived planetary parameters #301

shbhuk opened this issue Mar 28, 2020 · 6 comments

Comments

@shbhuk
Copy link

shbhuk commented Mar 28, 2020

Hi,
I'm curious whether there currently exists an API hook for derived planetary parameters. I see the CLI commands to get this in the Optional Features section of the tutorial, however I would like to use the same functionality in the script, i.e. radvel derive, radvel plot -t derived, and then the model comparison..

Looking at radvel.driver, I see how to implement this, but before I did that I wanted to check if you have an example script / notebook for this. As far as I could tell the Jupyter notebook tutorials do not deal with derived planetary parameters (let me know if I missed something).

https://radvel.readthedocs.io/en/latest/quickstartcli.html#optional-features

@shbhuk
Copy link
Author

shbhuk commented Mar 29, 2020

Likewise the 'report' command for CLI

@bjfultn
Copy link
Contributor

bjfultn commented Mar 29, 2020

I do not have tutorials for this sort of thing. It would be great if you wanted to implement and add to the existing tutorial(s) or make new ones!

@shbhuk
Copy link
Author

shbhuk commented Mar 30, 2020 via email

@bjfultn
Copy link
Contributor

bjfultn commented Mar 30, 2020

Yeah, I personally use the CLI almost exclusively.

@zhexingli
Copy link
Contributor

Not sure if this helps, but if you'd like to run the same commands in a python script instead of in the comand line (for reasons such as to incorporate the radvel commands and results in a bigger script that does other things), you could use a python subprocess with the same CLI command without using the API.

For example, the radvel derive -s filename command can be implemented as:
import subprocess
subprocess.check_output(['radvel','derive','-s','file'])
If you assign it to a variable it saves all the command line outputs. With some cleaning you can make it to display nicely.

@shbhuk
Copy link
Author

shbhuk commented Aug 15, 2021

Hi @zhexingli,
Thank you for the response. Yes, that's what I've been doing to use radvel, i.e. call the CLI commands through a python script.

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

No branches or pull requests

3 participants