ModelFitting

class jdaviz.configs.default.ModelFitting(*args, **kwargs)[source] [edit on github]

Bases: jdaviz.core.template_mixin.TemplateMixin

Public constructor

Attributes Summary

add_replace_results

A boolean (True, False) trait.

available_models

An instance of a Python list.

component_models

An instance of a Python list.

cube_fit

A boolean (True, False) trait.

dc_items

An instance of a Python list.

dialog

A boolean (True, False) trait.

display_order

A boolean (True, False) trait.

eq_error

A boolean (True, False) trait.

model_equation

A trait for unicode strings.

model_label

A trait for unicode strings.

poly_order

An int trait.

selected_subset

A trait for unicode strings.

selected_viewer

A trait for unicode strings.

spectral_max

A trait which allows any value.

spectral_min

A trait which allows any value.

spectral_subset_items

An instance of a Python list.

spectral_unit

A trait for unicode strings.

temp_model

A trait for unicode strings.

temp_name

A trait for unicode strings.

template_file

viewer_to_id

viewers

An instance of a Python list.

Methods Summary

vue_add_model(event)

Add the selected model and input string ID to the list of models

vue_data_selected(event)

Callback method for when the user has selected data from the drop down in the front-end.

vue_equation_changed(event)

vue_fit_model_to_cube(*args, **kwargs)

vue_list_subsets(event)

Populate the spectral subset selection dropdown

vue_model_fitting(*args, **kwargs)

Run fitting on the initialized models, fixing any parameters marked as such by the user, then update the displayed parameters with fit values

vue_model_selected(event)

vue_register_spectrum(event)

Add a spectrum to the data collection based on the currently displayed parameters (these could be user input or fit values).

vue_remove_model(event)

Attributes Documentation

add_replace_results

A boolean (True, False) trait.

available_models

An instance of a Python list.

component_models

An instance of a Python list.

cube_fit

A boolean (True, False) trait.

dc_items

An instance of a Python list.

dialog

A boolean (True, False) trait.

display_order

A boolean (True, False) trait.

eq_error

A boolean (True, False) trait.

model_equation

A trait for unicode strings.

model_label

A trait for unicode strings.

poly_order

An int trait.

selected_subset

A trait for unicode strings.

selected_viewer

A trait for unicode strings.

spectral_max

A trait which allows any value.

spectral_min

A trait which allows any value.

spectral_subset_items

An instance of a Python list.

spectral_unit

A trait for unicode strings.

temp_model

A trait for unicode strings.

temp_name

A trait for unicode strings.

template_file = ('/home/docs/checkouts/readthedocs.org/user_builds/jdaviz/envs/v2.1.0/lib/python3.8/site-packages/jdaviz/configs/default/plugins/model_fitting/model_fitting.py', 'model_fitting.vue')
viewer_to_id = {'Center': 'cubeviz-1', 'Left': 'cubeviz-0', 'Right': 'cubeviz-2'}
viewers

An instance of a Python list.

Methods Documentation

vue_add_model(event)[source] [edit on github]

Add the selected model and input string ID to the list of models

vue_data_selected(event)[source] [edit on github]

Callback method for when the user has selected data from the drop down in the front-end. It is here that we actually parse and create a new data object from the selected data. From this data object, unit information is scraped, and the selected spectrum is stored for later use in fitting.

Parameters
eventstr

IPyWidget callback event object. In this case, represents the data label of the data collection object selected by the user.

vue_equation_changed(event)[source] [edit on github]
vue_fit_model_to_cube(*args, **kwargs)[source] [edit on github]
vue_list_subsets(event)[source] [edit on github]

Populate the spectral subset selection dropdown

vue_model_fitting(*args, **kwargs)[source] [edit on github]

Run fitting on the initialized models, fixing any parameters marked as such by the user, then update the displayed parameters with fit values

vue_model_selected(event)[source] [edit on github]
vue_register_spectrum(event)[source] [edit on github]

Add a spectrum to the data collection based on the currently displayed parameters (these could be user input or fit values).

vue_remove_model(event)[source] [edit on github]