Skip to content

Commit

Permalink
doc
Browse files Browse the repository at this point in the history
  • Loading branch information
cshanahan1 committed Nov 21, 2024
1 parent ec7a7fb commit c338e55
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions jdaviz/core/custom_units_and_equivs.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ def _spectral_and_photon_flux_density_units():
def _eqv_pixar_sr(pixar_sr):
"""
Return Equivalencies to convert from flux to flux per solid
angle (aka surface brightness) using scale ratio `pixar_sr`
angle (aka surface brightness) using scale ratio ``pixar_sr``
(steradians per pixel).
"""
def converter_flux(x): # Surface Brightness -> Flux
Expand All @@ -49,7 +49,7 @@ def iconverter_flux(x): # Flux -> Surface Brightness

def _eqv_flux_to_sb_pixel():
"""
Returns an Equivalency between `flux_unit` and `flux_unit`/pix**2. This
Returns an Equivalency between ``flux_unit`` and ``flux_unit`/pix**2``. This
allows conversion between flux and flux-per-square-pixel surface brightness
e.g MJy <> MJy / pix2
"""
Expand All @@ -69,12 +69,12 @@ def _eqv_flux_to_sb_pixel():

def _eqv_sb_per_pixel_to_per_angle(flux_unit, scale_factor=1):
"""
Returns an equivalency between `flux_unit` per square pixel and
`flux_unit` per solid angle to be able to compare and convert between units
Returns an equivalency between ``flux_unit`` per square pixel and
``flux_unit`` per solid angle to be able to compare and convert between units
like Jy/pix**2 and Jy/sr. The scale factor is assumed to be in steradians,
to follow the convention of the PIXAR_SR keyword.
Note:
To allow conversions between units like 'ph / (Hz s cm2 sr)' and
To allow conversions between units like ``ph / (Hz s cm2 sr)`` and
MJy / pix2, which would require this equivalency as well as u.spectral_density,
these CAN'T be combined when converting like:
equivalencies=u.spectral_density(1 * u.m) + _eqv_sb_per_pixel_to_per_angle(u.Jy)
Expand Down

0 comments on commit c338e55

Please sign in to comment.