array_layout

API documentation for array_layout.c.

Methods to read read/generate array layouts, and move the array back to J2000.

Author

J.L.B. Line

Functions

void RTS_ENH2XYZ_local(float E, float N, float H, float lat, float *X, float *Y, float *Z)

Convert coords in local topocentric East, North, Height units to ‘local’ XYZ units.

Local means Z point north, X points through the equator from the geocenter along the local meridian and Y is East. This is like the absolute system except that zero lon is now the local meridian rather than prim meridian. Latitude is geodetic, in radian. This is what you want for constructing the local antenna positions in a UVFITS antenna table.

Parameters
  • E[in] East coord of the array positions (metres)

  • N[in] North coord of the array positions (metres)

  • H[in] Height coord of the array positions (metres)

  • lat[in] Latitude of the array (radians)

  • *X[inout] Pointer to local X coord to be filled (metres)

  • *Y[inout] Pointer to local Y coord to be filled (metres)

  • *Z[inout] Pointer to local Z coord to be filled (metres)

array_layout_t *calc_XYZ_diffs(woden_settings_t *woden_settings, int do_precession)

Populates an array_layout_t struct with useful antenna coords and baseline lengths for the array layout specified in *woden_settings

Explicitly, tries to read the array layout stored at woden_settings->array_layout_file_path, stores the E,N,H coords, converts to and stores X,Y,Z coords, and calculates the baseline lengths in the X,Y,Z frame. If do_precession=1, it will rotate the X,Y,Z to J2000 (based off of mjd in woden_settings). This should be equivalent to rotating the sky to the present day to account for precession. Assumes the sky model is in J2000 coords.

Parameters
  • *woden_settings[in] Pointer to a woden_settings_t struct

  • do_precession[in] Whether to precess back to J2000 or not (0 False, 1 True)

Returns

A pointer to a populated array_layout_t struct

void RTS_precXYZ(double rmat[3][3], double x, double y, double z, double lmst, double *xp, double *yp, double *zp, double lmst2000)

Rotates the array coordinates in x,y,z from the current date to the J2000 frame, returning the precessed coordinates in xp,yp,zp

wtf you do

Parameters
  • rmat[in] A 3D rotation matrix

  • x[in] X coord of the antenna in the current epoch

  • y[in] Y coord of the antenna in the current epoch

  • z[in] Z coord of the antenna in the current epoch

  • lmst[in] Current local mean sidereal time (radians)

  • xp[inout] X coord of the antenna in J2000 epoch

  • yp[inout] Y coord of the antenna in J2000 epoch

  • zp[inout] Z coord of the antenna in J2000 epoch

  • lmst2000[in] J2000 local mean sidereal time (radians)

void RTS_PrecessXYZtoJ2000(array_layout_t *array_layout, woden_settings_t *woden_settings)

Performs calculations to rotate the array coordinates from the current date back to their positions in J2000.

For any simulation on a date other than 01/01/2000, a J2000 sky model must be precessed to the current date, or the sources are in an incorrect location. Rather than precess every source however, we can just rotate the array itself back to J2000. I think this ignores the intrinsic velocities of each source but covers the Earth based precessions and what not. Explicitly, these three arrays in array_layout are updated: array_layout->ant_X, array_layout->ant_Y, array_layout->ant_Z, along with woden_settings->lst_base, as moving the array effectively changes the LST. Many, many calls to pal are made.

As said in the include file/help, this is an RTS function to rotate the array back to J2000. There are a number of lines commented out, which I don’t think I need, but am leaving here in case I do one day

Parameters
  • *array_layout[inout] An array_layout_t struct containing the array layout

  • *woden_settings[in] A woden_settings_t struct containing observational settings