Package ComboCode :: Package cc :: Package plotting :: Package objects :: Module PlotDust :: Class PlotDust
[hide private]
[frames] | no frames]

Class PlotDust

source code


Plotting environment for SEDs and all dust parameters.

Instance Methods [hide private]
 
__init__(self, star_name='model', sed=None, path_mcmax='', inputfilename=None, fn_add_star=0)
Initializing PlotDust session.
source code
 
plotSed(self, star_grid=[], fn_plt='', cfg='', iterative=0, no_models=0, show_phot_filter=0, **kwargs)
Creating an SED with 0, 1 or more models and data.
source code
 
plotCorrflux(self, star_grid=[], fn_plt='', cfg='', no_models=0)
Plot correlated fluxes with 0, 1 or more models and data.
source code
 
plotVisibilities(self, star_grid=[], fn_plt='', cfg='', no_models=0)
Plot visibilities as a function of baseline.
source code
 
plotDensMeixner(self, star_grid=[], fn_plt='', cfg='', **kwargs)
A 2D color-scale plot to visualize the density structure of the Meixner model.
source code
 
plotDens(self, star_grid=[], models=[], fn_plt='', unit='cm', cfg='')
Plotting the temperature stratification of the dust.
source code
 
plotTemp(self, star_grid=[], models=[], fn_plt='', power=[], unit='cm', cfg='')
Plotting the temperature stratification of the dust.
source code
 
plotTempSpecies(self, star_grid=[], models=[], fn_plt='', include_total=1, unit='cm', power=[], cfg='')
Plotting the temperature stratification of the dust for the species separately, per model.
source code
 
plotOpacities(self, star_grid=[], fn_plt='', scaling=0, species=['AMC'], cfg='', index=0, *args, **kwargs)
Plotting wavelength dependent mass extinction coefficients (ie opacities).
source code
 
plotExtinction(self, star_grid=[], models=[], fn_plt='', plot_default=1, cfg='')
Plotting wavelength dependent extinction efficiencies wrt grain size.
source code
list(Star())
makeMCMaxStars(self, models)
Set parameters for star_list taken from the MCMax database.
source code

Inherited from cc.plotting.objects.PlottingSession.PlottingSession: checkChangedPars, makeModelList, setFnPlt

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, star_name='model', sed=None, path_mcmax='', inputfilename=None, fn_add_star=0)
(Constructor)

source code 

Initializing PlotDust session.

Parameters:
  • star_name (string) - name of the star from Star.dat, use default only when never using any star model specific things

    (default: "model")

  • path_mcmax (string) - Output modeling folder in MCMax home folder

    (default: '')

  • inputfilename (string) - name of inputfile that is also copied to the output folder of the plots, if None nothing is copied

    (default: None)

  • sed (Sed()) - an Sed object needed for plotting the SED. None if not plotting an Sed, but just dust parameters such as temperature

    (default: None)

  • fn_add_star (bool) - Add the star name to the requested plot filename. Only relevant if fn_plt is given in a sub method.

    (default: 0)

Overrides: object.__init__

plotSed(self, star_grid=[], fn_plt='', cfg='', iterative=0, no_models=0, show_phot_filter=0, **kwargs)

source code 

Creating an SED with 0, 1 or more models and data.

Includes data preparation on the spot.

Additional plotCols keywords can be passed through kwargs. They overwrite cfg input.

Parameters:
  • star_grid (list[Star()]) - list of Star() models to plot. If star_grid is [], only data are plotted.

    (default: [])

  • fn_plt (string) - A base plot filename. Includes folder. If not, a default is added

    (default: '')

  • cfg (string) - path to the Plotting2.plotCols config file. If default, the hard-coded default plotting options are used.

    (default: '')

  • iterative (int) - add an extra suffix to the filename for each iteratively calculated model, with this number giving the model muber (index in star_grid), 0 if not used.

    (default: 0)

  • no_models (bool) - Only show data.

    (default: 0)

  • show_phot_filter (bool) - Show the wavelength band of the photometric filters as an x error bar on the model phot

    (default: 0)

