Skip to content

Commit c87aaa8

Browse files
committed
Merge pull request #4355 from eteq/fixish-4354
remove C as cgs base but also add CGS electric units
1 parent 19723fc commit c87aaa8

3 files changed

Lines changed: 9 additions & 2 deletions

File tree

‎CHANGES.rst‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -474,6 +474,9 @@ API changes
474474
instantiated). As unit formatters are mostly an internal implementation
475475
detail this is not likely to affect any users. [#4001]
476476

477+
- CGS E&M units are now defined separately from SI E&M units, and have
478+
distinct physical types. [#4255]
479+
477480
- ``astropy.utils``
478481

479482
- All of the ``get_pkg_data_*`` functions take an optional ``package``

‎astropy/units/cgs.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@
114114
###########################################################################
115115
# BASES
116116

117-
bases = set([cm, g, s, C, rad, cd, K, mol])
117+
bases = set([cm, g, s, rad, cd, K, mol])
118118

119119

120120
###########################################################################

‎astropy/units/physical.py‎

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,10 @@ def get_physical_type(unit):
124124
(astrophys.photon / si.AA / si.cm ** 2 / si.s, 'photon flux density wav'),
125125
(astrophys.R, 'photon flux'),
126126
(astrophys.bit, 'data quantity'),
127-
(astrophys.bit / si.s, 'bandwidth')
127+
(astrophys.bit / si.s, 'bandwidth'),
128+
(cgs.Franklin, 'electrical charge (ESU)'),
129+
(cgs.statampere, 'electrical current (ESU)'),
130+
(cgs.Biot, 'electrical current (EMU)'),
131+
(cgs.abcoulomb, 'electrical charge (EMU)')
128132
]:
129133
def_physical_type(unit, name)

0 commit comments

Comments
 (0)