Math Utils

In order to perform some calculations, we use some custom function, which are listed here.

CosmoCentral.LogSpacedFunction
LogSpaced(min::Float64, max::Float64, n::Int64)

This function evaluates $n$ points, logarithmically spaced between $min$ and $max$.

source
CosmoCentral.BinSearchFunction
BinSearch(x::Float64, Array::Vector{Float64})

Given a value $z$ and an Array, determines the couple of array elements where $z$ lies and returns the index corresponding to the first value.

source
CosmoCentral.CustomRegressionFunction
CustomRegression(x::Vector{Float64}, y::Vector{Float64})

Given two arrays $x$ and $y$, performs the linear regression and returns the coefficients $c$ and $m$ of the fitted line.

source