FixedWidthHeader#

class astropy.io.ascii.FixedWidthHeader[源代码]#

基类:BasicHeader

固定宽度的表头读取器。

属性摘要

position_line 

指定位置的行的行索引(默认值=1)

set_of_position_line_characters 

方法总结

get_cols \(行)

从表初始化头列对象 lines .

get_fixedwidth_params \(行)

分裂 line 并确定列值和列的起始和结束位置。

get_line(lines, index)

write \(行)

属性文档

position_line = None#

指定位置的行的行索引(默认值=1)

set_of_position_line_characters = {'!', '"', '#', '$', '%', '&', "'", '*', '+', '-', ':', '=', '\\', '^', '_', '`', '|', '~'}#

方法文件

get_cols(lines)[源代码]#

从表初始化头列对象 lines .

根据前面设置的标题属性查找或创建列名。套 self.cols 列的列表。

参数:
lines : listPython :列表

表格行列表

get_fixedwidth_params(line)[源代码]#

分裂 line 并确定列值和列的起始和结束位置。这可能包括长度为零的空列(例如 header row = "| col1 || col2 | col3 |"header2_row = "----- ------- -----" ). 空列被剥离。返回分隔符与相应的起始位置和结束位置之间的值。

参数:
line : strPython :字符串

输入线

返回:
vals : listPython :列表

值列表。

starts : listPython :列表

起始指数列表。

ends : listPython :列表

结束指数列表。

get_line(lines, index)[源代码]#
write(lines)[源代码]#