Contents:
DJE - (scalar) Julian ephemeris date. DEQ - (scalar) epoch of mean equinox of dvelh and dvelb. If deq=0
then deq is assumed to be equal to dje.
DVELH: (vector(3)) heliocentric velocity component. in km/s DVELB: (vector(3)) barycentric velocity component. in km/s
The 3-vectors DVELH and DVELB are given in a right-handed coordinate system with the +X axis toward the Vernal Equinox, and +Z axis toward the celestial pole.
to compute the Earth velocity using the full JPL ephemeris. The JPL ephemeris FITS file JPLEPH.405 must exist in either the current directory, or in the directory specified by the environment variable ASTRO_DATA. Alternatively, the JPL keyword can be set to the full path and name of the ephemeris file. A copy of the JPL ephemeris FITS file is available in
Algorithm taken from FORTRAN program of Stumpff (1980, A&A Suppl, 41,1) Stumpf claimed an accuracy of 42 cm/s for the velocity. A comparison with the JPL FORTRAN planetary ephemeris program PLEPH found agreement to within about 65 cm/s between 1986 and 1994
If /JPL is set (using JPLEPH.405 ephemeris file) then velocities are given in the ICRS system; otherwise in the FK4 system.
IDL> jdcnv, 1994, 2, 15, 0, jd ;==> JD = 2449398.5 IDL> baryvel, jd, 2000, vh, vb ;Original algorithm
==> vh = [-17.07243, -22.81121, -9.889315] ;Heliocentric km/s ==> vb = [-17.08083, -22.80471, -9.886582] ;Barycentric km/s
IDL> ra = ten(19,50,46.77)*15/!RADEG ;RA in radians IDL> dec = ten(08,52,3.5)/!RADEG ;Dec in radians IDL> v = vb[0]*cos(dec)*cos(ra) + $ ;Project velocity toward star
vb[1]*cos(dec)*sin(ra) + vb[2]*sin(dec)
PARALLAX - N_element vector giving stellar parallax (seconds of arc) RAD_VEL - N_element vector giving radial velocity in km/s
The values of MU_RADEC, PARALLAX, and RADVEL will all be modified upon output to contain the values of these quantities in the B1950 system. The parallax and radial velocity will have a very minor influence on the B1950 position.
The algorithm is taken from the Explanatory Supplement to the Astronomical Almanac 1992, page 186. Also see Aoki et al (1983), A&A, 128,263
BPRECESS distinguishes between the following two cases: (1) The proper motion is known and non-zero (2) the proper motion is unknown or known to be exactly zero (i.e.
extragalactic radio sources). In this case, the reverse of the algorithm in Appendix 2 of Aoki et al. (1983) is used to ensure that the output proper motion is exactly zero. Better precision can be achieved in this case by inputting the EPOCH of the original observations.
The error in using the IDL procedure PRECESS for converting between B1950 and J1950 can be up to 12”, mainly in right ascension. If better accuracy than this is needed then BPRECESS should be used.
An unsystematic comparison of BPRECESS with the IPAC precession routine (http://nedwww.ipac.caltech.edu/forms/calculator.html) always gives differences less than 0.15”.
The SAO2000 catalogue gives the J2000 position and proper motion for the star HD 119288. Find the B1950 position.
RA(2000) = 13h 42m 12.740s Dec(2000) = 8d 23’ 17.69’’ Mu(RA) = -.0257 s/yr Mu(Dec) = -.090 ‘’/yr
IDL> mu_radec = 100D* [ -15D*.0257, -0.090 ] IDL> ra = ten(13, 42, 12.740)*15.D IDL> dec = ten(8, 23, 17.69) IDL> bprecess, ra, dec, ra1950, dec1950, mu_radec = mu_radec IDL> print, adstring(ra1950, dec1950,2)
===> 13h 39m 44.526s +08d 38’ 28.63”
Written, W. Landsman October, 1992 Vectorized, W. Landsman February, 1994 Treat case where proper motion not known or exactly zero November 1994 Handling of arrays larger than 32767 Lars L. Christensen, march, 1995 Converted to IDL V5.0 W. Landsman September 1997 Fixed bug where A term not initialized for vector input
- Landsman February 2000
Converted to python Sergey Koposov july 2010
CALLING SEQUENCE:
imconv = convolve( image1, psf, FT_PSF = psf_FT )
- or:
- correl = convolve( image1, image2, /CORREL )
- or:
- correl = convolve( image, /AUTO )
OPTIONAL INPUT KEYWORDS:
- FT_PSF = passes out/in the Fourier transform of the PSF,
- (so that it can be re-used the next time function is called).
FT_IMAGE = passes out/in the Fourier transform of image.
- /CORRELATE uses the conjugate of the Fourier transform of PSF,
- to compute the cross-correlation of image and PSF, (equivalent to IDL function convol() with NO rotation of PSF)
/AUTO_CORR computes the auto-correlation function of image using FFT.
- /NO_FT overrides the use of FFT, using IDL function convol() instead.
- (then PSF is rotated by 180 degrees to give same result)
written, Frank Varosi, NASA/GSFC 1992. Appropriate precision type for result depending on input image
Markus Hundertmark February 2006
YR = Year (Integer) MN = Month (Integer) DAY = Day (Integer) HR = Hours and fractional hours (Real). If XJD is a vector,
then YR,MN,DAY and HR will be vectors of the same length.
IDL> DAYCNV, 2440000.D, yr, mn, day, hr
yields yr = 1968, mn =5, day = 23, hr =12.
BI - Input Latitude in DEGREES
SELECT - Integer (1-6) specifying type of coordinate transformation.
If not supplied as a parameter or keyword, then EULER will prompt for the value of SELECT Celestial coordinates (RA, Dec) should be given in equinox J2000 unless the /FK4 keyword is set.
/SELECT |
specified as a keyword |
User must supply a position, proper motion,radial velocity and distance (or parallax). Either scalars or vectors can be supplied.
RA - Right Ascension in Degrees Dec - Declination in Degrees
PMRA = Proper motion in RA in arc units (typically milli-arcseconds/yr) PMDEC = Proper motion in Declination (typically mas/yr)
VRAD = radial velocity in km/s
- DISTANCE - distance in parsecs
- or
- PLX - parallax with same distance units as proper motion measurements
- typically milliarcseconds (mas)
- /LSR - If this keyword is set, then the output velocities will be
- corrected for the solar motion (U,V,W)_Sun = (-10.00,+5.25,+7.17) (Dehnen & Binney, 1998) to the local standard of rest
ra = ten(1,9,42.3)*15. & dec = ten(61,32,49.5) pmra = 627.89 & pmdec = 77.84 ;mas/yr dis = 144 & vrad = -321.4 gal_uvw,u,v,w,ra=ra,dec=dec,pmra=pmra,pmdec=pmdec,vrad=vrad,dis=dis,/lsr
===> u=154 v = -493 w = 97 ;km/s
(2) Use the Hipparcos Input and Output Catalog IDL databases (see http://idlastro.gsfc.nasa.gov/ftp/zdbase/) to obtain space velocities for all stars within 10 pc with radial velocities > 10 km/s
dbopen,’hipparcos,hic’ ;Need Hipparcos output and input catalogs list = dbfind(‘plx>100,vrad>10’) ;Plx > 100 mas, Vrad > 10 km/s dbext,list,’pmra,pmdec,vrad,ra,dec,plx’,pmra,pmdec,vrad,ra,dec,plx ra = ra*15. ;Need right ascension in degrees GAL_UVW,u,v,w,ra=ra,dec=dec,pmra=pmra,pmdec=pmdec,vrad=vrad,plx = plx forprint,u,v,w ;Display results
Written, W. Landsman December 2000 fix the bug occuring if the input arrays are longer than 32767
and update the Sun velocity Sergey Koposov June 2008 vectorization of the loop – performance on large arrays is now 10 times higher Sergey Koposov December 2008
This procedure correct for the extra light travel time between the Earth and the Sun.
An online calculator for this quantity is available at http://www.physics.sfasu.edu/astro/javascript/hjd.html
What is the heliocentric Julian date of an observation of V402 Cygni (J2000: RA = 20 9 7.8, Dec = 37 09 07) taken June 15, 1973 at 11:40 UT?
IDL> juldate, [1973,6,15,11,40], jd ;Get geocentric Julian date IDL> hjd = helio_jd( jd, ten(20,9,7.8)*15., ten(37,9,7) )
==> hjd = 41848.9881
Wayne Warren (Raytheon ITSS) has compared the results of HELIO_JD with the FORTRAN subroutines in the STARLINK SLALIB library (see http://star-www.rl.ac.uk/).
Time Diff (sec)Date RA(2000) Dec(2000) STARLINK IDL
1999-10-29T00:00:00.0 21 08 25. -67 22 00. -59.0 -59.0 1999-10-29T00:00:00.0 02 56 33.4 +00 26 55. 474.1 474.1 1940-12-11T06:55:00.0 07 34 41.9 -00 30 42. 366.3 370.2 1992-02-29T03:15:56.2 12 56 27.4 +42 10 17. 350.8 350.9 2000-03-01T10:26:31.8 14 28 36.7 -20 42 11. 243.7 243.7 2100-02-26T09:18:24.2 08 26 51.7 +85 47 28. 104.0 108.8 PROCEDURES CALLED:
bprecess, xyz
Writes the list of numpy.arrays arraylist as a FITS table filename using namelist as list of names. Arraylist can be dictionary with arrays as values and names as keys. Also Arraylist can be numpy-record-array. Example: mwrfits(‘/tmp/xx.fits’,[arr,arr1],[‘X’,’Y’]) Or : mwrfits(‘test.fits’,{‘X’:arr,’Y’:arr1}) Or: data = numpy.zeros((4,),dtype=[(‘run’,’i4’),(‘rerun’,’f8’),(‘zz’,’b’)]) mwfits(‘test1.fits’,data)
Keep in mind that when you used a dictionary, the order of columns in the fits file is not guaranteed
For interactive display, one can use the procedure ASTRO which calls PRECESS or use the /PRINT keyword. The default (RA,DEC) system is FK5 based on epoch J2000.0 but FK4 based on B1950.0 is available via the /FK4 keyword.
Use BPRECESS and JPRECESS to convert between FK4 and FK5 systems
The input RA and DEC are modified by PRECESS to give the values after precession.
EQUINOX2 - Equinox of precessed coordinates.
/FK4 |
will be used otherwise FK5 (J2000.0) will be used instead. |
89d 15’ 50.6”); compute its coordinates at J1985.0
IDL> precess, ten(2,31,46.3)*15, ten(89,15,50.6), 2000, 1985, /PRINT
====> 2h 16m 22.73s, 89d 11’ 47.3”
(2) Precess the B1950 coordinates of Eps Ind (RA = 21h 59m,33.053s, DEC = (-56d, 59’, 33.053”) to equinox B1975.
IDL> ra = ten(21, 59, 33.053)*15 IDL> dec = ten(-56, 59, 33.053) IDL> precess, ra, dec ,1950, 1975, /fk4
PRECESS_XYZ
Precess equatorial geocentric rectangular coordinates.
precess_xyz, x, y, z, equinox1, equinox2
THESE ARE CHANGED UPON RETURNING.
EQUINOX1: equinox of input coordinates, numeric scalar
EQUINOX2: equinox of output coordinates, numeric scalar
x,y,z are changed upon return
to RA and Dec, precessed in the normal way, then changed back to x, y and z using unit vectors.
- Written by P. Plait/ACC March 24 1999
- (unit vectors provided by D. Lindler)
Use /Radian call to PRECESS W. Landsman November 2000 Use two parameter call to ATAN W. Landsman June 2001
/FK4 |
angles are used to compute the precession matrix. The default is to use FK5 (J2000.0) precession angles |
Return the precession matrix from 1950.0 to 1975.0 in the FK4 system
IDL> matrix = PREMAT( 1950.0, 1975.0, /FK4)
This routine reads the data from the ascii file a,b,c=readcol(‘dat.txt’,delimiter=’|’) you can skip a certain number of rows in the top of the file by specifying skiprows=X option. The format option is needed if you have datatypes different from float in your table In that case format string should be comma delimted set of I (int) F(float) D (double) S (string) characters. E.g. a,b,c=readcol(‘dat.txt’,format=’I,S,D’)
measures the spherical distance in degrees The input has to be in degrees too
xvel, yvel, zvel: velocity vectors corresponding to X, Y and Z.
What were the rectangular coordinates and velocities of the Sun on Jan 22, 1999 0h UT (= JD 2451200.5) in J2000 coords? NOTE: Astronomical Almanac (AA) is in TDT, so add 64 seconds to UT to convert.
IDL> xyz,51200.5+64.d/86400.d,x,y,z,xv,yv,zv,equinox = 2000
XYZ: 0.51456871 -0.76963263 -0.33376880 AA: 0.51453130 -0.7697110 -0.3337152 abs(err): 0.00003739 0.00007839 0.00005360 abs(err)
(km): 5609 11759 8040
XYZ: -0.014947268 -0.0083148382 -0.0036068577 AA: -0.01494574 -0.00831185 -0.00360365 abs(err): 0.000001583 0.0000029886 0.0000032077 abs(err)
(km/sec): 0.00265 0.00519 0.00557
Original algorithm from Almanac for Computers, Doggett et al. USNO 1978 Adapted from the book Astronomical Photometry by A. Henden Written W. Landsman STX June 1989 Correct error in X coefficient W. Landsman HSTX January 1995 Added velocities, more terms to positions and EQUINOX keyword,
some minor adjustments to calculations P. Plait/ACC March 24, 1999