plotting subpackage


Metallicity_Stack_Commons.plotting.balmer module


Generates plots illustrating Balmer recombination lines

This code was created from:

Metallicity_Stack_Commons.plotting.balmer.HbHgHd_fits(fitspath, out_pdf_prefix='HbHgHd_fits', use_revised=False, verbose=False, log=<Logger stdout_logger (INFO)>)

Generate PDF plots that illustrate H-delta, H-gamma, and H-beta line profiles and best fit

  • fitspath (str) – Full path

  • out_pdf_prefix (str) – Prefix for output PDF file

  • use_revised (bool) – Indicate whether to use regular or revised tables

  • verbose (bool) – Write verbose message to stdout. Default: file only

  • log (Logger) – logging.Logger object

Metallicity_Stack_Commons.plotting.balmer.extract_fit(astropy_table, line_name, balmer=False, verbose=False, log=<Logger stdout_logger (INFO)>)

Extract best fit from table and fluxes, return a list of fitting parameters and fluxes

  • astropy_table (Table) – Astropy table containing fitting result

  • line_name (str) – Name of Line to extract fit results

  • balmer (bool) – Indicate whether line is a Balmer line

  • verbose (bool) – Write verbose message to stdout. Default: file only

  • log (Logger) – logging.Logger object

Return type



Fitting results

Metallicity_Stack_Commons.plotting.balmer.fitting_result(wave, y_norm, lambda_cen, line_fit, line_fit_neg, flux_gauss, flux_spec, use_revised=False)

Returns fitting results based on inputs of best fit

  • wave (ndarray) – Array of rest-frame wavelengths

  • y_norm (ndarray) – Normalize 1-D spectra in units of 10^-17 erg/s/cm2/AA

  • lambda_cen (float) – Central wavelength in Angstroms

  • line_fit (list) – List containing Balmer emission fits

  • line_fit_neg (list) – List containing the absorption (“stellar”) Balmer fit

  • flux_gauss (float) – Flux from Gaussian model

  • flux_spec (float) – Flux from spectrum (above median)

  • use_revised (bool) – Indicate whether fluxes have been revised. Default: False

Return type



Dictionary of fitting results

Module contents