Currently there is an example of doing orbit determination in the examples folder (testodet.py) showing how this is done with the current setup. Basically the method provided by the package takes config file and data file contents as a string and passes that data to Java classes. This is kind of an awkward implementation from a Python standpoint. I suggest modifying the API to accept config/data/output file paths and then handling the file loading and passing to Java all in one place. It will make calls to the method simpler and more transparent to the user.
I also recommend making the output file path optional so that the user can choose whether to write the output to a file or just used the returned result in a script.
Finally, return the dictionary representation of the result, not the raw JSON string. Easy enough with json.loads(result). Calls will look something like:
from orbdetpy import do_orbdet
results = do_orbdet(config_path, data_path, output_path=output_path)
# results is a Python dictionary
with appropriately defined config_path, etc.
I suggest we merge my pull request #3 first and then make this a new major release on top of that since it will change the way the API calls are done (passing file paths instead of contents).
Currently there is an example of doing orbit determination in the examples folder (
testodet.py
) showing how this is done with the current setup. Basically the method provided by the package takes config file and data file contents as a string and passes that data to Java classes. This is kind of an awkward implementation from a Python standpoint. I suggest modifying the API to accept config/data/output file paths and then handling the file loading and passing to Java all in one place. It will make calls to the method simpler and more transparent to the user.I also recommend making the output file path optional so that the user can choose whether to write the output to a file or just used the returned result in a script.
Finally, return the dictionary representation of the result, not the raw JSON string. Easy enough with
json.loads(result)
. Calls will look something like:with appropriately defined
config_path
, etc.I suggest we merge my pull request #3 first and then make this a new major release on top of that since it will change the way the API calls are done (passing file paths instead of contents).