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))
def test_parse_pv_values(self): pv = wcs.parse_pv(self.header) assert_that(pv, has_length(2)) assert_that(pv[0], has_length(11)) assert_that(pv[1], has_length(11)) # PV1_0 through PV1_10 assert_that( pv[0], contains(-1.909806626877E-03, 1.00815723310, 1.983393486250E-03, 0.00000000000, 4.623172227977E-05, -1.020423075276E-05, 2.258600565396E-05, -2.354656733463E-02, -1.671912720931E-04, -2.339051960031E-02, -2.903290518437E-05)) # PV2_0 through PV2_10 assert_that( pv[1], contains(-7.294883106769E-04, 1.00392029973, 1.983331686156E-03, 0.00000000000, 3.022667872225E-05, 4.509364811534E-05, -5.385195875663E-06, -2.333221106141E-02, -1.789051786060E-04, -2.348803123711E-02, -2.465552723903E-05))