IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 37504


Ignore:
Timestamp:
Oct 20, 2014, 2:37:57 PM (12 years ago)
Author:
Serge CHASTEL
Message:

outdated pytohn version fix

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/mops/mops_ringsv3/populate_ringsv3_database.py

    r37503 r37504  
    1 #!/usr/bin/env python
     1#!/usr/bin/env python2.7
    22
    33import MySQLdb
     
    4242    fits = pyfits.open(tesselation)
    4343    table = fits[1].data
    44     raProjectionCenterRadians = numpy.radians(table['crval1'])
     44    raProjectionCenterRadians = numpy.radians(table.field('CRVAL1'))
    4545    craProjectionCenter = numpy.cos(raProjectionCenterRadians)
    4646    sraProjectionCenter = numpy.sin(raProjectionCenterRadians)
    47     decProjectionCenterRadians = numpy.radians(table['crval2'])
     47    decProjectionCenterRadians = numpy.radians(table.field('CRVAL2'))
    4848    cdecProjectionCenter = numpy.cos(decProjectionCenterRadians)
    4949    sdecProjectionCenter = numpy.sin(decProjectionCenterRadians)
    50     data = [ table['name'],
    51              table['crval1'], craProjectionCenter, sraProjectionCenter,
    52              table['crval2'], cdecProjectionCenter, sdecProjectionCenter,
    53              table['crpix1'], table['crpix2'],
     50    data = [ table.field('NAME'),
     51             tablefield('CRVAL1'), craProjectionCenter, sraProjectionCenter,
     52             tablefield('CRVAL2'), cdecProjectionCenter, sdecProjectionCenter,
     53             tablefield('CRPIX1'), tablefield('CRPIX2'),
    5454             ]
    5555    cursor = database.cursor()
Note: See TracChangeset for help on using the changeset viewer.