MinkasiWrapper

A Wrapper for the Minkasi Map Maker

Powered by Astropy Badge

This package wraps the Minkasi map mapker as an external map maker package for the TolTEC camera.

Minkasi Map Maker

Minkasi is a Python/C-based mapper for Mustang.

TODO: add credit and license of Minkasi.

Installation

Minkasi depends on fftw3, and requires an OpenMP-capable C compiler to work.

On macOS, this can be done with Homebrew:

$ brew install llvm libomp fftw3
$ export CC=/usr/local/opt/bin/clang
$ export LDFLAGS=-L/usr/local/opt/llvm/lib
$ export CPPFLAGS=-I/usr/local/opt/llvm/include

On Ubuntu, install the packages with:

$ sudo apt install gcc-10 fftw-dev

One can also use customized FFTW installation. This leverages the pkg-config stub that gets created in the fftw lib path:

$ export PKG_CONFIG_PATH=/path/to/fftw3/install/prefix/lib/pkgconfig

Once the preparation is done, install minkasi_wrapper with pip:

$ pip install git+https://github.com/toltec-astro/minkasi_wrapper

Usage

High-level API

To be implemented.

Low-level API

The minkasi_wrapper module exposes the low level minkasi.py API as the minkasi_wrapper.minkasi submodule:

from minkasi_wrapper import minkasi

tod = minkasi.Tod(...)

Please see the API documentation for details.

License

This project is Copyright (c) Zhiyuan Ma and licensed under the terms of the BSD 3-Clause license. This package is based upon the Astropy package template which is licensed under the BSD 3-clause license. See the licenses folder for more information.

Reference/API

minkasi_wrapper Package

minkasi_wrapper.extern.minkasi.minkasi Module

apply_noise(tod[, dat])

barrier()

cut_blacklist(tod_names, blacklist)

decimate(vec[, nrep])

derivs_from_elliptical_gauss(params, tod, ...)

derivs_from_elliptical_isobeta(params, tod, ...)

derivs_from_gauss_c(params, tod, *args, **kwargs)

derivs_from_isobeta_c(params, tod, *args, ...)

derivs_from_map(pars, tod, fun, map, dpar[, ...])

downsample_array_r2r(arr, fac)

downsample_tod(dat[, fac])

downsample_vec_r2r(vec, fac)

find_bad_skew_kurt(dat[, skew_thresh, ...])

find_good_fft_lens(n[, primes])

find_jumps(dat[, width, pad, thresh, rat])

find_spikes(dat[, inner, outer, rad, ...])

fit_cm_plus_poly(dat[, ord, cm_ord, niter, ...])

fit_jumps_from_cm(dat, jumps, cm[, ...])

fit_linear_ps_uncorr(dat, vecs[, tol, ...])

fit_mat_vecs_poly_nonoise(dat, mat, order[, ...])

fit_timestreams_with_derivs(func, pars, tods)

fit_timestreams_with_derivs_manyfun(funcs, ...)

fit_ts_ps(dat[, dt, ind, nu_min, nu_max, ...])

gapfill_eig(dat, cuts[, tod, thresh, ...])

get_aligned_map_subregion_car(lims[, fname, ...])

Get a wcs for a subregion of a map, with optionally finer pixellization.

get_curve_deriv_powspec(fitp, nu_scale, ...)

get_curve_deriv_tod_isosrc(pars, tod[, ...])

get_curve_deriv_tod_manygauss(pars, tod[, ...])

get_derivs_tod_isosrc(pars, tod[, niso])

get_ft_vec(n)

get_grad_mask_2d(map[, todvec, thresh, ...])

make a mask that has an estimate of the gradient within a pixel.

get_nthread()

get_timestream_chisq_curve_deriv_from_func(...)

get_timestream_chisq_from_func(func, pars, tods)

get_ts_curve_derivs_many_funcs(todvec, pars, ...)

get_ts_derivs_many_funcs(tod, pars, ...[, ...])

get_type(nbyte)

get_wcs(lims, pixsize[, proj, cosdec, ref_equ])

invsafe(mat[, thresh])

invscale(mat[, do_invsafe])

isobeta_src_chisq(params, tods)

make_hits(todvec, map[, do_weights])

make_rings(edges, cent, map[, pixsize, ...])

make_rings_wSlope(edges, cent, vals, map[, ...])

map2tod(dat, map, ipix[, do_add, do_omp])

mask_dict(mydict, mask)

nsphere_vol(npp)

partition_interval(start, stop[, seg_len, ...])

planck_g([freq])

conversion between T_CMB and T_RJ as a function of frequency.

plot_ps(vec[, downsamp])

polmap2tod(dat, map, poltag, twogamma, ipix)

poltag2pols(poltag)

read_fits_map(fname[, hdu, do_trans])

read_octave_struct(fname)

read_tod_from_fits(fname[, hdu, branch])

read_tod_from_fits_cbass(fname[, dopol, ...])

read_tod_from_toltec_nc(fname, arrayindex[, ...])

report_mpi()

run_pcg(b, x0, tods[, precon, maxiter, ...])

run_pcg_wprior(b, x0, tods[, prior, precon, ...])

run_pcg_wprior_old(b, x0, tods, prior[, ...])

scaled_airmass_from_el(mat)

segs_from_vec(vec[, pad])

return the starting/stopping points of regions marked False in vec.

set_nthread(nthread)

slice_with_copy(arr, ind)

smooth_many_vecs(vecs[, fwhm])

smooth_spectra(spec, fwhm)

