操作洞穴调查数据包
davies的Python项目详细描述
戴维斯
davies是一个用于处理洞穴勘测数据的python包。
它目前处于开发的早期阶段,随着它的成熟,它的接口可能会发生变化。
当前支持包括:
- Reading of Compass Project (.MAK) and Data (.DAT) source files, as well as compiled Plot (.PLT) files.
- Writing Compass Data (.DAT) files.
- Reading PocketTopo exported .TXT survey files.
- That’s it! No loop closure algorithms, no visualization or editing tools (though our examples directory contains scripts with which to build tools of this sort)
罗盘测量数据的示例用法:
from davies import compass # Parse a .DAT file datfile = compass.DatFile.read('MYCAVE.DAT') print len(datfile) # number of surveys in .DAT >> 17 print datfile.length # total surveyed footage including splays, etc. >> 5332.2 print datfile.included_length # total surveyed footage after discarding excluded shots >> 5280.0 survey = datfile['BS'] # grab a survey by its survey designation print survey.name >> A print survey.date >> 2006-09-30 print survey.length # surveyed footage including splays, etc. >> 5332.2 print survey.included_length # surveyed footage after discarding excluded shots >> 5280.0 print survey.shots[0] >> {'FROM': 'A1', 'TO': 'A2', 'LENGTH': 16.8, 'BEARING': 158.0, 'INC': -30.0, 'LEFT': 12.0, 'RIGHT': 15.0, 'UP': 15.0, 'DOWN': 20.0} print survey.shots[0].azm # azimuth after averaging front and backsights, magnetic declination 155.2
此示例显示谁在您的指南针项目中调查了最多的镜头:
from davies import compass cavers = {} for datfilename in sys.argv[1:]: for survey in compass.DatFile.read(datfilename): for member in survey.team: cavers[member] = cavers.get(member, 0.0) + survey.length for name in sorted(cavers, key=cavers.get, reverse=True): print "%s:\t%0.1f" % (name, cavers[name])
安装
此软件需要python 2.7。它将not与较旧的python版本一起工作,尽管它may与python 3.3+一起工作。
版本可从python包索引进行安装,请参见 installation instructions或直接运行 Mac OS X或大多数Linux发行版上的以下命令:
$> pip install davies
如果您下载了源发行版或从git存储库签出,请使用以下命令在本地安装:
$> python setup.py install
发展发生在GitHub。
名称
“戴维斯”这个名字是献给William E. Davies, 他开创了西弗吉尼亚洞穴系统调查的先河,并于1949年创作了《西弗吉尼亚洞穴》。比尔·戴维斯 后来为马里兰州进行了全州范围的洞穴调查,担任了 国家洞穴学会,并出版了权威的美国全喀斯特地图,喀斯特工程方面。戴维斯 今天仍然是西弗吉尼亚,美国和全世界洞穴测绘者的灵感来源。
许可证
davies是根据MIT License授权的免费/开源软件, 版权所有(c)2013-2016 Myotisoft LLC.