<commit_before>from sunpy.coordinates import Helioprojective

import astropy.units as u
from astropy.tests.helper import quantity_allclose

import numpy as np


def test_hpc_hpc():
    rsun = 1*u.m
    D0 = 1*u.km
    L0 = 1*u.deg

    hpc_in = Helioprojective(0*u.arcsec, 0*u.arcsec, rsun=rsun, D0=D0)
    hpc_out = Helioprojective(L0=1*u.deg, D0=D0, rsun=rsun)

    hpc_new = hpc_in.transform_to(hpc_out)

    assert hpc_new.L0 == hpc_out.L0
    assert hpc_new.B0 == hpc_out.B0
    assert hpc_new.D0 == hpc_out.D0

    # Calculate the distance subtended by an angle of L0 from the centre of the
    # Sun.
    dd = -1 * rsun * np.tan(L0)
    # Calculate the angle corresponding to that distance as seen by the new
    # observer.<commit_msg>Remove hard coded L0 value and reorder imports<commit_after>import numpy as np

import astropy.units as u
from astropy.tests.helper import quantity_allclose

from sunpy.coordinates import Helioprojective


def test_hpc_hpc():
    # Use some unphysical values for solar parameters for testing
    rsun = 1*u.m
    D0 = 1*u.km
    L0 = 1*u.deg

    hpc_in = Helioprojective(0*u.arcsec, 0*u.arcsec, rsun=rsun, D0=D0)
    hpc_out = Helioprojective(L0=L0, D0=D0, rsun=rsun)

    hpc_new = hpc_in.transform_to(hpc_out)

    assert hpc_new.L0 == hpc_out.L0
    assert hpc_new.B0 == hpc_out.B0
    assert hpc_new.D0 == hpc_out.D0

    # Calculate the distance subtended by an angle of L0 from the centre of the
    # Sun.
    dd = -1 * rsun * np.tan(L0)
    # Calculate the angle corresponding to that distance as seen by the new
    # observer.
{'fraction_non_alphanumeric': 0.0879746835443038, 'fraction_numerical': 0.028481012658227847, 'mean_word_length': 3.2386058981233243, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '246662', 'n_tokens_mistral': 643, 'n_tokens_neox': 608, 'n_words': 167}