Galfit related plots¶
- utilities.plotUtilities.display_hst_models(file1, fileout='test.pdf', title=None, cmap='spectral', log=False, show=False)[source]¶
Code author: Epinat Benoit - LAM <benoit.epinat@lam.fr> & Wilfried Mercier - IRAP <wilfried.mercier@irap.omp.eu>
This function enables to display a GALFIT output file containing the galaxy image, the associated model and the residuals.
- Parameters
file1 (str) – name of GALFIT output file
cmap (str) – (Optional) name of the colormap. Must be understood by matplotlib.
fileout (str) – (Optional) name of the output file
log (bool) – (Optional) whether to have a log scale or not
show (bool) – (Optional) whether to show the image or not
title (str) – (Optional) title of the output image
- Raises
TypeError –
if title is neither None, nor of type str
if fileout is not of type str
if cmap is not of type str
if log is not of type bool
if show is not of type bool
- utilities.plotUtilities.genMeThatPDF(fnamesList, pdfOut, readFromFile=False, groupNumbers=None, log=True, diverging=False, zeroPoint=0.0, cmap='bwr')[source]¶
Code author: Wilfried Mercier - IRAP <wilfried.mercier@irap.omp.eu>
Generate a pdf file with all the GALFIT images (data, model and residual) side by side.
Note
When certain problems arise, a default blank plot is drawn instead. Below is a list of issues where a blank plot may be generated
if a file is not found
if the min and max of an image are equal
- Parameters
fnamesList (list[str]) – all the file names (paths included) with the GALFIT images. If readFromFile is True, provide the name of a file containing all the different names (one per line).
pdfOut (str) – name of the output pdf file
diverging (bool) – (Optional) whether to use a diverging norm or not. If False, a linear norm will be used (overriding any log norm).
cmap (str) – (Optional) colormap to use for the plot
groupNumbers (list[str]) – (Optional) list of groups the galaxies belong to
log (bool) – (Optional) whether to show images as log or not
readFromFile (bool) – (Optional) whether to read the file names from a file or not. If True, the names must be listed one per line.
zeroPoint (float) – (Optional) value at which the diverging norm will split in two