findext(lng,
lat,
model='drimmel',
distance=None,
**kwargs)
| source code
|
Get the "model" extinction at a certain longitude and
latitude.
Find the predicted V-band extinction (Av) based on three dimensional
models of the galactic interstellar extinction. The user can choose
between different models by setting the model keyword:
1) "arenou": model from Arenou et al. (1992). 2)
"schlegel": model from Schlegel et al. (1998) 3)
"drimmel": model from Drimmel et al. (2003) 4)
"marshall": model from Marshall et al. (2006)
example useage:
-
Find the total galactic extinction for a star at galactic lattitude
10.2 and longitude 59.0 along the line of sight, as given by the
model of Arenou et al. (1992)
>>> lng = 10.2
>>> lat = 59.0
>>> av = findext(lng, lat, model='arenou')
>>> print("Av at lng = %.2f, lat = %.2f is %.2f magnitude" %(lng, lat, av))
Av at lng = 10.20, lat = 59.00 is 0.05 magnitude
-
Find the extinction for a star at galactic lattitude 107.05 and
longitude -34.93 and a distance of 144.65 parsecs, as given by the
model of Arenou et al. (1992)
>>> lng = 107.05
>>> lat = -34.93
>>> dd = 144.65
>>> av = findext(lng, lat, distance = dd, model='arenou')
>>> print("Av at lng = %.2f, lat = %.2f and distance = %.2f parsecs is %.2f magnitude" %(lng, lat, dd, av))
Av at lng = 107.05, lat = -34.93 and distance = 144.65 parsecs is 0.15 magnitude
-
Find the Marschall extinction for a star at galactic longitude 10.2
and latitude 9.0. If the distance is not given, we return the
complete extinction along the line of sight (i.e. put the star
somewhere out of the galaxy).
>>> lng = 10.2
>>> lat = 9.0
>>> av = findext(lng, lat, model='marshall')
>>> print("Av at lng = %.2f, lat = %.2f is %.2f magnitude" %(lng, lat, av))
Av at lng = 10.20, lat = 9.00 is 10.67 magnitude
-
Find the Marshall extinction for a star at galactic lattitude 271.05
and longitude -4.93 and a distance of 144.65 parsecs, but convert to
Av using Rv = 2.5 instead of Rv = 3.1
>>> lng = 271.05
>>> lat = -4.93
>>> dd = 144.65
>>> av = findext(lng, lat, distance = dd, model='marshall', Rv=2.5)
>>> print("Av at lng = %.2f, lat = %.2f and distance = %.2f parsecs is %.2f magnitude" %(lng, lat, dd, av))
Av at lng = 271.05, lat = -4.93 and distance = 144.65 parsecs is 13.95 magnitude
-
Find the extinction for a star at galactic longitude 10.2 and
latitude 9.0, using the schlegel model, using Rv=2.9 instead of
Rv=3.1
>>> lng = 58.2
>>> lat = 24.0
>>> distance = 848.
>>> av = findext(lng, lat, distance=distance)
>>> print("Av at lng = %.2f, lat = %.2f is %.2f magnitude" %(lng, lat, av))
Av at lng = 58.20, lat = 24.00 is 0.12 magnitude
REMARKS: a) Schlegel actually returns E(B-V), this value is then
converted to Av (the desired value for Rv can be set as a keyword;
standard sets Rv=3.1) b) Schlegel is very dubious for latitudes between
-5 and 5 degrees c) Marschall actually returns Ak, this value is then
converted to Av (the reddening law and Rv can be set as keyword; standard
sets Rv=3.1, redlaw='cardelli1989') d) Marschall is only available for
certain longitudes and latitudes: 0 < lng < 100 or 260 < lng
< 360 and -10 < lat < 10
- Parameters:
lng (float) - Galactic Longitude (in degrees)
lat (float) - Galactic Lattitude (in degrees)
model (str) - the name of the extinction model: ("arenou",
"schlegel", "drimmel" or
"marshall"; if none given, the program uses
"drimmel")
distance (float) - Distance to the source (in parsecs), if the distance is not
given, the total galactic extinction along the line of sight is
calculated
- Returns: float
- The extinction in Johnson V-band
|