Page 1 of 2

How to save dinver best fitting models as ascii files?

Posted: Fri Feb 24, 2012 2:13 am
by shandou
Hey guys,

I checked previous posts on a similar topic with the usage of gpdcreport command to extract dinver best fitting models from those report files. If I just use "gpdcreport run_01.report -pm", I'll get lines of text on my screen. Could anyone tell me how the gpdcreport output is organized? If I want to extract Vp, Vs and density information, what am I supposed to do?

Thank you very much! :)

Re: How to save dinver best fitting models as ascii files?

Posted: Wed Mar 07, 2012 5:12 pm
by admin
Hi,

Here are a few hints to use gpdcreport

'-pm' gives you the raw parameter values in an order that depends upon your parameterization. '-gm' or no option will export models with four columns, one line per layer: thickness (m), Vp (m/s), Vs (m/s), density (kg/m3). The first line is the total number of layers including the bottom half-space.

To get the best model (with the lowest misfit):

Code: Select all

gpdcreport run_01.report -best 1
See -help comments about option '-best' for details. You can convert this model to a Vp or Vs curve versus depth with:

Code: Select all

gpdcreport run_01.report -best 1 | gprofile -vs

Re: How to save dinver best fitting models as ascii files?

Posted: Tue Mar 13, 2012 8:59 pm
by riccardo
Excuse me but where I have to write the code

gpdcreport run_01.report -best 1

?

Re: How to save dinver best fitting models as ascii files?

Posted: Thu Mar 15, 2012 5:16 am
by admin
In a terminal... under Linux, Mac or by installing MSYS under Windows. You can search this forum about MSYS, there is a post that provide more details about it

Re: How to save dinver best fitting models as text files??

Posted: Mon Apr 09, 2012 12:04 pm
by nroy1deq
respected sir,

i have installed dinver in windows XP os...i want to save best fitting 20 models as a text file...is it possible in dinver???

Re: How to save dinver best fitting models as ascii files?

Posted: Tue Apr 10, 2012 12:08 pm
by admin
Yes, it is

Dinver is directly writing the generated models into a binary file with extension .report. If you saved your dinver environment you certainly found a *_report directory at the same location as your .dinver file. This directory contains all .report files generated during your last session. If you did not save your dinver environment, there is .dinvertemp directory in your home directory ("My documents" or something like that under Windows) which contains the .report files.

As mentioned above in this topic, inside MSYS, run the following command (after "cd" to the correct directory):

gpdcreport run_01.report -best 20 > list_of_20_best_models

Re: How to save dinver best fitting models as ascii files?

Posted: Tue Apr 10, 2012 12:11 pm
by admin
For the details about MSYS and its installation for Geopsy command line tools:
viewtopic.php?t=50

Re: How to save dinver best fitting models as ascii files?

Posted: Wed Apr 11, 2012 9:08 am
by nroy1deq
Sir,
I have installed MSYS..IT is opening like the page that i have attached with this post..I am not being able to go ahed..How to proceed next???

Re: How to save dinver best fitting models as ascii files?

Posted: Wed Apr 11, 2012 2:34 pm
by admin
Just type your commands. This is shell programming. There are a lot of books about it and you can find a lot of information with your favorite search engine.

Re: How to save dinver best fitting models as ascii files?

Posted: Wed Apr 11, 2012 11:03 pm
by nroy1deq
Sir,
I have got the result..sir, i want to know what "9" indicating (in attachment)?? is it showing parameters at 9 different depths.. I think
1st column - Depths
2nd column- p-wave velocity
3rd column-s-wave velocity
4th column- Density
Am i right??? I am little bit confused..about the format of result..how can i reduce the digit after fraction?? One thing i want to know that how can i copy the model parameters into a text files???

Re: How to save dinver best fitting models as ascii files?

Posted: Thu Apr 12, 2012 12:38 am
by admin
1st column - Depths
2nd column- p-wave velocity
3rd column-s-wave velocity
4th column- Density
Am i right???
Yes, you're right

The first line indicates the number of layers including the half-space. More details about the format is provided by

Code: Select all

gpdc -h all
To reduce the number of digits you can use awk utility like this:

Code: Select all

gpdcreportrun_01.report -best 5 | awk '
/^#/{print}
!/^#/{
  if(NF>1) {
    for(i=1;i<=NF;i++) printf("%.2f ", $i);
    printf("\n")
  } else {
    print
  }
}'
To export all output to a text file, you can use redirections ('>'):

Code: Select all

gpdcreportrun_01.report -best 5 > toto.txt

Re: How to save dinver best fitting models as ascii files?

Posted: Sat Apr 14, 2012 4:28 pm
by nroy1deq
Thank you sir...
Another problem i am facing..I have installed full geopsy software..I am not getting gpdc tool...I need this tool for forward computation...Only some limited tool is available...I have attached a screen shot of the tools available...

Re: How to save dinver best fitting models as ascii files?

Posted: Wed Apr 18, 2012 3:10 pm
by admin
gpdc is not a graphic tool. All the available tools are located in C:\Program Files\Geopsy.org\bin (under Windows if you select the default path for installation). The command line tools can be run from a MS-DOS console or better from MSYS. Linux and Mac OS X can run them from any terminal.
The PATH variable must be properly set up as explained at viewtopic.php?t=50.

Re: How to save dinver best fitting models as ascii files?

Posted: Fri May 11, 2012 2:35 pm
by nroy1deq
Respected Sir,
I am using dinver and some problem i am facing..
1.Is it possible to save only target dispersion curve as a image format????
2. regarding one matter i am surprised...if misfit increase no. of model decrease??? i am fully confused..

Re: How to save dinver best fitting models as ascii files?

Posted: Tue Jun 12, 2012 10:44 am
by nroy1deq
I am using dinver...How to know the profiles up to a maximum misfit value of 0.4...please help