Home | Trees | Indices | Help |
---|
|
Read and write ASCII files.
|
|||
General Input | |||
---|---|---|---|
(list,list) |
|
||
ndarray (, list) |
|
||
ndarray (, list) |
|
||
General Output | |||
|
|||
Helper functions | |||
|
|||
|
|||
|
|||
Source specific | |||
array,array,dict |
|
||
|
|||
|
|||
|
|||
|
|
|||
logger = logging.getLogger("IO.ASCII")
|
|
Load an ASCII file to list of lists. The comments and data go to two different lists. Also opens gzipped files.
|
Load ASCII file to a numpy array. For a list of extra keyword arguments, see
If you want to return a list of the columns instead of rows, just do
|
Load ASCII file to a numpy record array. For a list of extra keyword arguments, see
IF dtypes is None, we have some room to automatically detect the contents of the columns. This is not implemented yet. the keyword 'dtype' should be equal to a list of tuples, e.g.
|
Save a numpy array to an ASCII file. Add comments via keyword comments (a list of strings denoting every
comment line). By default, the comment lines will be preceded by the
If you give a record array, you can simply set
|
Convert fix width information to python information >>> fw2info('F13.4') ([float], [13]) >>> fw2info('I2') ([int], [2]) >>> fw2info('6I2') ([int, int, int, int, int, int], [2, 2, 2, 2, 2, 2]) >>> fw2info('5F12.3') ([float, float, float, float, float], [12, 12, 12, 12, 12]) |
Return spectrum and header from a HARPS normalised file.
|
Reads .phot from MADROT or .nad from MAD. MAD is the nonadiabatic pulsation code from Marc-Antoine Dupret. MADROT is the extension for slowly rotating stars in the traditional approximation. This function serves a generic read function, it reads *.phot and *.nad files, both from MAD and MADROT. Returns list of dicts
|
Reads .phot output file of MADROT. Returns list of dictionaries For quick reading, you can already give a range on teff and logg, and skip the rest of file. if there is a NAD file with the same name (but extension .nad instead of .phot), we read in the header of this file too for information on the star:: # M/M_sun = 1.40 Teff = 6510.2 Log (L/L_sun) = 0.5168 # Log g = 4.2748 R/R_sun = 1.4283 age (y) = 2.3477E+08 # X = 0.70 Z = 0.020 alphaconv = 1.80 overshoot = 0.40 if the filename is given as C{M1.4_0.020_0.40_0.70_001-0097.phot}, we add information on mass, Z, overshoot, X and evolution number to star_info, except for those quantities already derived from a NAD file. One dictionary representes information about one pulsation mode. @param teff: range in effective temperature for file selection (value, sigma) @type teff: tuple @param logg: range in surface gravity for file selection (value, sigma) @type logg: tuple |
Reads .phot output file of MAD. Returns list of dictionaries One dictionary representes information about one pulsation mode. |
Reads .nad output file of MAD. Returns list of dictionaries One dictionary representes information about one pulsation mode. |
Home | Trees | Indices | Help |
---|
Generated by Epydoc 3.0.1 on Fri Mar 30 10:45:19 2018 | http://epydoc.sourceforge.net |