Skip to content

Commit b967b0f

Browse files
committed
column format transformation without internal astropy
1 parent bbfa997 commit b967b0f

File tree

2 files changed

+7
-4
lines changed

2 files changed

+7
-4
lines changed

astroquery/heasarc/core.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22

33
import warnings
44
from six import StringIO, BytesIO
5-
from astropy.io.fits.column import _AsciiColumnFormat
65
from astropy.table import Table
76
from astropy.io import fits
87
from astropy import coordinates
@@ -183,13 +182,12 @@ def _old_w3query_fallback(self, content):
183182
if c.disp is not None:
184183
c.format = c.disp
185184
else:
186-
c.format = _AsciiColumnFormat(str(c.format).replace("I", "A"))
185+
c.format = str(c.format).replace("I", "A")
187186

188187
I = BytesIO()
189-
190188
f.writeto(I)
191189
I.seek(0)
192-
190+
193191
return Table.read(I)
194192

195193
def _fallback(self, text):

astroquery/heasarc/tests/test_heasarc_remote_isdc.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,11 @@ def test_ra_validity(self):
128128

129129
assert table_isdc['SCW_ID'] == table_heasarc['SCW_ID']
130130

131+
assert 'RA' in table_heasarc.columns
132+
assert 'RA_X' in table_isdc.columns
133+
134+
assert abs(float(table_isdc['RA_X'][0]) - float(table_heasarc['RA'][0])) < 0.0001
135+
131136
def test_basic_example(self):
132137
mission = 'integral_rev3_scw'
133138
object_name = '3c273'

0 commit comments

Comments
 (0)