Skip to main content

Network Spatial Coherence

What's the quality of your spatial network?

This package quantifies the spatial coherence of a network by measuring if network distances align with physical (Euclidean) distances. It helps you answer questions like: Do shortest-path network distances make spatial sense? Where, and by how much, does the network deviate from the geometric reality?

Additionally, it can reconstruct the network's original positions in space using the STRND algorithm. Networks can be simulated (if you don't have any) or imported, and weighted and bipartite networks are supported. For details, see Spatial Coherence and STRND papers.

Features

  • Analyze the spatial coherence of a network
  • Reconstruct images from purely network information - like drawing a country by only knowing which train stations are connected
  • Efficient graph loading and processing (sparse matrices)
  • Handles simulated graphs, custom graphs, unweighted graphs, weighted graphs, bipartite graphs

Install

Python 3.11 is reccomended, although older versions should work. See requirements.txt for dependencies.

pip install network_spatial_coherence

Example Results

OG Image SP Constant Net Dim Gram Mat REC Image
Coherent Network OG Image SP Constant Net Dim Gram Mat REC Image
Incoherent Network OG Image SP Constant Net Dim Gram Mat REC Image

Intro (important to read)

Usage and Examples

Detailed information

Interactive Network Viz

Citation

If you use this method or refer to its concepts in your research, please cite:

Bonet, D. F., Blumenthal, J. I., Lang, S., Dahlberg, S. K., & Hoffecker, I. T. (2025). Spatial coherence in DNA barcode networks. Patterns, 6(12), 101428. Full text

Bonet, D. F., & Hoffecker, I. T. (2023). Image recovery from unknown network mechanisms for DNA sequencing-based microscopy. Nanoscale, 15(18), 8153–8157. Full text

Contact

[dfb@kth.se]

Metadata

Release files for network-spatial-coherence 0.3.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for network-spatial-coherence 0.3.0
File Size Uploaded
network_spatial_coherence-0.3.0.tar.gz 4.8 MB Details

Built distribution (wheel)

Table of built distributions (wheels) for network-spatial-coherence 0.3.0
File Interpreter ABI Platform
network_spatial_coherence-0.3.0-py3-none-any.whl Python 3 none any Details

Total release size: 9.6 MB

Release files / network_spatial_coherence-0.3.0.tar.gz

Download URL network_spatial_coherence-0.3.0.tar.gz
Size 4.8 MB
Tags Source
SHA-256 checksum
How to use checksums
0bfed5ef9a5d851d07585854f72c2cdc07703a2e5ebec736a2e4e7143162dd2c
BLAKE2b-256 checksum
How to use checksums
18cbda430380d495433a5bbe8780cf489fbee8cb3189d8a4f15f3e12b30b0506
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.11.5

Release files / network_spatial_coherence-0.3.0-py3-none-any.whl

Download URL network_spatial_coherence-0.3.0-py3-none-any.whl
Size 4.8 MB
Tags Python 3
SHA-256 checksum
How to use checksums
178f18d88d08213e42d7206d8b90c75e8f4eff7d544f2c1d3258bef9f5c07677
BLAKE2b-256 checksum
How to use checksums
e2af673f2043ac4aead86437a3e735828f490e078ed372dfac4c8a92a66d4dbe
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.11.5

Release history Release notifications | RSS feed

This release

0.3.0 This release

2 release files

0.2.29

2 release files

0.2.28

2 release files

0.2.27

2 release files

0.2.26

2 release files

0.2.25

2 release files

0.2.24

2 release files

0.2.22

2 release files

0.2.21

2 release files

0.2.2

2 release files

0.2.1

2 release files

0.2.0

2 release files

0.1.20

2 release files

0.1.19

2 release files

0.1.18

2 release files

0.1.17

2 release files

0.1.16

2 release files

0.1.15

2 release files

0.1.14

2 release files

0.1.13

2 release files

0.1.12

2 release files

0.1.11

1 release file

0.1.1

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page