rd_degs_list.py

This is a python script (python/coords/rd_degs_list.py) that takes a file from xy2sky (for example), and reformats the Ra,Dec in sexigecimal formats to the more accesible floating point values in units of degrees.


% cat image2.RaDec
12:42:01.335 +41:00:03.77 J2000  831.000  710.000 
12:42:08.426 +41:05:27.23 J2000  787.000  901.000 
12:42:39.626 +41:03:03.29 J2000  578.000  820.000 
12:41:43.801 +41:22:09.95 J2000  960.000 1488.000 
12:40:29.723 +41:21:05.00 J2000 1450.000 1443.000 
12:40:31.281 +41:17:11.83 J2000 1438.000 1306.000 
12:41:30.548 +41:18:53.28 J2000 1046.000 1371.000 

% rd_degs_list.py image2.RaDec 
190.505562500 41.001047222 12:42:01.335 +41:00:03.77
190.535108333 41.090897222 12:42:08.426 +41:05:27.23
190.665108333 41.050913889 12:42:39.626 +41:03:03.29
190.432504167 41.369430556 12:41:43.801 +41:22:09.95
190.123845833 41.351388889 12:40:29.723 +41:21:05.00
190.130337500 41.286619444 12:40:31.281 +41:17:11.83
190.377283333 41.314800000 12:41:30.548 +41:18:53.28

Typically, the standard out results are directed to a file: 
rd_degs_list.py image2.RaDec > image2.RaDec_degrees

Note that the only important part of the input file "image2.RaDec" is that the first two columns are the Ra,Dec in sexigecimal form.




Back to SCO CODES page