Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Draft
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
377 commits
Select commit Hold shift + click to select a range
6f5f3bc
SI fix circle class
OrtnerMichael Dec 25, 2023
fe2952f
docstrings to SI
OrtnerMichael Dec 26, 2023
0993fa6
field wrap SI units fix
OrtnerMichael Dec 26, 2023
1559c1b
test bugfix include now fix #279 (cylinder bug)
OrtnerMichael Dec 27, 2023
b356f82
update
Alexboiboi Dec 27, 2023
d8a9e36
Merge branch 'main' of https://github.com/magpylib/magpylib into magn…
Alexboiboi Dec 27, 2023
c8871bf
Merge branch 'magnetization_polarization' of https://github.com/magpy…
Alexboiboi Dec 27, 2023
1363385
update Readme
Alexboiboi Dec 27, 2023
500a016
Merge branch 'main' of https://github.com/magpylib/magpylib into magn…
Alexboiboi Dec 28, 2023
4d7498e
Merge branch 'magnetization_polarization' of https://github.com/magpy…
Alexboiboi Dec 28, 2023
ae4dbc0
rework readme
Alexboiboi Dec 28, 2023
86a0d97
fix test
Alexboiboi Dec 28, 2023
d1f0a84
fix test
Alexboiboi Dec 28, 2023
4933b2d
replace units to SI in docstrings (code only)
Alexboiboi Dec 28, 2023
908e385
Merge branch 'magnetization_polarization' of https://github.com/magpy…
Alexboiboi Dec 28, 2023
7ed7f7b
fix units in get started
Alexboiboi Dec 28, 2023
dc6718e
replace dot separator (mpl font compat)
Alexboiboi Dec 28, 2023
3aba260
fix units docu graphics
Alexboiboi Dec 28, 2023
3c7566c
rename direct interface to functional interface
Alexboiboi Dec 28, 2023
f13815c
reorder docstring parameters
Alexboiboi Dec 28, 2023
4dfa16b
reorder param customsource
Alexboiboi Dec 28, 2023
cdc2108
fix units in docu magpylib api
Alexboiboi Dec 29, 2023
d7846df
Fix end of shaft
Alexboiboi Dec 29, 2023
0956c46
fix compound example
Alexboiboi Dec 29, 2023
f4375b0
add virutal documents (from myst & jupytext)
Alexboiboi Dec 29, 2023
7df406c
fix field interpolation
Alexboiboi Dec 29, 2023
419ba7d
fix shapes convex hull
Alexboiboi Dec 29, 2023
fc22ca2
fix shapes pyvista
Alexboiboi Dec 29, 2023
d5bb0f7
bump to v5 dev version
Alexboiboi Dec 29, 2023
a0f4508
bad columns v5 vs v4
Alexboiboi Dec 29, 2023
b1381e8
fix shapes superpos
Alexboiboi Dec 29, 2023
b7f1ab6
fix shapes triangle
Alexboiboi Dec 29, 2023
48b615a
fix tutorial collection
Alexboiboi Dec 29, 2023
d7b0929
fix tutorial field computation
Alexboiboi Dec 29, 2023
9e59ae5
fix tutorial path
Alexboiboi Dec 29, 2023
6d83142
better unit exponent display
Alexboiboi Dec 29, 2023
fa32633
fix tutorial custom
Alexboiboi Dec 29, 2023
a6e46b3
rework tutorial field computation
Alexboiboi Dec 29, 2023
563d04e
fix tutorial trimesh
Alexboiboi Dec 29, 2023
b691581
fix vis mpl streamplot
Alexboiboi Dec 29, 2023
15077ce
fix vis pv streamlines
Alexboiboi Dec 29, 2023
2bfcf7a
unpin pyvista version
Alexboiboi Dec 29, 2023
4ad1260
fix units
Alexboiboi Dec 29, 2023
ea8011d
Merge branch 'magnetization_polarization' of https://github.com/magpy…
Alexboiboi Dec 29, 2023
f444d9f
pylint
Alexboiboi Dec 30, 2023
509f0d5
pylint
Alexboiboi Dec 30, 2023
4e7dd22
add in_out to toplevel + docstrings updates
Alexboiboi Jan 3, 2024
57b6170
fix in_out not passed on getB
Alexboiboi Jan 3, 2024
a678af3
pass in_out only for magnets
Alexboiboi Jan 3, 2024
e01f9f6
add getM and getJ to all top levels
Alexboiboi Jan 3, 2024
7cdea92
fix imports for getB and getM
Alexboiboi Jan 3, 2024
8628b98
add self consistency getHBMJ test
Alexboiboi Jan 3, 2024
c07104c
fix tests
Alexboiboi Jan 3, 2024
c092df6
pre-commit
Alexboiboi Jan 3, 2024
0a71c31
pylint
Alexboiboi Jan 3, 2024
3eeea43
avoid edge case warning
Alexboiboi Jan 3, 2024
c7beef9
pylint
Alexboiboi Jan 3, 2024
d9f4e18
fix Sensor default description and allow pixel=None
Alexboiboi Jan 4, 2024
dd7de3f
Merge branch 'magnetization_polarization' of https://github.com/magpy…
Alexboiboi Jan 4, 2024
9527793
draft
Alexboiboi Jan 8, 2024
b97b510
add pint
Alexboiboi Jan 8, 2024
e8602fe
fix kwargs_ndim
Alexboiboi Jan 8, 2024
e57b801
remove print
Alexboiboi Jan 8, 2024
a137d27
use unit_check decorator
Alexboiboi Jan 8, 2024
28cee92
rework get_description
Alexboiboi Jan 8, 2024
7735165
fix bad arg in mag pol codependency
Alexboiboi Jan 8, 2024
fe4dad8
rework more repr
Alexboiboi Jan 8, 2024
8635542
update
Alexboiboi Jan 8, 2024
83ce7f3
rework base disp repr tests
Alexboiboi Jan 8, 2024
536ebfc
fix test
Alexboiboi Jan 8, 2024
c39e495
Merge branch 'inside-outside-getM-getJ' of https://github.com/magpyli…
Alexboiboi Jan 8, 2024
df8dafa
fix disp repr
Alexboiboi Jan 8, 2024
0b29622
raise ModuleNotFound if pint not found
Alexboiboi Jan 8, 2024
f5c1882
draft currents
Alexboiboi Jan 8, 2024
eebe604
finish polyline
Alexboiboi Jan 8, 2024
74a2036
add Cylinder units
Alexboiboi Jan 8, 2024
b014ae8
add sphere units
Alexboiboi Jan 8, 2024
5e4db03
add dipole units
Alexboiboi Jan 8, 2024
f145e51
Add Sensor pixel unit
Alexboiboi Jan 8, 2024
c55a775
fix units in base transform
Alexboiboi Jan 8, 2024
25fb86e
fix display
Alexboiboi Jan 9, 2024
071bb4f
fix tetrahedron barycenter units
Alexboiboi Jan 9, 2024
c7be915
fix trimesh units
Alexboiboi Jan 9, 2024
a750813
fix sens getB
Alexboiboi Jan 9, 2024
706fd35
remove news
Alexboiboi Jan 9, 2024
6916a24
update docs
Alexboiboi Jan 9, 2024
278785f
Merge branch 'magnetization_polarization' of https://github.com/magpy…
Alexboiboi Jan 9, 2024
c84043c
Merge branch 'inside-outside-getM-getJ' of https://github.com/magpyli…
Alexboiboi Jan 9, 2024
3313101
allow gaussian unit conversion
Alexboiboi Jan 10, 2024
46ae050
add units modes
Alexboiboi Jan 10, 2024
cfc5529
set_units_mode typo
Alexboiboi Jan 10, 2024
39ce83c
fix codeql
Alexboiboi Jan 10, 2024
deaf0d1
Merge branch 'inside-outside-getM-getJ' of https://github.com/magpyli…
Alexboiboi Jan 10, 2024
0211330
units mode to defaults
Alexboiboi Jan 10, 2024
992a9d7
pylint
Alexboiboi Jan 10, 2024
35355b1
Merge branch 'inside-outside-getM-getJ' of https://github.com/magpyli…
Alexboiboi Jan 10, 2024
b0aa226
fix test
Alexboiboi Jan 10, 2024
53b041d
Merge branch 'inside-outside-getM-getJ' of https://github.com/magpyli…
Alexboiboi Jan 10, 2024
91c5b73
refactor into units submodule
Alexboiboi Jan 11, 2024
02e4cbd
upgrade sphinx
Alexboiboi Jan 15, 2024
ebdc397
add missing changelog dates
Alexboiboi Jan 15, 2024
84812c8
Merge branch 'magnetization_polarization' of https://github.com/magpy…
Alexboiboi Jan 15, 2024
857f8ea
Merge branch 'inside-outside-getM-getJ' of https://github.com/magpyli…
Alexboiboi Jan 15, 2024
49d6450
Merge branch 'inside-outside-getM-getJ' of https://github.com/magpyli…
Alexboiboi Jan 15, 2024
2daec27
convert to generic
Alexboiboi Jan 15, 2024
2ebf6f1
add unyt unit handler
Alexboiboi Jan 15, 2024
8cbf641
add docstrings + refactor
Alexboiboi Jan 16, 2024
6fe1b12
add unyt
Alexboiboi Jan 16, 2024
86cba11
remove obsolete ipygany and kaleido
Alexboiboi Jan 16, 2024
7f40d0d
Merge branch 'magnetization_polarization' of https://github.com/magpy…
Alexboiboi Jan 16, 2024
76f7a53
Merge branch 'inside-outside-getM-getJ' of https://github.com/magpyli…
Alexboiboi Jan 16, 2024
dd0457b
Merge branch 'feature/v5-units-multiple' of https://github.com/magpyl…
Alexboiboi Jan 16, 2024
b503caa
fix tests
Alexboiboi Jan 16, 2024
44acf30
pylint
Alexboiboi Jan 16, 2024
c671d99
Merge branch 'magnetization_polarization' of https://github.com/magpy…
Alexboiboi Jan 16, 2024
ba60613
Merge branch 'inside-outside-getM-getJ' of https://github.com/magpyli…
Alexboiboi Jan 16, 2024
872a9c9
syntax
Alexboiboi Jan 16, 2024
7d8ddb6
rework adding unithandler
Alexboiboi Jan 16, 2024
ee07b26
add astropy UnitHandler
Alexboiboi Jan 16, 2024
2da39ef
remove unnecessary check_units
Alexboiboi Jan 16, 2024
ea082e7
add astropy
Alexboiboi Jan 17, 2024
7b0b958
fix pyvista + tests
Alexboiboi Jan 17, 2024
bcb31d9
fix pyvista animation test
Alexboiboi Jan 17, 2024
3df6d70
code ql
Alexboiboi Jan 17, 2024
07a7e70
fix field_func input_checks tests
Alexboiboi Jan 17, 2024
db9a19f
add input_check sensor handedness
Alexboiboi Jan 17, 2024
c96db6c
BaseExcitation coverage
Alexboiboi Jan 17, 2024
48afbdd
fix different_pixel_shapes test
Alexboiboi Jan 17, 2024
a85947c
fix legend style and description handling + tests
Alexboiboi Jan 17, 2024
cd1efe4
pylint
Alexboiboi Jan 17, 2024
40b55a1
fix pyvista animation tests on CI
Alexboiboi Jan 17, 2024
96a01e2
empty commit
Alexboiboi Jan 17, 2024
e56077e
offscreen pyvista animation test
Alexboiboi Jan 17, 2024
5778535
Merge branch 'magnetization_polarization' of https://github.com/magpy…
Alexboiboi Jan 17, 2024
9df9753
Merge branch 'inside-outside-getM-getJ' of https://github.com/magpyli…
Alexboiboi Jan 17, 2024
fc38380
avoid test syntax collision with pytest + doctests
Alexboiboi Jan 17, 2024
56157cc
Merge branch 'magnetization_polarization' of https://github.com/magpy…
Alexboiboi Jan 17, 2024
986b4e2
Merge branch 'inside-outside-getM-getJ' of https://github.com/magpyli…
Alexboiboi Jan 17, 2024
44c9815
fix missing pyvista test pollution
Alexboiboi Jan 18, 2024
ed1195b
Merge branch 'magnetization_polarization' of https://github.com/magpy…
Alexboiboi Jan 18, 2024
4753934
Merge branch 'inside-outside-getM-getJ' of https://github.com/magpyli…
Alexboiboi Jan 18, 2024
c92020e
add UnitsHandler validation
Alexboiboi Jan 18, 2024
13b0a3c
override parent order
OrtnerMichael Jan 18, 2024
5963145
test named only on init_subclass UnitsHandler
Alexboiboi Jan 18, 2024
46d670d
renaming
Alexboiboi Jan 18, 2024
7b3c265
fix pkg_name for UnitHandler
Alexboiboi Jan 18, 2024
49fd80b
pylint
Alexboiboi Jan 18, 2024
eb95691
override_parent
OrtnerMichael Jan 19, 2024
5037507
some docu fixes
OrtnerMichael Jan 19, 2024
6a0d7f7
Merge branch 'magnetization_polarization' of https://github.com/magpy…
OrtnerMichael Jan 19, 2024
c40e79d
new image
OrtnerMichael Jan 19, 2024
95d904d
cast right types
Alexboiboi Jan 19, 2024
cf74b73
add HBMJ consistency tests
Alexboiboi Jan 19, 2024
3b1a4f6
pylint
Alexboiboi Jan 19, 2024
306f450
pylint
Alexboiboi Jan 19, 2024
90a88a8
Merge branch 'magnetization_polarization' of https://github.com/magpy…
Alexboiboi Jan 19, 2024
0a72354
Pull from main
Alexboiboi Jan 19, 2024
1ee1e17
Merge branch 'inside-outside-getM-getJ' of https://github.com/magpyli…
Alexboiboi Jan 19, 2024
1da5117
update
Alexboiboi Jan 19, 2024
53861f5
typo
Alexboiboi Jan 19, 2024
29b79ea
improve override message
Alexboiboi Jan 19, 2024
351dffa
fix coerce units mode
Alexboiboi Jan 19, 2024
b56232a
move units param from magpy.defaults.units to magpy.units
Alexboiboi Jan 21, 2024
88a910a
add class name not check input sig name
Alexboiboi Jan 22, 2024
ad3ab88
add consistent unit mode
Alexboiboi Jan 22, 2024
6d3ccab
update changelog
Alexboiboi Jan 23, 2024
17c6e1d
Merge branch 'inside-outside-getM-getJ' of https://github.com/magpyli…
Alexboiboi Jan 23, 2024
fe4784e
remove units in defaults
Alexboiboi Jan 23, 2024
ee39386
minifix
OrtnerMichael Jan 23, 2024
127e5d6
Merge branch 'inside-outside-getM-getJ' of https://github.com/magpyli…
OrtnerMichael Jan 23, 2024
b914e73
declare units registry on first call
Alexboiboi Jan 23, 2024
97d2373
core getM getJ tests
OrtnerMichael Jan 24, 2024
85e5cec
fix consistent units behavior (position type adapting)
Alexboiboi Jan 24, 2024
a94ce65
intermediate commit
OrtnerMichael Jan 24, 2024
b2e34d5
allow string scalar inputs
Alexboiboi Jan 24, 2024
1360c13
fix expected units in python syntax
Alexboiboi Jan 24, 2024
5316d0f
update registry on package change
Alexboiboi Jan 24, 2024
d4f56fc
allow quantities as getfield observers
Alexboiboi Jan 24, 2024
3383477
fix observers inputs
Alexboiboi Jan 25, 2024
69205ba
pylint
Alexboiboi Jan 25, 2024
26cb5d6
Merge branch 'main' of https://github.com/magpylib/magpylib into insi…
Alexboiboi Jan 25, 2024
dc65da2
forbid mode or package change middle script
Alexboiboi Jan 26, 2024
51bcad1
renaming
Alexboiboi Jan 26, 2024
d00a2ab
renaming
Alexboiboi Jan 26, 2024
ffad5e0
add M and J to show2D
Alexboiboi Jan 26, 2024
16a1183
Merge branch 'inside-outside-getM-getJ' of https://github.com/magpyli…
Alexboiboi Jan 26, 2024
e21daee
fix test
Alexboiboi Jan 27, 2024
f7af42a
fix subplots test
Alexboiboi Jan 27, 2024
9d9b5b6
Merge branch 'inside-outside-getM-getJ' of https://github.com/magpyli…
Alexboiboi Jan 27, 2024
3129c5e
adding mu_0 to top level using scipy mu0
OrtnerMichael Jan 27, 2024
917d4cf
Merge branch 'inside-outside-getM-getJ' of https://github.com/magpyli…
OrtnerMichael Jan 27, 2024
6b34ee4
cuboid and cylinder core fixes
OrtnerMichael Jan 27, 2024
acfa53a
BHJM dipole
OrtnerMichael Jan 28, 2024
1806372
BHJM circle
OrtnerMichael Jan 28, 2024
f838aae
BHJM cylinder segment
OrtnerMichael Jan 28, 2024
6d8da42
some fixes
OrtnerMichael Jan 28, 2024
da198a7
allow quantities for rotate_from_angax
Alexboiboi Jan 29, 2024
6e27bea
qucistage
OrtnerMichael Jan 30, 2024
8241aad
minifix: propagate separator kw in magic_to_dict
Alexboiboi Feb 7, 2024
b4cff0a
Merge branch 'inside-outside-getM-getJ' of https://github.com/magpyli…
Alexboiboi Feb 8, 2024
39c1dad
allow tests to run
Alexboiboi Feb 8, 2024
869a4eb
Merge branch 'inside-outside-getM-getJ' of https://github.com/magpyli…
Alexboiboi Feb 8, 2024
623fd28
Merge branch 'inside-outside-getM-getJ' of https://github.com/magpyli…
OrtnerMichael Feb 11, 2024
c4116e0
cylinder fix
OrtnerMichael Feb 11, 2024
2672762
sphere BHJM
OrtnerMichael Feb 11, 2024
d47c4d6
BHJM sphere
OrtnerMichael Feb 11, 2024
72bf33c
sphere field bugfix
OrtnerMichael Feb 11, 2024
0fdbcc9
fix doctests for obj classes
Alexboiboi Feb 12, 2024
77e2565
sphere 2/3 fix
OrtnerMichael Feb 13, 2024
3ae284f
cylindr segement BHJM fixed
OrtnerMichael Feb 19, 2024
ffa5c28
[pre-commit.ci] pre-commit autoupdate
pre-commit-ci[bot] Feb 19, 2024
79d61bc
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Feb 19, 2024
2d07261
fix field wrap getB getH pi redef
OrtnerMichael Feb 20, 2024
9ec9614
BHJM tetrahedron
OrtnerMichael Feb 20, 2024
7021312
BHJM triangle
OrtnerMichael Feb 20, 2024
47e2f4e
remove type hint
OrtnerMichael Feb 21, 2024
e2c90df
BHJM triangular mesh
OrtnerMichael Feb 21, 2024
3d2513c
BHJM current polyline
OrtnerMichael Feb 21, 2024
b0b653e
minifix
OrtnerMichael Feb 21, 2024
b7588f3
Merge branch 'inside-outside-getM-getJ' of https://github.com/magpyli…
OrtnerMichael Feb 21, 2024
2509f2f
fix describe test resulting from mu0
OrtnerMichael Feb 21, 2024
2bbc9bb
remove convert_HBJM utility
OrtnerMichael Feb 22, 2024
5d5ce3c
review BHJM - fix MU0
OrtnerMichael Feb 22, 2024
1e3f81f
linting
OrtnerMichael Feb 22, 2024
b08b67b
linting and docstring minifix
OrtnerMichael Feb 22, 2024
70d5221
coverage
OrtnerMichael Feb 22, 2024
13870ee
pylint
Alexboiboi Feb 22, 2024
758bbf0
add in_out to tetra
OrtnerMichael Feb 24, 2024
525a4f7
Merge branch 'inside-outside-getM-getJ' of https://github.com/magpyli…
OrtnerMichael Feb 24, 2024
894ff25
*=0 -> =0
OrtnerMichael Feb 24, 2024
25e9760
BHJM docstrings
OrtnerMichael Feb 26, 2024
8dfb380
warning in_out
OrtnerMichael Feb 26, 2024
154ac24
pylint coverage fix in_out
OrtnerMichael Feb 26, 2024
571536d
linter
OrtnerMichael Feb 26, 2024
808c46e
Merge branch 'inside-outside-getM-getJ' of https://github.com/magpyli…
Alexboiboi Feb 27, 2024
c185825
update
Alexboiboi Feb 28, 2024
ab6c498
fix test imports
Alexboiboi Feb 28, 2024
8cea4a7
Merge branch 'main' of https://github.com/magpylib/magpylib into feat…
Alexboiboi Mar 6, 2024
d79a5e2
pylint
Alexboiboi Mar 6, 2024
6a334a3
Merge branch 'main' of https://github.com/magpylib/magpylib into feat…
Alexboiboi Mar 7, 2024
faa8ceb
Merge branch 'main' of https://github.com/magpylib/magpylib into pre-…
Alexboiboi Mar 7, 2024
6dcae48
switch to isort
Alexboiboi Mar 8, 2024
25bb764
Merge branch 'pre-commit-ci-update-config' of https://github.com/magp…
Alexboiboi Mar 8, 2024
accad7e
Merge branch 'main' of https://github.com/magpylib/magpylib into feat…
Alexboiboi Mar 8, 2024
ff2ee97
Merge branch 'main' of https://github.com/magpylib/magpylib into feat…
Alexboiboi Mar 13, 2024
45d5fbf
Merge branch 'main' of https://github.com/magpylib/magpylib into feat…
Alexboiboi Mar 15, 2024
3d84e77
Merge branch 'main' of https://github.com/magpylib/magpylib into feat…
Alexboiboi Jun 4, 2024
168c119
Merge branch 'main' of https://github.com/magpylib/magpylib into feat…
Alexboiboi Dec 31, 2024
e799030
fix merge
Alexboiboi Dec 31, 2024
45f713b
update
Alexboiboi Jan 1, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
docstrings to SI
  • Loading branch information
