Skip to content

Commit 9480c56

Browse files
committed
Change columns, dtype => datatype for flexibility and ASDF compatibility
1 parent 078c329 commit 9480c56

1 file changed

Lines changed: 11 additions & 11 deletions

File tree

‎APE6.rst‎

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ author: Tom Aldcroft
55

66
date-created: 2014 April 12
77

8-
date-last-revised: 2014 December 28
8+
date-last-revised: 2015 January 20
99

1010
type: Standard Track
1111

@@ -233,7 +233,7 @@ used programming languages (with the notable exception of IDL).
233233

234234
Translating to / from the data structure provided by a ECSV header into the native
235235
structure that an application uses should generally be quite easy because the
236-
functional elements (e.g. column name, type) are ubiquitous. Generally
236+
functional elements (e.g. column name, data type) are ubiquitous. Generally
237237
speaking manipulating data structures programmatically is easier than parsing
238238
textual data structure fields.
239239

@@ -272,9 +272,9 @@ Now we write this to a file using the ECSV format and print it::
272272
>>> cat example.ecsv
273273
# %ECSV 1.0
274274
# ---
275-
# columns:
276-
# - {name: a, unit: m / s, type: int64, format: '%03d'}
277-
# - {name: b, unit: km, type: int64, description: This is column b}
275+
# datatype:
276+
# - {name: a, unit: m / s, datatype: int64, format: '%03d'}
277+
# - {name: b, unit: km, datatype: int64, description: This is column b}
278278
a b
279279
001 2
280280
004 3
@@ -313,10 +313,10 @@ Now we write the table to standard out::
313313
>>> t.write(sys.stdout, format='ascii.ecsv')
314314
# %ECSV 1.0
315315
# ---
316-
# columns:
316+
# datatype:
317317
# - {name: a, unit: m / s, type: int64, format: '%5.2f', description: Column A}
318318
# - name: b
319-
# type: int64
319+
# datatype: int64
320320
# meta:
321321
# column_meta: {a: 1, b: 2}
322322
# meta: !!omap
@@ -336,7 +336,7 @@ Other implementations must likewise use an ordered mapping when reading and the
336336
``!!omap`` tag when writing for ordered mappings in the data structure.
337337

338338
In addition, the reference Python implementation outputs the column attributes
339-
in the order ``'name'``, ``'unit'``, ``'type'``, ``'format'``,
339+
in the order ``'name'``, ``'unit'``, ``'datatype'``, ``'format'``,
340340
``'description'``, and ``'meta'``. This is not a ECSV requirement but is
341341
recommended for human accessibility.
342342

@@ -367,8 +367,8 @@ encouraged.
367367

368368
Standard keywords are:
369369

370-
``columns``: list, required
371-
List of column specifiers.
370+
``datatype``: list, required
371+
Top-level data type specification as a list of column specifiers.
372372

373373
``delimiter``: one-character string, optional, default=``space``
374374
Delimiter character used to separate the data fields. Allowed
@@ -392,7 +392,7 @@ Each column specifier is a dictionary structure with the following keys:
392392
``name``: string, required
393393
Column name
394394

395-
``type``: string, required
395+
``datatype``: string, required
396396
Column data type. Allowed types are: ``bool``, ``int8``,
397397
``int16``, ``int32``, ``int64``, ``uint8``, ``uint16``, ``uint32``,
398398
``uint64``, ``float16``, ``float32``, ``float64``, ``float128``,

0 commit comments

Comments
 (0)