Learn R Programming

cooltools (version 2.33)

Practical Tools for Scientific Computation and Visualisation

Description

Provides utilities for scientific computation and visualisation, with an emphasis on applications in physics and astrophysics. Functionality includes random sampling from spherical and custom distributions, information and entropy analysis, Fourier transforms, two-point correlation estimation, binning and gridding of point sets, two-dimensional interpolation, Monte Carlo integration, vector operations, coordinate transformations, physical constants, and cosmological conversions. Graphics tools support the creation and export of publication-quality plots, animations, colour scales, map projections, and bitmap images. Several of these tools were used by Obreschkow et al. (2020) .

Copy Link

Version

Install

install.packages('cooltools')

Monthly Downloads

287

Version

2.33

License

GPL-3

Issues

Pull Requests

Stars

Forks

Maintainer

Danail Obreschkow

Last Published

September 11th, 2026

Functions in cooltools (2.33)

dftgrid

Produce coordinates for Discrete Fourier Transform
gradient

Compute gradient
errlines

Draw a line with uncertainty regions
entropy

Information entropy
inertia

Moment of inertia tensor
histcoord

Generate histogram coordinates from mid points
fibonaccisphere

Evenly distributed n points on a sphere
error

Stop code and produce an error message
landyszalay

Two-point correlation estimation
kde2

Multi-dimensional adaptive kernel density estimation
kappacorotation

Compute the co-rotational kinetic energy fraction
midseq

Mid-points of regular grid
jackknife

Jackknife Estimation
makemovie

Produce a movie from frame-drawing function
mcintegral

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

Mutual information of two random variables
moments

Second moment tensor
ndft

Non-uniform Discrete Fourier Transform
makeframe

Display a single movie frame
invert

Invert and shift colors of an image
is.equal

Numerical equality check
griddata

Distribute a point set onto a regular grid
quadrupole

Quadrupole tensor
progress

Show progress while timer in running
ngon

Draw a regular n-gon
rotation3

3D rotation matrix
nplot

Make empty plot area
quiet

Suppress console output
runif3

Generate randomly oriented vectors in 3D
scalarproduct

Scalar product
lim

Crop values to a custom range
rng

Random number generator for a custom d-dimensional distribution
rotation2

2D rotation matrix
rasterflip

Flip array to be displayed with rasterImage()
runif2

Generate randomly oriented vectors in 2D
subplot

Insert a sub-panel into plot
stretch

Stretch values to a custom range
lightness

Change lightness of a color
distradius

Radius of a point distribution
grf

Gaussian Random Field generator
sphericalharmonics

Spherical Harmonics
pol2car

Polar/cylindrical to Cartesian coordinate conversion
planckcolors

Planck CMB colour palette
mollweide

Mollweide projection
streamlines

Draw streamlines of a two-dimensional vector field
paircount

Count the number of point-pairs in distance bins
vectorproduct

Vector product
linfun

Linear Function Fitter
last

Last element of a vector
readhdf5

Read data from an HDF5 file
pdf2jpg

Convert pdf to jpg
tick

Start timer
wavelength2col

Convert wavelength to RGB
rebindensity

Re-bin density histograms
loadbin

Read binary data into array
linuxspaces

Handle spaces in Linux filenames
sph2car

Spherical to Cartesian coordinate conversion
smoothcontour

Draw smoothed contours
smoothfun

Smoothed Function
transparent

Add transparency to a color
tock

Stop timer
transzoom

Zoom, translate and rotate array image
userattributes

Retrieve Custom Object Attributes
unitvector

Normalize vectors to unit length
uniquedouble

Map positive 64-bit integers onto unique doubles
sigmoid

Sigmoid function
smartround

Round a vector of floating-point values while preserving their sum
sphereplot

Plot a spherical function or point set
sortlist

Sort List Entries Alphabetically
spectrumcolors

Spectrum colour palette
yinyangyong

Yin-Yang-Yong image
vectornorm

Vector norm
writehdf5

Write structured list to an HDF5 file
blur

Gaussian blur for arrays of arbitrary dimension
cmplx2col

Convert complex numbers to color
colorbar

Vertical color bar
contourlevel

Highest-density contour levels
approxfun2

Bilinear interpolation function of data on a regular grid
bindata

Bin two-dimensional data in one dimension
car2pol

Cartesian to polar/cylindrical coordinate conversion
car2sph

Cartesian to spherical coordinate conversion
alp

Associated Legendre Polynomials
angularmomentum

Compute the total angular momentum of a particle distribution
dpqr

Generate the d/p/q/r family for an arbitrary distribution
cosmofct

Fast cosmology conversion functions
cubehelix

Cube Helix colour palette
dft

Discrete Fourier Transform
cooltools-package

Practical Tools for Scientific Computations and Visualizations
.cooltools.env

Package environment
cst

Scientific constants
cshift

Circularly shift each dimension of an array
getgit

Install a GitHub Package