Difference between revisions of "Dinver: dinverext"

From GeopsyWiki
Jump to navigation Jump to search
Line 41: Line 41:
 
  linear("WritingTime","<",1.5,"SleepingTime",0);
 
  linear("WritingTime","<",1.5,"SleepingTime",0);
 
This means: <math>WritingTime<1.5*SleepingTime+0</math>. The first variable is the left hand-side parameter name, the second variable is the inequality sign ''"<"'' or ''">"'', the third variable is the constant to multiply to the right hand-side parameter, then the right hand-side parameter and finally the constant to add to the right-hand side.  
 
This means: <math>WritingTime<1.5*SleepingTime+0</math>. The first variable is the left hand-side parameter name, the second variable is the inequality sign ''"<"'' or ''">"'', the third variable is the constant to multiply to the right hand-side parameter, then the right hand-side parameter and finally the constant to add to the right-hand side.  
*Any other condition type could be implemented on request to [mailto:bug@geopsy.org bug@geopsy.org]
+
*Any other condition type could be implemented on request to [http://www.geopsy.org/forum Geopsy Forum].

Revision as of 01:19, 7 September 2010

dinverext is an external plugin for dinver. It implements forward computations for any Inverse problem using an external software that can be launched in command line.

Invoking dinverext

Plugin selection at dinver startup

Upon dinver startup, select the External forward computation module by checking the corresponding check box. See Dinver plugins for more details, especially if External forward computation module does not appear by default.

The module selection can be set also directly in the command line invoking dinver:

 dinver -i dinverext

The use of this plugin is mostly common to Generic Dinver interface except the Target and Parameters panels.

Target panel

Target panel

If this panel does not appear, you can show it with Tools menu. It lets you select the information about your forward code. The different text boxes are:

  • Working directory is the path to the external scripts the user wrote for the forward computation. Clicking on the button opens a pop-up menu to interactively select this path.
  • External command is the command line invoking the script of the user that computes the forward model and the misfit between the forward model and the data. Among its input, it should receive the DinverModel variable, a vector of real values containing the model parameters as defined in the Parameters panel. It has to output the variable DinverMisfit, containing the misfit value (real number).

Parameters panel

Parameter panel

If this panel does not appear, you can show it with menu Tools.

It defines the parameters of the forward model. The order of definition sets the order in the DinverModel vector.

Definition of a parameter

A parameter is defined writing the following command in the Parameters panel:

parameter("WritingTime","s",10,3600,"linear",1)

All the parameters should be provided. The two first variables are strings setting the name of the parameter and its unit. The variable name is used to set the conditions, for display purposes but not in the scripting. The vector containing the parameters is DinverModel (see above). The two next variables are the minimum and maximum values that can take the parameter. The fifth parameter is the scale of the parameter grid, either "linear" or "log". The last variable is the precision of the parameter grid. In "linear" scale, the precision is absolute, in "log" scale, the precision is relative. 0 is the default parameter producing 500 bins in the parameter grid. In the example, the parameter "WritingTime" can vary between 10 and 3600 seconds on a linear scale with a precision of 1 second.

Definition of conditions

Conditions between parameters can be set using the following functions in the Parameters panel, after the definition of the parameters:

  • linear is used to define a linear condition, as for example:
linear("WritingTime","<",1.5,"SleepingTime",0);

This means: . The first variable is the left hand-side parameter name, the second variable is the inequality sign "<" or ">", the third variable is the constant to multiply to the right hand-side parameter, then the right hand-side parameter and finally the constant to add to the right-hand side.

  • Any other condition type could be implemented on request to Geopsy Forum.