Skip to content

Commit ec8a24d

Browse files
committed
Update transform code and fix change log
1 parent 735e6c7 commit ec8a24d

File tree

3 files changed

+10
-10
lines changed

3 files changed

+10
-10
lines changed
File renamed without changes.

stixpy/coordinates/tests/test_transforms.py

+5-5
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
from sunpy.coordinates import HeliographicStonyhurst, Helioprojective
1010

1111
from stixpy.coordinates.frames import STIXImaging
12-
from stixpy.coordinates.transforms import _get_aux_data, get_hpc_info
12+
from stixpy.coordinates.transforms import _get_ephemeris_data, get_hpc_info
1313

1414

1515
@pytest.mark.skip(reason="Test data maybe incorrect")
@@ -70,15 +70,15 @@ def test_stx_to_hpc_obstime_end():
7070
@pytest.mark.remote_data
7171
def test_get_aux_data():
7272
with pytest.raises(ValueError, match="No STIX pointing data found for time range"):
73-
_get_aux_data(Time("2015-06-06")) # Before the mission started
73+
_get_ephemeris_data(Time("2015-06-06")) # Before the mission started
7474

75-
aux_data = _get_aux_data(Time("2022-08-28T16:02:00"))
75+
aux_data = _get_ephemeris_data(Time("2022-08-28T16:02:00"))
7676
assert len(aux_data) == 1341
7777

78-
aux_data = _get_aux_data(Time("2022-08-28T16:02:00"), end_time=Time("2022-08-28T16:04:00"))
78+
aux_data = _get_ephemeris_data(Time("2022-08-28T16:02:00"), end_time=Time("2022-08-28T16:04:00"))
7979
assert len(aux_data) == 1341
8080

81-
aux_data = _get_aux_data(Time("2022-08-28T23:58:00"), end_time=Time("2022-08-29T00:02:00"))
81+
aux_data = _get_ephemeris_data(Time("2022-08-28T23:58:00"), end_time=Time("2022-08-29T00:02:00"))
8282
assert len(aux_data) == 2691
8383

8484

stixpy/coordinates/transforms.py

+5-5
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ def get_hpc_info(times, end_time=None):
6868
-------
6969
7070
"""
71-
aux = _get_aux_data(times.min(), times.max())
71+
aux = _get_ephemeris_data(times.min(), times.max())
7272

7373
indices = np.argwhere((aux["time"] >= times.min()) & (aux["time"] <= times.max()))
7474
if end_time is not None:
@@ -153,7 +153,7 @@ def get_hpc_info(times, end_time=None):
153153

154154

155155
@lru_cache
156-
def _get_aux_data(start_time, end_time=None):
156+
def _get_ephemeris_data(start_time, end_time=None):
157157
r"""
158158
Search, download and read L2 pointing data.
159159
@@ -173,9 +173,9 @@ def _get_aux_data(start_time, end_time=None):
173173
query = Fido.search(
174174
a.Time(start_time, end_time),
175175
a.Instrument.stix,
176-
a.Level.l2,
177-
a.stix.DataType.aux,
178-
a.stix.DataProduct.aux_ephemeris,
176+
a.Level.anc,
177+
a.stix.DataType.asp,
178+
a.stix.DataProduct.asp_ephemeris,
179179
)
180180
if len(query["stix"]) == 0:
181181
raise ValueError(f"No STIX pointing data found for time range {start_time} to {end_time}.")

0 commit comments

Comments
 (0)