-
Notifications
You must be signed in to change notification settings - Fork 339
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' of https://github.com/GenericMappingTools/gmt
- Loading branch information
Showing
21 changed files
with
767 additions
and
116 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
#!/usr/bin/env bash | ||
# | ||
# Test grdcut longopts translation. | ||
|
||
m=grdcut | ||
l2s='--l2stranstest' | ||
a=$m-l2s-a.txt | ||
b=$m-l2s-b.txt | ||
rm -f $a $b ; touch $b | ||
|
||
cat << EOF > $a | ||
--l2stranstest -D+t | ||
--l2stranstest -Ex50 -Ey10 | ||
--l2stranstest -F+i+c | ||
--l2stranstest -G/some/file.grd=nf+d2+n-99 | ||
--l2stranstest -G/other/file.grd=nf+o6+s1.5 | ||
--l2stranstest -N-999 | ||
--l2stranstest -S100/20/5+n | ||
--l2stranstest -Z1000/2000+n | ||
--l2stranstest -Z1000/2000+N | ||
--l2stranstest -Z1000/2000+r | ||
EOF | ||
|
||
# module-specific longopts | ||
gmt $m $l2s --dryrun+trailer >> $b | ||
gmt $m $l2s --extract=x:50 --extract=y:10 >> $b | ||
gmt $m $l2s --clip+invert+crop >> $b | ||
gmt $m $l2s --outgrid=/some/file.grd=nf+divide:2+nan:-99 >> $b | ||
gmt $m $l2s --outgrid=/other/file.grd=nf+offset:6+scale:1.5 >> $b | ||
gmt $m $l2s --extend=-999 >> $b | ||
gmt $m $l2s --circ_subregion=100/20/5+set_nan >> $b | ||
gmt $m $l2s --zrange=1000/2000+exclude_nan >> $b | ||
gmt $m $l2s --zrange=1000/2000+include_nan >> $b | ||
gmt $m $l2s --zrange=1000/2000+strip_nan_rowcols >> $b | ||
|
||
diff $a $b --strip-trailing-cr > fail |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
#!/usr/bin/env bash | ||
# | ||
# Test grdfft longopts translation. | ||
|
||
m=grdfft | ||
l2s='--l2stranstest' | ||
a=$m-l2s-a.txt | ||
b=$m-l2s-b.txt | ||
rm -f $a $b ; touch $b | ||
|
||
cat << EOF > $a | ||
--l2stranstest -A90 -A10 | ||
--l2stranstest -C12 -C-8 | ||
--l2stranstest -D5 -D | ||
--l2stranstest -Er+n | ||
--l2stranstest -Ex+wk -Ey | ||
--l2stranstest -Fr1/2/3/4 -Fx10/20 -Fy4/8/1 | ||
--l2stranstest -G/some/file.grd=nf+d2+n-99 | ||
--l2stranstest -G/other/file.grd=nf+o6+s1.5 | ||
--l2stranstest -I4 -Ig | ||
--l2stranstest -N10/20+d -Na+a | ||
--l2stranstest -Nf+a+e | ||
--l2stranstest -Nm+h+m | ||
--l2stranstest -Nr+l+n | ||
--l2stranstest -Ns+v+wfft+z | ||
--l2stranstest -Q | ||
--l2stranstest -S5 -Sd | ||
EOF | ||
|
||
# module-specific longopts | ||
gmt $m $l2s --azimuth=90 --azim=10 >> $b | ||
gmt $m $l2s --upward=12 --upward=-8 >> $b | ||
gmt $m $l2s --differentiate=5 --dfdz >> $b | ||
gmt $m $l2s --power_spectrum=radial+normalize >> $b | ||
gmt $m $l2s --power_spectrum=x+wavelength:k --power_spectrum=y >> $b | ||
gmt $m $l2s --filter=isotropic:1/2/3/4 --filter=x:10/20 --filter=y:4/8/1 >> $b | ||
gmt $m $l2s --outgrid=/some/file.grd=nf+divide:2+nan:-99 >> $b | ||
gmt $m $l2s --outgrid=/other/file.grd=nf+offset:6+scale:1.5 >> $b | ||
gmt $m $l2s --integrate=4 --integrate=gravity >> $b | ||
gmt $m $l2s --dimensions=10/20+detrend --inquire=accurate+remove_mean >> $b | ||
gmt $m $l2s --dimensions=actual+remove_mean+edge_point >> $b | ||
gmt $m $l2s --dimensions=low_memory+remove_mid+edge_mirror >> $b | ||
gmt $m $l2s --dimensions=rapid+leave_alone+no_extend >> $b | ||
gmt $m $l2s --dimensions=show+verbose+suffix:fft+complex >> $b | ||
gmt $m $l2s --no_wavenum_ops >> $b | ||
gmt $m $l2s --scale=5 --scale=deflection >> $b | ||
|
||
diff $a $b --strip-trailing-cr > fail |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
#!/usr/bin/env bash | ||
# | ||
# Test greenspline longopts translation. | ||
|
||
m=greenspline | ||
l2s='--l2stranstest' | ||
a=$m-l2s-a.txt | ||
b=$m-l2s-b.txt | ||
rm -f $a $b ; touch $b | ||
|
||
cat << EOF > $a | ||
--l2stranstest -A/some/file+f0 | ||
--l2stranstest -Cn10+c+f/some/file | ||
--l2stranstest -Cr6+i | ||
--l2stranstest -Cv0.5+n | ||
--l2stranstest -D+cmycpt -D+cmycpt | ||
--l2stranstest -D+dbaddata+n-999+o5 | ||
--l2stranstest -D"+rsilly comment+s2+tBig News" | ||
--l2stranstest -D+vDataset+xMrX+yMsY+zZeebo | ||
--l2stranstest -E/some/file+r/report/file | ||
--l2stranstest -G/some/file.grd | ||
--l2stranstest -I4 -I2/3 -I1/2/3 | ||
--l2stranstest -L -Lt -Lr | ||
--l2stranstest -N/node/file | ||
--l2stranstest -Q -Q12 -Q4/5/6 | ||
--l2stranstest -Sc -Sl+e0.1 | ||
--l2stranstest -Sp -Sq200+n20 | ||
--l2stranstest -Sr200/10 -St500/3 | ||
--l2stranstest -T/this/mask.grd -T/that/mask.grd | ||
--l2stranstest -W -Ww | ||
--l2stranstest -Z3 -Z5 | ||
EOF | ||
|
||
# module-specific longopts | ||
gmt $m $l2s --gradient=/some/file+format:0 >> $b | ||
gmt $m $l2s --approx_fit=largest:10+cumulative+file:/some/file >> $b | ||
gmt $m $l2s --approx_fit=ratio:6+incremental >> $b | ||
gmt $m $l2s --approximate=variance:0.5+no_surface >> $b | ||
gmt $m $l2s --metadata+cpt:mycpt --ncdata+cmap:mycpt >> $b | ||
gmt $m $l2s --metadata+dname:baddata+invalid:-999+offset:5 >> $b | ||
gmt $m $l2s --metadata+remark:'silly comment'+scale:2+title:'Big News' >> $b | ||
gmt $m $l2s --metadata+varname:Dataset+xname:MrX+yname:MsY+zname:Zeebo >> $b | ||
gmt $m $l2s --misfit=/some/file+report:/report/file >> $b | ||
gmt $m $l2s --outgrid=/some/file.grd >> $b | ||
gmt $m $l2s --inc=4 --increment=2/3 --spacing=1/2/3 >> $b | ||
gmt $m $l2s --leave_trend --detrend=leastsquares --detrend=residuals >> $b | ||
gmt $m $l2s --nodes=/node/file >> $b | ||
gmt $m $l2s --derivative --dir_derivative=12 --vector=4/5/6 >> $b | ||
gmt $m $l2s --splines=min_scurvature --splines=linear+error:0.1 >> $b | ||
gmt $m $l2s --splines=min_pcurvature --splines=ctensionA:200+npoints:20 >> $b | ||
gmt $m $l2s --splines=rtension:200/10 --splines=ctensionB:500/3 >> $b | ||
gmt $m $l2s --maskgrid=/this/mask.grd --mask=/that/mask.grd >> $b | ||
gmt $m $l2s --uncertainties --uncertainties=weights >> $b | ||
gmt $m $l2s --distmode=3 --mode=5 >> $b | ||
|
||
diff $a $b --strip-trailing-cr > fail |
Oops, something went wrong.