pro timecalc ;wht characteristics ;mag=26. ;apparent magnitude of object ;eta=.7 ;theory to experimental ;f0=7.17e6 ;flux zero point ;texp=3600. ;exposure time ;A=12.47 ;telescope area ;thtel=.78 ;telescope throughput ;q=.74 ;quantum efficiency ;b=1330. ;bandwidth ;bsky=21. ;sky background mag/arcsec^2 ;apix=.237 ;arcsec/pixel ;f=.8 ;seeing ;r=4. ;readnoise ; 6885.96 38677.8 35.7959 5.83647 ;keck characteristics mag=26. ;apparent magnitude of object eta=.7 ;theory to experimental f0=7.17e6 ;flux zero point texp=600. ;exposure time A=76. ;telescope area thtel=.47 ; .78 ;telescope throughput calculated from count rates on ESI page q=.776375 ;quantum efficiency b=1330. ;bandwidth bsky=20. ;sky background mag/arcsec^2 apix=.15 ;arcsec/pixel f=.85 ;seeing r=2.7 ;readnoise ; 7338.38 16511.4 89.3608 6.02508 in .8 seeing ; 7338.38 16511.4 22.3402 11.9617 in .4 seeing n=10^(-mag/2.5)*f0*eta*texp*a*thtel*q*b ;number of photons from object s=10^(-bsky/2.5)*f0*eta*texp*a*thtel*q*b*apix^2 ;number of photons from sky p=3.14159265*(f/apix)^2 ;area of object sig=n/sqrt(n+p*(s+r^2)) ;signal to noise print,n,s,p,sig end