jwspecfit.lines
Emission-line database and line-list helpers.
Functions
|
Return default line names for a given grating. |
|
Filter lines to those observable in the wavelength range. |
|
Return observed wavelength in Angstroms for a line at redshift z. |
|
Return observed wavelength in microns for a line at redshift z. |
|
Return rest wavelength in Angstroms for a line name. |
|
Print the available emission/absorption lines in |
- jwspecfit.lines.get_line_list(grating='prism')[source]
Return default line names for a given grating.
For prism (R ~ 30–300), merged doublet entries are used for pairs that cannot be resolved. For medium and high-resolution gratings (R ≥ 1000), individual doublet components are returned.
The user can always override by passing an explicit
lines=argument tofit_lines().
- jwspecfit.lines.observable_lines(line_names, z, wave_min_um, wave_max_um, *, margin_sigma=3.0, sigma_um=0.005)[source]
Filter lines to those observable in the wavelength range.
- Parameters:
line_names (list of str) – Candidate line names (keys of
REST_LINES_A).z (float) – Source redshift.
wave_min_um (float) – Observed wavelength range in microns.
wave_max_um (float) – Observed wavelength range in microns.
margin_sigma (float) – Number of sigma margin from the edges.
sigma_um (float) – Approximate line width in microns (for margin calculation).
- Returns:
Lines whose observed wavelength falls within the range.
- Return type:
- jwspecfit.lines.observed_wave_A(name, z)[source]
Return observed wavelength in Angstroms for a line at redshift z.
- jwspecfit.lines.observed_wave_um(name, z)[source]
Return observed wavelength in microns for a line at redshift z.
- jwspecfit.lines.show_lines(*, rest_min_A=None, rest_max_A=None, search=None)[source]
Print the available emission/absorption lines in
REST_LINES_A.The printed names are the keys you can pass to the
lines=oradd_lines=arguments ofplot_spectrum_interactive()(and to the fitter), grouped by wavelength region.- Parameters:
- Return type:
Examples
>>> import jwspecfit >>> jwspecfit.show_lines(rest_min_A=4000, rest_max_A=5100) >>> jwspecfit.show_lines(search="Fe")