pofff.jobs.metric module
Plot spatial results and compute Wasserstein (EMD) distances between simulated and experimental segmentations.
- pofff.jobs.metric.before_emd(model_result: ndarray[tuple[Any, ...], dtype[int64]], experimental_data: ndarray[tuple[Any, ...], dtype[int64]], indx: int) float
Create PNG images from segmentation maps and compute EMD. PNG round-trip is required to preserve original behavior.
- pofff.jobs.metric.calculate_emd(file_1: str, file_2: str) float
Compute Wasserstein distance between two images. Reproduces the original numerical behavior exactly.
- pofff.jobs.metric.generate_segment_map(file_name: str, xlim: tuple[float, float], zlim: tuple[float, float], satmin: float, conmin: float) ndarray[tuple[Any, ...], dtype[int64]]
Convert continuous saturation and concentration fields into a discrete segmentation map.
- pofff.jobs.metric.main(argv=None) None
Segment maps at requested times and compute total EMD score.