The sherpa.utils moduleΒΆ
Functions
Knuth_close (x, y, tol[, myop]) |
Check whether two floating-point numbers are close together. |
_guess_ampl_scale |
float(x) -> floating point number |
apache_muller (fcn, xa, xb[, fa, fb, args, ...]) |
|
bisection (fcn, xa, xb[, fa, fb, args, ...]) |
|
bool_cast (val) |
Converts a string (true|False|on|OFF|etc...) to a boolean value |
calc_ftest (dof1, stat1, dof2, stat2) |
Compare two models using the F test. |
calc_mlr (delta_dof, delta_stat) |
Compare two models using the Maximum Likelihood Ratio test. |
calc_total_error ([staterror, syserror]) |
Add statistical and systematic errors in quadrature. |
create_expr (vals[, mask, format, delim]) |
collapse a list of channels into an expression using hyphens |
dataspace1d (start, stop[, step, numbins]) |
Populates an integrated grid |
dataspace2d (dim) |
Populates a blank image dataset |
demuller (fcn, xa, xb, xc[, fa, fb, fc, ...]) |
A root-finding algorithm using Muller’s method [1]_. |
erf |
|
export_method (meth[, name, modname]) |
Given a bound instance method, return a simple function that wraps it. |
extract_kernel |
|
filter_bins (mins, maxes, axislist) |
|
gamma (z) |
Calculate the Gamma function. |
get_error_estimates (x[, sorted]) |
Compute the median and (-1,+1) sigma values for the data. |
get_fwhm (y, x[, xhi]) |
|
get_keyword_defaults (func[, skip]) |
Return the keyword arguments and their default values. |
get_keyword_names (func[, skip]) |
Return the names of the keyword arguments. |
get_midpoint (a) |
|
get_num_args (func) |
Return the number of arguments for a function. |
get_peak (y, x[, xhi]) |
|
get_position (y, x[, xhi]) |
Get 1D model parameter positions pos (val, min, max) |
get_valley (y, x[, xhi]) |
|
guess_amplitude (y, x[, xhi]) |
Guess model parameter amplitude (val, min, max) |
guess_amplitude2d (y, x0lo, x1lo[, x0hi, x1hi]) |
Guess 2D model parameter amplitude (val, min, max) |
guess_amplitude_at_ref (r, y, x[, xhi]) |
Guess model parameter amplitude (val, min, max) |
guess_bounds (x[, xhi]) |
Guess model parameters xlo, xhi (val, min, max) |
guess_fwhm (y, x[, xhi, scale]) |
|
guess_position (y, x0lo, x1lo[, x0hi, x1hi]) |
Guess 2D model parameter positions xpos, ypos ({val0, min0, max0}, |
guess_radius (x0lo, x1lo[, x0hi, x1hi]) |
Guess 2D model parameter radius (val, min, max) |
guess_reference (pmin, pmax, x[, xhi]) |
Guess model parameter reference (val, min, max) |
histogram1d (x, x_lo, x_hi) |
Create a 1D histogram from a binned grid (x_lo , xhi ) and array of samples (x ). |
histogram2d (x, y, x_grid, y_grid) |
Create 21D histogram from a binned grid (x_grid , y_grid ) and array of samples (x , and y ). |
igam (a,x) |
Calculate the regularized incomplete Gamma function (lower). |
igamc (a,x) |
Calculate the complement of the regularized incomplete Gamma function (upper). |
incbet (a,b,x) |
Calculate the incomplete Beta function |
interpolate (xout, xin, yin[, function]) |
One-dimensional interpolation. |
is_binary_file (filename) |
Estimate if a file is a binary file. |
lgam (z) |
Calculate the log (base e) of the Gamma function. |
linear_interp (xout, xin, yin) |
Linear one-dimensional interpolation. |
multinormal_pdf (x, mu, sigma) |
The PDF of a multivariate-normal. |
multit_pdf (x, mu, sigma, dof) |
The PDF of a multivariate student-t. |
nearest_interp (xout, xin, yin) |
Nearest-neighbor one-dimensional interpolation. |
neville (xout, xin, yin) |
Polynomial one-dimensional interpolation using Neville’s method [1]_. |
neville2d (xinterp, yinterp, x, y, fval) |
|
new_muller (fcn, xa, xb[, fa, fb, args, ...]) |
|
normalize |
|
numpy_convolve (a, b) |
|
pad_bounding_box |
|
parallel_map (function, sequence[, numcores]) |
A parallelized version of the native Python map function that utilizes the Python multiprocessing module to divide and conquer sequence. |
param_apply_limits (param_limits, par[, ...]) |
apply the dictionary of guess values to parameter, also, save the |
parse_expr (expr) |
parse a filter expression into numerical components for notice/ignore |
poisson_noise (x) |
Draw samples from a Poisson distribution. |
print_fields (names, vals[, converters]) |
Given a list of strings names and mapping vals, where names is a subset of vals.keys(), return a listing of name/value pairs printed one per line in the format ‘<name> = <value>’. |
quantile (sorted_array, f) |
Return the quantile element from sorted_array, where f is [0,1] using linear interpolation. |
rebin (y0, x0lo, x0hi, x1lo, x1hi) |
Rebin a histogram. |
sao_arange |
|
sao_fcmp (x, y, tol) |
Compare y to x, using an absolute tolerance. |
set_origin |
|
sum_intervals |
|
zeroin (fcn, xa, xb[, fa, fb, args, maxfev, tol]) |
Obtain a zero of a function of one variable using Brent’s root finder. |
Classes
NoNewAttributesAfterInit () |
Prevents attribute deletion and setting of new attributes after __init__ has been called. |