Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Dynamic Exposure
Legacy
gde_calculations_prototype
Commits
7197934f
Commit
7197934f
authored
May 06, 2021
by
Cecilia Nievas
Browse files
Fixed use of capitals in GDE_TOOLS_create_industrial_cells.py
parent
e31cbb26
Changes
1
Hide whitespace changes
Inline
Side-by-side
GDE_TOOLS_create_industrial_cells.py
View file @
7197934f
...
@@ -660,22 +660,22 @@ def define_threshold_angle(width_EW, width_NS, outangle="radians"):
...
@@ -660,22 +660,22 @@ def define_threshold_angle(width_EW, width_NS, outangle="radians"):
"""This function defines the threshold angle to consider one cell at a particular cardinal
"""This function defines the threshold angle to consider one cell at a particular cardinal
point with respect to another cell. The threshold angle depends only on the widths of the
point with respect to another cell. The threshold angle depends only on the widths of the
cells, i.e. width_EW, width_NS. This threshold angle allows to distinguish, for example,
cells, i.e. width_EW, width_NS. This threshold angle allows to distinguish, for example,
between a cell located to the
N
orth,
E
ast or
N
orth-
E
ast of another cell. Though the cell
between a cell located to the
n
orth,
e
ast or
n
orth-
e
ast of another cell. Though the cell
widths are input in degrees, they are treated as Cartesian.
widths are input in degrees, they are treated as Cartesian.
Args:
Args:
width_EW (float):
w
idth of the cell in the
E
ast-
W
est direction, in degrees, >0.
width_EW (float):
W
idth of the cell in the
e
ast-
w
est direction, in degrees, >0.
width_NS (float):
w
idth of the cell in the
N
orth-south direction, in degrees, >0.
width_NS (float):
W
idth of the cell in the
n
orth-south direction, in degrees, >0.
outangle (str):
i
ndicates the units of the output angle, i.e. "radians" or "degrees".
outangle (str):
I
ndicates the units of the output angle, i.e. "radians" or "degrees".
Returns:
Returns:
ang_thr (float):
t
hreshold angle indicating:
ang_thr (float):
T
hreshold angle indicating:
- the angle between the
N
orth-
S
outh orientation and the limit lines to
- the angle between the
n
orth-
s
outh orientation and the limit lines to
consider a cell to be to the
N
orth or
S
outh of anoher cell (instead of
consider a cell to be to the
n
orth or
s
outh of anoher cell (instead of
the
N
orth-
E
ast, or
N
orth-
W
est, or
S
outh-
E
ast, or
S
outh-
W
est)
the
n
orth-
e
ast, or
n
orth-
w
est, or
s
outh-
e
ast, or
s
outh-
w
est)
- the angle between the
E
ast-
W
est orientation and the limit lines to
- the angle between the
e
ast-
w
est orientation and the limit lines to
consider a cell to be to the
E
ast or
W
est of another cell (instead of
consider a cell to be to the
e
ast or
w
est of another cell (instead of
the
N
orth-
E
ast, or
N
orth-
W
est, or
S
outh-
E
ast, or
S
outh-
W
est)
the
n
orth-
e
ast, or
n
orth-
w
est, or
s
outh-
e
ast, or
s
outh-
w
est)
It returns NaN if the input widths are not positive numbers.
It returns NaN if the input widths are not positive numbers.
"""
"""
...
@@ -708,7 +708,7 @@ def angles_from_coords(p1x, p1y, p2x, p2y):
...
@@ -708,7 +708,7 @@ def angles_from_coords(p1x, p1y, p2x, p2y):
p2y (array of floats) = Y coordinates of Points labelled as 2.
p2y (array of floats) = Y coordinates of Points labelled as 2.
Returns:
Returns:
anglesfromcoord (array of floats):
a
ngles formed by an E-W ("horizontal") line and a
anglesfromcoord (array of floats):
A
ngles formed by an E-W ("horizontal") line and a
segment that starts at P1 and finishes at P2, with
segment that starts at P1 and finishes at P2, with
P1 being the intersection point between the two
P1 being the intersection point between the two
lines. It will always be in the range [-pi, +pi].
lines. It will always be in the range [-pi, +pi].
...
@@ -726,12 +726,12 @@ def guarantee_radians(in_theta, theta_thr, inputangle):
...
@@ -726,12 +726,12 @@ def guarantee_radians(in_theta, theta_thr, inputangle):
It returns the original in_theta and theta_thr if inputangle is "radians".
It returns the original in_theta and theta_thr if inputangle is "radians".
Args:
Args:
in_theta (float):
a
ngles, in the units indicatd by inputangle
in_theta (float):
A
ngles, in the units indicatd by inputangle
theta_thr (float):
a
ngles, in the units indicatd by inputangle
theta_thr (float):
A
ngles, in the units indicatd by inputangle
Returns:
Returns:
in_theta (float):
a
ngles of in_theta, in radians
in_theta (float):
A
ngles of in_theta, in radians
theta_thr (float):
a
ngles of theta_thr, in radians
theta_thr (float):
A
ngles of theta_thr, in radians
"""
"""
if
inputangle
.
lower
()
==
"radians"
:
if
inputangle
.
lower
()
==
"radians"
:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment