Skip to content

Commit

Permalink
documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
Tomas Stolker committed Jul 5, 2019
1 parent 149a138 commit 93b190d
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions docs/examples.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,22 +3,24 @@
Examples
========

This page contains an incomplete overview of the functionalities that have been implemented in `species`. More examples will be added at a later stage. Feel free to contact Tomas Stolker (see :ref:`about`) for questions regarding the usability for your specific science case.

Conversion of photometry units
------------------------------

To calculated the flux density from a magnitude (and the other way around)::

import species

species.SpeciesInit("./")
species.SpeciesInit('./')

synphot = species.SyntheticPhotometry("MKO/NSFCam.J")
synphot = species.SyntheticPhotometry('MKO/NSFCam.J')

flux, error = synphot.magnitude_to_flux(19.04, 0.40)
app_mag, _ = synphot.flux_to_magnitude(flux, None)

print("Apparent flux density [W m-2 micron-1] =", flux)
print("Apparent magnitude [mag] =", app_mag)
print('Apparent flux density [W m-2 micron-1] =', flux)
print('Apparent magnitude [mag] =', app_mag)

Synthetic photometry
--------------------
Expand Down

0 comments on commit 93b190d

Please sign in to comment.