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

Class PlottingSession

source code


Plotting environment for data and models of circumstellar shells.

Instance Methods [hide private]
 
__init__(self, star_name='model', inputfilename=None, path='', code='GASTRoNOoM', fn_add_star=1)
Initializing an instance of PlottingSession.
source code
list[string]
checkChangedPars(self, star_grid)
Check which parameters change throughout the modeling in the mutable list.
source code
list[string]
makeModelList(self, star_grid, id_type)
Return a list of model id's in the star_grid.
source code
str
setFnPlt(self, fn_plt, fn_suffix='', fn_subfolder='')
Create a plot filename.
source code

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', inputfilename=None, path='', code='GASTRoNOoM', fn_add_star=1)
(Constructor)

source code 

Initializing an instance of PlottingSession.

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 (string) - Output modeling folder in code 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)

  • code (string) - the modeling code

    (default: GASTRoNOoM)

  • 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)

Overrides: object.__init__

checkChangedPars(self, star_grid)

source code 

Check which parameters change throughout the modeling in the mutable list.

Parameters:
  • star_grid (list[Star()]) - The parameter sets
Returns: list[string]
parameters in the mutable list that change

makeModelList(self, star_grid, id_type)

source code 

Return a list of model id's in the star_grid.

Parameters:
  • star_grid (list[Star()]) - The parameter sets
  • id_type (string) - the type of model id (MCMAX or GASTRONOOM or PACS)
Returns: list[string]
the model_ids

setFnPlt(self, fn_plt, fn_suffix='', fn_subfolder='')

source code 

Create a plot filename. The base filename (fn_plt) defines which of 3 cases is requested:

1) path is given, and the object has fn_add_star set to 1. 2) path is given, and the object has fn_add_star set to 0. 3) path is not given, in which case the star name is never added (it is included in the default folder name)

In all cases, a base filename must be given, and a suffix can be defined in addition.

Returns empty string if fn_plt is not defined or empty.

Parameters:
  • fn_plt (string) - A plot filename that can be given to each plotting sub method, or through the cfg file (managed by the sub method). If not given, each sub method defines a default. This includes the path if required.
  • fn_suffix (str) - An optional suffix to be appended to the filename

    (default: '')

  • fn_subfolder (str) - An additional subfolder in the default self.pplot can be added. Not used when path is included in fn_plt.

    (default: '')

Returns: str
The full path + filename without extension is returned.