Esempio n. 1
0
File: source.py Progetto: drusk/MOP
 def _update_ra_dec(self):
     fits_header = self.fits_header
     self._ra, self._dec = wcs.xy2sky(self.pixel_x, self.pixel_y,
                                      float(fits_header[astrom.CRPIX1]),
                                      float(fits_header[astrom.CRPIX2]),
                                      float(fits_header[astrom.CRVAL1]),
                                      float(fits_header[astrom.CRVAL2]),
                                      wcs.parse_cd(fits_header),
                                      wcs.parse_pv(fits_header),
                                      wcs.parse_order_fit(fits_header))
Esempio n. 2
0
 def _update_ra_dec(self):
     fits_header = self.fits_header
     self._ra, self._dec = wcs.xy2sky(self.pixel_x, self.pixel_y,
                                      float(fits_header['CRPIX1']),
                                      float(fits_header['CRPIX2']),
                                      float(fits_header['CRVAL1']),
                                      float(fits_header['CRVAL2']),
                                      wcs.parse_cd(fits_header),
                                      wcs.parse_pv(fits_header),
                                      wcs.parse_order_fit(fits_header))
Esempio n. 3
0
    def test_parse_cd_values(self):
        cd = wcs.parse_cd(self.header)

        assert_that(cd, has_length(2))
        assert_that(cd[0], has_length(2))
        assert_that(cd[1], has_length(2))

        # CD1_1, CD1_2
        assert_that(cd[0],
                    contains(-5.156837193510000E-05, -3.588985558218000E-07))

        # CD2_1, CD2_2
        assert_that(cd[1],
                    contains(-1.674871346376000E-07, 5.178515755263000E-05))
Esempio n. 4
0
    def test_parse_cd_values(self):
        cd = wcs.parse_cd(self.header)

        assert_that(cd, has_length(2))
        assert_that(cd[0], has_length(2))
        assert_that(cd[1], has_length(2))

        # CD1_1, CD1_2
        assert_that(cd[0],
                    contains(-5.156837193510000E-05, -3.588985558218000E-07))

        # CD2_1, CD2_2
        assert_that(cd[1],
                    contains(-1.674871346376000E-07, 5.178515755263000E-05))