plotCorrflux(self, star_grid=[], fn_plt='', cfg='', no_models=0)

source code 

Plot correlated fluxes with 0, 1 or more models and data.

Includes data preparation on the spot.

Parameters:
  • star_grid (list[Star()]) - list of Star() models to plot. If star_grid is [], only data are plotted.

    (default: [])

  • fn_plt (string) - A base plot filename. Includes folder. If not, a default is added

    (default: '')

  • cfg (string) - path to the Plotting2.plotCols config file. If default, the hard-coded default plotting options are used.

    (default: '')

  • no_models (bool) - Only show data.

    (default: 0)

plotVisibilities(self, star_grid=[], fn_plt='', cfg='', no_models=0)

source code 

Plot visibilities as a function of baseline.

Wavelengths plotted are what is requested in the ray tracing

Includes data preparation on the spot.

Data location is that of correlated flux (for the visibilities), but also requires an sed object to retrieve the MIDI spectrum. If one of them is not available, models are be plotted without data.

Parameters:
  • star_grid (list[Star()]) - list of Star() models to plot. If star_grid is [], only data are plotted.

    (default: [])

  • fn_plt (string) - A base plot filename. Includes folder. If not, a default is added

    (default: '')

  • cfg (string) - path to the Plotting2.plotCols config file. If default, the hard-coded default plotting options are used.

    (default: '')

  • no_models (bool) - Only show data.

    (default: 0)

  • fn_add_star (bool) - Add the star name to the requested plot filename.

    (default: 1)

plotDensMeixner(self, star_grid=[], fn_plt='', cfg='', **kwargs)

source code 

A 2D color-scale plot to visualize the density structure of the Meixner model. Requires the Star()[DENSTYPE] to be Meixner.

The method used for plotting is available in cc.plotting.PlotMeixner.py and can be used standalone. It is called by this method as well, prepping the star_grid information to be used with PlotMeixner.

Alternatively, if star_grid is not defined, you can also pass the plotting input for PlotMeixner.plot() through this method. args is only passed to the plotDens method in this case.

For now the density is plotted in cgs with respect to cm. The density is normalized to the maximum density in the grid. (rho=rho/rho_max)

Parameters:
  • star_grid (list[Star()]) - parameter sets, if [], the parameter sets are determined from the model ids

    (default: [])

  • fn_plt (string) - A base plot filename. Includes folder. If not, a default is added

    (default: '')

  • cfg (string) - Path to config file for this method. PlotMeixner.plotDens settings can be changed in cfg. Can be used to update the kwargs in case the density grid has to be adapted compared to what the star_grid indicates or what the kwargs contain. Give fn_plt as filename in cfg.

    (default: '')

plotDens(self, star_grid=[], models=[], fn_plt='', unit='cm', cfg='')

source code 

Plotting the temperature stratification of the dust.

All models are shown in one plot.

Parameters:
  • star_grid (list[Star()]) - parameter sets, if [], the parameter sets are determined from the model ids

    (default: [])

  • models (list[string]) - The model_ids, if [], the parameter sets are expected in star_grid

    (default: [])

  • fn_plt (string) - A base plot filename. Includes folder. If not, a default is added

    (default: '')

  • unit (str) - The unit of the plotted radial grid. Can be 'cm','rstar', 'au', 'm'

    (default: 'cm')

  • cfg (string) - path to the Plotting2.plotCols config file. If default, the hard-coded default plotting options are used.

    (default: '')

plotTemp(self, star_grid=[], models=[], fn_plt='', power=[], unit='cm', cfg='')

source code 

Plotting the temperature stratification of the dust.

All models are shown in one plot.

