Closed mkelley closed 6 years ago
Opening a PR sounds great to me.
There's no automated test suite set up currently. The current examples in the README covered all of the use cases I could think of so if they work I think you're good. If you have some test cases you could put together for what you've written it would be good to get them in plus the examples in the README into an automated script.
What I've done is checked a few fixed targets to make sure the window lengths agree with Fig. 2 at https://jwst-docs.stsci.edu/display/JPP/JWST+Position+Angles%2C+Ranges%2C+and+Offsets . The following checks ecliptic latitudes +/-85 (CVZ), +/-50 (one long window), and 0 deg (two short windows, no PA rotation):
jwst_gtvt 05:10:20.0095 -66:03:31.6075 --start_date=2019-9-1 --end_date=2020-9-2
jwst_gtvt 01:41:27.7219 -44:38:54.1858 --start_date=2019-9-1 --end_date=2020-9-2
jwst_gtvt 0 0 --start_date=2019-9-1 --end_date=2020-9-2
jwst_gtvt 22:18:34.2546 +44:39:08.4592 --start_date=2019-9-1 --end_date=2020-9-2
jwst_gtvt 18:49:40.3071 +66:03:41.387 --start_date=2019-9-1 --end_date=2020-9-2
I can also reproduce your two plots in the README, with only tiny differences. I'll make the PR in a bit.
Merged in #5
Hi,
This tool is great, but would be even better if it supported moving targets. To help address that, I have edited the code so that it can accept RA and Dec as arrays. This way, we can pass a moving target ephemeris. I also added a new function that retrieves the ephemeris using the callhorizons module, and a separate command-line script (jwst_mtvt) that accepts a moving target name. Below I've included output for comet Hale-Bopp and Jupiter.
The updates seem to work well, but I would like to verify that I correctly edited all the special cases. Do you have a test suite or similar that I could run?
I would be happy to share the updates with you. If you agree, I can make a pull request. My code is at: https://github.com/mkelley/jwst_gtvt/tree/moving-targets .
Cheers, msk