B_epoch_to_J

Astronomy.B_epoch_to_J(ra50, dec50, format=None)

Convert B1950 coordinates to J2000

This is a convenience to avoid having to format angles before calling the coordinate conversion routine. The need often comes up when an operator asks for coordinates in J2000 or decimal format.

Examples

Example

Basic:

In [1]: import Astronomy as A
In [2]: A.B_epoch_to_J('''00h02m29.056400s''',
                       '''54d11'43.187000"''', 'decimal')
Out[2]: (0.084544, 54.4736)
In [3]: A.B_epoch_to_J('''00h02m29.056400s''',
                       '''54d11'43.187000"''', 'formatted')
Out[3]: [u'00h05m04.359s', u'+54d28m25.056s']
In [4]: A.B_epoch_to_J('''00h02m29.056400s''',
                       '''54d11'43.187000"''')
Out[4]: ([0, 5, 4.359], [54, 28, 25.056])

Compare to the VLA Calibrator List:

J2000 A 00h05m04.363531s 54d28'24.926230"
B1950 A 00h02m29.056400s 54d11'43.187000"

Example

Crossing the midnight boundary:

In [8]: A.B_epoch_to_J('''23h58m34.865400s''',
                       '''18d57'51.753000"''')
Out[8]: ([0, 1, 8.6169], [19, 14, 33.9321])

Compare to the VLA Calibrator List:

J2000 A 00h01m08.621563s 19d14'33.801860"
B1950 A 23h58m34.865400s 18d57'51.753000"

Example

Negative declination:

In [10]: A.B_epoch_to_J('''00h00m48.4200s''',
                        '''-17d43'54.000"''', 'formatted')
Out[10]: [u'00h03m21.9921s', u'-17d27m11.6511s']
:param ra50string

For example: ‘00h02m29.056400s’

:param dec50string

For example : ‘’’54d11’43.187000”’’’

:param formatstring

‘decimal’, ‘formatted’, None

Returns

tuple of strings See notes for details.