tables_io.table_dict
Functions to store analysis results as astropy data tables
Classes
Warning: This class is being deprecated as of version 1.0.0. |
Module Contents
- class TableDict[source]
Bases:
collections.OrderedDictWarning: This class is being deprecated as of version 1.0.0.
Object to collect various types of table-like objects
This class is a dictionary mapping name to table-like and a few helper functions, e.g., to add new tables to the dictionary and to read and write files, either as FITS or HDF5 files.
- write(basepath, fmt=None)[source]
Write tables to the corresponding file type
- Parameters:
basepath (str) – base path for output files. Suffix will be added based on type
fmt (str or None) – The output file format, If None this will use write_native
- convert(tType)[source]
Build a new TableDict by converting all the table in the object to a different type
- Parameters:
tType (int) – The type to convert to
- Returns:
td – The new TableDict
- Return type:
TableDict
- classmethod read(filepath, tType=None, fmt=None, keys=None)[source]
Read a file to the corresponding table type
- Parameters:
filepath (str) – File to load
tType (int or None) – Table type, if None this will use readNative
fmt (str or None) – File format, if None it will be taken from the file extension
keys (list or None) – Keys to read for parquet files
- Returns:
tableDict – The data
- Return type:
TableDict