gpprofile: mean profile

This forum is dedicated to discuss all problems and suggestions related to the inversion software
Hcadet
Posts: 4
Joined: Thu Jun 05, 2008 11:51 am

gpprofile: mean profile

Postby Hcadet » Tue Jul 07, 2009 7:36 am

Hi,

Using gpprofile it is possible to compute a mean profile from a report file (right?), with a carefully choose file.report.
I would like to know how is it possible to also compute the standard deviation?

Thanks

regards,

Heloise

admin
Site Admin
Posts: 412
Joined: Mon Aug 13, 2007 11:48 am
Location: ISTerre
Contact:

Postby admin » Thu Jul 09, 2009 11:54 am

Hi Heloise,

To produce ground models out of a report, with a misfit less or equal to 1:

Code: Select all

gpdcreport my_run.report -gm -m 1


Then, you can chain this output to gpprofile to extract Vs profiles, for instance:

Code: Select all

gpdcreport my_run.report -gm -m 1 | gprofile -vs


This output a 'ready to plot' curve. For statistic computation, this is not exactly what we want. Instead, I suggest to re-sample the profile, let's say every 1 meter down to 50 meters:

Code: Select all

gpdcreport my_run.report -gm -m 1 | gprofile -vs -resample -d 50 -n 50


Next we compute the statistics over this ensemble of profiles.

Code: Select all

gpdcreport my_run.report -gm -m 1 | gprofile -vs -resample -d 50 -n 50 | grep -v "#" | awk '{print $2,$1}' | gphistogram -y-min 150 -y-max 3500 -x-min 1 -x-max 50 -x-count 50


The grep and awk are mandatory to remove comment lines and to swap first and second columns. gphistogram constructs one histogram per x bin. Hence, if not swapping, you'll obtain one histogram for each velocity rather than for each depth.

Finally, you can extract the mean, median, mode,.. with its deviation thanks to option '-mean', '-median',...

Code: Select all

gpdcreport my_run.report -gm -m 1 | gprofile -vs -resample -d 50 -n 50 | grep -v "#" | awk '{print $2,$1}' | gphistogram -y-min 150 -y-max 3500 -x-min 1 -x-max 50 -x-count 50 -mean

admin
Site Admin
Posts: 412
Joined: Mon Aug 13, 2007 11:48 am
Location: ISTerre
Contact:

Postby admin » Thu Jul 09, 2009 12:03 pm

With latest snapshots (<200907), you will get all value twice out of gpprofile -resample. The next snapshot will be soon available. Meanwhile you can filter out this double values, for instance with the following script:

Code: Select all

gpdcreport my_run.report -gm -m 1 | gprofile -vs -resample -d 50 -n 50 | grep -v "#" | awk 'BEGIN{d=-1}{if($2!=d){print $2,$1;d=$2}' | gphistogram -y-min 150 -y-max 3500 -x-min 1 -x-max 50 -x-count 50 -mean

Hcadet
Posts: 4
Joined: Thu Jun 05, 2008 11:51 am

Postby Hcadet » Fri Jul 10, 2009 8:09 am

Hey Marc!

Thanks a lot!

Heloise

fpinto
Posts: 1
Joined: Fri May 03, 2013 2:15 pm

Re: gpprofile: mean profile

Postby fpinto » Mon May 06, 2013 3:48 pm

Hy Marc,

I am a new user with Dinver and I have been trying to get the mean profile of my inversion.
I have followed the command lines that you indicate here, but i can't use the grep and awk.
I am using Ms-dos and the code works just fine until this part:

Code: Select all
gpdcreport my_run.report -gm -m 1 | gprofile -vs -resample -d 50 -n 50 | grep -v "#" | awk '{print $2,$1}' | gphistogram -y-min 150 -y-max 3500 -x-min 1 -x-max 50 -x-count 50


Should i use another command line instead of Ms-dos? Is Matlab a better one? Or is it a code problem?

Thank you for your time.
Francisco


Return to “Dinver usage”

Who is online

Users browsing this forum: No registered users and 1 guest