Difference between revisions of "Dinver: dinverext"
(New page: '''dinverext''' is an external plugin for dinver. It implements forward computations for any Inverse problem using an external software that can be launch...) |
|||
(2 intermediate revisions by the same user not shown) | |||
Line 17: | Line 17: | ||
[[Image:Dinverext_target_panel.png|thumb|left|300px|Target panel]] | [[Image:Dinverext_target_panel.png|thumb|left|300px|Target panel]] | ||
− | If this panel does not appear, you can show it with | + | If this panel does not appear, you can show it with [[Dinver: Tools menu|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. | *''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 | + | *''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|''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 == | == Parameters panel == | ||
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 [ | + | *Any other condition type could be implemented on request to [http://www.geopsy.org/forum Geopsy Forum]. |
Latest revision as of 12:18, 11 May 2015
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.
Contents
Invoking dinverext
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
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
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.