View Javadoc

1   /*
2    * $Id JohnsonMagnitude.java $
3    *
4    */
5   
6   package org.astrogrid.intensity;
7   
8   /***
9    * Also known as Vega Magnitudes...
10   *
11   * (taken from http://www.astro.utoronto.ca/~patton/astro/mags.html)
12   *<p>
13  This system is defined such that the star Alpha Lyr (Vega) has V=0.03 and all
14   colors equal to zero. Alternatively, the zero-color standard can be defined to
15   be the mean of a number of unreddened A0 V stars of Pop I abundance, using the
16   ensemble of Johnson-Morgan standards to fix the flux scale.
17   It remains to calibrate on an absolute scale the flux of Alpha Lyr or some
18   other appropriate star, Such a calibration has been accomplished by Hayes
19   and Lathan (1975), which yielded 3500 Jansky at 5556A for Alpha Lyr.
20   Articles discussing the UBVRI passbands include Bessel (1979), Bessel (1983), and Bessel (1990).
21  
22  References:
23  Bessel, M. S. 1990, PASP, 91, 589
24  Bessel, M. S. 1983, PASP, 95, 480
25  Bessel, M. S. 1990, PASP, 102, 1181
26  Hayes, D. S., & Latham, D. W. 1975, ApJ, 197, 593
27  Johnson, H. L. & Morgan, W. W. 1953, ApJ, 117, 313
28  
29   * @author M Hill
30   */
31  
32  public class JohnsonMagnitude extends Magnitude
33  {
34     
35     /*** Constructor */
36     public JohnsonMagnitude(double magnitude, double error, boolean apparent)
37     {
38        super(magnitude, error, apparent);
39     }
40     
41     /***
42      * Defaults to apparent magnitude
43      */
44     public JohnsonMagnitude(double magnitude, double error)
45     {
46        super(magnitude, error, true);
47     }
48     
49     /***
50      * Converts magnitude to flux
51      */
52     public Flux toFlux()
53     {
54        double flux = Math.pow(10, (0.4 * (getZeroPoint() - magnitude)));
55        double fluxError = (flux * error) / (2.5 * Math.log(Math.E) );
56        
57        return new Flux(flux, fluxError);
58     }
59  
60     /***
61      * returns the zero point required to convert to flux.  Data given by
62      * Mark Allen (ESO)
63      */
64     private double getZeroPoint()
65     {
66        if (passband == Passband.U)
67           return 8.1321326;
68        else if (passband == Passband.B)
69           return 9.0221171;
70        else if (passband == Passband.V)
71           return 8.9015597;
72        else if (passband == Passband.R)
73           return 8.7157219;
74        else if (passband == Passband.I)
75           return 8.4577423;
76        else if (passband == Passband.J)
77           return 8.0028097;
78        else if (passband == Passband.H)
79           return 7.5215004;
80        else if (passband == Passband.K)
81           return 7.0154499;
82        else
83           throw new UnsupportedOperationException("Do not know zero point for passband "+passband);
84     }
85     
86     /***
87      * Converts to Ab Magnitude.  See http://www.astro.utoronto.ca/~patton/astro/mags.html,
88      */
89     public AbMagnitude toAbMagnitude()
90     {
91  
92  //    if (passband == Passband.U)
93  //       return new AbMagnitude(something or other);
94  //    else if (passband == Passband.B)
95  //       return new
96  //    else
97           throw new UnsupportedOperationException("Do not know how to convert to AB Magnitude with passband "+passband);
98        
99     }
100 }
101 
102 /*
103 $Log: JohnsonMagnitude.java,v $
104 Revision 1.1.1.1  2003/08/25 18:36:27  mch
105 Reimported to fit It02 source structure
106 
107 Revision 1.1  2003/06/26 19:17:26  mch
108 new classes for handling passbands, etc
109 
110 */