Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions astropy/io/votable/tests/converter_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -234,8 +234,8 @@ def test_float_default_precision():
None, name='c', datatype='float', arraysize="4",
config=config)
c = converters.get_converter(field, config=config)
assert (c.output([1, 2, 3, 8.999999], [False, False, False, False]) ==
'1 2 3 8.9999990000000007')
assert (c.output([1, 2, 3, 8.9990234375], [False, False, False, False]) ==
'1 2 3 8.9990234375')


def test_vararray():
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@
<TD>4096</TD>
<TD>268435456</TD>
<TD>922337203685477</TD>
<TD>8.9999990000000007</TD>
<TD>8.9990234375</TD>

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I changed the example such that it is 9 - 1/2**10 and thus exactly representable.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think "8.9999990000000007" was designed for a purpose (perhaps to test floating point precision), so I am not comfortable with this change. Is there no way to make test pass without changing the file?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this is actually OK:

In [1]: 8.9999990000000007 == 8.999999
Out[1]: True

Previously, numpy just put out a large number of digits, so that one was sure that a number was well-represented, but it didn't not check it could be done with fewer; now it puts out just the right number (see above).

It also seems clear the "truth" was generated once, and is now tested against. The actual input file (regression.xml) does in fact had 8.999999 (and with numpy 1.14, that is what you get out; older versions are the ones that are problematic).

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Alright, you're the numpy expert here, so I'll just go with the flow.

<TD>1</TD>
<TD/>
<TD>1</TD>
Expand Down Expand Up @@ -277,7 +277,7 @@
<TD>4096</TD>
<TD>268435456</TD>
<TD>922337203685477</TD>
<TD>8.9999990000000007</TD>
<TD>8.9990234375</TD>
<TD>1</TD>
<TD/>
<TD>1</TD>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@
<TD>4096</TD>
<TD>268435456</TD>
<TD>922337203685477</TD>
<TD>8.9999990000000007</TD>
<TD>8.9990234375</TD>
<TD>1</TD>
<TD/>
<TD>1</TD>
Expand Down Expand Up @@ -278,7 +278,7 @@
<TD>4096</TD>
<TD>268435456</TD>
<TD>922337203685477</TD>
<TD>8.9999990000000007</TD>
<TD>8.9990234375</TD>
<TD>1</TD>
<TD/>
<TD>1</TD>
Expand Down
4 changes: 2 additions & 2 deletions astropy/io/votable/tests/data/regression.xml
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ The VOTable format is an XML standard for the interchange of data represented as
<TD>4096</TD>
<TD>268435456</TD>
<TD>922337203685477</TD>
<TD>8.999999</TD>
<TD>8.9990234375</TD>
<TD encoding="base64">P4AAAA==</TD>
<TD> </TD>
<TD>1</TD>
Expand Down Expand Up @@ -272,7 +272,7 @@ The VOTable format is an XML standard for the interchange of data represented as
<TD>4096</TD>
<TD>268435456</TD>
<TD>922337203685477</TD>
<TD>8.999999</TD>
<TD>8.9990234375</TD>
<TD encoding="base64">P4AAAA==</TD>
<TD> </TD>
<TD>1</TD>
Expand Down
2 changes: 1 addition & 1 deletion astropy/io/votable/tests/vo_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -351,7 +351,7 @@ def test_double(self):
assert issubclass(self.array['double'].dtype.type,
np.float64)
assert_array_equal(self.array['double'],
[8.999999, 0.0, np.inf, np.nan, -np.inf])
[8.9990234375, 0.0, np.inf, np.nan, -np.inf])
assert_array_equal(self.mask['double'],
[False, False, False, True, False])

Expand Down
5 changes: 3 additions & 2 deletions astropy/nddata/mixins/ndslicing.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,9 @@ class NDSlicingMixin:
>>> import numpy as np
>>> mask = np.array([True, False, True, True, False])
>>> nd2 = NDDataSliceable(nd, mask=mask)
>>> nd2[1:3].mask
array([False, True], dtype=bool)
>>> nd2slc = nd2[1:3]

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Avoid showing a bool array since dtype=bool has disappeared.

