Single galaxy analysis#
- class pylick.analysis.Galaxy(ID, index_keys, wave, flux, ferr=None, mask=None, z=None, meas_method='int', bpr_thres=1.0, file_table=None, plot=False, plot_settings={}, verbose=True)#
Class optimized to handle the analysis of a single galaxy.
>>> from pylick.analysis import Galaxy >>> ind_meas = Galaxy(...) >>> print(ind_meas)
- Parameters:
ID (str) – galaxy unique identifier
index_keys (list) – keys of the indices to measure (see
pylick.indices.IndexLibrary).wave (np.ndarray) – wavelength sampling of the spectrum.
flux (np.ndarray) – spectral fluxes corresponding to wave.
ferr (np.ndarray, optional) – spectral fluxes uncertainties. Defaults to None.
mask (np.ndarray, optional) – boolean array flagging bad (True) and good (False) pixels. Defaults to None.
z (float, optional) – if given, wave is assumed to be in the obs. frame and shifted to rest-frame. Defaults to None.
meas_method (str, optional) – method to measure the indices (“int”, “wei”, “exact”). Defaults to “int”.
bpr_thres (float, optional) – bad-to-total pixel ratio above which the measurement is not performed. Defaults to 1.
file_table (str, optional) – path to the file containing the indices definitions. Must be formatted as the default one located at data/file_table.dat.
verbose (bool, optional) – prints warnings and execution time in the console. Defaults to True.
- property errs#
Retrieve indices uncertainties.
- property names#
Retrieve indices names.
- plot(filename=None, settings={})#
Produce the plot with annotated indices (see
pylick.plot.spectrum_with_indices()).- Parameters:
plot (bool, optional) – produce plot file. Defaults to False.
plot_settings (dict, optional) – instructions for the plot code. Defaults to {}.
- Returns:
Figure
- Return type:
Figure
- property vals#
Retrieve indices values.