fastimgproto.coords module

fastimgproto.coords.time_of_next_transit(observer_longitude, target_ra, start_time, tolerance=<Quantity 0.02 arcsec>)[source]

Calculate time, t when the local-hour-angle of target will be 0.

(Such that start_time <= t < start_time + 24*u.hr.)

NB: This gives no guarantees about visibility / horizons, as we are ignoring observer-declination / target-declination here. Just provides a useful way of setting up an observation at a good hour-angle, for a given time-period.

Parameters:
Returns:

Approximate time of the next transit

(good to around 0.02 arcsec)

Return type:

astropy.time.Time

fastimgproto.coords.xyz_to_uvw_rotation_matrix(hour_angle, declination)[source]

Generates rotation matrix from XYZ -> UVW co-ordinates, for given HA, Dec.

For an explanation and derivation, see Notebook 4.1, Sections 4.1.1d and 4.1.2 of https://github.com/griffinfoster/fundamentals_of_interferometry (“The (u,v,w) Space”)

The definition of XYZ used here is that:

  • X axis points towards the crossing of the celestial equator and meridian at hour-angle \(H=0h\)
  • Y axis points towards hour-angle \(H=-6h\) (Due East from telescope, in the local-XYZ / local hour-angle case.)
  • Z axis points towards the North Celestial Pole (NCP).

The definition of UVW used here is that:

  • the u-axis lies in the celestial equatorial plane, and points toward the hour angle \(H_0-6h\) (where \(H_0\) is the hour-angle of the source) (i.e. East of source).
  • the v-axis lies in the plane of the great circle with hour angle \(H_0\), and points toward the declination and points toward the declination \(\frac{\pi}{2}-\delta_0\) (North of source).
  • the w-axis points in the direction of the source.

Can be used to generate a rotation matrix for either local XYZ co-ordinates, or for Global XYZ (also known as ECEF or ITRF) co-ordinates. In the case of local-XYZ co-ords the hour-angle \(H_0\) supplied should be Local-hour-angle (relative to transit, \(LHA = LST - RA\)). In the case of Global XYZ co-ords it should be Greenwich hour angle (\(GHA = GST - RA\), where GST is Greenwich Sidereal Time).

NB LST = GST + Longitude, equivalently LHA = GHA + Longitude (with the standard convention of East-is-positive)

Parameters:
Returns:

Rotation matrix for converting from XYZ to UVW. [Dtype numpy.float_, shape (3, 3)]

Return type:

numpy.ndarray

fastimgproto.coords.z_rotation_matrix(rotation_angle)[source]

Rotation matrix for a passive transformation counter-clockwise about Z-axis

(i.e. rotation of co-ordinate system)

Parameters:rotation_angle (astropy.units.Quantity) – Rotation-angle. Dimensions of angular width (arc).
Returns:Rotation matrix
Return type:numpy.ndarray