Dinver: dinverext

From GeopsyWiki
Revision as of 12:18, 11 May 2015 by Marc (talk | contribs) (→‎Target panel)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

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 that computes the misfit between the forward model and the data. Before running the user script dinver creates file parameters (one line per parameter). The type and the number of parameters is defined in the Parameters panel. The user script must create a file misfit which contains a single value, the misfit corresponding to the provided set of of parameters

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.