From f405e25a2ec684a985a8a5162bcbe30716df5ea9 Mon Sep 17 00:00:00 2001 From: Santiago Soler Date: Thu, 14 Nov 2024 13:04:51 -0800 Subject: [PATCH] Group similar parameters in docstrings (#105) Group similar parameters together in the docstrings of forward and kernel functions for points, dipoles and prisms. This makes the docstrings of the functions shorter and avoid too many repetitions. Configure flake8 for maximum line length in docstrings to 88. --- .flake8 | 2 +- choclo/dipole/_forward.py | 128 ++++++------------- choclo/point/_forward.py | 170 ++++++++----------------- choclo/point/_kernels.py | 160 ++++++----------------- choclo/prism/_gravity.py | 253 ++++++++----------------------------- choclo/prism/_kernels.py | 246 ++++++++++-------------------------- choclo/prism/_magnetic.py | 258 +++++++++----------------------------- choclo/prism/_utils.py | 184 ++++++--------------------- choclo/utils.py | 39 +++--- 9 files changed, 355 insertions(+), 1085 deletions(-) diff --git a/.flake8 b/.flake8 index 7540f326..b7fbefdd 100644 --- a/.flake8 +++ b/.flake8 @@ -2,7 +2,7 @@ [flake8] max-line-length = 88 -max-doc-length = 79 +max-doc-length = 88 ignore = # Too many leading '#' for block comment E266, diff --git a/choclo/dipole/_forward.py b/choclo/dipole/_forward.py index c30f9857..526a2b39 100644 --- a/choclo/dipole/_forward.py +++ b/choclo/dipole/_forward.py @@ -37,39 +37,20 @@ def magnetic_field( Parameters ---------- - easting_p : float - Easting coordinate of the observation point in meters. - northing_p : float - Northing coordinate of the observation point in meters. - upward_p : float - Upward coordinate of the observation point in meters. - easting_q : float - Easting coordinate of the dipole in meters. - northing_q : float - Northing coordinate of the dipole in meters. - upward_q : float - Upward coordinate of the dipole in meters. - magnetic_moment_east : float - The East component of the magnetic moment vector of the dipole. Must be - in :math:`A m^2`. - magnetic_moment_north : float - The North component of the magnetic moment vector of the dipole. Must - be in :math:`A m^2`. - magnetic_moment_up : float - The upward component of the magnetic moment vector of the dipole. Must - be in :math:`A m^2`. + easting_p, northing_p, upward_p : float + Easting, northing and upward coordinates of the observation point in + meters. + easting_q, northing_q, upward_q : float + Easting, northing and upward coordinates of the dipole in meters. + magnetic_moment_east, magnetic_moment_north, magnetic_moment_up : float + The east, north and upward component of the magnetic moment vector of + the dipole. Must be in :math:`A m^2`. Returns ------- - b_e : float - Easting component of the magnetic field generated by the dipole - on the observation point in :math:`\text{T}`. - b_n : float - Northing component of the magnetic field generated by the dipole - on the observation point in :math:`\text{T}`. - b_u : float - Upward component of the magnetic field generated by the dipole - on the observation point in :math:`\text{T}`. + b_e, b_n, b_u : float + Easting, northing and upward components of the magnetic field generated + by the dipole on the observation point in :math:`\text{T}`. Notes ----- @@ -141,27 +122,14 @@ def magnetic_e( Parameters ---------- - easting_p : float - Easting coordinate of the observation point in meters. - northing_p : float - Northing coordinate of the observation point in meters. - upward_p : float - Upward coordinate of the observation point in meters. - easting_q : float - Easting coordinate of the dipole in meters. - northing_q : float - Northing coordinate of the dipole in meters. - upward_q : float - Upward coordinate of the dipole in meters. - magnetic_moment_east : float - The East component of the magnetic moment vector of the dipole. Must be - in :math:`A m^2`. - magnetic_moment_north : float - The North component of the magnetic moment vector of the dipole. Must - be in :math:`A m^2`. - magnetic_moment_up : float - The upward component of the magnetic moment vector of the dipole. Must - be in :math:`A m^2`. + easting_p, northing_p, upward_p : float + Easting, northing and upward coordinates of the observation point in + meters. + easting_q, northing_q, upward_q : float + Easting, northing and upward coordinates of the dipole in meters. + magnetic_moment_east, magnetic_moment_north, magnetic_moment_up : float + The east, north and upward component of the magnetic moment vector of + the dipole. Must be in :math:`A m^2`. Returns ------- @@ -232,27 +200,14 @@ def magnetic_n( Parameters ---------- - easting_p : float - Easting coordinate of the observation point in meters. - northing_p : float - Northing coordinate of the observation point in meters. - upward_p : float - Upward coordinate of the observation point in meters. - easting_q : float - Easting coordinate of the dipole in meters. - northing_q : float - Northing coordinate of the dipole in meters. - upward_q : float - Upward coordinate of the dipole in meters. - magnetic_moment_east : float - The East component of the magnetic moment vector of the dipole. Must be - in :math:`A m^2`. - magnetic_moment_north : float - The North component of the magnetic moment vector of the dipole. Must - be in :math:`A m^2`. - magnetic_moment_up : float - The upward component of the magnetic moment vector of the dipole. Must - be in :math:`A m^2`. + easting_p, northing_p, upward_p : float + Easting, northing and upward coordinates of the observation point in + meters. + easting_q, northing_q, upward_q : float + Easting, northing and upward coordinates of the dipole in meters. + magnetic_moment_east, magnetic_moment_north, magnetic_moment_up : float + The east, north and upward component of the magnetic moment vector of + the dipole. Must be in :math:`A m^2`. Returns ------- @@ -323,27 +278,14 @@ def magnetic_u( Parameters ---------- - easting_p : float - Easting coordinate of the observation point in meters. - northing_p : float - Northing coordinate of the observation point in meters. - upward_p : float - Upward coordinate of the observation point in meters. - easting_q : float - Easting coordinate of the dipole in meters. - northing_q : float - Northing coordinate of the dipole in meters. - upward_q : float - Upward coordinate of the dipole in meters. - magnetic_moment_east : float - The East component of the magnetic moment vector of the dipole. Must be - in :math:`A m^2`. - magnetic_moment_north : float - The North component of the magnetic moment vector of the dipole. Must - be in :math:`A m^2`. - magnetic_moment_up : float - The upward component of the magnetic moment vector of the dipole. Must - be in :math:`A m^2`. + easting_p, northing_p, upward_p : float + Easting, northing and upward coordinates of the observation point in + meters. + easting_q, northing_q, upward_q : float + Easting, northing and upward coordinates of the dipole in meters. + magnetic_moment_east, magnetic_moment_north, magnetic_moment_up : float + The east, north and upward component of the magnetic moment vector of + the dipole. Must be in :math:`A m^2`. Returns ------- diff --git a/choclo/point/_forward.py b/choclo/point/_forward.py index 4332e8f2..c722db26 100644 --- a/choclo/point/_forward.py +++ b/choclo/point/_forward.py @@ -35,18 +35,11 @@ def gravity_pot(easting_p, northing_p, upward_p, easting_q, northing_q, upward_q Parameters ---------- - easting_p : float - Easting coordinate of the observation point in meters. - northing_p : float - Northing coordinate of the observation point in meters. - upward_p : float - Upward coordinate of the observation point in meters. - easting_q : float - Easting coordinate of the point source in meters. - northing_q : float - Northing coordinate of the point source in meters. - upward_q : float - Upward coordinate of the point source in meters. + easting_p, northing_p, upward_p : float + Easting, northing and upward coordinates of the observation point in + meters. + easting_q, northing_q, upward_q : float + Easting, northing and upward coordinates of the point source in meters. mass : float Mass of the point source in kilograms. @@ -90,18 +83,11 @@ def gravity_e(easting_p, northing_p, upward_p, easting_q, northing_q, upward_q, Parameters ---------- - easting_p : float - Easting coordinate of the observation point in meters. - northing_p : float - Northing coordinate of the observation point in meters. - upward_p : float - Upward coordinate of the observation point in meters. - easting_q : float - Easting coordinate of the point source in meters. - northing_q : float - Northing coordinate of the point source in meters. - upward_q : float - Upward coordinate of the point source in meters. + easting_p, northing_p, upward_p : float + Easting, northing and upward coordinates of the observation point in + meters. + easting_q, northing_q, upward_q : float + Easting, northing and upward coordinates of the point source in meters. mass : float Mass of the point source in kilograms. @@ -150,18 +136,11 @@ def gravity_n(easting_p, northing_p, upward_p, easting_q, northing_q, upward_q, Parameters ---------- - easting_p : float - Easting coordinate of the observation point in meters. - northing_p : float - Northing coordinate of the observation point in meters. - upward_p : float - Upward coordinate of the observation point in meters. - easting_q : float - Easting coordinate of the point source in meters. - northing_q : float - Northing coordinate of the point source in meters. - upward_q : float - Upward coordinate of the point source in meters. + easting_p, northing_p, upward_p : float + Easting, northing and upward coordinates of the observation point in + meters. + easting_q, northing_q, upward_q : float + Easting, northing and upward coordinates of the point source in meters. mass : float Mass of the point source in kilograms. @@ -210,18 +189,11 @@ def gravity_u(easting_p, northing_p, upward_p, easting_q, northing_q, upward_q, Parameters ---------- - easting_p : float - Easting coordinate of the observation point in meters. - northing_p : float - Northing coordinate of the observation point in meters. - upward_p : float - Upward coordinate of the observation point in meters. - easting_q : float - Easting coordinate of the point source in meters. - northing_q : float - Northing coordinate of the point source in meters. - upward_q : float - Upward coordinate of the point source in meters. + easting_p, northing_p, upward_p : float + Easting, northing and upward coordinates of the observation point in + meters. + easting_q, northing_q, upward_q : float + Easting, northing and upward coordinates of the point source in meters. mass : float Mass of the point source in kilograms. @@ -270,18 +242,11 @@ def gravity_ee(easting_p, northing_p, upward_p, easting_q, northing_q, upward_q, Parameters ---------- - easting_p : float - Easting coordinate of the observation point in meters. - northing_p : float - Northing coordinate of the observation point in meters. - upward_p : float - Upward coordinate of the observation point in meters. - easting_q : float - Easting coordinate of the point source in meters. - northing_q : float - Northing coordinate of the point source in meters. - upward_q : float - Upward coordinate of the point source in meters. + easting_p, northing_p, upward_p : float + Easting, northing and upward coordinates of the observation point in + meters. + easting_q, northing_q, upward_q : float + Easting, northing and upward coordinates of the point source in meters. mass : float Mass of the point source in kilograms. @@ -337,18 +302,11 @@ def gravity_nn(easting_p, northing_p, upward_p, easting_q, northing_q, upward_q, Parameters ---------- - easting_p : float - Easting coordinate of the observation point in meters. - northing_p : float - Northing coordinate of the observation point in meters. - upward_p : float - Upward coordinate of the observation point in meters. - easting_q : float - Easting coordinate of the point source in meters. - northing_q : float - Northing coordinate of the point source in meters. - upward_q : float - Upward coordinate of the point source in meters. + easting_p, northing_p, upward_p : float + Easting, northing and upward coordinates of the observation point in + meters. + easting_q, northing_q, upward_q : float + Easting, northing and upward coordinates of the point source in meters. mass : float Mass of the point source in kilograms. @@ -404,18 +362,11 @@ def gravity_uu(easting_p, northing_p, upward_p, easting_q, northing_q, upward_q, Parameters ---------- - easting_p : float - Easting coordinate of the observation point in meters. - northing_p : float - Northing coordinate of the observation point in meters. - upward_p : float - Upward coordinate of the observation point in meters. - easting_q : float - Easting coordinate of the point source in meters. - northing_q : float - Northing coordinate of the point source in meters. - upward_q : float - Upward coordinate of the point source in meters. + easting_p, northing_p, upward_p : float + Easting, northing and upward coordinates of the observation point in + meters. + easting_q, northing_q, upward_q : float + Easting, northing and upward coordinates of the point source in meters. mass : float Mass of the point source in kilograms. @@ -471,18 +422,11 @@ def gravity_en(easting_p, northing_p, upward_p, easting_q, northing_q, upward_q, Parameters ---------- - easting_p : float - Easting coordinate of the observation point in meters. - northing_p : float - Northing coordinate of the observation point in meters. - upward_p : float - Upward coordinate of the observation point in meters. - easting_q : float - Easting coordinate of the point source in meters. - northing_q : float - Northing coordinate of the point source in meters. - upward_q : float - Upward coordinate of the point source in meters. + easting_p, northing_p, upward_p : float + Easting, northing and upward coordinates of the observation point in + meters. + easting_q, northing_q, upward_q : float + Easting, northing and upward coordinates of the point source in meters. mass : float Mass of the point source in kilograms. @@ -533,18 +477,11 @@ def gravity_eu(easting_p, northing_p, upward_p, easting_q, northing_q, upward_q, Parameters ---------- - easting_p : float - Easting coordinate of the observation point in meters. - northing_p : float - Northing coordinate of the observation point in meters. - upward_p : float - Upward coordinate of the observation point in meters. - easting_q : float - Easting coordinate of the point source in meters. - northing_q : float - Northing coordinate of the point source in meters. - upward_q : float - Upward coordinate of the point source in meters. + easting_p, northing_p, upward_p : float + Easting, northing and upward coordinates of the observation point in + meters. + easting_q, northing_q, upward_q : float + Easting, northing and upward coordinates of the point source in meters. mass : float Mass of the point source in kilograms. @@ -595,18 +532,11 @@ def gravity_nu(easting_p, northing_p, upward_p, easting_q, northing_q, upward_q, Parameters ---------- - easting_p : float - Easting coordinate of the observation point in meters. - northing_p : float - Northing coordinate of the observation point in meters. - upward_p : float - Upward coordinate of the observation point in meters. - easting_q : float - Easting coordinate of the point source in meters. - northing_q : float - Northing coordinate of the point source in meters. - upward_q : float - Upward coordinate of the point source in meters. + easting_p, northing_p, upward_p : float + Easting, northing and upward coordinates of the observation point in + meters. + easting_q, northing_q, upward_q : float + Easting, northing and upward coordinates of the point source in meters. mass : float Mass of the point source in kilograms. diff --git a/choclo/point/_kernels.py b/choclo/point/_kernels.py index dc061d5a..faa815b4 100644 --- a/choclo/point/_kernels.py +++ b/choclo/point/_kernels.py @@ -24,18 +24,10 @@ def kernel_pot( Parameters ---------- - easting_p : float - Easting coordinate of point :math:`\mathbf{p}`. - northing_p : float - Northing coordinate of point :math:`\mathbf{p}`. - upward_p : float - Upward coordinate of point :math:`\mathbf{p}`. - easting_q : float - Easting coordinate of point :math:`\mathbf{q}`. - northing_q : float - Northing coordinate of point :math:`\mathbf{q}`. - upward_q : float - Upward coordinate of point :math:`\mathbf{q}`. + easting_p, northing_p, upward_p : float + Easting, northing and upward coordinates of point :math:`\mathbf{p}`. + easting_q, northing_q, upward_q : float + Easting, northing and upward coordinates of point :math:`\mathbf{q}`. distance : float Euclidean distance between points :math:`\mathbf{p}` and :math:`\mathbf{q}`. @@ -80,18 +72,10 @@ def kernel_e( Parameters ---------- - easting_p : float - Easting coordinate of point :math:`\mathbf{p}`. - northing_p : float - Northing coordinate of point :math:`\mathbf{p}`. - upward_p : float - Upward coordinate of point :math:`\mathbf{p}`. - easting_q : float - Easting coordinate of point :math:`\mathbf{q}`. - northing_q : float - Northing coordinate of point :math:`\mathbf{q}`. - upward_q : float - Upward coordinate of point :math:`\mathbf{q}`. + easting_p, northing_p, upward_p : float + Easting, northing and upward coordinates of point :math:`\mathbf{p}`. + easting_q, northing_q, upward_q : float + Easting, northing and upward coordinates of point :math:`\mathbf{q}`. distance : float Euclidean distance between points :math:`\mathbf{p}` and :math:`\mathbf{q}`. @@ -141,18 +125,10 @@ def kernel_n( Parameters ---------- - easting_p : float - Easting coordinate of point :math:`\mathbf{p}`. - northing_p : float - Northing coordinate of point :math:`\mathbf{p}`. - upward_p : float - Upward coordinate of point :math:`\mathbf{p}`. - easting_q : float - Easting coordinate of point :math:`\mathbf{q}`. - northing_q : float - Northing coordinate of point :math:`\mathbf{q}`. - upward_q : float - Upward coordinate of point :math:`\mathbf{q}`. + easting_p, northing_p, upward_p : float + Easting, northing and upward coordinates of point :math:`\mathbf{p}`. + easting_q, northing_q, upward_q : float + Easting, northing and upward coordinates of point :math:`\mathbf{q}`. distance : float Euclidean distance between points :math:`\mathbf{p}` and :math:`\mathbf{q}`. @@ -202,18 +178,10 @@ def kernel_u( Parameters ---------- - easting_p : float - Easting coordinate of point :math:`\mathbf{p}`. - northing_p : float - Northing coordinate of point :math:`\mathbf{p}`. - upward_p : float - Upward coordinate of point :math:`\mathbf{p}`. - easting_q : float - Easting coordinate of point :math:`\mathbf{q}`. - northing_q : float - Northing coordinate of point :math:`\mathbf{q}`. - upward_q : float - Upward coordinate of point :math:`\mathbf{q}`. + easting_p, northing_p, upward_p : float + Easting, northing and upward coordinates of point :math:`\mathbf{p}`. + easting_q, northing_q, upward_q : float + Easting, northing and upward coordinates of point :math:`\mathbf{q}`. distance : float Euclidean distance between points :math:`\mathbf{p}` and :math:`\mathbf{q}`. @@ -263,18 +231,10 @@ def kernel_ee( Parameters ---------- - easting_p : float - Easting coordinate of point :math:`\mathbf{p}`. - northing_p : float - Northing coordinate of point :math:`\mathbf{p}`. - upward_p : float - Upward coordinate of point :math:`\mathbf{p}`. - easting_q : float - Easting coordinate of point :math:`\mathbf{q}`. - northing_q : float - Northing coordinate of point :math:`\mathbf{q}`. - upward_q : float - Upward coordinate of point :math:`\mathbf{q}`. + easting_p, northing_p, upward_p : float + Easting, northing and upward coordinates of point :math:`\mathbf{p}`. + easting_q, northing_q, upward_q : float + Easting, northing and upward coordinates of point :math:`\mathbf{q}`. distance : float Euclidean distance between points :math:`\mathbf{p}` and :math:`\mathbf{q}`. @@ -329,18 +289,10 @@ def kernel_nn( Parameters ---------- - easting_p : float - Easting coordinate of point :math:`\mathbf{p}`. - northing_p : float - Northing coordinate of point :math:`\mathbf{p}`. - upward_p : float - Upward coordinate of point :math:`\mathbf{p}`. - easting_q : float - Easting coordinate of point :math:`\mathbf{q}`. - northing_q : float - Northing coordinate of point :math:`\mathbf{q}`. - upward_q : float - Upward coordinate of point :math:`\mathbf{q}`. + easting_p, northing_p, upward_p : float + Easting, northing and upward coordinates of point :math:`\mathbf{p}`. + easting_q, northing_q, upward_q : float + Easting, northing and upward coordinates of point :math:`\mathbf{q}`. distance : float Euclidean distance between points :math:`\mathbf{p}` and :math:`\mathbf{q}`. @@ -395,18 +347,10 @@ def kernel_uu( Parameters ---------- - easting_p : float - Easting coordinate of point :math:`\mathbf{p}`. - northing_p : float - Northing coordinate of point :math:`\mathbf{p}`. - upward_p : float - Upward coordinate of point :math:`\mathbf{p}`. - easting_q : float - Easting coordinate of point :math:`\mathbf{q}`. - northing_q : float - Northing coordinate of point :math:`\mathbf{q}`. - upward_q : float - Upward coordinate of point :math:`\mathbf{q}`. + easting_p, northing_p, upward_p : float + Easting, northing and upward coordinates of point :math:`\mathbf{p}`. + easting_q, northing_q, upward_q : float + Easting, northing and upward coordinates of point :math:`\mathbf{q}`. distance : float Euclidean distance between points :math:`\mathbf{p}` and :math:`\mathbf{q}`. @@ -461,18 +405,10 @@ def kernel_en( Parameters ---------- - easting_p : float - Easting coordinate of point :math:`\mathbf{p}`. - northing_p : float - Northing coordinate of point :math:`\mathbf{p}`. - upward_p : float - Upward coordinate of point :math:`\mathbf{p}`. - easting_q : float - Easting coordinate of point :math:`\mathbf{q}`. - northing_q : float - Northing coordinate of point :math:`\mathbf{q}`. - upward_q : float - Upward coordinate of point :math:`\mathbf{q}`. + easting_p, northing_p, upward_p : float + Easting, northing and upward coordinates of point :math:`\mathbf{p}`. + easting_q, northing_q, upward_q : float + Easting, northing and upward coordinates of point :math:`\mathbf{q}`. distance : float Euclidean distance between points :math:`\mathbf{p}` and :math:`\mathbf{q}`. @@ -522,18 +458,10 @@ def kernel_eu( Parameters ---------- - easting_p : float - Easting coordinate of point :math:`\mathbf{p}`. - northing_p : float - Northing coordinate of point :math:`\mathbf{p}`. - upward_p : float - Upward coordinate of point :math:`\mathbf{p}`. - easting_q : float - Easting coordinate of point :math:`\mathbf{q}`. - northing_q : float - Northing coordinate of point :math:`\mathbf{q}`. - upward_q : float - Upward coordinate of point :math:`\mathbf{q}`. + easting_p, northing_p, upward_p : float + Easting, northing and upward coordinates of point :math:`\mathbf{p}`. + easting_q, northing_q, upward_q : float + Easting, northing and upward coordinates of point :math:`\mathbf{q}`. distance : float Euclidean distance between points :math:`\mathbf{p}` and :math:`\mathbf{q}`. @@ -583,18 +511,10 @@ def kernel_nu( Parameters ---------- - easting_p : float - Easting coordinate of point :math:`\mathbf{p}`. - northing_p : float - Northing coordinate of point :math:`\mathbf{p}`. - upward_p : float - Upward coordinate of point :math:`\mathbf{p}`. - easting_q : float - Easting coordinate of point :math:`\mathbf{q}`. - northing_q : float - Northing coordinate of point :math:`\mathbf{q}`. - upward_q : float - Upward coordinate of point :math:`\mathbf{q}`. + easting_p, northing_p, upward_p : float + Easting, northing and upward coordinates of point :math:`\mathbf{p}`. + easting_q, northing_q, upward_q : float + Easting, northing and upward coordinates of point :math:`\mathbf{q}`. distance : float Euclidean distance between points :math:`\mathbf{p}` and :math:`\mathbf{q}`. diff --git a/choclo/prism/_gravity.py b/choclo/prism/_gravity.py index d03840ed..03239639 100644 --- a/choclo/prism/_gravity.py +++ b/choclo/prism/_gravity.py @@ -54,24 +54,11 @@ def gravity_pot( Parameters ---------- - easting : float - Easting coordinate of the observation point. Must be in meters. - northing : float - Northing coordinate of the observation point. Must be in meters. - upward : float - Upward coordinate of the observation point. Must be in meters. - prism_west : float - The West boundary of the prism. Must be in meters. - prism_east : float - The East boundary of the prism. Must be in meters. - prism_south : float - The South boundary of the prism. Must be in meters. - prism_north : float - The North boundary of the prism. Must be in meters. - prism_bottom : float - The bottom boundary of the prism. Must be in meters. - prism_top : float - The top boundary of the prism. Must be in meters. + easting, northing, upward : float + Easting, northing and upward coordinates of the observation point. Must + be in meters. + prism_west, prism_east, prism_south, prism_north, prism_bottom, prism_top : float + The boundaries of the prism. Must be in meters. density : float Density of the rectangular prism in kilograms per cubic meter. @@ -200,24 +187,11 @@ def gravity_e( Parameters ---------- - easting : float - Easting coordinate of the observation point. Must be in meters. - northing : float - Northing coordinate of the observation point. Must be in meters. - upward : float - Upward coordinate of the observation point. Must be in meters. - prism_west : float - The West boundary of the prism. Must be in meters. - prism_east : float - The East boundary of the prism. Must be in meters. - prism_south : float - The South boundary of the prism. Must be in meters. - prism_north : float - The North boundary of the prism. Must be in meters. - prism_bottom : float - The bottom boundary of the prism. Must be in meters. - prism_top : float - The top boundary of the prism. Must be in meters. + easting, northing, upward : float + Easting, northing and upward coordinates of the observation point. Must + be in meters. + prism_west, prism_east, prism_south, prism_north, prism_bottom, prism_top : float + The boundaries of the prism. Must be in meters. density : float Density of the rectangular prism in kilograms per cubic meter. @@ -347,24 +321,11 @@ def gravity_n( Parameters ---------- - easting : float - Easting coordinate of the observation point. Must be in meters. - northing : float - Northing coordinate of the observation point. Must be in meters. - upward : float - Upward coordinate of the observation point. Must be in meters. - prism_west : float - The West boundary of the prism. Must be in meters. - prism_east : float - The East boundary of the prism. Must be in meters. - prism_south : float - The South boundary of the prism. Must be in meters. - prism_north : float - The North boundary of the prism. Must be in meters. - prism_bottom : float - The bottom boundary of the prism. Must be in meters. - prism_top : float - The top boundary of the prism. Must be in meters. + easting, northing, upward : float + Easting, northing and upward coordinates of the observation point. Must + be in meters. + prism_west, prism_east, prism_south, prism_north, prism_bottom, prism_top : float + The boundaries of the prism. Must be in meters. density : float Density of the rectangular prism in kilograms per cubic meter. @@ -494,24 +455,11 @@ def gravity_u( Parameters ---------- - easting : float - Easting coordinate of the observation point. Must be in meters. - northing : float - Northing coordinate of the observation point. Must be in meters. - upward : float - Upward coordinate of the observation point. Must be in meters. - prism_west : float - The West boundary of the prism. Must be in meters. - prism_east : float - The East boundary of the prism. Must be in meters. - prism_south : float - The South boundary of the prism. Must be in meters. - prism_north : float - The North boundary of the prism. Must be in meters. - prism_bottom : float - The bottom boundary of the prism. Must be in meters. - prism_top : float - The top boundary of the prism. Must be in meters. + easting, northing, upward : float + Easting, northing and upward coordinates of the observation point. Must + be in meters. + prism_west, prism_east, prism_south, prism_north, prism_bottom, prism_top : float + The boundaries of the prism. Must be in meters. density : float Density of the rectangular prism in kilograms per cubic meter. @@ -647,24 +595,11 @@ def gravity_ee( Parameters ---------- - easting : float - Easting coordinate of the observation point. Must be in meters. - northing : float - Northing coordinate of the observation point. Must be in meters. - upward : float - Upward coordinate of the observation point. Must be in meters. - prism_west : float - The West boundary of the prism. Must be in meters. - prism_east : float - The East boundary of the prism. Must be in meters. - prism_south : float - The South boundary of the prism. Must be in meters. - prism_north : float - The North boundary of the prism. Must be in meters. - prism_bottom : float - The bottom boundary of the prism. Must be in meters. - prism_top : float - The top boundary of the prism. Must be in meters. + easting, northing, upward : float + Easting, northing and upward coordinates of the observation point. Must + be in meters. + prism_west, prism_east, prism_south, prism_north, prism_bottom, prism_top : float + The boundaries of the prism. Must be in meters. density : float Density of the rectangular prism in kilograms per cubic meter. @@ -818,24 +753,11 @@ def gravity_nn( Parameters ---------- - easting : float - Easting coordinate of the observation point. Must be in meters. - northing : float - Northing coordinate of the observation point. Must be in meters. - upward : float - Upward coordinate of the observation point. Must be in meters. - prism_west : float - The West boundary of the prism. Must be in meters. - prism_east : float - The East boundary of the prism. Must be in meters. - prism_south : float - The South boundary of the prism. Must be in meters. - prism_north : float - The North boundary of the prism. Must be in meters. - prism_bottom : float - The bottom boundary of the prism. Must be in meters. - prism_top : float - The top boundary of the prism. Must be in meters. + easting, northing, upward : float + Easting, northing and upward coordinates of the observation point. Must + be in meters. + prism_west, prism_east, prism_south, prism_north, prism_bottom, prism_top : float + The boundaries of the prism. Must be in meters. density : float Density of the rectangular prism in kilograms per cubic meter. @@ -989,24 +911,11 @@ def gravity_uu( Parameters ---------- - easting : float - Easting coordinate of the observation point. Must be in meters. - northing : float - Northing coordinate of the observation point. Must be in meters. - upward : float - Upward coordinate of the observation point. Must be in meters. - prism_west : float - The West boundary of the prism. Must be in meters. - prism_east : float - The East boundary of the prism. Must be in meters. - prism_south : float - The South boundary of the prism. Must be in meters. - prism_north : float - The North boundary of the prism. Must be in meters. - prism_bottom : float - The bottom boundary of the prism. Must be in meters. - prism_top : float - The top boundary of the prism. Must be in meters. + easting, northing, upward : float + Easting, northing and upward coordinates of the observation point. Must + be in meters. + prism_west, prism_east, prism_south, prism_north, prism_bottom, prism_top : float + The boundaries of the prism. Must be in meters. density : float Density of the rectangular prism in kilograms per cubic meter. @@ -1160,24 +1069,11 @@ def gravity_en( Parameters ---------- - easting : float - Easting coordinate of the observation point. Must be in meters. - northing : float - Northing coordinate of the observation point. Must be in meters. - upward : float - Upward coordinate of the observation point. Must be in meters. - prism_west : float - The West boundary of the prism. Must be in meters. - prism_east : float - The East boundary of the prism. Must be in meters. - prism_south : float - The South boundary of the prism. Must be in meters. - prism_north : float - The North boundary of the prism. Must be in meters. - prism_bottom : float - The bottom boundary of the prism. Must be in meters. - prism_top : float - The top boundary of the prism. Must be in meters. + easting, northing, upward : float + Easting, northing and upward coordinates of the observation point. Must + be in meters. + prism_west, prism_east, prism_south, prism_north, prism_bottom, prism_top : float + The boundaries of the prism. Must be in meters. density : float Density of the rectangular prism in kilograms per cubic meter. @@ -1307,24 +1203,11 @@ def gravity_eu( Parameters ---------- - easting : float - Easting coordinate of the observation point. Must be in meters. - northing : float - Northing coordinate of the observation point. Must be in meters. - upward : float - Upward coordinate of the observation point. Must be in meters. - prism_west : float - The West boundary of the prism. Must be in meters. - prism_east : float - The East boundary of the prism. Must be in meters. - prism_south : float - The South boundary of the prism. Must be in meters. - prism_north : float - The North boundary of the prism. Must be in meters. - prism_bottom : float - The bottom boundary of the prism. Must be in meters. - prism_top : float - The top boundary of the prism. Must be in meters. + easting, northing, upward : float + Easting, northing and upward coordinates of the observation point. Must + be in meters. + prism_west, prism_east, prism_south, prism_north, prism_bottom, prism_top : float + The boundaries of the prism. Must be in meters. density : float Density of the rectangular prism in kilograms per cubic meter. @@ -1455,24 +1338,11 @@ def gravity_nu( Parameters ---------- - easting : float - Easting coordinate of the observation point. Must be in meters. - northing : float - Northing coordinate of the observation point. Must be in meters. - upward : float - Upward coordinate of the observation point. Must be in meters. - prism_west : float - The West boundary of the prism. Must be in meters. - prism_east : float - The East boundary of the prism. Must be in meters. - prism_south : float - The South boundary of the prism. Must be in meters. - prism_north : float - The North boundary of the prism. Must be in meters. - prism_bottom : float - The bottom boundary of the prism. Must be in meters. - prism_top : float - The top boundary of the prism. Must be in meters. + easting, northing, upward : float + Easting, northing and upward coordinates of the observation point. Must + be in meters. + prism_west, prism_east, prism_south, prism_north, prism_bottom, prism_top : float + The boundaries of the prism. Must be in meters. density : float Density of the rectangular prism in kilograms per cubic meter. @@ -1600,24 +1470,11 @@ def _evaluate_kernel( Parameters ---------- - easting : float - Easting coordinate of the observation point. Must be in meters. - northing : float - Northing coordinate of the observation point. Must be in meters. - upward : float - Upward coordinate of the observation point. Must be in meters. - prism_west : float - The West boundary of the prism. Must be in meters. - prism_east : float - The East boundary of the prism. Must be in meters. - prism_south : float - The South boundary of the prism. Must be in meters. - prism_north : float - The North boundary of the prism. Must be in meters. - prism_bottom : float - The bottom boundary of the prism. Must be in meters. - prism_top : float - The top boundary of the prism. Must be in meters. + easting, northing, upward : float + Easting, northing and upward coordinates of the observation point. Must + be in meters. + prism_west, prism_east, prism_south, prism_north, prism_bottom, prism_top : float + The boundaries of the prism. Must be in meters. kernel : callable Kernel function that will be evaluated on each one of the shifted vertices of the prism. diff --git a/choclo/prism/_kernels.py b/choclo/prism/_kernels.py index b3f8f845..2d4126fc 100644 --- a/choclo/prism/_kernels.py +++ b/choclo/prism/_kernels.py @@ -28,15 +28,9 @@ def kernel_pot(easting, northing, upward, radius): Parameters ---------- - easting : float - Shifted easting coordinate of the vertex of the prism. Must be in - meters. - northing : float - Shifted northing coordinate of the vertex of the prism. Must be in - meters. - upward : float - Shifted upward coordinate of the vertex of the prism. Must be in - meters. + easting, northing, upward : float + Shifted easting, northing and upward coordinates of the vertex of the + prism. Must be in meters. radius : float Square root of the sum of the squares of the ``easting``, ``northing`` and ``upward`` shifted coordinates. @@ -120,15 +114,9 @@ def kernel_e(easting, northing, upward, radius): Parameters ---------- - easting : float - Shifted easting coordinate of the vertex of the prism. Must be in - meters. - northing : float - Shifted northing coordinate of the vertex of the prism. Must be in - meters. - upward : float - Shifted upward coordinate of the vertex of the prism. Must be in - meters. + easting, northing, upward : float + Shifted easting, northing and upward coordinates of the vertex of the + prism. Must be in meters. radius : float Square root of the sum of the squares of the ``easting``, ``northing`` and ``upward`` shifted coordinates. @@ -215,15 +203,9 @@ def kernel_n(easting, northing, upward, radius): Parameters ---------- - easting : float - Shifted easting coordinate of the vertex of the prism. Must be in - meters. - northing : float - Shifted northing coordinate of the vertex of the prism. Must be in - meters. - upward : float - Shifted upward coordinate of the vertex of the prism. Must be in - meters. + easting, northing, upward : float + Shifted easting, northing and upward coordinates of the vertex of the + prism. Must be in meters. radius : float Square root of the sum of the squares of the ``easting``, ``northing`` and ``upward`` shifted coordinates. @@ -310,15 +292,9 @@ def kernel_u(easting, northing, upward, radius): Parameters ---------- - easting : float - Shifted easting coordinate of the vertex of the prism. Must be in - meters. - northing : float - Shifted northing coordinate of the vertex of the prism. Must be in - meters. - upward : float - Shifted upward coordinate of the vertex of the prism. Must be in - meters. + easting, northing, upward : float + Shifted easting, northing and upward coordinates of the vertex of the + prism. Must be in meters. radius : float Square root of the sum of the squares of the ``easting``, ``northing`` and ``upward`` shifted coordinates. @@ -406,15 +382,9 @@ def kernel_ee(easting, northing, upward, radius): Parameters ---------- - easting : float - Shifted easting coordinate of the vertex of the prism. Must be in - meters. - northing : float - Shifted northing coordinate of the vertex of the prism. Must be in - meters. - upward : float - Shifted upward coordinate of the vertex of the prism. Must be in - meters. + easting, northing, upward : float + Shifted easting, northing and upward coordinates of the vertex of the + prism. Must be in meters. radius : float Square root of the sum of the squares of the ``easting``, ``northing`` and ``upward`` shifted coordinates. @@ -471,15 +441,9 @@ def kernel_nn(easting, northing, upward, radius): Parameters ---------- - easting : float - Shifted easting coordinate of the vertex of the prism. Must be in - meters. - northing : float - Shifted northing coordinate of the vertex of the prism. Must be in - meters. - upward : float - Shifted upward coordinate of the vertex of the prism. Must be in - meters. + easting, northing, upward : float + Shifted easting, northing and upward coordinates of the vertex of the + prism. Must be in meters. radius : float Square root of the sum of the squares of the ``easting``, ``northing`` and ``upward`` shifted coordinates. @@ -536,15 +500,9 @@ def kernel_uu(easting, northing, upward, radius): Parameters ---------- - easting : float - Shifted easting coordinate of the vertex of the prism. Must be in - meters. - northing : float - Shifted northing coordinate of the vertex of the prism. Must be in - meters. - upward : float - Shifted upward coordinate of the vertex of the prism. Must be in - meters. + easting, northing, upward : float + Shifted easting, northing and upward coordinates of the vertex of the + prism. Must be in meters. radius : float Square root of the sum of the squares of the ``easting``, ``northing`` and ``upward`` shifted coordinates. @@ -601,15 +559,9 @@ def kernel_en(easting, northing, upward, radius): Parameters ---------- - easting : float - Shifted easting coordinate of the vertex of the prism. Must be in - meters. - northing : float - Shifted northing coordinate of the vertex of the prism. Must be in - meters. - upward : float - Shifted upward coordinate of the vertex of the prism. Must be in - meters. + easting, northing, upward : float + Shifted easting, northing and upward coordinates of the vertex of the + prism. Must be in meters. radius : float Square root of the sum of the squares of the ``easting``, ``northing`` and ``upward`` shifted coordinates. @@ -666,15 +618,9 @@ def kernel_eu(easting, northing, upward, radius): Parameters ---------- - easting : float - Shifted easting coordinate of the vertex of the prism. Must be in - meters. - northing : float - Shifted northing coordinate of the vertex of the prism. Must be in - meters. - upward : float - Shifted upward coordinate of the vertex of the prism. Must be in - meters. + easting, northing, upward : float + Shifted easting, northing and upward coordinates of the vertex of the + prism. Must be in meters. radius : float Square root of the sum of the squares of the ``easting``, ``northing`` and ``upward`` shifted coordinates. @@ -731,15 +677,9 @@ def kernel_nu(easting, northing, upward, radius): Parameters ---------- - easting : float - Shifted easting coordinate of the vertex of the prism. Must be in - meters. - northing : float - Shifted northing coordinate of the vertex of the prism. Must be in - meters. - upward : float - Shifted upward coordinate of the vertex of the prism. Must be in - meters. + easting, northing, upward : float + Shifted easting, northing and upward coordinates of the vertex of the + prism. Must be in meters. radius : float Square root of the sum of the squares of the ``easting``, ``northing`` and ``upward`` shifted coordinates. @@ -833,7 +773,7 @@ def _safe_log(x, y, z, r): x : float Shifted coordinate of the prism vertex that will be used for evaluating the log. - y, z : floats + y, z : float The other two shifted coordinates of the prism vertex. They are used to determine if ``abs(x) == r`` with more accuracy, and to evaluate the log function to avoid floating point errors when :math:`x < 0` and @@ -914,15 +854,9 @@ def kernel_eee(easting, northing, upward, radius): Parameters ---------- - easting : float - Shifted easting coordinate of the vertex of the prism. Must be in - meters. - northing : float - Shifted northing coordinate of the vertex of the prism. Must be in - meters. - upward : float - Shifted upward coordinate of the vertex of the prism. Must be in - meters. + easting, northing, upward : float + Shifted easting, northing and upward coordinates of the vertex of the + prism. Must be in meters. radius : float Square root of the sum of the squares of the ``easting``, ``northing`` and ``upward`` shifted coordinates. @@ -972,15 +906,9 @@ def kernel_nnn(easting, northing, upward, radius): Parameters ---------- - easting : float - Shifted easting coordinate of the vertex of the prism. Must be in - meters. - northing : float - Shifted northing coordinate of the vertex of the prism. Must be in - meters. - upward : float - Shifted upward coordinate of the vertex of the prism. Must be in - meters. + easting, northing, upward : float + Shifted easting, northing and upward coordinates of the vertex of the + prism. Must be in meters. radius : float Square root of the sum of the squares of the ``easting``, ``northing`` and ``upward`` shifted coordinates. @@ -1030,15 +958,9 @@ def kernel_uuu(easting, northing, upward, radius): Parameters ---------- - easting : float - Shifted easting coordinate of the vertex of the prism. Must be in - meters. - northing : float - Shifted northing coordinate of the vertex of the prism. Must be in - meters. - upward : float - Shifted upward coordinate of the vertex of the prism. Must be in - meters. + easting, northing, upward : float + Shifted easting, northing and upward coordinates of the vertex of the + prism. Must be in meters. radius : float Square root of the sum of the squares of the ``easting``, ``northing`` and ``upward`` shifted coordinates. @@ -1088,15 +1010,9 @@ def kernel_een(easting, northing, upward, radius): Parameters ---------- - easting : float - Shifted easting coordinate of the vertex of the prism. Must be in - meters. - northing : float - Shifted northing coordinate of the vertex of the prism. Must be in - meters. - upward : float - Shifted upward coordinate of the vertex of the prism. Must be in - meters. + easting, northing, upward : float + Shifted easting, northing and upward coordinates of the vertex of the + prism. Must be in meters. radius : float Square root of the sum of the squares of the ``easting``, ``northing`` and ``upward`` shifted coordinates. @@ -1146,15 +1062,9 @@ def kernel_eeu(easting, northing, upward, radius): Parameters ---------- - easting : float - Shifted easting coordinate of the vertex of the prism. Must be in - meters. - northing : float - Shifted northing coordinate of the vertex of the prism. Must be in - meters. - upward : float - Shifted upward coordinate of the vertex of the prism. Must be in - meters. + easting, northing, upward : float + Shifted easting, northing and upward coordinates of the vertex of the + prism. Must be in meters. radius : float Square root of the sum of the squares of the ``easting``, ``northing`` and ``upward`` shifted coordinates. @@ -1204,15 +1114,9 @@ def kernel_enn(easting, northing, upward, radius): Parameters ---------- - easting : float - Shifted easting coordinate of the vertex of the prism. Must be in - meters. - northing : float - Shifted northing coordinate of the vertex of the prism. Must be in - meters. - upward : float - Shifted upward coordinate of the vertex of the prism. Must be in - meters. + easting, northing, upward : float + Shifted easting, northing and upward coordinates of the vertex of the + prism. Must be in meters. radius : float Square root of the sum of the squares of the ``easting``, ``northing`` and ``upward`` shifted coordinates. @@ -1262,15 +1166,9 @@ def kernel_nnu(easting, northing, upward, radius): Parameters ---------- - easting : float - Shifted easting coordinate of the vertex of the prism. Must be in - meters. - northing : float - Shifted northing coordinate of the vertex of the prism. Must be in - meters. - upward : float - Shifted upward coordinate of the vertex of the prism. Must be in - meters. + easting, northing, upward : float + Shifted easting, northing and upward coordinates of the vertex of the + prism. Must be in meters. radius : float Square root of the sum of the squares of the ``easting``, ``northing`` and ``upward`` shifted coordinates. @@ -1320,15 +1218,9 @@ def kernel_euu(easting, northing, upward, radius): Parameters ---------- - easting : float - Shifted easting coordinate of the vertex of the prism. Must be in - meters. - northing : float - Shifted northing coordinate of the vertex of the prism. Must be in - meters. - upward : float - Shifted upward coordinate of the vertex of the prism. Must be in - meters. + easting, northing, upward : float + Shifted easting, northing and upward coordinates of the vertex of the + prism. Must be in meters. radius : float Square root of the sum of the squares of the ``easting``, ``northing`` and ``upward`` shifted coordinates. @@ -1378,15 +1270,9 @@ def kernel_nuu(easting, northing, upward, radius): Parameters ---------- - easting : float - Shifted easting coordinate of the vertex of the prism. Must be in - meters. - northing : float - Shifted northing coordinate of the vertex of the prism. Must be in - meters. - upward : float - Shifted upward coordinate of the vertex of the prism. Must be in - meters. + easting, northing, upward : float + Shifted easting, northing and upward coordinates of the vertex of the + prism. Must be in meters. radius : float Square root of the sum of the squares of the ``easting``, ``northing`` and ``upward`` shifted coordinates. @@ -1436,15 +1322,9 @@ def kernel_enu(easting, northing, upward, radius): Parameters ---------- - easting : float - Shifted easting coordinate of the vertex of the prism. Must be in - meters. - northing : float - Shifted northing coordinate of the vertex of the prism. Must be in - meters. - upward : float - Shifted upward coordinate of the vertex of the prism. Must be in - meters. + easting, northing, upward : float + Shifted easting, northing and upward coordinates of the vertex of the + prism. Must be in meters. radius : float Square root of the sum of the squares of the ``easting``, ``northing`` and ``upward`` shifted coordinates. @@ -1498,7 +1378,7 @@ def _kernel_iii(x_i, x_j, x_k, radius): Parameters ---------- - x_i, x_j, x_k : floats + x_i, x_j, x_k : float Shifted coordinates of the vertex of the prism. Must be in meters. radius : float Square root of the sum of the squares of the ``x_i``, ``x_j``, and @@ -1558,7 +1438,7 @@ def _kernel_iij(x_i, x_j, x_k, radius): Parameters ---------- - x_i, x_j, x_k : floats + x_i, x_j, x_k : float Shifted coordinates of the vertex of the prism. Must be in meters. radius : float Square root of the sum of the squares of the ``x_i``, ``x_j``, and diff --git a/choclo/prism/_magnetic.py b/choclo/prism/_magnetic.py index d8ff39c9..598e84a3 100644 --- a/choclo/prism/_magnetic.py +++ b/choclo/prism/_magnetic.py @@ -68,24 +68,11 @@ def magnetic_field( Parameters ---------- - easting : float - Easting coordinate of the observation point. Must be in meters. - northing : float - Northing coordinate of the observation point. Must be in meters. - upward : float - Upward coordinate of the observation point. Must be in meters. - prism_west : float - The West boundary of the prism. Must be in meters. - prism_east : float - The East boundary of the prism. Must be in meters. - prism_south : float - The South boundary of the prism. Must be in meters. - prism_north : float - The North boundary of the prism. Must be in meters. - prism_bottom : float - The bottom boundary of the prism. Must be in meters. - prism_top : float - The top boundary of the prism. Must be in meters. + easting, northing, upward : float + Easting, northing and upward coordinates of the observation point. Must + be in meters. + prism_west, prism_east, prism_south, prism_north, prism_bottom, prism_top : float + The boundaries of the prism. Must be in meters. magnetization_east : float The East component of the magnetization vector of the prism. Must be in :math:`A m^{-1}`. @@ -98,19 +85,9 @@ def magnetic_field( Returns ------- - b_e : float - Easting component of the magnetic field generated by the prism - on the observation point in :math:`\text{T}`. - It will be ``numpy.nan`` if the observation point falls in a singular - point: prism vertices, prism edges or interior points. - b_n : float - Northing component of the magnetic field generated by the prism - on the observation point in :math:`\text{T}`. - It will be ``numpy.nan`` if the observation point falls in a singular - point: prism vertices, prism edges or interior points. - b_u : float - Upward component of the magnetic field generated by the prism - on the observation point in :math:`\text{T}`. + b_e, b_n, b_u : float + Easting, northing and upward component of the magnetic field generated + by the prism on the observation point in :math:`\text{T}`. It will be ``numpy.nan`` if the observation point falls in a singular point: prism vertices, prism edges or interior points. @@ -396,24 +373,11 @@ def magnetic_e( Parameters ---------- - easting : float - Easting coordinate of the observation point. Must be in meters. - northing : float - Northing coordinate of the observation point. Must be in meters. - upward : float - Upward coordinate of the observation point. Must be in meters. - prism_west : float - The West boundary of the prism. Must be in meters. - prism_east : float - The East boundary of the prism. Must be in meters. - prism_south : float - The South boundary of the prism. Must be in meters. - prism_north : float - The North boundary of the prism. Must be in meters. - prism_bottom : float - The bottom boundary of the prism. Must be in meters. - prism_top : float - The top boundary of the prism. Must be in meters. + easting, northing, upward : float + Easting, northing and upward coordinates of the observation point. Must + be in meters. + prism_west, prism_east, prism_south, prism_north, prism_bottom, prism_top : float + The boundaries of the prism. Must be in meters. magnetization_east : float The East component of the magnetization vector of the prism. Must be in :math:`A m^{-1}`. @@ -583,24 +547,11 @@ def magnetic_n( Parameters ---------- - easting : float - Easting coordinate of the observation point. Must be in meters. - northing : float - Northing coordinate of the observation point. Must be in meters. - upward : float - Upward coordinate of the observation point. Must be in meters. - prism_west : float - The West boundary of the prism. Must be in meters. - prism_east : float - The East boundary of the prism. Must be in meters. - prism_south : float - The South boundary of the prism. Must be in meters. - prism_north : float - The North boundary of the prism. Must be in meters. - prism_bottom : float - The bottom boundary of the prism. Must be in meters. - prism_top : float - The top boundary of the prism. Must be in meters. + easting, northing, upward : float + Easting, northing and upward coordinates of the observation point. Must + be in meters. + prism_west, prism_east, prism_south, prism_north, prism_bottom, prism_top : float + The boundaries of the prism. Must be in meters. magnetization_east : float The East component of the magnetization vector of the prism. Must be in :math:`A m^{-1}`. @@ -770,24 +721,11 @@ def magnetic_u( Parameters ---------- - easting : float - Easting coordinate of the observation point. Must be in meters. - northing : float - Northing coordinate of the observation point. Must be in meters. - upward : float - Upward coordinate of the observation point. Must be in meters. - prism_west : float - The West boundary of the prism. Must be in meters. - prism_east : float - The East boundary of the prism. Must be in meters. - prism_south : float - The South boundary of the prism. Must be in meters. - prism_north : float - The North boundary of the prism. Must be in meters. - prism_bottom : float - The bottom boundary of the prism. Must be in meters. - prism_top : float - The top boundary of the prism. Must be in meters. + easting, northing, upward : float + Easting, northing and upward coordinates of the observation point. Must + be in meters. + prism_west, prism_east, prism_south, prism_north, prism_bottom, prism_top : float + The boundaries of the prism. Must be in meters. magnetization_east : float The East component of the magnetization vector of the prism. Must be in :math:`A m^{-1}`. @@ -957,24 +895,11 @@ def magnetic_ee( Parameters ---------- - easting : float - Easting coordinate of the observation point. Must be in meters. - northing : float - Northing coordinate of the observation point. Must be in meters. - upward : float - Upward coordinate of the observation point. Must be in meters. - prism_west : float - The West boundary of the prism. Must be in meters. - prism_east : float - The East boundary of the prism. Must be in meters. - prism_south : float - The South boundary of the prism. Must be in meters. - prism_north : float - The North boundary of the prism. Must be in meters. - prism_bottom : float - The bottom boundary of the prism. Must be in meters. - prism_top : float - The top boundary of the prism. Must be in meters. + easting, northing, upward : float + Easting, northing and upward coordinates of the observation point. Must + be in meters. + prism_west, prism_east, prism_south, prism_north, prism_bottom, prism_top : float + The boundaries of the prism. Must be in meters. magnetization_east : float The East component of the magnetization vector of the prism. Must be in :math:`A m^{-1}`. @@ -1105,24 +1030,11 @@ def magnetic_nn( Parameters ---------- - easting : float - Easting coordinate of the observation point. Must be in meters. - northing : float - Northing coordinate of the observation point. Must be in meters. - upward : float - Upward coordinate of the observation point. Must be in meters. - prism_west : float - The West boundary of the prism. Must be in meters. - prism_east : float - The East boundary of the prism. Must be in meters. - prism_south : float - The South boundary of the prism. Must be in meters. - prism_north : float - The North boundary of the prism. Must be in meters. - prism_bottom : float - The bottom boundary of the prism. Must be in meters. - prism_top : float - The top boundary of the prism. Must be in meters. + easting, northing, upward : float + Easting, northing and upward coordinates of the observation point. Must + be in meters. + prism_west, prism_east, prism_south, prism_north, prism_bottom, prism_top : float + The boundaries of the prism. Must be in meters. magnetization_east : float The East component of the magnetization vector of the prism. Must be in :math:`A m^{-1}`. @@ -1253,24 +1165,11 @@ def magnetic_uu( Parameters ---------- - easting : float - Easting coordinate of the observation point. Must be in meters. - northing : float - Northing coordinate of the observation point. Must be in meters. - upward : float - Upward coordinate of the observation point. Must be in meters. - prism_west : float - The West boundary of the prism. Must be in meters. - prism_east : float - The East boundary of the prism. Must be in meters. - prism_south : float - The South boundary of the prism. Must be in meters. - prism_north : float - The North boundary of the prism. Must be in meters. - prism_bottom : float - The bottom boundary of the prism. Must be in meters. - prism_top : float - The top boundary of the prism. Must be in meters. + easting, northing, upward : float + Easting, northing and upward coordinates of the observation point. Must + be in meters. + prism_west, prism_east, prism_south, prism_north, prism_bottom, prism_top : float + The boundaries of the prism. Must be in meters. magnetization_east : float The East component of the magnetization vector of the prism. Must be in :math:`A m^{-1}`. @@ -1401,24 +1300,11 @@ def magnetic_en( Parameters ---------- - easting : float - Easting coordinate of the observation point. Must be in meters. - northing : float - Northing coordinate of the observation point. Must be in meters. - upward : float - Upward coordinate of the observation point. Must be in meters. - prism_west : float - The West boundary of the prism. Must be in meters. - prism_east : float - The East boundary of the prism. Must be in meters. - prism_south : float - The South boundary of the prism. Must be in meters. - prism_north : float - The North boundary of the prism. Must be in meters. - prism_bottom : float - The bottom boundary of the prism. Must be in meters. - prism_top : float - The top boundary of the prism. Must be in meters. + easting, northing, upward : float + Easting, northing and upward coordinates of the observation point. Must + be in meters. + prism_west, prism_east, prism_south, prism_north, prism_bottom, prism_top : float + The boundaries of the prism. Must be in meters. magnetization_east : float The East component of the magnetization vector of the prism. Must be in :math:`A m^{-1}`. @@ -1549,24 +1435,11 @@ def magnetic_eu( Parameters ---------- - easting : float - Easting coordinate of the observation point. Must be in meters. - northing : float - Northing coordinate of the observation point. Must be in meters. - upward : float - Upward coordinate of the observation point. Must be in meters. - prism_west : float - The West boundary of the prism. Must be in meters. - prism_east : float - The East boundary of the prism. Must be in meters. - prism_south : float - The South boundary of the prism. Must be in meters. - prism_north : float - The North boundary of the prism. Must be in meters. - prism_bottom : float - The bottom boundary of the prism. Must be in meters. - prism_top : float - The top boundary of the prism. Must be in meters. + easting, northing, upward : float + Easting, northing and upward coordinates of the observation point. Must + be in meters. + prism_west, prism_east, prism_south, prism_north, prism_bottom, prism_top : float + The boundaries of the prism. Must be in meters. magnetization_east : float The East component of the magnetization vector of the prism. Must be in :math:`A m^{-1}`. @@ -1697,24 +1570,11 @@ def magnetic_nu( Parameters ---------- - easting : float - Easting coordinate of the observation point. Must be in meters. - northing : float - Northing coordinate of the observation point. Must be in meters. - upward : float - Upward coordinate of the observation point. Must be in meters. - prism_west : float - The West boundary of the prism. Must be in meters. - prism_east : float - The East boundary of the prism. Must be in meters. - prism_south : float - The South boundary of the prism. Must be in meters. - prism_north : float - The North boundary of the prism. Must be in meters. - prism_bottom : float - The bottom boundary of the prism. Must be in meters. - prism_top : float - The top boundary of the prism. Must be in meters. + easting, northing, upward : float + Easting, northing and upward coordinates of the observation point. Must + be in meters. + prism_west, prism_east, prism_south, prism_north, prism_bottom, prism_top : float + The boundaries of the prism. Must be in meters. magnetization_east : float The East component of the magnetization vector of the prism. Must be in :math:`A m^{-1}`. @@ -1849,15 +1709,11 @@ def _calculate_component( Parameters ---------- - easting, northing, upward : floats + easting, northing, upward : float Coordinates of the observation point. Must be in meters. - prism_west, prism_east : floats - The easting boundaries of the prism. Must be in meters. - prism_south, prism_north : floats - The northing boundaries of the prism. Must be in meters. - prism_bottom, prism_top : floats - The upward boundaries of the prism. Must be in meters. - magnetization_east, magnetization_north, magnetization_up : floats + prism_west, prism_east, prism_south, prism_north, prism_bottom, prism_top : float + The boundaries of the prism. Must be in meters. + magnetization_east, magnetization_north, magnetization_up : float The components of the magnetization vector of the prism. Must be in :math:`A m^{-1}`. kernel_i, kernel_j, kernel_k : callables diff --git a/choclo/prism/_utils.py b/choclo/prism/_utils.py index 30998639..2c43b172 100644 --- a/choclo/prism/_utils.py +++ b/choclo/prism/_utils.py @@ -31,24 +31,11 @@ def is_interior_point( Parameters ---------- - easting : float - Easting coordinate of the observation point. Must be in meters. - northing : float - Northing coordinate of the observation point. Must be in meters. - upward : float - Upward coordinate of the observation point. Must be in meters. - prism_west : float - The West boundary of the prism. Must be in meters. - prism_east : float - The East boundary of the prism. Must be in meters. - prism_south : float - The South boundary of the prism. Must be in meters. - prism_north : float - The North boundary of the prism. Must be in meters. - prism_bottom : float - The bottom boundary of the prism. Must be in meters. - prism_top : float - The top boundary of the prism. Must be in meters. + easting, northing, upward : float + Easting, northing and upward coordinates of the observation point. Must + be in meters. + prism_west, prism_east, prism_south, prism_north, prism_bottom, prism_top : float + The boundaries of the prism. Must be in meters. Returns ------- @@ -83,24 +70,11 @@ def is_point_on_edge( Parameters ---------- - easting : float - Easting coordinate of the observation point. Must be in meters. - northing : float - Northing coordinate of the observation point. Must be in meters. - upward : float - Upward coordinate of the observation point. Must be in meters. - prism_west : float - The West boundary of the prism. Must be in meters. - prism_east : float - The East boundary of the prism. Must be in meters. - prism_south : float - The South boundary of the prism. Must be in meters. - prism_north : float - The North boundary of the prism. Must be in meters. - prism_bottom : float - The bottom boundary of the prism. Must be in meters. - prism_top : float - The top boundary of the prism. Must be in meters. + easting, northing, upward : float + Easting, northing and upward coordinates of the observation point. Must + be in meters. + prism_west, prism_east, prism_south, prism_north, prism_bottom, prism_top : float + The boundaries of the prism. Must be in meters. Returns ------- @@ -167,24 +141,11 @@ def is_point_on_easting_edge( Parameters ---------- - easting : float - Easting coordinate of the observation point. Must be in meters. - northing : float - Northing coordinate of the observation point. Must be in meters. - upward : float - Upward coordinate of the observation point. Must be in meters. - prism_west : float - The West boundary of the prism. Must be in meters. - prism_east : float - The East boundary of the prism. Must be in meters. - prism_south : float - The South boundary of the prism. Must be in meters. - prism_north : float - The North boundary of the prism. Must be in meters. - prism_bottom : float - The bottom boundary of the prism. Must be in meters. - prism_top : float - The top boundary of the prism. Must be in meters. + easting, northing, upward : float + Easting, northing and upward coordinates of the observation point. Must + be in meters. + prism_west, prism_east, prism_south, prism_north, prism_bottom, prism_top : float + The boundaries of the prism. Must be in meters. Returns ------- @@ -222,24 +183,11 @@ def is_point_on_northing_edge( Parameters ---------- - easting : float - Easting coordinate of the observation point. Must be in meters. - northing : float - Northing coordinate of the observation point. Must be in meters. - upward : float - Upward coordinate of the observation point. Must be in meters. - prism_west : float - The West boundary of the prism. Must be in meters. - prism_east : float - The East boundary of the prism. Must be in meters. - prism_south : float - The South boundary of the prism. Must be in meters. - prism_north : float - The North boundary of the prism. Must be in meters. - prism_bottom : float - The bottom boundary of the prism. Must be in meters. - prism_top : float - The top boundary of the prism. Must be in meters. + easting, northing, upward : float + Easting, northing and upward coordinates of the observation point. Must + be in meters. + prism_west, prism_east, prism_south, prism_north, prism_bottom, prism_top : float + The boundaries of the prism. Must be in meters. Returns ------- @@ -277,24 +225,11 @@ def is_point_on_upward_edge( Parameters ---------- - easting : float - Easting coordinate of the observation point. Must be in meters. - northing : float - Northing coordinate of the observation point. Must be in meters. - upward : float - Upward coordinate of the observation point. Must be in meters. - prism_west : float - The West boundary of the prism. Must be in meters. - prism_east : float - The East boundary of the prism. Must be in meters. - prism_south : float - The South boundary of the prism. Must be in meters. - prism_north : float - The North boundary of the prism. Must be in meters. - prism_bottom : float - The bottom boundary of the prism. Must be in meters. - prism_top : float - The top boundary of the prism. Must be in meters. + easting, northing, upward : float + Easting, northing and upward coordinates of the observation point. Must + be in meters. + prism_west, prism_east, prism_south, prism_north, prism_bottom, prism_top : float + The boundaries of the prism. Must be in meters. Returns ------- @@ -332,24 +267,11 @@ def is_point_on_east_face( Parameters ---------- - easting : float - Easting coordinate of the observation point. Must be in meters. - northing : float - Northing coordinate of the observation point. Must be in meters. - upward : float - Upward coordinate of the observation point. Must be in meters. - prism_west : float - The West boundary of the prism. Must be in meters. - prism_east : float - The East boundary of the prism. Must be in meters. - prism_south : float - The South boundary of the prism. Must be in meters. - prism_north : float - The North boundary of the prism. Must be in meters. - prism_bottom : float - The bottom boundary of the prism. Must be in meters. - prism_top : float - The top boundary of the prism. Must be in meters. + easting, northing, upward : float + Easting, northing and upward coordinates of the observation point. Must + be in meters. + prism_west, prism_east, prism_south, prism_north, prism_bottom, prism_top : float + The boundaries of the prism. Must be in meters. Returns ------- @@ -388,24 +310,11 @@ def is_point_on_north_face( Parameters ---------- - easting : float - Easting coordinate of the observation point. Must be in meters. - northing : float - Northing coordinate of the observation point. Must be in meters. - upward : float - Upward coordinate of the observation point. Must be in meters. - prism_west : float - The West boundary of the prism. Must be in meters. - prism_east : float - The East boundary of the prism. Must be in meters. - prism_south : float - The South boundary of the prism. Must be in meters. - prism_north : float - The North boundary of the prism. Must be in meters. - prism_bottom : float - The bottom boundary of the prism. Must be in meters. - prism_top : float - The top boundary of the prism. Must be in meters. + easting, northing, upward : float + Easting, northing and upward coordinates of the observation point. Must + be in meters. + prism_west, prism_east, prism_south, prism_north, prism_bottom, prism_top : float + The boundaries of the prism. Must be in meters. Returns ------- @@ -443,24 +352,11 @@ def is_point_on_top_face( Parameters ---------- - easting : float - Easting coordinate of the observation point. Must be in meters. - northing : float - Northing coordinate of the observation point. Must be in meters. - upward : float - Upward coordinate of the observation point. Must be in meters. - prism_west : float - The West boundary of the prism. Must be in meters. - prism_east : float - The East boundary of the prism. Must be in meters. - prism_south : float - The South boundary of the prism. Must be in meters. - prism_north : float - The North boundary of the prism. Must be in meters. - prism_bottom : float - The bottom boundary of the prism. Must be in meters. - prism_top : float - The top boundary of the prism. Must be in meters. + easting, northing, upward : float + Easting, northing and upward coordinates of the observation point. Must + be in meters. + prism_west, prism_east, prism_south, prism_north, prism_bottom, prism_top : float + The boundaries of the prism. Must be in meters. Returns ------- diff --git a/choclo/utils.py b/choclo/utils.py index 1a07325f..76cdaeae 100644 --- a/choclo/utils.py +++ b/choclo/utils.py @@ -24,18 +24,10 @@ def distance_cartesian( Parameters ---------- - easting_p : float - Easting coordinate of point :math:`\mathbf{p}`. - northing_p : float - Northing coordinate of point :math:`\mathbf{p}`. - upward_p : float - Upward coordinate of point :math:`\mathbf{p}`. - easting_q : float - Easting coordinate of point :math:`\mathbf{q}`. - northing_q : float - Northing coordinate of point :math:`\mathbf{q}`. - upward_q : float - Upward coordinate of point :math:`\mathbf{q}`. + easting_p, northing_p, upward_p : float + Easting, northing and upward coordinates of point :math:`\mathbf{p}`. + easting_q, northing_q, upward_q : float + Easting, northing and upward coordinates of point :math:`\mathbf{q}`. Returns ------- @@ -75,23 +67,20 @@ def distance_spherical( Parameters ---------- - longitude_p : float - Longitude coordinate of point :math:`\mathbf{p}` in degrees. - latitude_p : float - Latitude coordinate of point :math:`\mathbf{p}` in degrees. - radius_p : float - Radial coordinate of point :math:`\mathbf{p}` in meters. - longitude_q : float - Longitude coordinate of point :math:`\mathbf{q}` in degrees. - latitude_q : float - Latitude coordinate of point :math:`\mathbf{q}` in degrees. - radius_q : float - Radial coordinate of point :math:`\mathbf{q}` in meters. + longitude_p, latitude_p, radius_p : float + Longitude, latitude and radial coordinates of point :math:`\mathbf{p}`. + Longitude and latitude must be in degrees. Radial coordinate should be + in meters. + longitude_q, latitude_q, radius_q : float + Longitude, latitude and radial coordinates of point :math:`\mathbf{q}`. + Longitude and latitude must be in degrees. Radial coordinate should be + in meters. Returns ------- distance : float - Euclidean distance between ``point_p`` and ``point_q``. + Euclidean distance between point :math:`\mathbf{p}` and point + :math:`\mathbf{q}`. Notes -----