Skip to content

Commit

Permalink
conversions: add dBc unit
Browse files Browse the repository at this point in the history
  • Loading branch information
bwinkel committed Jul 20, 2017
1 parent c019c42 commit 1cc53f8
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
3 changes: 2 additions & 1 deletion pycraf/conversions/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
Unit Alias Definition
================ ============== ======================================
|dimless| dimless |u|.dimensionless_unscaled
|dB| = |dBi| dB = dBi |u|.dB(dimless)
|dB|,|dBi|,|dBc| dB, dBi, dBc |u|.dB(dimless)
|dBW| dB_W |u|.dB(|u|.W)
|dBW_Hz| dB_W_Hz |u|.dB(|u|.W / |u|.Hz)
|dBW_m2| dB_W_m2 |u|.dB(|u|.W / |u|.m ** 2)
Expand All @@ -30,6 +30,7 @@
.. |dimless| replace:: :math:`1`
.. |dB| replace:: :math:`\mathrm{dB}`
.. |dBi| replace:: :math:`\mathrm{dBi}`
.. |dBc| replace:: :math:`\mathrm{dBc}`
.. |dBW| replace:: :math:`\mathrm{dB}[\mathrm{W}]`
.. |dBW_Hz| replace:: :math:`\mathrm{dB}[\mathrm{W} / \mathrm{Hz}]`
.. |dBW_m2| replace:: :math:`\mathrm{dB}[\mathrm{W} / \mathrm{m}^2]`
Expand Down
5 changes: 2 additions & 3 deletions pycraf/conversions/conversions.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,7 @@

UNITS = [
'dimless',
'dB',
'dBi',
'dB', 'dBi', 'dBc',
'dB_W',
'dB_W_Hz',
'dB_W_m2',
Expand Down Expand Up @@ -46,7 +45,7 @@
# define some useful dB-Scales
# dimless = apu.Unit(1)
dimless = apu.dimensionless_unscaled
dB = dBi = apu.dB(dimless)
dB = dBi = dBc = apu.dB(dimless)
dB_W = apu.dB(apu.W)
dB_W_Hz = apu.dB(apu.W / apu.Hz)
dB_W_m2 = apu.dB(apu.W / apu.m ** 2)
Expand Down

0 comments on commit 1cc53f8

Please sign in to comment.