瓢虫是一个python库,用于加载、分析和修改eneregyplus天气文件(epw)。
lbt-ladybug的Python项目详细描述
瓢虫
瓢虫是一个python库,用于加载、分析和修改eneregyplus天气文件(epw)。您可以从EPWMap下载epw文件。
该库包括核心库,核心库是瓢虫的基础。有关插件特定的问题和注释,请参阅ladybug-grasshopper或ladybug-dynamo存储库。
注
有关传统瓢虫蚱蜢插件,请参见this repository。
API Documentation
安装
pip install lbt-ladybug
用法
# load epw weather datafromladybug.epwimportEPWepw_data=EPW('path_to_epw_file')dry_bulb_temp=epw_data.dry_bulb_temperature# Get altitude and longitudefromladybug.locationimportLocationformladybug.sunpathimportSunpath# Create location. You can also extract location data from an epw file.sydney=Location('Sydney','AUS',latitude=-33.87,longitude=151.22,time_zone=10)# Initiate sunpathsp=Sunpath.from_location(sydney)sun=sp.calculate_sun(month=11,day=15,hour=11.0)print('altitude: {}, azimuth: {}'.format(sun.altitude,sun.azimuth))>>>altitude:72.26,azimuth:32.37
导数功
瓢虫是以下软件项目的衍生产品:
pyeuclid用于矢量数学计算。在lgpl下提供。
PVLib-python用于太阳辐照度计算。根据BSD 3条款提供。
这些作品的适用版权声明可以在相关的.py文件中找到。