-
Notifications
You must be signed in to change notification settings - Fork 408
Closed
Labels
feature requestRequest a new featureRequest a new feature
Description
I want to plot the misfit evaluation of a grid made with greenspline in a graph.
gmt greenspline Perfiles?.txt -i0,1,4 -R$R -I$inc -Sc -V -Z1 -Ggsplines.nc -Emisfit.txt 2> misfit_stderr.txt
So, first I use -Emisfit.txt 2> misfit_stderr.txt to save the info of the whole grid into in a file.
Then I use grep:
grep "Misfit evaluation" misfit_stderr.txt
greenspline [INFORMATION]: Misfit evaluation: N = 217 Mean = -7.35372e-15 Std.dev = 3.84514e-14 RMS = 3.90611e-14
With this command I can plot the Mean info (i.e. Mean = -7.35372e-15) in the graph. So far so good.
grep "Misfit evaluation" misfit_stderr.txt | cut -f 2 | gmt text -F+cTL+f9p -Dj0.1c/18p
Issue
My problem is when I want to plot "N = 217" in the graph. With -f 1 doesn't work
grep "Misfit evaluation" misfit_stderr.txt | cut -f 1
greenspline [INFORMATION]: Misfit evaluation: N = 217
Also try:
grep "Misfit evaluation" misfit_stderr.txt | cut -d" " -f5-7
N = 217 Mean
Solution?
So, I think that this could be solve if I add a \t before "N" in the lines 2533 and 2535 of https://github.com/GenericMappingTools/gmt/blob/master/src/greenspline.c
`GMT_Report (API, GMT_MSG_INFORMATION, "Misfit evaluation: N = %u\tMean = %g\tStd.dev = %g\tRMS = %g\n", nm, mean, std, rms);`
Is my solution ok? Should I make a PR?
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
feature requestRequest a new featureRequest a new feature