Beispiel #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
Beispiel #2
0
obs.effnpix = S / 3.0  #3 is an approx. increment factor of PSF
obs.mu = 1

shot = []
dark = []
read = []
H = []
J = []
Hw = []
darr = np.linspace(10, 30, 101)
magdict = convmag.get_magdict()
for distpc in darr:
    target.d = distpc * u.pc  #change targets
    obs.target = target
    obs.update()
    Htmp = convmag.get_mag("H", obs.flux, magdict)
    Jtmp = convmag.get_mag("J", obs.flux, magdict)
    Hwtmp = 0.7 * Jtmp + 0.3 * Htmp
    H.append(Htmp)
    J.append(Jtmp)
    Hw.append(Hwtmp)
    #print(distpc,convmag.get_mag("H",obs.flux,magdict))
    if obs.sat:
        satmag = [Hwtmp, Htmp, Jtmp]
    dark.append(obs.sigd_relative)
    read.append(obs.sigr_relative)
    shot.append(obs.sign_relative)

sigsarr_relative = np.array(shot)
sigdarr_relative = np.array(dark)
sigrarr_relative = np.array(read)
Beispiel #3
0
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)
Beispiel #4
0
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
target.contrast = planet.reflectivity

obs = exocounts.ObsClass(habex, target)

obs.texposure = 1.0 * u.h  #= [hour]
obs.tframe = 10.0 * u.s  #time for one frame [sec]
obs.napix = 1  # number of the pixels in aperture
obs.mu = 1
obs.effnpix = 0.5

obs.target = target
obs.update()

magdict = convmag.get_magdict()
print("magnitude=", convmag.get_mag("V", obs.flux, magdict))
print(obs.nphoton_brightest / habex.fullwell)
print(obs.sat)
print("photon/pix/frame=", obs.nphoton_frame)
print("shot noise (sigma)=", obs.sign_relative * 1.e-6)
print("shot noise (dark)=", obs.sigd_relative * 1.e-6)
print("shot noise (read)=", obs.sigr_relative * 1.e-6)