Skip to content

Commit 81de8f0

Browse files
authored
pygmt.project: Migrate the 'azimuth' parameter to the new alias system (#4421)
1 parent 66e69b5 commit 81de8f0

1 file changed

Lines changed: 7 additions & 6 deletions

File tree

pygmt/src/project.py

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@
2121

2222
@fmt_docstring
2323
@use_alias(
24-
A="azimuth",
2524
F="convention",
2625
G="generate",
2726
N="flat_earth",
@@ -37,6 +36,7 @@ def project( # noqa: PLR0913
3736
z=None,
3837
output_type: Literal["pandas", "numpy", "file"] = "pandas",
3938
outfile: PathLike | None = None,
39+
azimuth: float | None = None,
4040
center: Sequence[float | str] | None = None,
4141
endpoint: Sequence[float | str] | None = None,
4242
width: Sequence[float | str] | None = None,
@@ -111,6 +111,7 @@ def project( # noqa: PLR0913
111111
Full GMT docs at :gmt-docs:`project.html`.
112112
113113
$aliases
114+
- A = azimuth
114115
- C = center
115116
- E = endpoint
116117
- L = length
@@ -126,19 +127,18 @@ def project( # noqa: PLR0913
126127
$table_classes.
127128
$output_type
128129
$outfile
129-
130130
center
131131
Set the origin of the projection, in the form of (*cx*, *cy*), in Definitions 1
132132
or 2. If Definition 3 is used, then (*cx*, *cy*) are the coordinates of a point
133133
through which the oblique zero meridian (:math:`p = 0`) should pass.
134134
(*cx*, *cy*) is not required to be 90 degrees from the pole set by ``pole``.
135-
azimuth : float or str
136-
Define the azimuth of the projection (Definition 1).
137-
135+
azimuth
136+
Set the azimuth of the projection (Definition 1). The azimuth is clockwise from
137+
North (the y-axis) regardless of whether spherical or Cartesian coordinate
138+
transformation is applied.
138139
endpoint
139140
(*bx*, *by*).
140141
Set the end point of the projection path (Definition 2).
141-
142142
convention : str
143143
Specify the desired output using any combination of **xyzpqrs**, in
144144
any order [Default is **xypqrsz**]. Do not space between the letters.
@@ -236,6 +236,7 @@ def project( # noqa: PLR0913
236236
column_names = list("rsp")
237237

238238
aliasdict = AliasSystem(
239+
A=Alias(azimuth, name="azimuth"),
239240
C=Alias(center, name="center", sep="/", size=2),
240241
E=Alias(endpoint, name="endpoint", sep="/", size=2),
241242
L=Alias(length, name="length", sep="/", size=2, mapping={"limit": "w"}),

0 commit comments

Comments
 (0)