Skip to content

Python function to compute g(r) the 2D pair correlation function (or radial distribution function) of a set of points.

License

Notifications You must be signed in to change notification settings

huayranus/paircorrelation2d

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 

Repository files navigation

paircorrelation2d

paircorrelation2d is a Python module to compute the 2D pair correlation function (radial distribution function) g(r) for a set of points, corrected to take account of the boundary effects.

Installation

Simply put the script in your working directory (or in any directory you added to your python path).

Usage

For the impatient

import matplotlib.pyplot as plt
from paircorrelation2d import pcf2d

#Assuming array_positions is a Nx2 numpy array containing the 2D coordinates of N points
#Assuming bins_distances is a Mx1 numpy array containing bin edges defining the values of r for which g(r) is going to be computed

[g_of_r,r]=pcf2d(array_positions, bins_distances)

plt.plot(r,g_of_r)

For the patient

See example.ipynb for a detailed presentation.

Requirements

License

MIT

About

Python function to compute g(r) the 2D pair correlation function (or radial distribution function) of a set of points.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Jupyter Notebook 95.9%
  • Python 4.1%