[AstroPy] Heliocentric Velocity Correction
Sat Jun 9 04:51:54 CDT 2012
The SpecFrame class in pyast (https://github.com/timj/starlink-pyast)
can do corrections between various different standards of rest,
including heliocentric. pyast provides a comprehensive object-oriented
system for handling coordinate systems and transformation of many
types, including sky, spectral and time coordinate systems. See below
for an example of how to use it to convert from topocentric to
heliocentric, and see
http://www.starlink.ac.uk/docs/sun211.htx/node680.html#SpecFrame for a
full description of the SecFrame class.
import starlink.Ast as Ast
# First create a Frame (a SpecFrame) describing the "input" system -
# topocentric radio velocity in this example. The Unit property defaults
# to km/s for radio velocity, but could be changed (e.g. to m/s) if required.
# Here I set just the main properties, but there are lots of others.
sf1 = Ast.SpecFrame()
sf1.System = "vradio" # Spectral system (all FITS values supported)
sf1.StdOfRest = "topo" # Standard of rest (all FITS values supported)
sf1.Epoch = 2012.23458765 # Julian epoch of observation - could be MJD
sf1.ObsLon = 155.32311 # East longitude of observer in degs
sf1.ObsLat = 22.32311 # Latitude of observer in degs
sf1.RefRA = "16:12:23.3" # FK5 J2000 (RA,Dec) of the source (there
sf1.RefDec = "-23:24:18.2" # are other ways to set the source position)
sf1.RestFreq = 345.795 # In GHz
# Make a deep copy of this SpecFrame and then modify its properties to
# describe the "output" system. Here I just change the standard of rest to
# heliocentric, the spectral system to frequency and the unit to GHz (the
# default unit for frequency is Hz).
sf2 = copy.deepcopy( sf1 )
sf2.StdOfRest = "helio"
sf2.System = "freq"
sf2.Unit = "GHz"
# Create an object that knows how to convert values in the system
# described by "sf1" into the system described by "sf2".
fs = sf1.convert( sf2 )
# Use this object to convert a set of topocentric radio velocities in m/s
# into heliocentric frequencies in GHz.
topovel = [ 12234.23, -23000.3, 7823.444 ]
heliofreq = fs.tran( topovel )
print( heliofreq )
More information about the AstroPy