OrtnerMichael committed Dec 26, 2023
commit fe2952f6f02df167efd634e5f1f2797280400337
23 changes: 13 additions & 10 deletions magpylib/_src/obj_classes/class_Sensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,10 @@ class Sensor(BaseGeo, BaseDisplayRepr):
When `position=(0,0,0)` and `orientation=None` local object coordinates
coincide with the global coordinate system.

A sensor is made up of pixel (sensing elements) where the magnetic field is evaluated.
A sensor is made up of pixel (sensing elements / positions) where the magnetic
field is evaluated.

SI units are used for all inputs and outputs.

Parameters
----------
Expand Down Expand Up @@ -140,7 +143,7 @@ def handedness(self, val):
def getB(
self, *sources, sumup=False, squeeze=True, pixel_agg=None, output="ndarray"
):
"""Compute the B-field in units of tesla as seen by the sensor.
"""Compute the B-field in units of T as seen by the sensor.

Parameters
----------
Expand Down Expand Up @@ -168,14 +171,14 @@ def getB(
Returns
-------
B-field: ndarray, shape squeeze(l, m, n1, n2, ..., 3) or DataFrame
B-field of each source (l) at each path position (m) and each sensor pixel
position (n1,n2,...) in units of tesla. Paths of objects that are shorter than
m will be considered as static beyond their end.
B-field of each source (index l) at each path position (index m) and each sensor pixel
position (indices n1,n2,...) in units of T. Paths of objects that are shorter than
index m are considered as static beyond their end.

Examples
--------
Sensors are observers for magnetic field computation. In this example we compute the
B-field in units of tesla as seen by the sensor in the center of a circular current loop:
B-field in T as seen by the sensor in the center of a circular current loop:

>>> import magpylib as magpy
>>> sens = magpy.Sensor()
Expand Down Expand Up @@ -243,14 +246,14 @@ def getH(
Returns
-------
H-field: ndarray, shape squeeze(l, m, n1, n2, ..., 3) or DataFrame
H-field of each source (l) at each path position (m) and each sensor pixel
position (n1,n2,...) in units of A/m. Paths of objects that are shorter than
m will be considered as static beyond their end.
H-field of each source (index l) at each path position (index m) and each sensor pixel
position (indices n1,n2,...) in units of A/m. Paths of objects that are shorter than
index m are considered as static beyond their end.

Examples
--------
Sensors are observers for magnetic field computation. In this example we compute the
B-field in units of tesla as seen by the sensor in the center of a circular current loop:
B-field in T as seen by the sensor in the center of a circular current loop:

>>> import magpylib as magpy
>>> sens = magpy.Sensor()
Expand Down
6 changes: 4 additions & 2 deletions magpylib/_src/obj_classes/class_current_Polyline.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,15 @@


class Polyline(BaseCurrent):
"""Current flowing in straight lines from vertex to vertex.
"""Line current flowing in straight paths from vertex to vertex.

Can be used as `sources` input for magnetic field computation.

The vertex positions are defined in the local object coordinates (rotate with object).
When `position=(0,0,0)` and `orientation=None` global and local coordinates coincide.

SI units are used for all inputs and outputs.

Parameters
----------
current: float, default=`None`
Expand Down Expand Up @@ -49,7 +51,7 @@ class Polyline(BaseCurrent):

Examples
--------
`Polyline` objects are magnetic field sources. In this example we compute the H-field A/m
`Polyline` objects are magnetic field sources. In this example we compute the H-field in A/m
of a square-shaped line-current with 1 A current at the observer position (1,1,1) given in
units of meter:

Expand Down
8 changes: 4 additions & 4 deletions magpylib/_src/obj_classes/class_magnet_Cuboid.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,12 @@ class Cuboid(BaseMagnet):
to the global coordinate basis vectors and the geometric center of the Cuboid
is located in the origin.

Units .... Min = Bout, Jin = Hout, length units arbitrary
SI units are used for all inputs and outputs.

Parameters
----------
position: array_like, shape (3,) or (m,3), default=`(0,0,0)`
Object position(s) in the global coordinates in meter.
Object position(s) in the global coordinates in units of meter.
For m>1, the `position` and `orientation` attributes together
represent an object path.

Expand Down Expand Up @@ -54,8 +54,8 @@ class Cuboid(BaseMagnet):
Examples
--------
`Cuboid` magnets are magnetic field sources. Below we compute the H-field in A/m of a
cubical magnet with magnetic polarization of (0.5,0.6,0.7) in units of tesla and 0.01 m sides
at the observer position (0.01,0.01,0.01) given in units of meter:
cubical magnet with magnetic polarization of (0.5,0.6,0.7) in units of tesla and
0.01 meter sides at the observer position (0.01,0.01,0.01) given in units of meter:

>>> import magpylib as magpy
>>> src = magpy.magnet.Cuboid(polarization=(.5,.6,.7), dimension=(.01,.01,.01))
Expand Down
2 changes: 2 additions & 0 deletions magpylib/_src/obj_classes/class_magnet_Cylinder.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ class Cylinder(BaseMagnet):
cylinder lies in the origin of the global coordinate system and
the cylinder axis coincides with the global z-axis.

SI units are used for all inputs and outputs.

Parameters
----------
position: array_like, shape (3,) or (m,3), default=`(0,0,0)`
Expand Down
6 changes: 4 additions & 2 deletions magpylib/_src/obj_classes/class_magnet_CylinderSegment.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ class CylinderSegment(BaseMagnet):
the cylinder axis coincides with the global z-axis. Section angle 0
corresponds to an x-z plane section of the cylinder.

SI units are used for all inputs and outputs.

Parameters
----------
position: array_like, shape (3,) or (m,3), default=`(0,0,0)`
Expand Down Expand Up @@ -65,8 +67,8 @@ class CylinderSegment(BaseMagnet):
Examples
--------
`CylinderSegment` magnets are magnetic field sources. In this example we compute the
H-field A/m of such a cylinder segment magnet with polarization (.1,.2,.3)
in units of tesla, inner radius 0.01 meter, outer radius 0.02 m, height 0.01 meter, and
H-field in A/m of such a cylinder segment magnet with polarization (.1,.2,.3)
in units of tesla, inner radius 0.01 meter, outer radius 0.02 meter, height 0.01 meter, and
section angles 0 and 45 deg at the observer position (0.02,0.02,0.02) in units of meter:

>>> import magpylib as magpy
Expand Down
4 changes: 3 additions & 1 deletion magpylib/_src/obj_classes/class_magnet_Sphere.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ class Sphere(BaseMagnet):
When `position=(0,0,0)` and `orientation=None` the sphere center is located
in the origin of the global coordinate system.

SI units are used for all inputs and outputs.

Parameters
----------
position: array_like, shape (3,) or (m,3), default=`(0,0,0)`
Expand Down Expand Up @@ -50,7 +52,7 @@ class Sphere(BaseMagnet):

Examples
--------
`Sphere` objects are magnetic field sources. In this example we compute the H-field A/m
`Sphere` objects are magnetic field sources. In this example we compute the H-field in A/m
of a spherical magnet with polarization (0.1,0.2,0.3) in units of tesla and diameter
of 0.01 meter at the observer position (0.01,0.01,0.01) given in units of meter:

Expand Down
2 changes: 2 additions & 0 deletions magpylib/_src/obj_classes/class_magnet_Tetrahedron.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ class Tetrahedron(BaseMagnet):
is determined by its vertices and. It is not necessarily located in the origin an can
be computed with the barycenter property.

SI units are used for all inputs and outputs.

Parameters
----------
position: array_like, shape (3,) or (m,3)
Expand Down
15 changes: 13 additions & 2 deletions magpylib/_src/obj_classes/class_magnet_TriangularMesh.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,12 @@
class TriangularMesh(BaseMagnet):
"""Magnet with homogeneous magnetization defined by triangular surface mesh.
Can be used as `sources` input for magnetic field computation.

When `position=(0,0,0)` and `orientation=None` the TriangularMesh vertices
are the same as in the global coordinate system.

SI units are used for all inputs and outputs.

Parameters
----------
position: array_like, shape (3,) or (m,3), default=`(0,0,0)`
Expand Down Expand Up @@ -99,8 +102,8 @@ class TriangularMesh(BaseMagnet):

Examples
--------
We compute the B-field in units of tesla of a triangular mesh (4 vertices, 4 faces)
with polarization (0.1,0.2,0.3) in units of tesla at the observer position
We compute the B-field in units of T of a triangular mesh (4 vertices, 4 faces)
with polarization (0.1,0.2,0.3) in units of T at the observer position
(0.01,0.01,0.01) given in units of meter:

>>> import magpylib as magpy
Expand Down Expand Up @@ -538,6 +541,8 @@ def from_ConvexHull(
):
"""Create a TriangularMesh magnet from a point cloud via its convex hull.

SI units are used for all inputs and outputs.

Parameters
----------
position: array_like, shape (3,) or (m,3)
Expand Down Expand Up @@ -629,6 +634,8 @@ def from_pyvista(
):
"""Create a TriangularMesh magnet from a pyvista PolyData mesh object.

SI units are used for all inputs and outputs.

Parameters
----------
position: array_like, shape (3,) or (m,3)
Expand Down Expand Up @@ -737,6 +744,8 @@ def from_triangles(
):
"""Create a TriangularMesh magnet from a list or Collection of Triangle objects.

SI units are used for all inputs and outputs.

Parameters
----------
position: array_like, shape (3,) or (m,3)
Expand Down Expand Up @@ -843,6 +852,8 @@ def from_mesh(
):
"""Create a TriangularMesh magnet from a mesh input.

SI units are used for all inputs and outputs.

Parameters
----------
position: array_like, shape (3,) or (m,3)
Expand Down
6 changes: 4 additions & 2 deletions magpylib/_src/obj_classes/class_misc_CustomSource.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,14 @@ class CustomSource(BaseSource):
When `position=(0,0,0)` and `orientation=None` local object coordinates
coincide with the global coordinate system.

SI units are used for all inputs and outputs.

Parameters
----------
field_func: callable, default=`None`
The function for B- and H-field computation must have the two positional arguments
`field` and `observers`. With `field='B'` or `field='H'` the B- or H-field in units
of or A/m must be returned respectively. The `observers` argument must
of T or A/m must be returned respectively. The `observers` argument must
accept numpy ndarray inputs of shape (n,3), in which case the returned fields must
be numpy ndarrays of shape (n,3) themselves.

Expand Down Expand Up @@ -44,7 +46,7 @@ class CustomSource(BaseSource):
With version 4 `CustomSource` objects enable users to define their own source
objects, and to embedded them in the Magpylib object oriented interface. In this example
we create a source that generates a constant field and evaluate the field at observer
position (0.01,0.01,0.01) given in meter:
position (0.01,0.01,0.01) given in meters:

>>> import numpy as np
>>> import magpylib as magpy
Expand Down
8 changes: 5 additions & 3 deletions magpylib/_src/obj_classes/class_misc_Dipole.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ class Dipole(BaseSource):
When `position=(0,0,0)` and `orientation=None` the dipole is located in the origin of
global coordinate system.

SI units are used for all inputs and outputs.

Parameters
----------
position: array_like, shape (3,) or (m,3), default=`(0,0,0)`
Expand All @@ -30,8 +32,8 @@ class Dipole(BaseSource):

moment: array_like, shape (3,), unit A・m², default=`None`
Magnetic dipole moment in units of A・m² given in the local object coordinates.
For homogeneous magnets the relation moment=magnetization*volume holds. The dipole
moment of a Circle object is pi**2/10*diameter**2*current.
For homogeneous magnets the relation moment=magnetization*volume holds. For
current loops the relation moment = current*loop_surface holds.

parent: `Collection` object or `None`
The object is a child of it's parent collection.
Expand All @@ -46,7 +48,7 @@ class Dipole(BaseSource):

Examples
--------
`Dipole` objects are magnetic field sources. In this example we compute the H-field A/m
`Dipole` objects are magnetic field sources. In this example we compute the H-field in A/m
of such a magnetic dipole with a moment of (100,100,100) in units of A・m² at an
observer position (.01,.01,.01) given in units of meter:

Expand Down
2 changes: 2 additions & 0 deletions magpylib/_src/obj_classes/class_misc_Triangle.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ class Triangle(BaseMagnet):
Triangle vertices coincide with the global coordinate system. The geometric
center of the Triangle is determined by its vertices.

SI units are used for all inputs and outputs.

Parameters
----------
position: array_like, shape (3,) or (m,3)
Expand Down