Package ComboCode :: Package cc :: Package managers :: Module PlottingManager :: Class PlottingManager
[hide private]
[frames] | no frames]

Class PlottingManager

source code

An interface for managing requested plots for a CC session.

Instance Methods [hide private]
 
__init__(self, star_name, mcmax=False, gastronoom=False, chemistry=False, pacs=None, path_gastronoom='codeJun2010', path_mcmax='codeJun2010', path_chemistry='OutputClumpy', inputfilename='inputComboCode.dat', spire=None, fn_add_star=1, plot_pars={}, sed=None)
Initializing a PlottingManager instance.
source code
 
startPlotting(self, star_grid, iterative=0)
Start plotting PLOT_INPUT requests for those models that are available (i.e.
source code
 
plotTransitions(self, star_grid, force=0, cfg='', fn_suffix='')
Run the plotTransitions method in the PlotGas object of this manager.
source code
Method Details [hide private]

__init__(self, star_name, mcmax=False, gastronoom=False, chemistry=False, pacs=None, path_gastronoom='codeJun2010', path_mcmax='codeJun2010', path_chemistry='OutputClumpy', inputfilename='inputComboCode.dat', spire=None, fn_add_star=1, plot_pars={}, sed=None)
(Constructor)

source code 

Initializing a PlottingManager instance.

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

    (default: "model")

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

    (default: None)

  • mcmax (bool) - Running MCMax?

    (default: 0)

  • gastronoom (bool) - Running GASTRoNOoM?

    (default: 0)

  • path_mcmax (string) - modeling folder in MCMax home

    (default: 'runTest')

  • path_gastronoom (string) - modeling folder in GASTRoNOoM home

    (default: 'runTest')

  • pacs (Pacs()) - A Pacs() object for managing data and model handling for PACS spectra. None if not applicable

    (default: None)

  • spire (Spire()) - A Spire() object for managing data and model handling for SPIRE spectra. None if not applicable

    (default: None)

  • sed (Sed()) - The SED for managing data and model handling for SED spectra/photometry. None if not applicable

    (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: 1)

  • plot_pars (dict) - dictionary with all the plotting parameters that turn on or off plotting modules. By default they are all turned off.

    (default: dict())

startPlotting(self, star_grid, iterative=0)

source code 

Start plotting PLOT_INPUT requests for those models that are available (i.e. gastronoom and/or mcmax).

Parameters:
  • star_grid (list[Star()]) - list of stars to be plotted
  • iterative (int) - if true the old grids are plotted on a model_iteration per model_iteration basis, only works for MCMax models for now.

    (default: 0)

plotTransitions(self, star_grid, force=0, cfg='', fn_suffix='')

source code 

Run the plotTransitions method in the PlotGas object of this manager.

If available, the cfg is taken from the plot input.

Only done if PLOT_GAS_TRANSITIONS is indeed 1 in the CC inputfile. This can be forced through the keyword force.

This method is mainly used if you want to plot a sub selection of models from the main input grid, for instance after statistical selection.

Parameters:
  • star_grid (list[Star()]) - The collection of models to be plotted
  • force (bool) - Plot the transitions regardless of the PLOT_GAS_TRANSITIONS keyword in cc input, e.g. when the manager is ran outside a cc session.

    (default: 0)

  • cfg (string) - The config file. If not given, the manager checks if a cfg file is available in the CC input.

    (default: None)

  • fn_suffix (string) - A suffix that is appended to the filename. For instance, when running the plot command for a best fit subgrid of Star() models as to not overwrite the plot of the full grid.

    (default: '')