Selection of thousand random profile

This forum is dedicated to discuss all problems and suggestions related to the inversion software
nroy1deq
Posts: 17
Joined: Sat Feb 04, 2012 7:08 am

Selection of thousand random profile

Postby nroy1deq » Fri Jul 26, 2019 3:22 pm

gpdcreport run_01.report -gm -n 1000 -m 1.0 | gpprofile -vs > 1000vs.txt

gpdcreport run_01.report -pR 0 -n 1000 -m 1.0 > 1000disp.txt

Will the above two commands provide 1000 random Vs profiles equal to or below a misfit of 1.0 and their corresponding 1000 dispersion curves????

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

Re: Selection of thousand random profile

Postby admin » Fri Aug 23, 2019 8:44 am

If there are less than 1000 models with a misfit below 1, you will get less than 1000 profiles.
It was a bit unclear in the help message from gpdcreport: I fixed it. With '-n 1000', only the first 1000 models will be out. Combined with '-m 1', only the first 1000 models with a misfit less than 1.

There are not randomly picked among all models with a misfit less than 1.

To pick models randomly, it is s bit more complex, at least I can see this method:

Code: Select all

# Get the list of index in .report where misfit is less than 1
gpdcreport your.report -m 1 -pm | awk '!/#/{print $1}' > index
# Pick randomly 1000 indexes in this list
for i in $(gprandom -n 1000 -min 1 -max $(cat index | wc -l)); do
  head -n $(echo $i | awk '{printf("%i\n",$0)}') index | tail -n 1
done > selected_index
# Extract the picks indexes from the report file
cat selected_index | gpdcreport your.report -index

nroy1deq
Posts: 17
Joined: Sat Feb 04, 2012 7:08 am

Re: Selection of thousand random profile

Postby nroy1deq » Fri Sep 06, 2019 8:52 pm

How can I select specified number of profiles between a range of misfit. Say, I want to select 1000 profiles between a misfit range of 0.1 to 0.5. How can I do that ?


Return to “Dinver usage”

Who is online

Users browsing this forum: No registered users and 2 guests