Attribute VB_Name = "Module1" Public Function SchaeferLimitingMag(ByVal dblAperature_inch As Double, ByVal dblMagnification As Double, ByVal dblNELM As Double, ByVal dblAge As Double, ByVal strTelescopeType As String, ByVal dblCleanliness As Double, ByVal dblColorIndex As Double, ByVal dblZenithDist_deg As Double, ByVal dblExtinctionCoeff As Double, ByVal dblSeeing_arsec As Double, ByVal dblExperience As Double) As String ' Returns limiting magnitude for stellar point sources based on characteristics of ' observer, sky brightness, telescope and magnification, etc. ' ' Per ' Schaefer, Bradley E. Oct. 2002. Astronomy and the limits of vision. Vistas in Astronomy. 36(4):311-361 ' http://adsabs.harvard.edu/cgi-bin/nph-bib_query?bibcode=1993VA.....36..311S ' ' Schaefer, B.E. Feb. 1990. Telescopic Limiting Magnitude. PASP 102:212-229 ' http://adsbit.harvard.edu/cgi-bin/nph-iarticle_query?bibcode=1990PASP..102..212S ' ' Schaefer, B. March 1989, "How faint can you see?", Sky & Telescope, 77(3):332 ' http://adsabs.harvard.edu/cgi-bin/nph-bib_query?bibcode=1989S%26T....77..332S ' ' Schaefer, B. Nov. 1989, "Your telescope's limiting magnitude", Sky & Telescope 78(5):552 ' http://adsabs.harvard.edu/cgi-bin/nph-bib_query?bibcode=1989S%26T....78..522S ' ' Schaefer, B. E., Nov. 1989. The Visual Recovery of Halley's Comet. 78(5):525 ' http://adsabs.harvard.edu/cgi-bin/nph-bib_query?bibcode=1989S%26T....78..525S ' ' Clark, R. April 1994, "How faint can you see?", Sky & Telescope, 87(4):106 ' ' Garstang, R. H. 2000. Limiting visual magnitude and night sky brightness. Memorie della Societa Astronomia Italiana 71:83 ' http://adsabs.harvard.edu/cgi-bin/nph-bib_query?bibcode=2000MmSAI..71...83G ' ' Garstang, R.H May. 1999. Vision thresholds revisited (abstract). American Astronomical Society, 194th AAS Meeting, #09.16 ' http://adsabs.harvard.edu/cgi-bin/nph-bib_query?bibcode=1999AAS...194.0916G ' ' Garstang, R.H. April 1999. New Formula for Optimum Magnification and Telescopic Limiting Magnitude. Journal of the Royal Astronomical Society of Canada. 93:80 ' http://adsabs.harvard.edu/cgi-bin/nph-bib_query?bibcode=1999JRASC..93...80G ' ' Knoll, H. A. et al. Aug. 1946. Visual thresholds of steady point sources of light in fields of brightness from dark to daylight. 1946JOSA...36..480K ' http://adsabs.harvard.edu/cgi-bin/nph-bib_query?bibcode=1946JOSA...36..480K ' ' Blackwell, H. R. Nov. 1946. Constant thresholds of the human eye. 1946JOSA...36..624B ' http://adsabs.harvard.edu/cgi-bin/nph-bib_query?bibcode=1946JOSA...36..624B ' ' Hecht, S. et al. 1947. Visibility of Lines and Squares. 1947JOSA...37..500H ' http://adsabs.harvard.edu/cgi-bin/nph-bib_query?bibcode=1947JOSA...37..500H ' ' Kumnick, L.S. 1954. Pupillary psychosensory restitution and aging. 1954JOSA...44..735K ' http://adsabs.harvard.edu/cgi-bin/nph-bib_query?bibcode=1954JOSA...44..735K ' ' Schaefer's algorithm models star brightness (I*) based on the product of a series of ' corrective factors: ' ' I* = L * F_b * F_c * F_t * F_p * F_a * F_r * F_sc * F_c * F_s ' ' where ' ' L = is the response of the human eye to light ' F_b = transforms the binocular eye perception equation of Knoll (1946) and Hecht (1947) to monocular viewing ' F_e = extinction factor ' F_t = transmission factor of the telescope ' F_p = correction factor for the observer's exit pupil size based on the observer's age ' F_m = correction factor for the dimming of the image resulting from magnification ' F_r = extended object size correction factor ' F_sc = correction factor for the Stiles-Crawford effect in the human eye ' F_c = correction factor for the color of the star observed ' F_s = correction factor for the experience of observer ' Test: ' Schaefer, S&T. Nov. 1989 at 525. The O'Meara 1985 recovery of Halley's Comet ' Aperature 24 Magnification 549 NELM 8.2 Age 28 ' TelescopeType Reflector Cleanliness 9 StarColorIndex 0.7 ' Zenith_dist_degrees 20 ExtinctionCoeff 0.1 SeeingDiskDiameter 0.7 ' Experience 9 yields TLM of 19.2 ' ? SchaeferLimitingMag(24,549,8.2,28,"Reflector",9,0.7,20,0.1,0.7,9) ' TLM Dia. Exit Pupil Dia. Eye Pupil ' 19.2683027088087 1.1103825136612 6.73090864766789 ' Initialize variables Dim z, CC, KK, k, x, FC, FD, DS, D, FO, DE, AG, DP, MG, TH, SE, FB As Double Dim FE, FT, FP, FA, FM, FR, CI, CL, KV, FS, MZ, BS, XX, B, I, dblIS, M, EXPER As Double Dim Fl As Double Dim TT, strOut As String ' Translate interface variables to Schaefer variables D = dblAperature_inch ' Aperature inches MG = dblMagnification ' Magnification (Power X) MZ = dblNELM ' Visual magnitude limit (NELM) AG = dblAge ' Age TT = strTelescopeType ' Telescope Type Reflector | Refractor | Schmidt Cassegrain CL = dblCleanliness ' Cleanliness index 0 - 9 Dirty - Clean | Default 4 CI = dblColorIndex ' Color Index (B-V) ' A0 type:CI = 0.0 | B7 type: CI=-0.11 | G2: CI = 0.63 | M2 type star: CI = 1.85 z = dblZenithDist_deg ' Zenith Distance degrees KV = dblExtinctionCoeff ' Extinction Coefficient SE = dblSeeing_arsec ' Seeing - arcseconds EXPER = dblExperience ' Experience 0 - 9 Novice - Expert | Default 4 ' Do Schaefer limiting magnitude computation ' Initial variable set D = D * 25.4 ' Inches input converted to mm ' Set F_t - the transmission factor of the telescope Select Case TT ' Evaluate telescope type Case "Reflector" DS = 0 Fl = (0.99 ^ 4) Case "Refractor" DS = 0.15 * D Fl = (0.88 ^ 2) Case "Schmidt Cassegrain" DS = 0.35 * D Fl = ((0.99 * 0.88) ^ 2) Case Else ' Other values - gracefully handle by resetting to type reflector. ' Debug.Print "Error bad telescope type" DS = 0 Fl = (0.99 ^ 4) End Select ' Run algorithm ' Set constants z = z / 57.296 ' CONVERT TO RADIANS CC = 1.58 * (10 ^ -10) ' NIGHT-VISION CONSTANT KK = 0.0126 ' NIGHT-VISION CONSTANT k = 1.2 * KV ' CORRECT KV TO 5100 A x = 1# / Cos(z) ' AIR MASS ' Determine correction factors FD = 1# - ((DS / D) * (DS / D)) ' ALLOW FOR OBSTRUCTION FO = 0.99 ^ 4 ' EYEPIECE (4 COATED AIR-GLASS SURFACES) DE = 7# * Exp(-AG * AG / 20000#) ' DIAM EYE PUPIL IN MM DP = D / MG ' DIAM OF EXIT PUPIL TH = 2# * SE * MG ' APPARENT DIAMETER OF SEEING DISK (ARC-SEC) CORRECTIONS FB = Sqr(2#) ' BINOCULAR VISION FE = 10 ^ (0.4 * k * x) ' ATMOSPHERIC EXTINCTION ' Runtime error was here due to parsing of denominator FT = 1# / (Fl * FD * FO - (0.01 * (9# - CL))) ' TOTAL TRANSMISSION OF TELESCOPE FP = 1# ' LIGHT OUTSIDE PUPIL If (DE < DP) Then FP = (DP * DP) / DE / DE End If FA = (DE / D) * (DE / D) ' LIGHT-COLLECTING AREA FM = MG * MG ' SPREAD OF SKY PHOTONS FR = 1# ' POINT SOURCE CAN If (TH > 900) Then FR = Sqr(TH / 900) ' APPEAR EXTENDED End If FC = 10 ^ (0.4 * ((CI / 2) - 1#)) ' COLOR OF STAR FS = 1# ' OBSERVER'S SENSITIVITY ' Determine sky brightness ' CALCULATE SKY BRIGHTNESS If (MZ >= (7# - k)) Then BS = 54 ' BEST POSS. SKY BRIGHTNESS FS = 10 ^ (0.4 * (7 - k - MZ)) ' & GOOD EYESIGHT Else XX = 0.2 * (8.68 - k - MZ) ' FS ASSUMED = 1 BS = 39.7 * (((10 ^ XX) - 1#) ^ 2#) ' SKY BRIGHTNESS FOR MZ End If BS = BS * ((z * z * 0.5) + 1#) ' ZENITH HAS DARKEST SKY B = BS / (FB * FT * FP * FA * FM * FC) ' BACKGROUND BRIGHTNESS IN TELESCOPE ' Determine limiting magnitude ' CALCULATE LIMITING MAGNITUDE ' Apply Hecht's equation. See Schaefer (Feb 1990). I = CC * ((1# + Sqr(KK * B)) ^ 2#) ' Hecht (JOSA,v37,p59,1947) ' Apply Schaefer's corrective factor model. See Schaefer (Feb 1990). dblIS = I * FB * FE * FT * FP * FA * FR * FC * FS ' FOR NO SCOPE, NO AIR M = -16.57 - (2.5 * Log(dblIS) / Log(10#)) ' INTENSITY TO V MAG M = M + ((EXPER - 6#) * 0.16) ' EMPIRICAL EXPERIENCE CORRECTION ' Assemble output string strOut = M & " " & DP & " " & DE ' Return result SchaeferLimitingMag = strOut End Function