Barak 0.3.2 documentation

barak.io.writetxt

«  barak.io.writetable   ::   Contents   ::   barak.phot.UBVRI_to_ugriz  »

barak.io.writetxt

barak.io.writetxt(fh, cols, sep=' ', names=None, header=None, overwrite=False, fmt_float='s')[source]

This is deprecated. Use writetable() with file type ‘.tbl’ instead.

Write data to a column-aligned text file.

Structured array data written using this function can be read again using:

>>> readtxt(filename, readnames=True)
Parameters :

fh : file object or str

The file to be written to.

cols : structured array or a list of columns

Data to be written.

sep : str (‘ ‘)

A string used to separate items on each row.

names : list, string, False or None (None)

Column names. Can be a comma-separated string of names. If False, do not print any names. If None and cols is a structured array, column names are the array field names.

header : str (None)

A header written before the data and column names.

overwrite : bool (False)

If True, overwrite an existing file without prompting.

«  barak.io.writetable   ::   Contents   ::   barak.phot.UBVRI_to_ugriz  »