Tools (mpdaf.tools)

Contents:

Reference/API

mpdaf.tools Package

Functions

add_mpdaf_keywords_to_file(path, method, …) Add keywords in a FITS file header to describe the method and the corresponding parameters.
add_mpdaf_method_keywords(header, method, …) Add keywords in a FITS header to describe the method and the corresponding parameters.
broadcast_to_cube(arr, shape) Broadcast an array (image or spectrum to a cube.
chdir(*args, **kwds) Context manager to change the current working directory.
copy_header(srchdr[, dsthdr, exclude, unit]) Copy all keywords from a FITS header to another.
copy_keywords(srchdr, dsthdr, keys) Copy a list of FITS keywords from one header to another.
deprecated(instructions) Flags a method as deprecated.
fix_unit_read(x)
fix_unit_write(x)
is_valid_fits_file(filename) Return True is a file exist and is a valid FITS file (based on its extension).
read_slice_from_fits(filename_or_hdu[, …]) Read data from a FITS file.
table_to_hdu(table) Convert an Table object to a FITS BinTableHDU.
timeit(f) Decorator which prints the execution time of a function.
timer(*args, **kwds) Context manager which prints the execution time.
write_fits_to(filename, data[, overwrite]) Wrapper function for astropy.io.fits.writeto.
write_hdulist_to(hdulist, fileobj[, overwrite]) Wrapper function for astropy.io.fits.HDUList.writeto.
zscale(image[, nsamples, contrast, …])

Classes

LowercaseOrderedDict(*args) Ordered dictonary where all strings keys are case insensitive.
MpdafUnitsWarning
MpdafWarning

Class Inheritance Diagram

Inheritance diagram of mpdaf.tools.util.LowercaseOrderedDict, mpdaf.tools.util.MpdafUnitsWarning, mpdaf.tools.util.MpdafWarning