空间相关的地震动强度分布模拟库
Project description
SpatialIM
SpatialIM是一个用于空间相关的烈度分布模拟的Python库,基于C++实现,提供高效的地震烈度模拟计算。
系统要求
- Windows 64位操作系统
- Python 3.12
安装
pip install spatialim
使用示例
import spatialim
# 设置参数
lon_0, lat_0 = -122.320011, 37.963314 # 震中经纬度
M = 7.0 # 震级
N_sim = 100 # 模拟次数
seed = 42 # 随机数种子
W = 20.0 # 断裂面宽度(km)
length = 50.0 # 断裂面长度(km)
normal_x, normal_y, normal_z = 0.318, 0.214, 0.1395 # 法线方向
lambda_angle = 0 # rake角度(度)
Fhw = 1 # hanging wall效应
Zhyp = 15.0 # 震源深度(km)
region = 1 # 区域(1=加州)
nPCs = 10 # 主成分数
# 创建地震源对象
eqs = spatialim.EQSource_CB14PCA(lon_0, lat_0)
eqs.set_seed(seed)
eqs.set_W(W)
eqs.set_length(length)
eqs.set_RuptureNormal(normal_x, normal_y, normal_z)
eqs.set_lambda(lambda_angle)
eqs.set_Fhw(Fhw)
eqs.set_Zhyp(Zhyp)
eqs.set_region(region)
eqs.set_nPCs(nPCs)
# 注册场地
# eqs.register_site(ID, lon, lat, elevation_km, T0, Vs30, Z25)
eqs.register_site(1, -122.26, 37.87, 0.0, 0.2, 250.0, 0.51)
# 模拟烈度
magnitudes = [M] * N_sim
eqs.simulate_intensities(magnitudes)
# 保存结果
eqs.save_im("intensity_results.txt")
eqs.save_xy("site_coordinates.txt")
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
spatialim-0.1.1.tar.gz
(512.6 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
spatialim-0.1.1-py3-none-any.whl
(515.9 kB
view details)
File details
Details for the file spatialim-0.1.1.tar.gz.
File metadata
- Download URL: spatialim-0.1.1.tar.gz
- Upload date:
- Size: 512.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
73c3252ce9867ae5848c591721d18792ef37acb18abd73b02d6bba0e93944caf
|
|
| MD5 |
fac596e5227e7c3ce6b8033984114a4c
|
|
| BLAKE2b-256 |
d3a002410ee3486d3604c4934d362f3fd3de1ab0bdfe0f92b25b7337f31c13ca
|
File details
Details for the file spatialim-0.1.1-py3-none-any.whl.
File metadata
- Download URL: spatialim-0.1.1-py3-none-any.whl
- Upload date:
- Size: 515.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8c0dcb6a040e1d68ae4e916a8df277dd2d8204b67608d0542ced5dfaa3ea52ca
|
|
| MD5 |
62e28e602b14efa70290973f3e1ed945
|
|
| BLAKE2b-256 |
ce1cd7d887f5df10b591c67c7ba7258416970b18fe93a2a5ec6db01b2ca8437d
|