skyportal / gwemopt

Gravitational-wave Electromagnetic Optimization
GNU General Public License v3.0
19 stars 34 forks source link

Unify run interface #107

Closed robertdstein closed 1 year ago

robertdstein commented 1 year ago

This PR unifies the run interface. Now __main__.py calls a run function from run.py, with the system arguments. run.py then handles argument parsing by a function in args.py, and then actually executes the if/else function logic. The advantage of this approach is that the tests can call run.py too, so there is no duplication of code. This PR also deduplicates the many many parameters which are explicitly copied one by one with the same name in params.py to a dictionary. Instead, the argparse namespace is just directly converted to a dictionary, and then only the special cases are updated manually. Lastly, for speed, this PR gets rid of the old test event, and just directly downloads the well-localised S190814bv from gracedb.