Exemplo n.º 1
0
def test_ejas_bb():
    """ unit test for blackbody photon count and other noises  assuming JASMINE (2022 April)

    """
    ejas = exocounts.InstClass()
    ejas.lamb = 1.25 * u.micron  #micron
    ejas.dlam = 0.7 * u.micron  #micron
    ejas.dtel = 0.34 * u.m  #telescope diameter m
    ejas.dstel = 0.14 * u.m  #secondary telescope diameter m or 12.4 (3 tels)

    QE = 0.7
    ejas.throughput = QE * 0.85 * 0.95
    ejas.ndark = 15.5 / u.s  #dark current
    ejas.nread = 15.0  #nr
    ejas.fullwell = 150000.

    target = exocounts.TargetClass()
    target.teff = 3000.0 * u.K  #K
    target.rstar = 0.2 * const.R_sun  #Rsolar
    target.d = 15.0 * u.pc  #pc

    obs = exocounts.ObsClass(ejas, target)

    obs.texposure = 0.0833 * u.h  #cadence [hour]
    obs.tframe = 12.5 * u.s  #time for one frame [sec]
    obs.napix = 15  # number of the pixels in aperture
    obs.mu = 1
    S = 1.8 * 1.8 * np.pi  #core size
    obs.effnpix = S / 3.0  #3 is an approx. increment factor of PSF
    obs.mu = 1

    target.d = 16.0 * u.pc  #change targets
    obs.target = target
    obs.update()

    magdict = convmag.get_magdict()
    print("H mag=", convmag.get_mag("H", obs.flux, magdict))
    print("J mag=", convmag.get_mag("J", obs.flux, magdict))
    print(
        "Hw mag=", 0.7 * convmag.get_mag("J", obs.flux, magdict) +
        0.3 * convmag.get_mag("H", obs.flux, magdict))
    print("V mag=", convmag.get_mag("V", obs.flux, magdict))
    print("=========================")
    print("saturation?", obs.sat)
    print("dark [ppm]=", obs.sigd)
    print("readout [ppm]=", obs.sigr)
    print("photon [ppm]=", obs.sign)
    print("=========================")
    print("photon relative=", obs.sign_relative)

    assert not obs.sat
    assert obs.sigd - 264.04942719119845 == 0.0
    assert obs.sigr - 284.5480627240326 == 0.0
    assert obs.sign - 3392.713732726309 == 0.0
    assert obs.sign_relative - 294.74930064212117 == 0.0
Exemplo n.º 2
0
from exocounts import exocounts
from exocounts import convmag
from astropy import constants as const
from astropy import units as u
import numpy as np

ost = exocounts.InstClass()
ost.lamb = 10.0 * u.micron  #micron
ost.dlam = 0.25 * u.micron  #micron
#ost.dtel = 9.1 #telescope diameter m
ost.dtel = 5.9 * u.m  #telescope diameter m

ost.dstel = 0.00 * u.m  #secondary telescope diameter m
ost.throughput = 0.1
ost.ndark = 0.17  #dark current
ost.nread = 14.0  #nr
ost.fullwell = 80000.

target = exocounts.TargetClass()
target.name = "Trappist e"
target.teff = 2559.0 * u.K  #K
target.rstar = 0.117 * const.R_sun  #Rsolar
target.d = 12.1 * u.pc  #pc

obs = exocounts.ObsClass(ost, target)

obs.texposure = 30.0 * u.h  #cadence [hour] # 30 x visits (1 hr=transit dur trappist e)
obs.tframe = 7.1 * u.s  #time for one frame [sec]
obs.napix = 15  # number of the pixels in aperture
obs.mu = 1
S = 1.8 * 1.8 * np.pi  #core size
Exemplo n.º 3
0
from exocounts import exocounts
from exocounts import convmag

from astropy import units as u
from astropy import constants as const

import matplotlib.pyplot as plt
import pylab
import numpy as np

ejas = exocounts.InstClass()
ejas.lamb = 1.4 * u.micron  #micron
ejas.dlam = 0.6 * u.micron  #micron
ejas.dtel = 0.31 * u.m  #telescope diameter m
ejas.dstel = 0.09 * u.m  #secondary telescope diameter m
ejas.throughput = 0.7
ejas.ndark = 60.0 / u.s  #dark current
ejas.nread = 30.0  #nr
ejas.fullwell = 80000.

target = exocounts.TargetClass()
target.teff = 3000.0 * u.K  #K
target.rstar = 0.2 * const.R_sun  #Rsolar
target.d = 15.0 * u.pc  #pc

obs = exocounts.ObsClass(ejas, target)

obs.texposure = 0.0833 * u.h  #cadence [hour]
obs.tframe = 7.1 * u.s  #time for one frame [sec]
obs.napix = 15  # number of the pixels in aperture
obs.mu = 1
Exemplo n.º 4
0
from exocounts import exocounts
from exocounts import planet
from exocounts import convmag
from astropy import constants as const
from astropy import units as u
import numpy as np

habex = exocounts.InstClass()
habex.lamb = 0.5 * u.micron  #micron
habex.dlam = 0.1 * u.micron  #micron
habex.dtel = 4.0 * u.m  #telescope diameter m
habex.dstel = 0.00 * u.m  #secondary telescope diameter m
habex.throughput = 0.3
habex.ndark = 3.e-5 / u.s  #dark current [e-/pix/s]
habex.nread = 0.008  #nr [e-/pix/read]
habex.fullwell = 1.e7

target = exocounts.TargetClass()
target.teff = 5800.0 * u.K  #K
target.rstar = 1.0 * const.R_sun  #Rsolar
target.d = 5.0 * u.pc  #pc

planet = planet.PlanetClass()
planet.rplanet = 1.0 * const.R_earth  #Re
planet.a = 1.0 * u.AU  #AU
planet.albedo = 0.3
planet.phase = np.pi / 2.0
planet.compute_reflectivity()
print("Star-Planet Contrast =", planet.reflectivity)

#set planet scattered light as a target
Exemplo n.º 5
0
from exocounts import convmag
from astropy import constants as const
from astropy import units as u
import numpy as np

#
#
# each side
# 32deg 11.26d for mid M
# 40deg 2.27d for late M
#



#Table 3
fm21=exocounts.InstClass()
fm21.dtel = 6.5*u.m #telescope diameter m
fm21.dstel = 0.00*u.m #secondary telescope diameter m
fm21.throughput = 0.15

fm21.ndark = 0.2/u.s #dark current [e-/pix/s]
fm21.nread = 14.0 #nr [e-/pix/read]
fm21.fullwell = 1.e7


fm21.lamb = 10.0*u.micron #micron
R=30000. #Table 3
fm21.dlam = fm21.lamb/R #micron

target=exocounts.TargetClass()
#mid M