def update_azza(self):
     """
     update_azza():
         Update the AZ and ZA based on the current time with the vegas_status instance.
     """
     (iptr, ang, stat) = s.sla_dafin(self['RA_STR'].replace(':', ' '), 1)
     self.update("RA", ang*15.0*RADTODEG)
     (iptr, ang, stat) = s.sla_dafin(self['DEC_STR'].replace(':', ' '), 1)
     self.update("DEC", ang*RADTODEG)
     MJD = astro.current_MJD()
     az, za = astro.radec_to_azza(self['RA'], self['DEC'], MJD, scope='GBT')
     self.update("AZ", az)
     self.update("ZA", za)
示例#2
0
 def update_azza(self):
     """
     update_azza():
         Update the AZ and ZA based on the current time with the nuppi_status instance.
     """
     (iptr, ang, stat) = s.sla_dafin(self['RA_STR'].replace(':', ' '), 1)
     self.update("RA", ang * 15.0 * RADTODEG)
     (iptr, ang, stat) = s.sla_dafin(self['DEC_STR'].replace(':', ' '), 1)
     self.update("DEC", ang * RADTODEG)
     MJD = current_MJD()
     az, za = radec_to_azza(self['RA'], self['DEC'], MJD, scope='NRT')
     self.update("AZ", az)
     self.update("ZA", za)
示例#3
0
    def radvellist(self, sdate, rastring, decstring):

        # decode the date, convert to MJD
        ss = sdate.split('-')
        year = int(ss[0])
        mont = int(ss[1])
        day = int(ss[2])
        mjdv = s.sla_cldj(year, mont, day)
        mjd0 = mjdv[0]
        rstat = mjdv[1]

        raval = s.sla_dafin(rastring, 1)  # convert to radians
        dcval = s.sla_dafin(decstring, 1)

        rarad = raval[1] * 15.
        dcrad = dcval[1]

        # degrees
        radeg = rarad * 180.0 / math.pi
        decdeg = dcrad * 180.0 / math.pi

        # print ""
        # print ' %3s %7s %7s %7s %13s %13s %13s' %  \
        #      ('UTHr', 'LST', 'Geo', 'Helio', 'Barycentric', 'LSRK', 'Galacto')

        # loop through 25 hours
        for i in range(0, 25):
            hour = i
            dfrac = hour / 24.0
            mjd1 = mjd0 + dfrac

            rr = self.rvel(mjd1, radeg, decdeg)
            #  ((mjdd, last*12.0/math.pi, Rgeo, totalhelio,totalbary, totallsrk,totalgal))

            print(' %3d %7.3f %7.3f %7.3f %13.3f %13.3f %13.3f' % \
               (hour,rr[1],rr[2],rr[3],rr[4],rr[5],rr[6]))