Skip to content

Commit 7f28fd0

Browse files
authored
Merge pull request #788 from keflavich/alma_test_updates
Update ALMA tests to accommodate archive restructuring
2 parents 0a7cf0e + f2590a6 commit 7f28fd0

File tree

1 file changed

+14
-8
lines changed

1 file changed

+14
-8
lines changed

astroquery/alma/tests/test_alma_remote.py

Lines changed: 14 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -85,13 +85,18 @@ def test_stage_data(self, temp_dir):
8585

8686
result_s = alma.query_object('Sgr A*')
8787
assert b'2011.0.00217.S' in result_s['Project code']
88-
assert b'uid://A002/X47ed8e/X3cd' in result_s['Asdm uid']
89-
match = result_s['Asdm uid'] == b'uid://A002/X47ed8e/X3cd'
88+
# UID comes from:
89+
# 2011.0.00217.S G0.25+0.02 266.53995833333346 -28.709500000000009 3 1.4544413048949709 976.5625 2280.739 2013-09-07 [86.26..88.14GHz,976.56kHz,null] U [88.15..90.03GHz,976.56kHz,null] U [98.19..100.07GHz,976.56kHz,null] U [100.15..102.03GHz,976.56kHz,null] 3110.9112850878114 XX YY 2012-07-29 02:01:54 Rathborne, Jill 1.7593164 uid://A002/X391d0b/X7b uid://A002/X47aefc/X369 Globular cluster formation: caught in the act S TARGET 365.55225721174787 Y 7
90+
# (this information is included in comments because the ALMA archive
91+
# has apparently changed UIDs, but the associated data should never go
92+
# missing)
93+
assert b'uid://A002/X47aefc/X369' in result_s['Asdm uid']
94+
match = result_s['Asdm uid'] == b'uid://A002/X47aefc/X369'
9095
uid = result_s['Asdm uid'][match]
9196

9297
result = alma.stage_data(uid)
9398

94-
assert ('uid___A002_X47ed8e' in
99+
assert ('uid___A002_X47aefc' in
95100
os.path.split(result['URL'][0])[1])
96101

97102
# test re-staging
@@ -113,14 +118,15 @@ def test_doc_example(self, temp_dir):
113118
galactic_center = coordinates.SkyCoord(0 * u.deg, 0 * u.deg,
114119
frame='galactic')
115120
gc_data = alma.query_region(galactic_center, 1 * u.deg)
116-
assert len(gc_data) >= 425 # Feb 8, 2016
121+
#assert len(gc_data) >= 425 # Feb 8, 2016
122+
assert len(gc_data) >= 50 # Nov 16, 2016
117123

118124
uids = np.unique(m83_data['Asdm uid'])
119125
assert b'uid://A002/X3b3400/X90f' in uids
120126
X90f = (m83_data['Asdm uid'] == b'uid://A002/X3b3400/X90f')
121-
assert X90f.sum() == 45
127+
assert X90f.sum() == 1 # Nov 16, 2016: reduced from 45
122128
X31 = (m83_data['Member ous id'] == b'uid://A002/X3216af/X31')
123-
assert X31.sum() == 225
129+
assert X31.sum() == 1 # Nov 16, 2016: reduced from 225
124130

125131
asdm = alma.stage_data('uid://A002/X3b3400/X90f')
126132
totalsize_asdm = asdm['size'].sum() * u.Unit(asdm['size'].unit)
@@ -139,8 +145,8 @@ def test_query(self, temp_dir):
139145

140146
result = alma.query(payload={'start_date': '<11-11-2011'},
141147
public=False, science=True)
142-
# now 535?
143-
assert len(result) == 621
148+
# Nov 16, 2016: 159
149+
assert len(result) == 159
144150

145151
@pytest.mark.bigdata
146152
def test_cycle1(self, temp_dir):

0 commit comments

Comments
 (0)