from astropy import constants as const from astropy import units as u magdict = convmag.get_magdict() alphacenA = exocounts.TargetClass() alphacenA.name = "alpha cen A" alphacenA.teff = 5790.0 * u.K #K ## optimistic (no cloud) alphacenA.rstar = 1.2234 * const.R_sun alphacenA.d = 1.34 * u.pc #pc fluxA = nstar.getflux(alphacenA, 10.47 * u.micron) print(alphacenA.name) print(fluxA) print("N mag=", convmag.get_mag("N", fluxA, magdict)) alphacenB = exocounts.TargetClass() alphacenB.name = "alpha cen B" alphacenB.teff = 5260.0 * u.K #K ## optimistic (no cloud) alphacenB.rstar = 0.8632 * const.R_sun alphacenB.d = 1.34 * u.pc #pc fluxB = nstar.getflux(alphacenB, 10.47 * u.micron) print(alphacenB.name) print(fluxB) print("N mag=", convmag.get_mag("N", fluxB, magdict)) tauceti = exocounts.TargetClass() tauceti.name = "tau ceti"
flux, photonf, Nphoton, sign = nstar.Nstar(lambda_micron, stellar_temperature, rsol, dpc, dtel, dstel, dlam_micron, throughput, th, info=False) sigd = ndark.Ndark(th, nd, npix, mu) sigr = nreadout.Nreadout(th, tr, nr, npix, mu, mode="linear") print("band:", b) magdict = convmag.get_magdict() print("magnitude=", convmag.get_mag(b, flux, magdict)) print("star,dark,readout") print(sign, sigd, sigr) Nread = (th * 3600) / tr Nave = Nphoton / Nread / npix print("Average photon counts: e-/pix/read: ", Nave) print("[ppm] star,dark,readout") Ntot = Nphoton ppm = 1.e6 print(sign / Ntot * ppm, sigd / Ntot * ppm, sigr / Ntot * ppm) # + darr = np.linspace(10, 30, 21) sigsarr = []
obs = exocounts.ObsClass(michi, target) obs.texposure = 100.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 obs.effnpix = S / 3.0 #3 is an approx. increment factor of PSF obs.mu = 1 obs.fgaparture = ((diflimit.ld(michi.lamb, michi.dtel)) / 2.0)**2 * np.pi obs.target = target obs.update() magdict = convmag.get_magdict() print("photon count for foreground", obs.nphoton_foreground) print("photon count signal for exp=", obs.nphoton_exposure) print("S/N for Nsig/sqrt(Nthermal)", obs.nphoton_exposure / np.sqrt(obs.nphoton_foreground)) print("Contrast for/sig (log)", np.log10(obs.nphoton_foreground / obs.nphoton_exposure)) print("Contrast for/sig ", (obs.nphoton_foreground / obs.nphoton_exposure)) magdict = convmag.get_magdict() print("N mag=", convmag.get_mag("N", obs.flux, magdict)) #print("photon noise [ppm]=",obs.sign_relative)
SUBARU.throughput = 0.05 SUBARU.ndark = 0.0/u.s #dark current [e-/pix/s] SUBARU.nread = 0.00 #nr [e-/pix/read] SUBARU.fullwell = 1.e7 target=exocounts.TargetClass() target.teff = 1300.0*u.K #K target.rstar = 0.1*const.R_sun #Rsolar target.d = 40.0*u.pc #pc obs=exocounts.ObsClass(SUBARU,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/SUBARU.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)
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 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.dpc = 16.0 #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)