本文整理汇总了Python中larch.Group.__name__方法的典型用法代码示例。如果您正苦于以下问题:Python Group.__name__方法的具体用法?Python Group.__name__怎么用?Python Group.__name__使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类larch.Group
的用法示例。
在下文中一共展示了Group.__name__方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: read_stepscan
# 需要导入模块: from larch import Group [as 别名]
# 或者: from larch.Group import __name__ [as 别名]
def read_stepscan(fname, _larch=None, **kws):
"""read Epics Step Scan file to larch Group"""
scan = EpicsScanData(fname)
group = Group()
group.__name__ ='Epics Step Sscan Data file %s' % fname
for key, val in scan.__dict__.items():
if not key.startswith('_'):
setattr(group, key, val)
group.get_data = scan.get_data
return group
示例2: gsescan_group
# 需要导入模块: from larch import Group [as 别名]
# 或者: from larch.Group import __name__ [as 别名]
def gsescan_group(fname, _larch=None, bad=None, **kws):
"""simple mapping of EscanData file to larch groups"""
escan = EscanData(fname, bad=bad)
if escan.status is not None:
raise ValueError('Not a valid Escan Data file')
group = Group()
group.__name__ ='GSE Escan Data file %s' % fname
for key, val in escan.__dict__.items():
if not key.startswith('_'):
setattr(group, key, val)
group.array_labels = group.pos_desc + group.sums_names
group.get_data = escan.get_data
return group
示例3: read_xdi
# 需要导入模块: from larch import Group [as 别名]
# 或者: from larch.Group import __name__ [as 别名]
def read_xdi(filename, labels=None, _larch=None):
"""simple mapping of XDI file to larch groups"""
xdif = XDIFile(filename, labels=labels)
group = Group()
for key, val in xdif.__dict__.items():
if not key.startswith('_'):
if six.PY3 and key in string_attrs:
val = tostr(val)
setattr(group, key, val)
group.__name__ ='XDI file %s' % filename
doc = ['%i arrays, %i npts' % (xdif.narrays, xdif.npts)]
arr_labels = getattr(xdif, 'array_labels', None)
if arr_labels is not None:
doc.append("Array Labels: %s" % repr(arr_labels))
group.__doc__ = '\n'.join(doc)
group.path = filename
path, fname = os.path.split(filename)
group.filename = fname
return group