Visualization¶
Authors¶
John Weaver <john.weaver.astro@gmail.com>
About¶
Visulization tools to examine output from pca_projection routines.
Regions are defined from the SDSS/MaNGA MPL-6 sample by K. Rowlands (priv. comm.)
Known Issues¶
None
-
pygappy.visualization.get_patches_highmass()[source]¶ Patches for PCA-defined regions calibrated with MPL-6. Suitable for low-z, with Log10(M*) > 10.
Parameters: None – Returns: pca_patches_highmass – Series of patches for high-mass objects. Return type: ndarray
-
pygappy.visualization.get_patches_lowmass()[source]¶ Patches for PCA-defined regions calibrated with MPL-6. Suitable for low-z, with Log10(M*) < 10.
Parameters: None – Returns: pca_patches_lowmass – Series of patches for low-mass objects. Return type: ndarray
-
pygappy.visualization.model(data, wave, pcs, espec, error=None, mean=None, norm=1.0, nshow=3, show_labels=True, ax=None, normalize=False)[source]¶ Plots the output model fit of a PCA analysis.
Parameters: - data (ndarray) – 1D spectrum with ‘float’ type.
- wave (ndarray) – 1D array of wavelengths.
- pcs (ndarray) – 1D array of principal components.
- espec (ndarray) – 2D array of eiegenspectra.
- error (ndarray, optional) – 1D error spectrum. Required for windows to work.
- mean (float, optional) – 1D mean spectrum, required for normgappy pcs.
- norm (float, optional) – Normalization constant, required for normgappy pcs.
- nshow (float, optional) – Number of eigenspectra to plot. Default is ‘3’.
- show_labels (bool, optional) – Turns on/off default x/y labels. Default is ‘True’.
- normalize (bool, optional) – Turns on/off scaling normalization using norm. Default is ‘False’.
- ax (:obj:axes, optional) – Existing ax object to draw on. Default is ‘None’
Returns: - ax (axes-object) – Axes containing the model plot.
- fig (figure-object, optional) – If enabled, figure containing the axes.
-
pygappy.visualization.pc_plane(logmass=1.0, ax=None, monochromatic=False)[source]¶ Returns an ax object with PC1/2 plane patches.
Parameters: - logmass (float, optional) – Log10 stellar mass, used to select suitable region patches. Default is ‘1.’, for low-mass.
- ax (axes-object, optional) – Existing axes object to populate. Default is ‘None’.
- monochromatic (bool, optional) – If enabled, only shows region boundaries, not colors. Default is ‘False’.
Returns: - ax (axes-object) – Axes containing the model plot.
- fig (figure-object, optional) – If enabled, figure containing the axes.