SuperDARN / rst

Radar Software Toolkit (RST)
https://superdarn.github.io/rst/
GNU General Public License v3.0
21 stars 16 forks source link

Adding new -xshift and -yshift options to field_plot #578

Closed egthomas closed 9 months ago

egthomas commented 1 year ago

This pull request modifieds the field_plot binary and MapStereographic function (in tfunc.c) to support user-controlled horizontal and vertical shifting of the plotting region. This is particularly useful for radars where the default options, or some combination of -latmin / -lat / -lon, aren't quite sufficient.

For example, this is the default for Iceland East (ICE) in magnetic coordinates:

default

If we want to zoom in a little better, one could set -latmin 60 -lat 85 -lon 65:

no_shift

Finally, with the new -xshift option one can actually center the radar FOV, eg -latmin 60 -lat 85 -lon 65 -xshift -0.35:

shift

These new -xshift and -yshift options can be used with any field_plot figure in the (default) stereographic projection; orthographic projections will be unchanged.

ecbland commented 9 months ago

This works well. Just one suggestion about the documentation above.

field_plot -png -def -v -xshift -0.2 -yshift -0.2 20141219.0802.00.cly.fitacf3 > plot.png

plot