Example #1
0
    def get_heliographic_coordinates(self):
        if self.heliographic_coordinates is None:
            hcc_x, hcc_y, hcc_z = self.get_heliocentric_coordinates()
            self.heliographic_coordinates = wcs.convert_hcc_hg(
                hcc_x, hcc_y, hcc_z)[0:2]

        return self.heliographic_coordinates
Example #2
0
def test_conv_hcc_hg():
    coord = [13.0, 58.0]
    result = wcs.convert_hcc_hg(img.rsun_meters, 
                                img.heliographic_latitude, img.heliographic_longitude,
                                coord[0], coord[1])
    known_answer = [1.0791282e-06, -7.0640732]
    magnitude = np.floor(np.log10(np.abs(known_answer)))
    assert_array_almost_equal(result*10**(-magnitude), 
                              known_answer*10**(-magnitude), decimal=2)
Example #3
0
def test_conv_hcc_hg():
    coord = [13.0, 58.0]
    result = wcs.convert_hcc_hg(img.rsun_meters, img.heliographic_latitude,
                                img.heliographic_longitude, coord[0], coord[1])
    known_answer = [1.0791282e-06, -7.0640732]
    magnitude = np.floor(np.log10(np.abs(known_answer)))
    assert_array_almost_equal(result * 10**(-magnitude),
                              known_answer * 10**(-magnitude),
                              decimal=2)
Example #4
0
def test_conv_hcc_hg():
    coord = [13.0, 58.0]
    result = wcs.convert_hcc_hg(img.rsun_arcseconds, 
                                img.heliographic_latitude, img.heliographic_longitude,
                                coord[0], coord[1])
    assert_array_almost_equal(result, [1.0791282e-06, -7.0640732], decimal=2)
Example #5
0
def test_conv_hcc_hg():
    coord = [13.0, 58.0]
    result = wcs.convert_hcc_hg(header, coord[0], coord[1])
    assert_array_almost_equal(result, [1.0791282e-06, -7.0640732], decimal=2)