ConfigHelper
- class jdaviz.core.helpers.ConfigHelper(app=None, verbosity='info')[source] [edit on github]
Bases:
glue.core.hub.HubListener
The Base Helper Class. Provides shared abstracted helper methods to the user.
Subclasses should set
_default_configuration
if they are meant to be used with a specific configuration.- Parameters
- app
Application
orNone
The application object, or if
None
, creates a new one based on the default configuration for this helper.- verbosity{‘debug’, ‘info’, ‘warning’, ‘error’}
Verbosity of the application.
- app
Attributes Summary
Returns the fitted model parameters.
Methods Summary
get_model_parameters
([models, model_label, x, y])Convert each parameter of model inside models into a coordinate that maps the model name and parameter name to a
astropy.units.Quantity
object.get_models
([models, model_label, x, y])Loop through all models and output models of the label model_label.
load_data
(data[, parser_reference])Attributes Documentation
- fitted_models
Returns the fitted model parameters.
- Returns
- parametersdict
dict of Quantity arrays, or None.
Methods Documentation
- get_model_parameters(models=None, model_label=None, x=None, y=None)[source] [edit on github]
Convert each parameter of model inside models into a coordinate that maps the model name and parameter name to a
astropy.units.Quantity
object.- Parameters
- modelsdict
A dictionary where the key is a model name and the value is an
astropy.modeling.CompoundModel
object.- model_labelstr
Get model parameters for a particular model by inputting its label.
- xint
The x coordinate of the model spaxels that will be returned from get_models.
- yint
The y coordinate of the model spaxels that will be returned from get_models.
- Returns
- dict
a dictionary of the form {model name: {parameter name: [[
astropy.units.Quantity
]]}} for 3d models or {model name: {parameter name:astropy.units.Quantity
}} where the Quantity object represents the parameter value and unit of one of spaxel models or the 1d models, respectively.
- get_models(models=None, model_label=None, x=None, y=None)[source] [edit on github]
Loop through all models and output models of the label model_label. If x or y is set, return model_labels of those (x, y) coordinates. If x and y are None, print all models regardless of coordinates.
- Parameters
- modelsdict
A dict of models, with the key being the label name and the value being an
astropy.modeling.CompoundModel
object. Defaults tofitted_models
if no parameter is provided.- model_labelstr
The name of the model that will be found and returned. If it equals default, every model present will be returned.
- xint
The x coordinate of the model spaxels that will be returned.
- yint
The y coordinate of the model spaxels that will be returned.
- Returns
- selected_modelsdict
Dictionary of the selected models.
- load_data(data, parser_reference=None, **kwargs)[source] [edit on github]