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(double E, double N, double H, double lat, double *X, double *Y, double *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_tstruct with useful antenna coords and baseline lengths for the array layout specified in*woden_settingsExplicitly, 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. Ifdo_precession=1, it will rotate the X,Y,Z to J2000 (based off of mjd inwoden_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_tstructdo_precession – [in] Whether to precess back to J2000 or not (0 False, 1 True)
- Returns
A pointer to a populated
array_layout_tstruct
-
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,zfrom the current date to the J2000 frame, returning the precessed coordinates inxp,yp,zpwtf 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_layoutare updated:array_layout->ant_X,array_layout->ant_Y,array_layout->ant_Z, along withwoden_settings->lst_base, as moving the array effectively changes the LST. Many, many calls topalare 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_tstruct containing the array layout*woden_settings – [in] A
woden_settings_tstruct containing observational settings