Exemple #1
0
def plotPerfVSpectralType():

    teff = np.linspace(3000, 7000, 9)

    prad_earth = 4
    prad = prad_earth  * const.earthRadius/const.solarRadius
    srad = sp.getParam(teff)

    mp.clf()
    apj.pre()

    for m in [9,12,15]:
        signal_ppm = 1e6*(prad/srad)**2
        noise_ppm = noiseModel_ppm(m, expTime_sec=1800, teff_K=teff)
        snr = signal_ppm/noise_ppm

        mp.plot(teff, snr, '-', lw=4, label="V=%i" %(m))

    apj.post()
    mp.xlim([7000, 3000])
#    mp.ylim(0, 50)
    mp.legend(loc=2)
    mp.xlabel("Stellar Temperature (K)")
    mp.ylabel("Expected Signal-to-Noise")
    mp.gca().set_yscale('log')
    mp.grid(True, which='both')
    mp.title("Estimated SNR For %.1f Re radius planet" %(prad_earth))
    apj.pgid()
Exemple #2
0
def main():

    sk = schmidtKaler()
    hh = habetsHeinze()
    hb = huber()

    mp.clf()
    apj.pre()
    col = 'radius'
    mp.plot(sk[:,'teff'], sk[:, col], 'o-', label="SK")
    mp.plot(hh[:,'teff'], hh[:, col], 'o-', label="HH")
    mp.plot(hb[:,'teff'], hb[:, col], 'o', label="Huber")

    mp.legend(loc=2)
    mp.xlabel("Teff")
    mp.ylabel(col)

    mp.axvline(5770, color='grey', lw=.5)
    mp.axhline(1,  color='grey', lw=.5)
Exemple #3
0
def main():

    hdCatFile = "/home/fergal/all/kepler/twowheel/hdcat.txt"
    nCompanions = 10

    print "Loading ..."
    hdCat = scenery.loadHdCatalogue(hdCatFile, maxMag=12)

    fn = "distMat.npz"
    if os.path.exists(fn):
        print "Using cached values..."
        npzFile = np.load(fn)
        distMat = npzFile['distMat']
        mags = npzFile['mags']
        npzFile.close()
        pass
    else:
        print "Computing ..."
        distMat, mags = computeDistMatrix(hdCat, magCol=3, maxMag=8)
        np.savez(fn, distMat=distMat, mags=mags)

    mp.clf()
    apj.pre()
#    mp.imshow(distMat, interpolation="nearest")

    print "Computing focal plane radius..."
    for nCompanions in [30, 10,3]:
        radius = computeDistToNNearestStars(distMat, nCompanions)
        mp.plot(mags, radius, '-', label="%i stars" %(nCompanions))

    mp.xlabel("Magnitude")
    mp.ylabel("Distance (degrees)")
    mp.legend(loc=1)
    mp.title("Distance to nearest bright stars")
    mp.ylim(0,40)
    apj.post()
    return distMat, mags