makeParamPlot(sg,
xpar,
ypar,
expar=[ ] ,
eypar=[ ] ,
xratios=[ ] ,
yratios=[ ] ,
emdot=[ ] ,
exparlog=0,
eyparlog=0,
edists=[ ] ,
mode=' dint ' ,
n_data=0,
extra_mpar=[ ] ,
extra_dpar=[ ] ,
cfg='
' ,
pfn_path='
' ,
add_linear_fit=0,
alf_xmin=None,
alf_xmax=None,
seds=[ ] ,
deredden=0,
**kwargs)
| source code
|
Make a diagnostic plot of either measured line strengths or intrinsic
parameters versus measured line strengths or intrinsic parameters.
Ratios are possible for line strengths. Not for intrinsic
parameters.
Requires preparatory work done for the Pacs() and the Star()
objects.
- Parameters:
sg (list[Star()]) - The stellar models, in which the transitions have been matched
with integrated line strengths. If both models and data are
combined, the data Star() objects are assumed to be listed first.
xpar (string/int) - The parameter on the x-axis. Can be either a string (Star()
keyword), or an index (of the transition in the first object in
the sg list) for line strengths, or a float giving the wavelength
of the continuum point. When looking at line strengths in a combo
mode (cint or ctmb) this means it is the index in the transition
list of the data objects rather than the model objects.
Transitions in objects other than the first 1 can have different
indices. Note the essential difference between floats and
integers!
ypar (string/int) - The parameter on the y-axis. Can be either a string (Star()
keyword), or an index (of the transition in the first object in
the sg list) for line strengths, or a float giving the wavelength
of the continuum point. When looking at line strengths inn a
combo mode (cint or ctmb) this means it is the index in the
transition list of the data objects rather than the model
objects. Transitions in objects other than the first 1 can have
different indices. Note the essential difference between floats
and integers!
xratios (list[int/str]) - If xpar is a line strength or a continuum point, multiple ratios
can be requested to be plotted in succession. Therefore, this
gives the indices (if int, refers to the 1st Star() object in sg)
or 'mdot' (if ratio wrt Mdot) or float (in case of a continuum
wavelength point) for the x-axis ratio.
(default: [])
yratios (list[int/str]) - If ypar is a line strength, multiple ratios can be requested to
be plotted in succession. Therefore, this gives the indices (if
int, refers to the 1st Star() object in sg) or 'mdot' (if ratio
wrt Mdot) or float (in case of a continuum wavelength point) for
the y-axis ratio
(default: [])
emdot (list[float]) - Include errors for the x/yratio quantity if it is mdot. Not used
for error estimation on mdot as a parameter! The mdot errors are
given in log scale.
(default: [])
expar (array) - The error on the x-parameter if it is a Star() key and if mode is
cint or dint. Number of entries in array is equal to the number
of data Star() objects.
(default: [])
eypar (array) - The error on the y-parameter if it is a Star() key and if mode is
cint or dint. Number of entries in array is equal to the number
of data Star() objects.
(default: [])
exparlog (bool) - The xpar error is given in logscale. Only relevant for the d and
c modes.
(default: 0)
eyparlog (bool) - The ypar error is given in logscale. Only relevant for the d and
c modes.
(default: 0)
edists (list[float]) - Include errors for distance estimates of stars here. These
distances are only used to rescale line strengths if they are not
in a ratio.
(default: [])
mode (str) - The mode in which line strengths are selected, ie either from
data or from models. Either 'dint', 'mint', 'mtmb' or 'dtmb'
values. A combination of both is possible by setting this key to
'cint' or 'ctmb'. Then the extra keyword 'n_data' is required,
which indicates how many Star() objects are associated with data.
The method assumes they are the first objects in the list of
Star() objects. In case only continuum wavelengths are requested
(a combination is possible!), only the first letter really
matters.
(default: 'dint')
n_data (int) - The number of data Star() objects, assuming they are the first in
the star_grid. Only required if mode == 'combo'. This number, if
given, must be equal to the number of seds, if given.
(default: 0)
extra_mpar (list[string]) - If extra conditional parameters are requested for models, the
plot is colour coded based on them. For instance, Star() object
keywords can serve as conditionals. Note that these are only
applied when mode == mtmb, mint, cint or ctmb.
(default: [])
extra_dpar (list[string]) - If extra conditional parameters are requested for data, the plot
is colour coded based on them. For instance, Star() object
keywords can serve as conditionals. Note that these are only
applied when mode == dtmb, dint, cint or ctmb.
(default: [])
seds (list[Sed()]) - The SEDs of the data objects. Only used when xpar or ypar is a
float (and thus continuum points are required). The number of
SEDs given must be equal to n_data, or the number of Star()
objects if mode[0] == 'd'. An error is thrown otherwise.
(default: [])
deredden (bool) - Deredden the SEDs before plotting, in case of continuum flux
points. This is never done in case only one data object is given
and reddening is requested in models to avoid double correction.
(default: 0)
cfg (string/dict) - config filename read as a dictionary, can replace any keyword
given to plotCols. Can also be a dictionary itself, in which case
no file is read and the kwargs are updated with the content of
cfg
(default: '')
add_linear_fit (bool) - Add a linear fit to the figures. The fit is done through corrSG
method, of which extra arguments can be given in kwargs.
(xpar_co, ypar_co) Only works in dint or cint mode if xratios or
yratios has len less than 2.
(default: 0)
pfn_path (str) - Output folder for diagnostic plots. Default if to be stored
locally.
(default: '')
alf_xmin (float) - The minimum x value for the linear fit plot, if requested. (This
is not the cut off value for the fitting routine itself!) Has to
be given if a linear fit is requested.
(default: None)
alf_xmax (float) - The maximum x value for the linear fit plot, if requested. (This
is not the cut off value for the fitting routine itself!) Has to
be given if a linear fit is requested.
(default: None)
**kwargs (dict) - extra keywords needed for the linear fit, if requested.
- Returns: str
- The filename of the produced plot is returned.
|