tableload(datafile, cdfile, hfile=None)
The primary use for the tableload
function is to allow the input of ASCII data that was edited in a standard text editor of the table data and parameters. The tabledump function can be used to create the initial ASCII files.
datafile: Each line of the data file represents one row of table data. The data is output one column at a time in column order. If a column contains an array, each element of the column array in the current row is output before moving on to the next column. Each row ends with a new line.
Integer data is output right-justified in a 21-character field followed by a blank. Floating point data is output right justified using 'g' format in a 21-character field with 15 digits of precision, followed by a blank. String data that does not contain whitespace is output left-justified in a field whose width matches the width specified in the TFORM
header parameter for the column, followed by a blank. When the string data contains whitespace characters, the string is enclosed in quotation marks ( ""
). For the last data element in a row, the trailing blank in the field is replaced by a new line character.
For column data containing variable length arrays ('P' format), the array data is preceded by the string 'VLA_Length= '
and the integer length of the array for that row, left-justified in a 21-character field, followed by a blank.
This format does not support variable length arrays using the
('Q' format) due to difficult to overcome ambiguities. What this means is that this file format cannot support VLA columns in tables stored in files that are over 2 GB in size.
For column data representing a bit field ('X' format), each bit value in the field is output right-justified in a 21-character field as 1 (for true) or 0 (for false).
cdfile: Each line of the column definitions file provides the definitions for one column in the table. The line is broken up into 8, sixteen-character fields. The first field provides the column name ( TTYPEn
). The second field provides the column format ( TFORMn
). The third field provides the display format ( TDISPn
). The fourth field provides the physical units ( TUNITn
). The fifth field provides the dimensions for a multidimensional array ( TDIMn
). The sixth field provides the value that signifies an undefined value ( TNULLn
). The seventh field provides the scale factor ( TSCALn
). The eighth field provides the offset value ( TZEROn
). A field value of ""
is used to represent the case where no value is provided.
hfile: Each line of the header parameters file provides the definition of a single HDU header card as represented by the card image.
Input data file containing the table data in ASCII format.
Input column definition file containing the names, formats, display formats, physical units, multidimensional array dimensions, undefined values, scale factors, and offsets associated with the columns in the table.
Input parameter definition file containing the header parameter definitions to be associated with the table. If :None:None:`None`
, a minimal header is constructed.
Create a table from the input ASCII files. The input is from up to three separate files, one containing column definitions, one containing header parameters, and one containing column data. The header parameters file is not required. When the header parameters file is absent a minimal header is constructed.
The following pages refer to to this document either explicitly or contain code examples using this.
astropy.io.fits.convenience.tableload
astropy.io.fits.convenience.tabledump
Hover to see nodes names; edges to Self not shown, Caped at 50 nodes.
Using a canvas is more power efficient and can get hundred of nodes ; but does not allow hyperlinks; , arrows or text (beyond on hover)
SVG is more flexible but power hungry; and does not scale well to 50 + nodes.
All aboves nodes referred to, (or are referred from) current nodes; Edges from Self to other have been omitted (or all nodes would be connected to the central node "self" which is not useful). Nodes are colored by the library they belong to, and scaled with the number of references pointing them