Page 1 of 1
gphistogram for plotting azimuth vs freq or slowness data from max file
Posted: Sun Dec 27, 2020 5:59 pm
by luigiV
Hi Marc,
I want to ask you, please, how can I plot the azimuth vs frequency or vs slowness data of a max file using Geopsyland. The command line in the documentation isn't accepted, of course, so is there another command or an other way to represent that data?
Thanks
Luigi
Re: gphistogram for plotting azimuth vs freq or slowness data from max file
Posted: Mon Dec 28, 2020 8:36 pm
by admin
Can you send the exact command you typed in the terminal? And the error message in case of an error?
Usually the simplest way is
For azimuth vs slowness, there is no direct way but you can do:
- Edit your.max file and remove everything before "BEGIN DATA", and save it to yourdata.max
- There is a script provided by geopsy-fk available in share/geopsy-fk, called "max2data" that does the same action but it does not work in GeopsyLand because "awk" is not available.
- And finish with:
Code: Select all
cat yourdata.max | gphistogram -x-column 2 -y-column 3 -stdin -x-count 200 # Old .max before 2017
cat yourdata.max | gphistogram -x-column 3 -y-column 4 -stdin -x-count 200 # From 2017
Re: gphistogram for plotting azimuth vs freq or slowness data from max file
Posted: Tue Dec 29, 2020 9:52 am
by luigiV
Hi Marc, thanks.
In documentation I found
awk 'substr($1,1,1)!="#" {print $4, $3}' my.max |\
gphistogram -x-min -0 -x-max 360 -x-count 72 -x-sampling linear \
-y-min 0 -y-max 8 -y-count 100 -y-sampling linear
and the error message is: awk command not found (as you wrote).
the command lines you indicate are decidedly simpler and more intuitive, but difficult to conceive for the user who is not familiar with the syntax of Linux and its adaptation to Geopsyland. If it were possible it would be very useful to update the documentation relating to these practical aspects for the user in Windows environment.
I had thought of solving the azimuth problem by plotting the max file column relative to azimuth with a rose diagram. Is it conceptually wrong or is the result anyway correct, although obviously it is not a function on slowness or frequency?
Finally, I would be grateful if you answered my last post on Dinver topic because it is a problem that I cannot understand and, therefore, to solve.
Thanks
Luigi
p.s. I experimented with your indication with Geopsyland 3.3.4 using the script with a file probably created with version 2.9.0 and I got the following answer
"Reading file 'HRFK.max' ... Old slowness max file (before 2017) Loading: -
Error parsing line '0 10 6.95812 221.915 228.085 0.171483 -25.7196'
Loading: 0 "
So I recreated the file with 3.3.4 and the answer was:
bin $ gphistogram N-HRFK.max -azimuth
Cannot open file 'N-HRFK.max' for reading "
Gphistogram for the default plot (freq vs V) works perfectly showing the plot.
Do you have an answer, please?
--------------------------------------------------------------------------------------
I have one answer: your script is not accepted because the correct form is
gphistogram -azimuth
Enter
Then Geopsyland open a window asking for file name and the plot is correctly showed.
For the plot azimuth vs slowness I have not been able to obtein any result because the new max file with only the data is not read in the expected format:
bin$ gphistogram -x-column 4 -y-column 5
Reading file 'C:/Lavori/2020/vipiteno/FK-SPAC/NW-FK.max'..
Loading: -
-[1ALoading: 7632
Identified a linear scale for
Identified a linear scale for X with minimum step 4.26326e-14...
but the X is the column 8 (power), not the number 4 (slowness).. (1 seconds, 2 frequency, 3 polarization, 4 slowness, 5 azimuth, 6 ellipicity, 7 noise, 8 power, 9 valid) and the process in on hold.
May be I have misunderstood your suggested steps...
Re: gphistogram for plotting azimuth vs freq or slowness data from max file
Posted: Mon Jan 04, 2021 3:06 pm
by admin
Hi Luigi,
If it were possible it would be very useful to update the documentation relating to these practical aspects for the user in Windows environment.
There is a lot of things to do but time is missing. We should organize a sort of workshop like in 2010 to update the documentation.
Azimuth can be a function of velocity or probably better velocity as a function of azimuth. Effectively rose diagrams are more explicit than a 2D plot with an azimuth axis from 0 to 180 or 360 deg.. I had a graphical object to display rose diagrams but it has to be updated to be re-introduced.
Reading file 'HRFK.max' ... Old slowness max file (before 2017) Loading: -
Error parsing line '0 10 6.95812 221.915 228.085 0.171483 -25.7196'
Loading: 0
Can you send me the original HRFK.max file?
bin $ gphistogram N-HRFK.max -azimuth
Cannot open file 'N-HRFK.max' for reading "
It is probably just a question of current directory. Use "pwd" and "cd" to change to the directory containing 'N-HRFK.max' or enter the full path. "C:\" drive can be accessed with "/c/"
bin$ gphistogram -x-column 4 -y-column 5
Sorry, the column numbers are 3 and 4, respectively. I made a mistake. Remove the header before processing.
It does not work as is with branch 3.3. But I tested successfully under branch 3.4 (currently available through git). There is a limitation with branch 3.3 that can be avoided with option '-x-count 200'. However, a minor fix is necessary and it will be available in 3.3.5
Code: Select all
gphistogram -x-column 3 -y-column 4 -x-count 200
Re: gphistogram for plotting azimuth vs freq or slowness data from max file
Posted: Mon Jan 04, 2021 10:22 pm
by luigiV
Hi Marc,
Can you send me the original HRFK.max file?
I attach the file
Thanks
Luigi
Re: gphistogram for plotting azimuth vs freq or slowness data from max file
Posted: Tue Jan 05, 2021 3:17 pm
by admin
Hi Luigi,
I checked it successfully for the next 3.3.5 (and 3.4.0). There are probably minor modifications compared with 3.3.4 that are critical in this case. 3.3.5 will be probably available during next week. Waiting for you eventual return.
Marc
Re: gphistogram for plotting azimuth vs freq or slowness data from max file
Posted: Wed Jan 06, 2021 9:51 am
by luigiV
Hi Marc,
from your words I understand that you have successfully checked the .max file created with the 2.9.0 release with the new 3.5 branch although the parsing is different from what you get with the branches after 3.0. In these, in fact, the slowness is at column 4 and the azimuth at 5, while in the max file I sent you the slowness is at column 3 and the azimuth at 4.
Can I conclude that branch 3.5 is also able to read .max files created with releases prior to 3.0 provided that the x and y columns are correctly indicated in the script (without count limitation)?
Thanks
Luigi
Re: gphistogram for plotting azimuth vs freq or slowness data from max file
Posted: Wed Jan 06, 2021 9:09 pm
by admin
Read version 3.3.5 instead branch 3.5. I'm developing branch 3.4 but branch 3.5 is not yet created.
If you use -x-column and -y-column, effectively you have to adapt the index to the format. If you are using standard plotting ways (no argument, -azimuth,...), gphistogram recognizes the type of max files and adapts itself.