Learn R Programming

physx (version 1.0)

Efficient Scientific Computations

Description

Collection of auxiliary routines for efficient scientific computations in physics and astrophysics. These routines can be used for random number generation (e.g. from spherical and custom distributions), information and entropy analysis (e.g. used in Obreschkow et al. (2020) ), spatial statistics, such as special DFTs and Landy-Szalay estimators (Landy & Szalay (1993) ), binning/gridding of point sets and 2D interpolation, Monte Carlo integration, vector arithmetics, coordinate transformations, unit conversions and cosmological distance calculations. Also includes a list of important physical constants, particularly useful in astrophysics.

Copy Link

Version

Install

install.packages('physx')

Monthly Downloads

5

Version

1.0

License

GPL-3

Maintainer

Danail Obreschkow

Last Published

February 3rd, 2022

Functions in physx (1.0)

alp

Associated Legendre Polynomials
cosmofct

Fast cosmology conversion functions
dft

Discrete Fourier Transform
bindata

Bin two-dimensional data in one dimension
dftgrid

Produce coordinates for Discrete Fourier Transform
approxfun2

Bilinear interpolation function of data on a regular grid
cst

Scientific constants
car2pol

Cartesian to polar/cylindrical coordinate conversion
car2sph

Cartesian to spherical coordinate conversion
contourlevel

Find contour levels of a d-dimensional density field
rng

Random number generator for a custom d-dimensional distribution
rotation2

2D rotation matrix
kde2

2D kernel density estimation
paircount

Count the number of point-pairs in distance bins
griddata

Grid 1D point set
fibonaccisphere

Evenly distributed n points on a sphere
ndft

Non-uniform Discrete Fourier Transform
vectorproduct

Vector product
vectornorm

Vector norm
unitvector

Normalize vectors to unit length
runif2

Generate randomly oriented vectors in 2D
rotation3

3D rotation matrix
landyszalay

Two-point correlation estimation
griddata2

Grid 2D point set
mcintegral

Monte Carlo and Quasi-Monte Carlo integration in any dimension
histcoord

Generate histogram coordinates from mid points
pol2car

Polar/cylindrical to Cartesian coordinate conversion
mutual

Mutual information of two random variables
physx

Routines for scientific research
dpqr

d/p/q/r-family for a custom distribution
sph2car

Spherical to cartesian coordinate conversion
sphericalharmonics

Spherical Harmonics
entropy

Information entropy
rebindensity

Re-bin density histograms
quadrupole

Quadrupole tensor
runif3

Generate randomly oriented vectors in 3D
scalarproduct

Scalar product