STScI-Citizen-Science / MTPipeline

Pipeline to produce CR rejected, astrodrizzled, png's of HST WFPC2 solar system data.
6 stars 1 forks source link

modify jpl2db.py to include fetching of magnitude and diameter data #71

Closed prathamjoshi closed 10 years ago

prathamjoshi commented 11 years ago

The jpl2db.py module defines the behavior for interacting with the JPL New Horizons project via a TELNET connection to obtain ephemerides in RA and DEC degree coordinates. This information is written to a MySQL database using the SQLAlchemy module.

I am going to modify the script to have it also fetch and write magnitude (9. Visual mag. & Surface Brght ) and diameter (13. Target angular diameter) data from JPL. This will involve both changing the code and adding columns to our database.

prathamjoshi commented 11 years ago

currently the table looks like this:

+--------+---------------+-------------------+------+------+----------+-------------+-------------+
| id     | sub_images_id | master_finders_id | x    | y    | diameter | object_name | description |
+--------+---------------+-------------------+------+------+----------+-------------+-------------+
| 105707 |             5 |                 4 |  107 |  243 |     NULL | deimos      | NULL        |
| 105708 |             9 |                 5 |  348 |  424 |     NULL | phobos      | NULL        |
| 105709 |             6 |                 6 |  389 |  414 |     NULL | mars        | NULL        |

and our query:

"http://ssd.jpl.nasa.gov/horizons_batch.cgi?watch=1&COMMAND='{0[0]}'&TABLE_TYPE='{0[2]}'&CENTER='{0[3]}'&START_TIME='{0[4]}'&STOP_TIME='{0[5]}'&STEP_SIZE='{0[6]}'&QUANTITIES='{0[8]}'&CSV_FORMAT='YES'"

prathamjoshi commented 11 years ago

column addition statements: ALTER TABLE master_finders ADD magnitude FLOAT; ALTER TABLE master_finders ADD diameter FLOAT;