wodenpy.observational

Methods to calculate observational related parameters needed for both the simulation and output uvfits file.

calc_obs

calc_obs.calc_jdcal(date)[source]

Takes a string calendar date-time and returns julian date by using astropy.time.Time, so date can be formatted anyway astropy.time.Time accepts. Returns the date in two parts, an integer day, and a fractional day. The header of a uvfits file takes the integer part, and the fractional part goes into the DATE array

Parameters:

date (string) – UTC date/time (e.g. in format YYYY-MM-DDThh:mm:ss or similar)

Returns:

  • jd_day (float) – floor of the julian date

  • jd_fraction (float) – remaining fraction of the julian date

calc_obs.get_uvfits_date_and_position_constants(latitude=None, longitude=None, date=None, height=None)[source]

Returns a number of date and time based values that are needed for uvfits headers. For the given Earth location and UTC date return the local sidereal time (deg), the Greenwich sidereal time at 0 hours on the given date (deg), the rotational speed of Earth on the given date (in degrees per day), and the difference between UT1 and UTC. Uses astropy.time.Time and astropy.coordinates.EarthLocation to make the calculations.

Parameters:
  • latitude (float) – Latitude of location on Earth (deg)

  • longitude (float) – Longitude of location on Earth (deg)

  • height (float) – Height above sea level of location on Earth (m)

  • date (string) – UTC date/time (in format YYYY-MM-DDThh:mm:ss)

Returns:

  • LST_deg (float) – Local sidereal time (degrees)

  • GST0_deg (float) – Greenwich sidereal time at 0 hours on the given date (degrees)

  • DEGPDY (float) – Rotational speed of Earth on the given date (degrees per day)

  • ut1utc (float) – Difference between UT1 and UTC (secs)