从空间代理数据计算绘图指标
项目描述
Simularium Metrics Calculator
从空间代理数据计算绘图指标
安装
稳定版本: pip install simularium-metrics-calculator
开发头: pip install git+https://github.com/simularium/metrics-calculator.git
要安装带有所有开发依赖项的可编辑模式: just install
快速入门
from simulariumio import FileConverter, InputFileData
from simularium_metrics_calculator import (
PLOT_TYPE,
SCATTER_PLOT_MODE,
MetricsService,
PlotInfo,
)
# create main class
metrics_service = MetricsService()
# check the metrics that are available to plot
metrics = metrics_service.available_metrics()
# load simularium trajectory data using simulariumio
traj_data = FileConverter(
input_file=InputFileData(
file_path=(
"simularium_metrics_calculator/tests/data/"
"aster_pull3D_couples_actin_solid_3_frames_small.json"
)
)
)._data
# configure some plots
plot1 = PlotInfo( # Number of agents vs time scatterplot
plot_type=PLOT_TYPE.SCATTER,
metric_info_x=metrics[0]["uid"],
metric_info_y=metrics[2]["uid"],
scatter_plot_mode=SCATTER_PLOT_MODE.LINES,
)
plot2 = PlotInfo( # Nearest neighbor distance histogram
plot_type=PLOT_TYPE.HISTOGRAM,
metric_info_x=metrics[3]["uid"],
)
# calculate the plot data
result = manager.plot_data(
traj_data,
plots=[
plot1,
plot2,
],
)
文档
有关完整包文档,请访问 simularium.github.io/metrics-calculator。
开发
有关开发代码的信息,请参阅 CONTRIBUTING.md。
Apache软件许可证2.0
项目详情
关闭
哈希值 用于 simularium_metrics_calculator-1.0.2-py3-none-any.whl
算法 | 哈希摘要 | |
---|---|---|
SHA256 | e4d56c49992a1ed28d69f2560f79ae275707448a52f304f5f15b15845337ef8d |
|
MD5 | d1310a6caf1b2148364e33881c4b9298 |
|
BLAKE2b-256 | 1a08b51c65cb7af2f9e9c1f8a2412240b89f78cf1361437435a870653d393f96 |