Parameters:
  • star_grid (list[Star()]) - parameter sets, if [], the parameter sets are determined from the model ids

    (default: [])

  • models (list[string]) - The model_ids, if [], the parameter sets are expected in star_grid

    (default: [])

  • fn_plt (string) - A base plot filename. Includes folder. If not, a default is added

    (default: '')

  • power (list) - A list of values for s in below formula. If [] no power law is included. Power law parameters are taken from star_grid[0].

    See Thesis p32, where power is s in T(r) = T_eff*(2*r/R_STAR)**(-2/(4+s)). This value is typically 1.

    (default: [])

  • unit (str) - The unit of the plotted radial grid. Can be 'cm','rstar', 'au', 'm'

    (default: 'cm')

  • cfg (string) - path to the Plotting2.plotCols config file. If default, the hard-coded default plotting options are used.

    (default: '')

plotTempSpecies(self, star_grid=[], models=[], fn_plt='', include_total=1, unit='cm', power=[], cfg='')

source code 

Plotting the temperature stratification of the dust for the species separately, per model.

Parameters:
  • star_grid (list[Star()]) - parameter sets, if [], the parameter sets are determined from the model ids

    (default: [])

  • models (list[string]) - The model_ids, if [], the parameter sets are expected in star_grid

    (default: [])

  • fn_plt (string) - A base plot filename. Includes folder. If not, a default is added

    (default: '')

  • include_total (bool) - Include the sum of all temperature profiles as well for comparison.

    (default: 0)

  • unit (str) - The unit of the plotted radial grid. Can be 'cm','rstar', 'au', 'm'

    (default: 'cm')

  • power (list) - A list of values for s in below formula. If [] no power law is included. Power law parameters are taken from star_grid[0].

    See Thesis p32, where power is s in T(r) = T_eff*(2*r/R_STAR)**(-2/(4+s)). This value is typically 1.

    (default: [])

  • cfg (string) - path to the Plotting2.plotCols config file. If default, the hard-coded default plotting options are used.

    (default: '')

plotOpacities(self, star_grid=[], fn_plt='', scaling=0, species=['AMC'], cfg='', index=0, *args, **kwargs)

source code 

Plotting wavelength dependent mass extinction coefficients (ie opacities).

If based on star_grid or modelslist, they are scaled with abundances if wanted.

If no model info is given, the input opacities are plotted.

Args and kwargs can be given straight to the plot command.

Parameters:
  • star_grid (list(Star())) - The input Star() models. If default, the MCMax input opacities are plotted.

    (default: [])

  • fn_plt (string) - A base plot filename. Includes folder. If not, a default is added

    (default: '')

  • scaling (bool) - allow species abundance scaling of opacities

    (default: 0)

  • species (list(string)) - If no star_grid or model list are given, this gives the species requested to be plotted from Dust.dat

    (default: ['AMC'])

  • cfg (string) - path to the Plotting2.plotCols config file. If default, the hard-coded default plotting options are used.

    (default: '')

  • index (int) - The index of the kappas in the .opacity/.particle file. 0: extinction, 1: absorption, 2: scattering. Only relevant when plotting without Star() models.

    (default: 0)

plotExtinction(self, star_grid=[], models=[], fn_plt='', plot_default=1, cfg='')

source code 

Plotting wavelength dependent extinction efficiencies wrt grain size.

This always depends on a star_grid or one created from a list of MCMax model ids.

Plotted are the total efficiencies, including relative weights between the included dust species. This is the input for GASTRoNOoM!

Parameters:
  • star_grid (list[Star()]) - List of Star() instances. If default, model ids have to be given.

    (default: [])

  • models (list[string]) - The model ids, only required if star_grid is []

    (default: [])

  • fn_plt (string) - A base plot filename. Includes folder. If not, a default is added

    (default: '')

  • cfg (string) - path to the Plotting2.plotCols config file. If default, the hard-coded default plotting options are used.

    (default: '')

makeMCMaxStars(self, models)

source code 

Set parameters for star_list taken from the MCMax database.

Based on the model id of MCMax.

Parameters:
  • models (list(string)) - model_ids for the MCMax db
Returns: list(Star())
The model instances