| Previous: Creating dialogs and notebooks | Up: Index |

Description of classes

Only classes, methods and variables which should be used by other modules or applications are listed. Use the sources for additional information.
module SciParam.parameter:

classSciParam: Base class for scientific parameter.
 name Name of parameter.
 description Description of parameter or emtpy string.
 unit Unit of parameter or empty string.
 default Default value of parameter or None.
 value Current value of parameter or None.
 comment Comment about current parameter or empty string.
 required Required flag: 0 or 1.
 notunknown 'unknown' is a disallowed value: 0 or 1.
 unknown List of values which will be considered equivalent to status "unknown".

 def__init__(self, Create a SciParam object.
 name, Set name from string.
 description=None, Set description from string.
 unit=None, Set unit from string.
 default=None, Set default from string or from the same type as value is.
 value=None, Set value from string or from native type.
 comment=None, Set comment from string.
 required=0, Set required flag to 0 or 1.
 notunknown=0) Set notunknown flag to 0 or 1.

 defisvalid(self, Are values valid (or unknown) for this parameter?
 *args) No argument: use value of current parameter; one argument: use this value; more arguments: currently not implemented.

 defisusual(self, Are values usual (or unknown) for this parameter?
 *args) No argument: use value of current parameter; one argument: use this value; more arguments: currently not implemented.

 defisunknown(self, Are values unknown?
 *args) No argument: use value of current parameter; one argument: use this value; more arguments: currently not implemented.

 defrange(self) Return a string telling what kind of value is expected

 defconvert(self, Convert string or number to internal representation (value or None); Return internal representation or raise ValueError.
 value) Value to convert.

 defstring(self, Convert internal representation to string; return "unknown" if value is in unknown.
 value) Value to convert.

 defnormalize(self, Convert string to normalized string; return either a string that is valid for convert() or default.
 value, Value to convert.
 default=None) Default to return if value is invalid.

 def__str__(self) Implements «str(parameter)»; return the string representation of the current value.

classFloatParam(SciParam): Float values with warning and error range.
Internal representation is: float or None
 wrange Warning range object: values in this range are usual.
 erange Error range object: values in this range are valid.

 def__init__(self, Create a FloatParam object.
 name, Set name from string.
 description=None, Set description from string.
 unit=None, Set unit from string.
 default=None, Set default from string or from the same type as value is.
 value=None, Set value from string or from native type.
 comment=None, Set comment from string.
 required=0, Set required flag to 0 or 1.
 notunknown=0, Set notunknown flag to 0 or 1.
 wrange=None, Set wrange from string or range object.
 erange=None) Set erange from string or range object.

classDistParam(FloatParam): Float values with warning/error range and optional distribution.
Internal representation is: (float, dist) or None
String representation is: "float" or "float;distvalue/disttype"
 dist Distribution object: distribution of this value.

 def__init__(self, Create a DistParam object.
 name, Set name from string.
 description=None, Set description from string.
 unit=None, Set unit from string.
 default=None, Set default from string or from the same type as value is.
 value=None, Set value from string or from native type.
 comment=None, Set comment from string.
 required=0, Set required flag to 0 or 1.
 notunknown=0, Set notunknown flag to 0 or 1.
 wrange=None, Set wrange from string or range object.
 erange=None, Set erange from string or range object.
 dist=None) Set distribution from string or distribution object.

classIntParam(FloatParam): Long integer values with warning and error range.
Internal representation is: long int or None
 def__init__(self, Create a IntParam object.
 name, Set name from string.
 description=None, Set description from string.
 unit=None, Set unit from string.
 default=None, Set default from string or from the same type as value is.
 value=None, Set value from string or from native type.
 comment=None, Set comment from string.
 required=0, Set required flag to 0 or 1.
 notunknown=0, Set notunknown flag to 0 or 1.
 wrange=None, Set wrange from string or range object.
 erange=None) Set erange from string or range object.

classStringParam(SciParam): String values.
Internal representation is: string or None
 def__init__(self, Create a StringParam object.
 name, Set name from string.
 description=None, Set description from string.
 unit=None, Set unit from string.
 default=None, Set default from string or from the same type as value is.
 value=None, Set value from string or from native type.
 comment=None, Set comment from string.
 required=0, Set required flag to 0 or 1.
 notunknown=0) Set notunknown flag to 0 or 1.

