Skip to content

Commit

Permalink
[doc] Update "Functions that Checking Units or Assigning Units" and F…
Browse files Browse the repository at this point in the history
…ix some typo (#87)

* Update docs and fix typo

* Update customize_functions.ipynb

* Update customize_functions.ipynb
  • Loading branch information
Routhleck authored Dec 27, 2024
1 parent 4a063d4 commit 9063787
Show file tree
Hide file tree
Showing 3 changed files with 936 additions and 50 deletions.
10 changes: 5 additions & 5 deletions brainunit/_unit_constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,10 +87,10 @@
parsec = Unit.create(meter.dim, name="parsec", dispname="pc", scale=meter.scale + 16, factor=3.085677581491367e16)

# ----- Pressure -----
atm = atmosphere = Unit.create(pascal.dim, name="atmosphere", dispname="atm", scale=meter.scale + 5, factor=1.013249966)
bar = Unit.create(pascal.dim, name="bar", dispname="bar", scale=meter.scale + 5, factor=1.)
mmHg = torr = Unit.create(pascal.dim, name="torr", dispname="torr", scale=meter.scale + 2, factor=1.3332236842105263)
psi = Unit.create(pascal.dim, name="pound per square inch", dispname="psi", scale=meter.scale + 3,
atm = atmosphere = Unit.create(pascal.dim, name="atmosphere", dispname="atm", scale=pascal.scale + 5, factor=1.013249966)
bar = Unit.create(pascal.dim, name="bar", dispname="bar", scale=pascal.scale + 5, factor=1.)
mmHg = torr = Unit.create(pascal.dim, name="torr", dispname="torr", scale=pascal.scale + 2, factor=1.3332236842105263)
psi = Unit.create(pascal.dim, name="pound per square inch", dispname="psi", scale=pascal.scale + 3,
factor=6.894757293168361)

# ----- Area -----
Expand Down Expand Up @@ -122,7 +122,7 @@
factor=2.55927778)

# ----- Energy -----
eV = electron_volt = Unit.create(joule.dim, name="electronvolt", dispname="eV", scale=-19, factor=1.602176565)
eV = electron_volt = Unit.create(joule.dim, name="electronvolt", dispname="eV", scale=joule.scale - 19, factor=1.602176565)
calorie = calorie_th = Unit.create(joule.dim, name="calorie", dispname="cal", scale=joule.scale, factor=4.184)
calorie_IT = Unit.create(joule.dim, name="calorie (International Table)", dispname="cal IT", scale=joule.scale,
factor=4.1868)
Expand Down
5 changes: 4 additions & 1 deletion docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -164,10 +164,13 @@ We are building the `brain dynamics programming ecosystem <https://ecosystem-for
:maxdepth: 1
:caption: Unit-aware Math Functions

mathematical_functions/customize_functions.ipynb
mathematical_functions/array_creation.ipynb
mathematical_functions/numpy_functions.ipynb
mathematical_functions/elinstein_operations.ipynb
mathematical_functions/customize_functions.ipynb
mathematical_functions/linalg_functions.ipynb
mathematical_functions/fft_functions.ipynb
mathematical_functions/lax_functions.ipynb


.. toctree::
Expand Down
Loading

0 comments on commit 9063787

Please sign in to comment.