Пример #1
0
 def get_heliocentric_coordinates(self):
     if self.heliocentric_coordinates is None:
         x_coords, y_coords = self.get_helioprojective_coordinates()
         self.heliocentric_coordinates = \
             wcs.convert_hpc_hcc(x_coords, y_coords,
                                 dsun_meters=self.header["DSUN_OBS"],
                                 z=True)
     return self.heliocentric_coordinates
Пример #2
0
def test_conv_hpc_hcc():
    coord = [40.0, 32.0]
    result = wcs.convert_hpc_hcc(img.rsun_meters, 
                                 img.dsun, img.units['x'], img.units['y'], 
                                 coord[0], coord[1])
    known_answer = [28748691, 22998953]
    magnitude = np.floor(np.log10(np.abs(known_answer)))
    assert_array_almost_equal(result*10**(-magnitude), 
                              known_answer*10**(-magnitude), decimal=2)
Пример #3
0
def test_conv_hpc_hcc():
    coord = [40.0, 32.0]
    result = wcs.convert_hpc_hcc(img.rsun_meters, img.dsun, img.units['x'],
                                 img.units['y'], coord[0], coord[1])
    known_answer = [28748691, 22998953]
    magnitude = np.floor(np.log10(np.abs(known_answer)))
    assert_array_almost_equal(result * 10**(-magnitude),
                              known_answer * 10**(-magnitude),
                              decimal=2)
Пример #4
0
def test_conv_hpc_hcc():
    coord = [40.0, 32.0]
    result = wcs.convert_hpc_hcc(img.rsun_arcseconds, 
                                 img.dsun, img.units['x'], img.units['y'], 
                                 coord[0], coord[1])
    assert_array_almost_equal(result, [28748691, 22998953], decimal=3)
Пример #5
0
def test_conv_hpc_hcc():
    coord = [40.0, 32.0]
    result = wcs.convert_hpc_hcc(header, coord[0], coord[1])
    assert_array_almost_equal(result, [28748691, 22998953], decimal=3)