Ephemeris Objects

Since ALMA Cycle 3, the ALMA observatory includes in each raw dataset (SDM) all necessary ephemerides in the so-called Ephemeris table, an XML file which corresponds to the ephemeris used during the observation. Upon import to MS format, the task importasdm will translate the xml ephemerides into separate CASA ephemeris tables for each field, which have the same format as those used by the task setjy. Examples can be found in the subdirectory "data/ephemerides/JPL-Horizons" in each CASA distribution. The ephemeris tables are automatically attached to the corresponding field(s) and can be used whenever needed. For example, an ephemeris table is necessary for the spectral frame transformation of the visibilities to the source rest frame using the task cvel or, as a faster alternative, the new task mstransform.

The ephemerides used by ALMA are originally for the observer location of ALMA (topocentric). They use the ICRS coordinate reference frame and typically have a time spacing of ten or twenty minutes. For the later transformation of the spectral reference frame, however, a geocentric ephemeris is necessary. The importasdm task will therefore by default also perform a conversion from the ALMA observer location to the geocenter. This is controlled by the importasdm parameter convert_ephem2geo which is True by default.

The spectral reference frame of the visibilities in the SDM is always topocentric (TOPO), the observer reference frame. To analyze spectral lines in an ephemeris source, it can be helpful to transform the visibilities to the source rest spectral frame (REST). This is in particular necessary when the velocity of the source varies significantly throughout the observation. This offline software Doppler-shift correction can be achieved with either the traditional task cvel or its faster implementation cvel2 which uses internally the same code as the task mstransform. All three tasks should produce the same result. As a matter of fact, an online Doppler-shift tracking, corresponding to the velocity of the source at the beginning of the observation, is applied during observations. This online correction allows one to tune the spectral windows adequately to match the requested rest frequencies, but the labelling of the spectral frame of the raw data remains in TOPO.

The user must set the outframe parameter of cvel, cvel2, or mstransform to "SOURCE". This will lead to a transformation from the TOPO to the GEO reference frame followed by an additional time-dependent Doppler correction according to the radial velocity of the object as given by its ephemeris.

When an ephemeris is attached to a field of the MS FIELD table, the object position does not correspond to the direction columns of the FIELD table but can be retrieved by linearly interpolating from the ephemeris table for the given time. The nominal entry of the direction column then changes its meaning to an angular offset with respect to the ephemeris. Thus, if the object is exactly at the position described by the ephemeris, the nominal entries of the direction column are zero for right ascension and declination. If, e.g. in the case of a mosaic, there are a number of fields with nearby positions, the fields can share an ephemeris; they all reference the same ephemeris table via the optional column EPHEMERIS_ID, but have in their direction column entries different offsets.

Because the nominal field direction entries do not correspond to the actual object position, one could obtain the object position with the following special tool method:


or the more general:


(see the built-in CASA help for details). The default time of the position is taken from the TIME column of the FIELD table.

In summary, with ephemerides included in the ALMA raw data and the added support for this in the importasdm task, the user does not have to worry about how to obtain the right ephemeris in the right format and how to attach it properly to the MS. This process is transparent and only a few logger messages indicate that it is happening. The correct time-dependent positions, radial velocities, and object distances are used in all relevant tasks such as listobs, plotms, and, as described above, cvel, cvel2, and mstransform. For Solar-System object flux calibrators, the task setjy will, however, only extract the nominal position from the SDM ephemeris and otherwise use its internal set of ephemerides since these contain additionally needed object parameters. Care has to be taken when trying to extract the field positions from the FIELD table as the nominal direction column entries will only be _offsets_ (w.r.t. the ephemeris position) when an ephemeris is attached.

As opposed to ALMA data which uses a tabulated representation of the ephemerides, VLA data use a polynomial representation of the positions and radial velocities. Also this representation is supported. The polynomial ephemeris is internally tabulated with a default time step of 0.001 days and then processed as in the ALMA case. The parameter polyephem_tabtimestep can be used to control the step size of the tabulation.