@@ -49,7 +49,7 @@ julia> uconvert(u"Jy", 1.23e-20 * u"erg/s/cm^2/Hz")
49491230.0000000000002 Jy
5050
5151julia> uconvert(u"ly", 1 * u"pc")
52- 3.2615637771674337 ly
52+ 3.2615637771674333 ly
5353```
5454
5555## Magnitudes
@@ -101,7 +101,7 @@ julia> 5*u.g_mag + 10*u.Jy # magnitudes can be mixed with ordinary linear units
101101julia> uconvert(u.AB_mag, 1*u.μJy) # converting one μJy to AB magnitudes
10210223.90006562228223 AB mag
103103
104- julia> uconvert(u.mag_bol , 1*u.Ssun) # apparent bolometric magnitude of the Sun
104+ julia> uconvert(u.bol_mag , 1*u.Ssun) # apparent bolometric magnitude of the Sun
105105-26.83199694276591 bol mag
106106
107107julia> uconvert(u.bol_Mag, 1*u.Lsun) # absolute bolometric magnitude of the Sun
@@ -112,21 +112,33 @@ julia> uconvert(u.bol_Mag, 1*u.Lsun) # absolute bolometric magnitude of the Sun
112112[ Color index] ( https://en.wikipedia.org/wiki/Color_index ) is also supported
113113
114114``` jldoctest
115+ julia> using UnitfulAstro
116+
117+ julia> u = UnitfulAstro;
118+
115119julia> 1u.B_mag - 0.5u.V_mag
116- 0.5000000000000002
120+ 0.4999999999999999
117121```
118122** Note:** that the only operation that can happen between different bands is subtraction
119123``` jldoctest
124+ julia> using UnitfulAstro
125+
126+ julia> u = UnitfulAstro;
127+
120128julia> 1u.B_mag + 0.5u.V_mag
121- ERROR: MagnitudeError: an invalid operation was attempted with magnitudes: 1.0000000000000002 Johnson B mag, 0.5 Johnson V mag
129+ ERROR: MagnitudeError: an invalid operation was attempted with magnitudes: 0.9999999999999999 Johnson B mag, 0.5 Johnson V mag
122130```
123131** and** that ` + ` and ` - ` work on individual bands
124132``` jldoctest
133+ julia> using UnitfulAstro
134+
135+ julia> u = UnitfulAstro;
136+
125137julia> 1u.B_mag - 1.5u.B_mag
126- 2.082308583340621 Johnson B mag
138+ 2.0823085833406205 Johnson B mag
127139
128140julia> 1u.B_mag + 1.5u.B_mag
129- 0.46889349301415095 Johnson B mag
141+ 0.46889349301415084 Johnson B mag
130142```
131143
132144## IAU Resolutions
0 commit comments