Utils (sitelle.utils)

Introduction

Miscellaneous functions, some of them are deprecated

Reference/API

sitelle.utils Module

Module grouping a bunch of utility functions used throughout the package.

Functions

estimate_noise(full_axis, full_spectrum, …) Estimates the noise in an integrated spectra from sitelle, by measuring it outside of the filter range.
gen_wavelength_header(h, axis[, ax_num]) Generates a FITS wavelength header in Ansgtroms
read_wavelength_axis(header, axis) Generates the right wavelength axis from a FITS header
rebin(map, binsize, type) Method used to rebin a map.
regular_wl_axis(axis[, xlims]) Converts a wavenumber axis ([cm-1]) into a regular (==equally spaced) wavelength axis ([Angstroms])
wavelength_regrid(cube, rebinned, …[, header]) Interpolation of a 3D datacube on a regular wavelength axis.
nm_to_cm1(spectrum, nm_axis, out_axis) Interpolates a spectrum from a wavelength axis to a wavenulber axis
swap_header_axis(h, a0, a1) Swaps header keywords between dimensions.
filter_star_list(_star_list) Very basic filter to remove stars position which are out of the image.
measure_dist(pos1, pos2) Measure the distance (norm 2) between two positions, in units of the position.
get_star_list(star_list_deg, im, hdr, dxmap, …) Computes the pixel positions of a list of positions in degrees.
stats_without_lines(spec, cube_axis, lines, …) Computes statistics on a spectrum when region around lines are excluded.