smooth_vec(vec[, fwhm])

split_dict(mydict, vec, thresh)

split_partitioned_vec(start, stop[, breaks, ...])

timestreams_from_gauss(ra, dec, fwhm, tod[, ...])

timestreams_from_isobeta(params, tod)

timestreams_from_isobeta_c(params, tod[, pred])

tod2map_cached(map, dat, ipix)

tod2map_everyone(map, dat, ipix, edges)

tod2map_omp(map, dat, ipix[, atomic])

tod2map_simple(map, dat, ipix)

tod2polmap(map, dat, poltag, twogamma, ipix)

todvec_from_files_octave(fnames)

truncate_tod(dat[, primes])

update_lamda(lamda, success)

write_fits_map_wheader(map, fname, header[, ...])

y2rj([freq])

conversion to multiply a y map by to get a Rayleigh-Jeans normalized map note that it doesn't have the T_cmb at the end, so the value for low frequencies is -2.

Cuts(tod[, do_add])

CutsCompact(tod)

HealMap([proj, nside, tag])

HealPolMap([poltag, proj, nside, tag, ...])

MapNoiseWhite(ivar_map[, isinv, nfac])

Mapset()

NoiseBinnedDet(dat, dt[, freqs, scale_facs])

NoiseBinnedEig(dat, dt[, freqs, scale_facs, ...])

NoiseCMWhite(dat)

NoiseSmoothedSVD(dat_use[, fwhm, prewhiten, ...])

NoiseWhite(dat)

NoiseWhiteNotch(dat, numin, numax, tod)

PolMap(lims, pixsize[, poltag, proj, pad, ...])

SkyMap(lims[, pixsize, proj, pad, primes, ...])

SkyMapCar(lims[, pixsize, proj, pad, ...])

SkyMapCarOld(lims, pixsize)

SkyMapCoarse(map)

SkyMapTwoRes(map_lowres, lims[, osamp, ...])

A pair of maps to serve as a prior for multi-experiment mapping.

Tod(info)

TodVec()

detOffset([tod])

null_precon()

tsAirmass([tod, order])

tsBinnedAz(tod[, lims, nbin])

tsBinnedAzShared([ndet, lims, nbin])

tsCalib([tod, model])

tsCommon([tod])

tsDetAz(tod[, npoly])

tsGeneric([tod])

tsModel([todvec, modelclass])

tsMultiModel([todvec, todtags, modelclass, tag])

A class to hold timestream models that are shared between groups of TODs.

tsNotch(tod, numin, numax)

tsPoly(tod[, order])

tsStripes(tod[, seg_len, do_slope, tthresh])

tsStripes_old(tod[, seg_len, do_slope])

tsVecs(tod, vecs)

Inheritance diagram of minkasi_wrapper.extern.minkasi.minkasi.Cuts, minkasi_wrapper.extern.minkasi.minkasi.CutsCompact, minkasi_wrapper.extern.minkasi.minkasi.HealMap, minkasi_wrapper.extern.minkasi.minkasi.HealPolMap, minkasi_wrapper.extern.minkasi.minkasi.MapNoiseWhite, minkasi_wrapper.extern.minkasi.minkasi.Mapset, minkasi_wrapper.extern.minkasi.minkasi.NoiseBinnedDet, minkasi_wrapper.extern.minkasi.minkasi.NoiseBinnedEig, minkasi_wrapper.extern.minkasi.minkasi.NoiseCMWhite, minkasi_wrapper.extern.minkasi.minkasi.NoiseSmoothedSVD, minkasi_wrapper.extern.minkasi.minkasi.NoiseWhite, minkasi_wrapper.extern.minkasi.minkasi.NoiseWhiteNotch, minkasi_wrapper.extern.minkasi.minkasi.PolMap, minkasi_wrapper.extern.minkasi.minkasi.SkyMap, minkasi_wrapper.extern.minkasi.minkasi.SkyMapCar, minkasi_wrapper.extern.minkasi.minkasi.SkyMapCarOld, minkasi_wrapper.extern.minkasi.minkasi.SkyMapCoarse, minkasi_wrapper.extern.minkasi.minkasi.SkyMapTwoRes, minkasi_wrapper.extern.minkasi.minkasi.Tod, minkasi_wrapper.extern.minkasi.minkasi.TodVec, minkasi_wrapper.extern.minkasi.minkasi.detOffset, minkasi_wrapper.extern.minkasi.minkasi.null_precon, minkasi_wrapper.extern.minkasi.minkasi.tsAirmass, minkasi_wrapper.extern.minkasi.minkasi.tsBinnedAz, minkasi_wrapper.extern.minkasi.minkasi.tsBinnedAzShared, minkasi_wrapper.extern.minkasi.minkasi.tsCalib, minkasi_wrapper.extern.minkasi.minkasi.tsCommon, minkasi_wrapper.extern.minkasi.minkasi.tsDetAz, minkasi_wrapper.extern.minkasi.minkasi.tsGeneric, minkasi_wrapper.extern.minkasi.minkasi.tsModel, minkasi_wrapper.extern.minkasi.minkasi.tsMultiModel, minkasi_wrapper.extern.minkasi.minkasi.tsNotch, minkasi_wrapper.extern.minkasi.minkasi.tsPoly, minkasi_wrapper.extern.minkasi.minkasi.tsStripes, minkasi_wrapper.extern.minkasi.minkasi.tsStripes_old, minkasi_wrapper.extern.minkasi.minkasi.tsVecs

Index