Metadata-Version: 2.1
Name: OPIPP
Version: 0.1.1
Summary: A Python implementation of Optimization-based PIPP, a method for retinal mosaic simulation.
Author-email: Liuyuan He <liyhe@pku.edu.cn>
License: MIT License
        
        Copyright (c) 2023 Liuyuan He
        
        Permission is hereby granted, free of charge, to any person obtaining a copy
        of this software and associated documentation files (the "Software"), to deal
        in the Software without restriction, including without limitation the rights
        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
        copies of the Software, and to permit persons to whom the Software is
        furnished to do so, subject to the following conditions:
        
        The above copyright notice and this permission notice shall be included in all
        copies or substantial portions of the Software.
        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
        SOFTWARE.
Project-URL: Homepage, https://github.com/heliy/OPIPP
Project-URL: Bug Reports, https://github.com/heliy/OPIPP/issues
Project-URL: Source, https://github.com/heliy/OPIPP/
Classifier: Development Status :: 3 - Alpha
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3 :: Only
Requires-Python: >=3.8
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: numpy >=1.20.0
Requires-Dist: scipy >=1.9.0
Requires-Dist: matplotlib >=3.2.0
Requires-Dist: networkx >=2.0.0

# OPIPP: Optimization-based Pairwise Interaction Point Process

A Python implementation of **OPIPP**, a method for precisely generating artificial **retinal mosaics**, the spatial organization of retinal neurons. [Here](tutorial/0.background.md) is a short introduction to the background.

## Pipeline

![overview](tutorial/imgs/rm-overview.png)

We recommend the "import-analysis-simulation" pipeline for generating artificial mosaics and purpose a tutorial for each step, as
1. [Importing retinal spatial pattern datasets from local files](tutorial/1.import.md)
2. [Analyzing and visualizing spatial patterns of mosaics](tutorial/2.analysis.md)
3. [Simulating artifical retinal mosaics](tutorial/3.simulation.md)

Users are welcome to [extend and customize methods](tutorial/3.simulation.md#extention) for feature calculation and mosaic simulation.

## Tools

Here are useful tools that are not implemented in the current version. We plan to apply these methods in future development.

- [Estimate parameters of mosaic simulation by R](tutorial/estimate_inter_ps.md)
- [Parallel process for mosaic generation by MPI](tutorial/parallel_processing.md)


# Install

## PyPI (pip)

```console
pip install git+https://github.com/heliy/OPIPP
```

<!-- or 

```console
pip install OPIPP
``` -->

## Dependencies

- python >=3.8
- numpy >= 1.20.0
- scipy >= 1.9.0
- matplotlib >= 3.2.0
- networkx >= 2.0.0

# Citation

- TODO

# References

- The example mosaic for retinal horizontal cells and related spatial features are from [(Keeley et al., 2020)](https://doi.org/10.1002/cne.24880).

- In the optimization, we use the adaptive simulated annealing algorithm from [(Ingber, 1993)](https://optimization-online.org/wp-content/uploads/2001/03/291.pdf).
