User utilities¶
The following functions/classes provide convenience functionality for users of the library.
Input and Output¶
- glass.save_cls(filename, cls)[source]¶
Save a list of Cls to file.
Uses
numpy.savez()
internally. The filename should therefore have a.npz
suffix, or it will be given one.
- glass.load_cls(filename)[source]¶
Load a list of Cls from file.
Uses
numpy.load()
internally.
- glass.write_catalog(filename, *, ext=None)[source]¶
Write a catalogue into a FITS file.
ext is the optional name of the extension. To be used as a context manager:
# create the catalogue writer with write_catalog("catalog.fits") as out: ... # write catalogue columns RA, DEC, E1, E2, WHT with given arrays out.write(RA=lon, DEC=lat, E1=eps1, E2=e2, WHT=w)
Note
Requires the
fitsio
package.