>>> nd2slc[nd2slc.mask]
NDDataSliceable([3])

Be aware that changing values of the sliced instance will change the values
of the original::
Expand Down
3 changes: 1 addition & 2 deletions astropy/nddata/tests/test_ccddata.py
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,6 @@ def test_initialize_from_fits_with_data_in_different_extension(tmpdir):
def test_initialize_from_fits_with_extension(tmpdir):
fake_img1 = np.random.random(size=(100, 100))
fake_img2 = np.random.random(size=(100, 100))
new_hdul = fits.HDUList()
hdu0 = fits.PrimaryHDU()
hdu1 = fits.ImageHDU(fake_img1)
hdu2 = fits.ImageHDU(fake_img2)
Expand Down Expand Up @@ -279,7 +278,7 @@ def test_setting_uncertainty_with_array(ccd_data):

def test_setting_uncertainty_wrong_shape_raises_error(ccd_data):
with pytest.raises(ValueError):
ccd_data.uncertainty = np.random.random(size=2 * ccd_data.shape)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oops, this made a 100,100,100,100 array (which is a bit much for my 2GB laptop)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, I already fixed that downstream (astropy/ccdproc#579) but forgot that the test had been copied over...

ccd_data.uncertainty = np.random.random(size=(3, 4))


def test_to_hdu(ccd_data):
Expand Down
38 changes: 27 additions & 11 deletions astropy/table/tests/test_showtable.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import os

from ..scripts import showtable
from ...utils.compat import NUMPY_LT_1_14

ROOT = os.path.abspath(os.path.dirname(__file__))
ASCII_ROOT = os.path.join(ROOT, '..', '..', 'io', 'ascii', 'tests')
Expand Down Expand Up @@ -28,11 +29,20 @@ def test_info(capsys):
def test_stats(capsys):
showtable.main([os.path.join(FITS_ROOT, 'data/table.fits'), '--stats'])
out, err = capsys.readouterr()
assert out == ('<Table length=3>{0}'
' name mean std min max {0}'
'------ ------- ------- ---- ----{0}'
'target -- -- -- --{0}'
' V_mag 12.8667 1.72111 11.1 15.2{0}').format(os.linesep)
if NUMPY_LT_1_14:

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We really shouldn't be testing float output!

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can maybe use another table, could you check the output with astropy/io/ascii/tests/t/simple_csv.csv ? (I don't have time to install numpy 1.14 right now, maybe later today or tomorrow):

❯ showtable astropy/io/ascii/tests/t/simple_csv.csv --stats
<Table length=2>
name mean std min max
---- ---- --- --- ---
   a  2.5 1.5   1   4
   b  3.5 1.5   2   5
   c  4.5 1.5   3   6

@taldcroft taldcroft Dec 10, 2017

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this is a case where we should be testing non-nice floating point values. The whole point of showtable is creating human-readable output that is informative and "pleasant". So using real-world values is important to catch formatting issues that our users will end up seeing.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@taldcroft, @saimn - yes, although it may be that we have to define what is pleasant ourselves rather than rely on numpy doing it for us. But let's discuss in #6962, as it is somewhat orthogonal to the point of this PR, which is simply to get things to pass with numpy 1.14.x.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agreed about moving the discussion to #6962 , so the current change is fine by me.

expected = ('<Table length=3>{0}'
' name mean std min max {0}'
'------ ------- ------- ---- ----{0}'
'target -- -- -- --{0}'
' V_mag 12.8667 1.72111 11.1 15.2{0}')
else:
expected = ('<Table length=3>{0}'
' name mean std min max {0}'
'------ --------- --------- ---- ----{0}'
'target -- -- -- --{0}'
' V_mag 12.866668 1.7211105 11.1 15.2{0}')

assert out == expected.format(os.linesep)


def test_fits(capsys):
Expand All @@ -49,12 +59,18 @@ def test_fits_hdu(capsys):
showtable.main([os.path.join(FITS_ROOT, 'data/zerowidth.fits'),
'--hdu', 'AIPS OF'])
out, err = capsys.readouterr()
assert out.startswith(
' TIME SOURCE ID ANTENNA NO. SUBARRAY FREQ ID ANT FLAG STATUS 1\n'
' DAYS \n'
'-------- --------- ----------- -------- ------- -------- --------\n'
'0.144387 1 10 1 1 4 4\n'
)
if NUMPY_LT_1_14:
assert out.startswith(
' TIME SOURCE ID ANTENNA NO. SUBARRAY FREQ ID ANT FLAG STATUS 1\n'
' DAYS \n'
'-------- --------- ----------- -------- ------- -------- --------\n'
'0.144387 1 10 1 1 4 4\n')
else:
assert out.startswith(
' TIME SOURCE ID ANTENNA NO. SUBARRAY FREQ ID ANT FLAG STATUS 1\n'
' DAYS \n'
'---------- --------- ----------- -------- ------- -------- --------\n'
'0.14438657 1 10 1 1 4 4\n')


def test_csv(capsys):
Expand Down
2 changes: 1 addition & 1 deletion astropy/time/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -1209,7 +1209,7 @@ def get_delta_ut1_utc(self, iers_table=None, return_status=False):
>>> t = Time(['1961-01-01', '2000-01-01'], scale='utc')
>>> delta, status = t.get_delta_ut1_utc(return_status=True)
>>> status == TIME_BEFORE_IERS_RANGE
array([ True, False], dtype=bool)
array([ True, False]...)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, ugly, but don't know what else to do...

"""
if iers_table is None:
from ..utils.iers import IERS
Expand Down
2 changes: 1 addition & 1 deletion docs/coordinates/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -286,7 +286,7 @@ high-level |skycoord| method - see :ref:`astropy-coordinates-rv-corrs`)::
>>> target = SkyCoord.from_name('M31') # doctest: +REMOTE_DATA
>>> keck = EarthLocation.of_site('Keck') # doctest: +REMOTE_DATA
>>> target.radial_velocity_correction(obstime=obstime, location=keck).to('km/s') # doctest: +REMOTE_DATA +FLOAT_CMP
<Quantity -22.363056056 km / s>
<Quantity -22.359784554780255 km / s>

Velocities (Proper Motions and Radial Velocities)
-------------------------------------------------
Expand Down
4 changes: 2 additions & 2 deletions docs/coordinates/solarsystem.rst
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@ without the need to download a large ephemerides file::
>>> with solar_system_ephemeris.set('builtin'):
... jup = get_body('jupiter', t, loc) # doctest: +REMOTE_DATA +IGNORE_OUTPUT
>>> jup # doctest: +FLOAT_CMP +REMOTE_DATA
<SkyCoord (GCRS: obstime=2014-09-22 23:22:00.000, obsgeoloc=( 3949481.689878457, -550931.9118838, 4961151.73733447) m, obsgeovel=( 40.1745933, 288.00078051, 0.) m / s): (ra, dec, distance) in (deg, deg, AU)
( 136.91116201, 17.02935408, 5.94386022)>
<SkyCoord (GCRS: obstime=2014-09-22 23:22:00.000, obsgeoloc=(3949481.68990863, -550931.91188162, 4961151.73733451) m, obsgeovel=(40.15954083, 287.47876693, -0.04597867) m / s): (ra, dec, distance) in (deg, deg, AU)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not completely sure why this didn't fail before: the new baryvel has z component of geovel != 0.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah, that's weird... I'm seeing the same as you, and that has nothing to do with numpy... maybe it's some weird quirk of the FLOAT_CMP? Anyway, looks fine to me

(136.91116209, 17.02935409, 5.94386022)>

Above, we used ``solar_system_ephemeris`` as a context, which sets the default
ephemeris while in the ``with`` clause, and resets it at the end.
Expand Down
4 changes: 2 additions & 2 deletions docs/io/fits/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -510,8 +510,8 @@ tools to use. We can reassign (update) the values::

take the mean of a column::

>>> data['c3'].mean()
5.1999998927116398
>>> data['c3'].mean() # doctest: +FLOAT_CMP
5.19999989271164

and so on.

Expand Down
4 changes: 2 additions & 2 deletions docs/io/fits/usage/image.rst
Original file line number Diff line number Diff line change
Expand Up @@ -112,8 +112,8 @@ before and after the data is touched::
16
>>> hdu.header['bzero']
1500.0
>>> hdu.data[0, 0] # once data is touched, it is scaled
557.75629
>>> hdu.data[0, 0] # once data is touched, it is scaled # doctest: +FLOAT_CMP
557.7563
>>> hdu.data.dtype.name
'float32'
>>> hdu.header['bitpix'] # BITPIX is also updated
Expand Down
20 changes: 10 additions & 10 deletions docs/io/fits/usage/unfamiliar.rst
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ table, Astropy will automatically detect what kind of table it is.
>>> from astropy.io import fits
>>> filename = fits.util.get_testdata_filepath('ascii.fits')
>>> hdul = fits.open(filename)
>>> hdul[1].data[:1]
FITS_rec([(10.122999999999999, 37)],
>>> hdul[1].data[:1] # doctest: +FLOAT_CMP
FITS_rec([(10.123, 37)],
dtype=(numpy.record, {'names':['a','b'], 'formats':['S10','S5'], 'offsets':[0,11], 'itemsize':16}))
>>> hdul[1].data['a']
array([ 10.123, 5.2 , 15.61 , 0. , 345. ])
Expand Down Expand Up @@ -270,10 +270,10 @@ The group parameter can be accessed by the :meth:`~GroupData.par` method. Like
the table :meth:`~FITS_rec.field` method, the argument can be either index or
name::

>>> hdul[0].data.par(0)[8] # Access group parameter by name or by index
8.1000004
>>> hdul[0].data.par('abc')[8]
8.1000004
>>> hdul[0].data.par(0)[8] # Access group parameter by name or by index # doctest: +FLOAT_CMP
8.1
>>> hdul[0].data.par('abc')[8] # doctest: +FLOAT_CMP
8.1

Note that the parameter name 'xyz' appears twice. This is a feature in the
random access group, and it means to add the values together. Thus::
Expand All @@ -294,10 +294,10 @@ data item (a group). So there are two possible ways to get a group parameter
for a certain group, this is similar to the situation in table data (with its
:meth:`~FITS_rec.field` method)::

>>> hdul[0].data.par(0)[8]
8.1000004
>>> hdul[0].data[8].par(0)
8.1000004
>>> hdul[0].data.par(0)[8] # doctest: +FLOAT_CMP
8.1
>>> hdul[0].data[8].par(0) # doctest: +FLOAT_CMP
8.1

On the other hand, to modify a group parameter, we can either assign the new
value directly (if accessing the row/group number last) or use the
Expand Down
66 changes: 33 additions & 33 deletions docs/io/unified.rst
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ the file format, for instance ``'ascii.daophot'``:
It is possible to load tables directly from the Internet using URLs. For example,
download tables from Vizier catalogues in CDS format (``'ascii.cds'``)::

>>> t = Table.read("ftp://cdsarc.u-strasbg.fr/pub/cats/VII/253/snrs.dat",
... readme="ftp://cdsarc.u-strasbg.fr/pub/cats/VII/253/ReadMe",
>>> t = Table.read("ftp://cdsarc.u-strasbg.fr/pub/cats/VII/253/snrs.dat",
... readme="ftp://cdsarc.u-strasbg.fr/pub/cats/VII/253/ReadMe",
... format="ascii.cds") # doctest: +SKIP

For certain file formats, the format can be automatically detected, for
Expand Down Expand Up @@ -81,39 +81,39 @@ To get full documentation on the usage and available options do ``showtable
Built-in table readers/writers
==============================

The :class:`~astropy.table.Table` class has built-in support for various input
and output formats including :ref:`table_io_ascii`,
The :class:`~astropy.table.Table` class has built-in support for various input
and output formats including :ref:`table_io_ascii`,
-:ref:`table_io_fits`, :ref:`table_io_hdf5`, and :ref:`table_io_votable`.

A full list of the supported formats and corresponding classes
is shown in the table below.
The ``Write`` column indicates those formats that support write functionality, and
The ``Write`` column indicates those formats that support write functionality, and
the ``Suffix`` column indicates the filename suffix indicating a particular format.
If the value of ``Suffix`` is ``auto``, the format is auto-detected from the file itself.
Not all formats support auto-detection.

=========================== ===== ====== ============================================================================================
Format Write Suffix Description
Format Write Suffix Description
=========================== ===== ====== ============================================================================================
ascii Yes ASCII table in any supported format (uses guessing)
ascii.aastex Yes :class:`~astropy.io.ascii.AASTex`: AASTeX deluxetable used for AAS journals
ascii.basic Yes :class:`~astropy.io.ascii.Basic`: Basic table with custom delimiters
ascii.cds No :class:`~astropy.io.ascii.Cds`: CDS format table
ascii.commented_header Yes :class:`~astropy.io.ascii.CommentedHeader`: Column names in a commented line
ascii.csv Yes .csv :class:`~astropy.io.ascii.Csv`: Basic table with comma-separated values
ascii.daophot No :class:`~astropy.io.ascii.Daophot`: IRAF DAOphot format table
ascii.ecsv Yes .ecsv :class:`~astropy.io.ascii.Ecsv`: Basic table with Enhanced CSV (supporting metadata)
ascii.fixed_width Yes :class:`~astropy.io.ascii.FixedWidth`: Fixed width
ascii.fixed_width_no_header Yes :class:`~astropy.io.ascii.FixedWidthNoHeader`: Fixed width with no header
ascii.fixed_width_two_line Yes :class:`~astropy.io.ascii.FixedWidthTwoLine`: Fixed width with second header line
ascii.html Yes .html :class:`~astropy.io.ascii.HTML`: HTML table
ascii.ipac Yes :class:`~astropy.io.ascii.Ipac`: IPAC format table
ascii.latex Yes .tex :class:`~astropy.io.ascii.Latex`: LaTeX table
ascii.no_header Yes :class:`~astropy.io.ascii.NoHeader`: Basic table with no headers
ascii.rdb Yes .rdb :class:`~astropy.io.ascii.Rdb`: Tab-separated with a type definition header line
ascii Yes ASCII table in any supported format (uses guessing)
ascii.aastex Yes :class:`~astropy.io.ascii.AASTex`: AASTeX deluxetable used for AAS journals
ascii.basic Yes :class:`~astropy.io.ascii.Basic`: Basic table with custom delimiters
ascii.cds No :class:`~astropy.io.ascii.Cds`: CDS format table
ascii.commented_header Yes :class:`~astropy.io.ascii.CommentedHeader`: Column names in a commented line
ascii.csv Yes .csv :class:`~astropy.io.ascii.Csv`: Basic table with comma-separated values
ascii.daophot No :class:`~astropy.io.ascii.Daophot`: IRAF DAOphot format table
ascii.ecsv Yes .ecsv :class:`~astropy.io.ascii.Ecsv`: Basic table with Enhanced CSV (supporting metadata)
ascii.fixed_width Yes :class:`~astropy.io.ascii.FixedWidth`: Fixed width
ascii.fixed_width_no_header Yes :class:`~astropy.io.ascii.FixedWidthNoHeader`: Fixed width with no header
ascii.fixed_width_two_line Yes :class:`~astropy.io.ascii.FixedWidthTwoLine`: Fixed width with second header line
ascii.html Yes .html :class:`~astropy.io.ascii.HTML`: HTML table
ascii.ipac Yes :class:`~astropy.io.ascii.Ipac`: IPAC format table
ascii.latex Yes .tex :class:`~astropy.io.ascii.Latex`: LaTeX table
ascii.no_header Yes :class:`~astropy.io.ascii.NoHeader`: Basic table with no headers
ascii.rdb Yes .rdb :class:`~astropy.io.ascii.Rdb`: Tab-separated with a type definition header line
ascii.rst Yes .rst :class:`~astropy.io.ascii.RST`: reStructuredText simple format table
ascii.sextractor No :class:`~astropy.io.ascii.SExtractor`: SExtractor format table
ascii.tab Yes :class:`~astropy.io.ascii.Tab`: Basic table with tab-separated values
ascii.sextractor No :class:`~astropy.io.ascii.SExtractor`: SExtractor format table
ascii.tab Yes :class:`~astropy.io.ascii.Tab`: Basic table with tab-separated values
fits Yes auto :mod:`~astropy.io.fits`: Flexible Image Transport System file
hdf5 Yes auto HDF5_: Hierarchical Data Format binary file
votable Yes auto :mod:`~astropy.io.votable`: Table format used by Virtual Observatory (VO) initiative
Expand Down Expand Up @@ -346,8 +346,8 @@ precision. For example:
<Time object: scale='tt' format='jd' value=[ 2400100.5 2400200.5]>
>>> tm['a'].location
<EarthLocation (-2446354., 4237210., 4077985.) m>
>>> tm['a'] == t['a']
array([ True, True], dtype=bool)
>>> all(tm['a'] == t['a'])
True

The same will work with ``QTable``.

Expand Down Expand Up @@ -440,16 +440,16 @@ and the time coordinate column ``time`` as ``[1, 2]`` will give::
>>> chandra_events = get_pkg_data_filename('data/chandra_time.fits',
... package='astropy.io.fits.tests')
>>> native = Table.read(chandra_events, astropy_native=True)
>>> native['time']
<Time object: scale='tt' format='mjd' value=[ 57413.76033393 57413.76033393]>
>>> native['time'] # doctest: +FLOAT_CMP
<Time object: scale='tt' format='mjd' value=[57413.76033393 57413.76033393]>
>>> non_native = Table.read(chandra_events)
>>> # MJDREF = 5.0814000000000E+04, TIMESYS = 'TT'
>>> ref_time = Time(non_native.meta['MJDREF'], format='mjd',
... scale=non_native.meta['TIMESYS'].lower())
>>> # TTYPE1 = 'time', TUNIT1 = 's'
>>> delta_time = TimeDelta(non_native['time'])
>>> ref_time + delta_time == native['time']
array([ True, True], dtype=bool)
>>> all(ref_time + delta_time == native['time'])
True

By default, FITS table columns will be read as standard `~astropy.table.Column`
objects without taking the FITS time standard into consideration.
Expand Down Expand Up @@ -567,8 +567,8 @@ to ``t['a']`` will then store ``[100.0 200.0]`` instead of
<Column name='a' dtype='float64' length=2>
100.0
200.0
>>> tm['a'] == t['a'].value
array([ True, True], dtype=bool)
>>> all(tm['a'] == t['a'].value)
True

By default, ``serialize_method['fits']`` in a Time column ``info`` is equal to
``'jd1_jd2'``, that is, Time column will be written in full precision.
Expand Down Expand Up @@ -635,7 +635,7 @@ overwriting existing files. To overwrite only a single table within an HDF5
file that has multiple datasets, use *both* the ``overwrite=True`` and
``append=True`` arguments.

If the metadata of the table cannot be written directly to the HDF5 file
If the metadata of the table cannot be written directly to the HDF5 file
(e.g. dictionaries), or if you want to preserve the units and description
of tables and columns, use ``serialize_meta=True``::

Expand Down
Loading