healpy.fitsfunc.write_map

healpy.fitsfunc.write_map(filename, m, nest=False, dtype=<type 'numpy.float32'>, fits_IDL=True, coord=None, partial=False, column_names=None, column_units=None, extra_header=())

Writes an healpix map into an healpix file.

Parameters:

filename : str

the fits file name

m : array or sequence of 3 arrays

the map to write. Possibly a sequence of 3 maps of same size. They will be considered as I, Q, U maps. Supports masked maps, see the ma function.

nest : bool, optional

If True, ordering scheme is assumed to be NESTED, otherwise, RING. Default: RING. The map ordering is not modified by this function, the input map array should already be in the desired ordering (run ud_grade beforehand).

fits_IDL : bool, optional

If True, reshapes columns in rows of 1024, otherwise all the data will go in one column. Default: True

coord : str

The coordinate system, typically ‘E’ for Ecliptic, ‘G’ for Galactic or ‘C’ for Celestial (equatorial)

partial : bool, optional

If True, fits file is written as a partial-sky file with explicit indexing. Otherwise, implicit indexing is used. Default: False.

column_names : str or list

Column name or list of column names, if None we use: I_STOKES for 1 component, I/Q/U_STOKES for 3 components, II, IQ, IU, QQ, QU, UU for 6 components, COLUMN_0, COLUMN_1... otherwise

column_units : str or list

Units for each column, or same units for all columns.

extra_header : list

Extra records to add to FITS header.

dtype: np.dtype or list of np.dtypes, optional

The datatype in which the columns will be stored. Will be converted internally from the numpy datatype to the fits convention. If a list, the length must correspond to the number of map arrays. Default: np.float32.