specdash package¶
Subpackages¶
Submodules¶
specdash.app_layout module¶
specdash.config module¶
specdash.flux module¶
-
specdash.flux.
convert_flux
(flux=[], wavelength=[], from_flux_unit='F_lambda', to_flux_unit='F_lambda', to_wavelength_unit='angstrom')[source]¶
specdash.spectral_lines module¶
specdash.utilities module¶
specdash.viewer module¶
-
class
specdash.viewer.
Viewer
(as_website=False)[source]¶ Bases:
object
Class representing the spectrum viewer object.
-
APP_DATA_KEYS
= ['traces', 'fitted_models', 'selection', 'smoothing_kernel_types', 'fitting_model_types', 'redshift_distributions', 'metadata', 'line_analysis', 'axis_units', 'updates', 'trace_store_mapping', 'zdist_store_mapping']¶
-
add_spectrum_from_file
(file_path, catalog_name, display_name=None, to_wavelength_unit=None, to_flux_unit=None)[source]¶ - Parameters
file_path –
catalog_name –
display_name –
to_wavelength_unit –
to_flux_unit –
-
add_spectrum_from_id
(specid, catalog_name, display_name=None, to_wavelength_unit=None, to_flux_unit=None)[source]¶ - Parameters
specid –
catalog_name –
display_name –
to_wavelength_unit –
to_flux_unit –
-
fit_model
(trace_name, median_filter_width=1, add_fit_substracted_trace=False)[source]¶ - Parameters
trace_name –
median_filter_width –
add_fit_substracted_trace –
-
reset_smoothing
(trace_name)[source]¶ Resets the smoothing previously done on trace :param trace_name: name of trace :return:
-
set_axis_units
(wavelength_unit='angstrom', flux_unit='F_lambda')[source]¶ - Parameters
wavelength_unit –
flux_unit –
-
set_custom_model_fitter
(model, fitter)[source]¶ Sets the instances of a model and fitter in order to perform model fitting on a trace. :param model: model instance :param fitter: fitter instance :return:
-
set_data_selection
(trace_name, selection_indices=[])[source]¶ - Parameters
trace_name –
selection_indices –
-
set_model_fitter
(trace_name, fitting_model='gaussian + linear')[source]¶ Sets the instances of a model and fitter in order to perform model fitting on a trace. :param model: model instance :param fitter: fitter instance :return:
-
set_smoothing_kernel
(kernel='Gaussian', kernel_width=20, custom_array_kernel=None, custom_kernel_function=None, function_array_size=21)[source]¶ Sets the smoothing kernel from several kernel options :param kernel: :param kernel_width: :param custom_array_kernel: :param custom_kernel_function: :param function_array_size: :return:
-
show_jupyter_app
(debug=False, mode='jupyterlab')[source]¶ Opens the Spectrum Viewer inside Jupyter. :param debug: :param mode: :return:
-
smooth_trace
(trace_name, do_substract=False)[source]¶ Smooths a trace after the kernel is set with ‘set_smoothing_kernel’ :param trace_name: name of trace :param do_substract: True if the smoothed trace is substraced from the original trace. False otherwise. :return:
-