Skip to content

Commit

Permalink
Adding sky model
Browse files Browse the repository at this point in the history
  • Loading branch information
bmorris3 committed Jan 28, 2019
1 parent ce89a17 commit ffe6083
Show file tree
Hide file tree
Showing 9 changed files with 594,070 additions and 44 deletions.
9 changes: 5 additions & 4 deletions example_hat11.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import astropy.units as u
from astropy.constants import R_sun
import matplotlib.pyplot as plt
from telescopy import Telescope, Filter, BlackBody, Imager
from telescopy import Telescope, Filter, BlackBody, Imager, SkyModel

fig, ax = plt.subplots()

Expand All @@ -12,11 +12,12 @@
exp_time = 5 * u.s

r = Filter.from_name('SDSS_r')
sky = SkyModel.from_cerro_paranal()
target = BlackBody(T_eff, radius, distance)
telescope = Telescope(aperture_diameter=aperture_diameter, throughput=0.9)
imager = Imager(quantum_efficiency=0.8, gain=2)
telescope = Telescope(aperture_diameter=aperture_diameter, throughput=1.0)
imager = Imager(quantum_efficiency=1.0, gain=2)

print('nphotons: \t', imager.counts(telescope, target, exp_time, r))
print('ncounts: \t', imager.counts(telescope, target, exp_time, r, sky))
print('measured: \t', 13453145)

# path = '/Users/bmmorris/data/Q2UW01/UT180528/test.0003.fits'
Expand Down
5 changes: 3 additions & 2 deletions example_trappist1.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import astropy.units as u
import matplotlib.pyplot as plt
from telescopy import Telescope, Filter, BlackBody, Imager
from telescopy import Telescope, Filter, BlackBody, Imager, SkyModel
from astropy.constants import R_sun

fig, ax = plt.subplots()
Expand All @@ -13,9 +13,10 @@

r = Filter.from_name('SDSS_z')
target = BlackBody(T_eff, radius, distance)
sky = SkyModel.from_cerro_paranal()
telescope = Telescope(aperture_diameter=aperture_diameter, throughput=0.9)
imager = Imager(quantum_efficiency=0.8, gain=2)
print('nphotons: \t', imager.counts(telescope, target, exp_time, r))
print('ncounts: \t', imager.counts(telescope, target, exp_time, r, sky))
print('measured: \t', 891164)

# path = '/Users/bmmorris/data/Q2UW01/UT160619/trappist-1.0044.fits'
Expand Down
2 changes: 1 addition & 1 deletion telescopy/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,4 @@ class UnsupportedPythonError(Exception):
from .vega import *
from .imager import *
from .star import *

from .skymodel import *

0 comments on commit ffe6083

Please sign in to comment.