separations (class) ∞
-
class
separations
(log, ra1, dec1, ra2, dec2, settings=False)[source] ∞ Bases:
object
The worker class for the separations module
Key Arguments
log
– loggersettings
– the settings dictionaryra1
– the right-ascension of the first location. Decimal degrees or sexegesimal.dec1
– the declination of the first location. Decimal degrees or sexegesimal.ra2
– the right-ascension of the second location. Decimal degrees or sexegesimal.dec2
– the declination of the second location. Decimal degrees or sexegesimal.
Usage
Todo
replace get_angular_separation throughout all code using dryxPython
replace getAngularSeparationthroughout all code using dryxPython
You can input sexegesimal coordinates,
from astrocalc.coords import separations calculator = separations( log=log, ra1="23:32:23.2324", dec1="-13:32:45.43553", ra2="23:32:34.642", dec2="-12:12:34.9334", ) angularSeparation, north, east = calculator.get() print(angularSeparation, north, east) # OUT: '4813.39431', '4810.50214', '166.83941'
or decimal degrees,
from astrocalc.coords import separations calculator = separations( log=log, ra1=2.3342343, dec1=89.23244233, ra2=45.343545345, dec2=87.3435435 ) angularSeparation, north, east = calculator.get() print(angularSeparation, north, east) # OUT: '7774.4375', '-6800.0358', '4625.7620'
or even a mix of both
from astrocalc.coords import separations calculator = separations( log=log, ra1=352.5342343, dec1=89.23, ra2="23:32:34.642", dec2="89:12:34.9334" ) angularSeparation, north, east = calculator.get() print(angularSeparation, north, east) # OUT: '78.9', '-73.1', '29.9')
Methods
get
()Calulate the angular separation between two locations on the sky
-
get
()[source] ∞ Calulate the angular separation between two locations on the sky
Input precision should be respected.
Key Arguments
Return
angularSeparation
– total angular separation between coordinates (arcsec)north
– north-south separation between coordinates (arcsec)east
– east-west separation between coordinates (arcsec)
See main class usage for details.