classChoiceParam(SciParam): Values from a list of choices.
Internal representation is: (choice string, choice value)
 choices List of 2-tuples (choice string, choice value).
 long If 1: state that this will be a long list of choices.
 unknown_yes_no Predefined choice list [("unknown", None), ("Yes", 1), ("No", 0)]
 yes_no Predefined choice list [("Yes", 1), ("No", 0)]

 def__init__(self, Create a ChoiceParam object.
 name, Set name from string.
 description=None, Set description from string.
 unit=None, Set unit from string.
 default=None, Set default from string or from the same type as value is.
 value=None, Set value from choice or value.
 comment=None, Set comment from string.
 required=0, Set required flag to 0 or 1.
 notunknown=0, Set notunknown flag to 0 or 1.
 choices=unknown_yes_no, Set choices from list of strings or list of 2-tuples (string, value).
 long=0) Set long flag to 0 or 1.


module SciParam.range:

classRange: Mathematical range.
 def__init__(self, Create a Range object. Returns a range ]-oo;oo[ if no value is given.
 range=None) Range can be specified as a string in scientific notation, e.g. ]-oo;1.2E5] for a range from minus infinity upto and including 120000, or as another range object.

 defSetRange(self, Set range from string or another Range object.
 range) Range can be specified as a string in scientific notation, e.g. ]-oo;1.2E5] for a range from minus infinity upto and including 120000, or as another range object.

 defGetRange(self) Return range in internal representation: 4-tuple ('[' or ']', begin(float), end(float), '[' or ']').

 deffloat(self, Convert a string to float. 'oo' will be infinity, '-oo' will be minus infinity.
 string) String to convert to float.

 def__contains__(self, Implements «float in range».
 value) String to be converted.

 def__eq__(self, Implements «range == range».
 other) Range to be compared with.

 def__ne__(self, Implements «range != range».
 other) Range to be compared with.

 def__str__(self) Implements «str(range)»; return the string from which range was instanciated.


module SciParam.distribution:

classDistribution: Mathematical distribution.
 value Parameter of distribution: max. value for uniform, std. deviation for normal/log-normal.
 type Type of distribution: none/normal/log-normal/uniform.
 types List of distribution types.
 none The 'none' distribution type.
 parameter Dictionary mapping type string to 2-tuple with meaning of (float value, distribution value).

 def__init__(self, Create a Distribution object. Returns a distribution of type 'none' if no value is given.
 value=None, Parameter of distribution: It can be a Float or a Distribution object (also sets type) or a string "value/type" or a 2-tuple (value, type).
 type=None) Type of distribution.

 def__str__(self) Implements «str(distribution)»; return a string "value/type".


module SciParam.control:

classParameterDialog(wxDialog): Dialog with parameter controls and details box.
 def__init__(self, Create a ParameterDialog object.
 parent, Can be NULL, a frame or another dialog box.
 id, An identifier for the dialog. A value of -1 is taken to mean a default.
 title, The title of the dialog.
 parameter, A list of SciParam objects.
 columns=1, The number of columns.
 pos=wxDefaultPosition, The dialog position.
 size=wxDefaultSize, The dialog size.
 style=wxDEFAULT_DIALOG_STYLE
| wxSYSTEM_MENU
| wxRESIZE_BORDER,
 show_comment=true) Show the comment entry field.


module SciParam.notebook:

classParameterNotebookDialog(ParameterDialog): Dialog with a notebook containing parameter controls and details box.
 def__init__(self, Create a ParameterNotebookDialog object.
 parent, Can be NULL, a frame or another dialog box.
 id, An identifier for the dialog. A value of -1 is taken to mean a default.
 title, The title of the dialog.
 parameter, A list of SciParam objects.
 columns=1, The number of columns.
 pos=wxDefaultPosition, The dialog position.
 size=wxDefaultSize, The dialog size.
 style=wxDEFAULT_DIALOG_STYLE
| wxSYSTEM_MENU
| wxRESIZE_BORDER,
The window style.
 show_comment=true) Show the comment entry field.


| Previous: Creating dialogs and notebooks | Up: Index |