Utility Methods

breads.utils Module

Functions

LPFvsHPF(myvec, cutoff)

Ask JB to write documentation!

broaden(wvs, spectrum, R[, mppool, kernel])

Broaden a spectrum to instrument resolution assuming a gaussian line spread function.

broaden_kernel(wvs, spectrum, kernel)

Broaden a spectrum to instrument resolution assuming a custom kernel.

clean_nans(arr[, set_to, allowed_range, ...])

companion_relative_to_absolute_position(...)

Compute absolute ICRS coordinates of a substellar companion at a given date

copy(x)

Shallow copy operation on arbitrary Python objects.

corrected_wavelengths(data, off0, off1, ...)

correlate2d(in1, in2[, mode, boundary, ...])

Cross-correlate two 2-dimensional arrays.

file_directory(file)

filter_spec_with_spline(wvs, spec[, ...])

find_closest_leftnright_elements(v1, v2)

Find the closest elements in v1 to the left and right of each element in v2.

findbadpix(cube[, noisecube, badpixcube, ...])

gaussian2D(nx, ny, mu_x, mu_y, sig_x, sig_y, A)

Two Dimensional Gaussian for getting PSF for different wavelength slices

get_err_from_posterior(x, posterior)

Return the mode, and the left and right errors of a distribution.

get_spline_model(x_knots, x_samples[, ...])

Compute a spline based linear model.

lsq_linear(A, b[, bounds, method, tol, ...])

Solve a linear least-squares problem with bounds on the variables.

mask_bleeding(data[, threshold, per, ...])

median_abs_deviation(x[, axis, center, ...])

Compute the median absolute deviation of the data along the given axis.

nonlin_lnprior_func(nonlin_paras, ...)

basic function to limit prior ranges for emcee

open_psg_allmol(filename, l0, l1)

Open psg model for all molecules returns wavelength, h2o, co2, ch4, co for l0-l1 range specified

pixgauss2d(p, shape[, hdfactor, xhdgrid, ...])

2d gaussian model.

propagate_coordinates_at_epoch(targetname, date)

Get coordinates at an epoch for some target, taking into account proper motions.

rotate_coordinates(x, y, angle[, flipx])

scale_psg(psg_tuple, airmass, pwv)

See also JWST tools.