astrocalc.coords.separations module

Calculate separations between sky-coordinates

Author : David Young

class astrocalc.coords.separations.separations(log, ra1, dec1, ra2, dec2, settings=False)[source][source]

Bases: object

The worker class for the separations module

Key Arguments

  • log – logger

  • settings – the settings dictionary

  • ra1 – 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,

```python 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,

```python 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

```python 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’) ```

get()[source][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.