Metadata-Version: 2.4
Name: ripleypy
Version: 0.2.1
Summary: Add your description here
Requires-Python: >=3.12
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: numpy>=2.0.0
Provides-Extra: dev
Requires-Dist: bumpver; extra == "dev"
Requires-Dist: mypy; extra == "dev"
Provides-Extra: test
Requires-Dist: shapely; extra == "test"
Requires-Dist: scipy; extra == "test"
Dynamic: license-file

[![Mypy](https://github.com/BioImaging-NKI/ripleypy/actions/workflows/mypy.yml/badge.svg)](https://github.com/BioImaging-NKI/ripleypy/actions/workflows/mypy.yml)
[![Ruff](https://github.com/BioImaging-NKI/ripleypy/actions/workflows/ruff.yml/badge.svg)](https://github.com/BioImaging-NKI/ripleypy/actions/workflows/ruff.yml)

# Ripley-py
Performs 2D ripley analysis of points inside a masked area.
Edge correction is performed in accordance with the description by Peter Haase (1995)
> Edge corrections by weighting It(uij) were employed by
Getis & Franklin (1987) and Andersen (1992). The
weighting factor wij is equal to the proportion of the
circumference of the circle with radius uij and centred on
point i and passing through j, that lies within the plot
boundaries.

This is approximated by 256 points on a circle.

# Examples
Each example plots the masked area with the points on top, and below it the
observed L(r) - r curve against the random-noise floor (median +/- 75%
interval from repeated random draws in the same mask).

## Example images 1
Generated with [example1.py](https://github.com/BioImaging-NKI/ripleypy/blob/main/example1.py)

### Random
![Ripley L(r) - r curve for uniformly random points, against the random noise floor](https://raw.githubusercontent.com/BioImaging-NKI/ripleypy/main/img/example1_random_example.png)
### Clustered
![Ripley L(r) - r curve for clustered points, against the random noise floor](https://raw.githubusercontent.com/BioImaging-NKI/ripleypy/main/img/example1_clustered_example.png)

## Example images 2
Generated with [example2.py](https://github.com/BioImaging-NKI/ripleypy/blob/main/example2.py)

### Real world data
Mask from convex hull of the points

![Ripley L(r) - r curve for real world data, against the random noise floor](https://raw.githubusercontent.com/BioImaging-NKI/ripleypy/main/img/example2_ripley.png)
