Simulated Satellite Observing

Simulated Satellite Observing

Simulating artificial observing from a satellite instrument consists of two parts: building an observing “schedule” and then simulating telescope motion using that schedule. A satellite schedule contains a list of scans, which describe the overall telescope motion for some length of time:

class toast.schedule.SatelliteScan(name=None, start=None, stop=None, prec_period=<Quantity 0. min>, spin_period=<Quantity 0. min>)

Simulated satellite telescope scan properties for one observation.

This class assumes a simplistic model where the nominal precession axis is pointing in the anti-sun direction (from a location such as at L2). This class just specifies the rotation rates about this axis and also about the spin axis. The opening angles are part of the Telescope and not specified here.

Parameters
  • name (str) – Arbitrary name (does not have to be unique).

  • start (datetime) – The start time of the scan.

  • stop (datetime) – The stop time of the scan.

  • prec_period (Quantity) – The time for one revolution about the precession axis.

  • spin_period (Quantity) – The time for one revolution about the spin axis.

class toast.schedule.SatelliteSchedule(scans=None, site_name='Unknown', telescope_name='Unknown')

Class representing a satellite observing schedule.

A schedule is a collection of scans, with some extra methods for doing I/O.

Parameters
  • scans (list) – A list of SatelliteScan instances or None.

  • site_name (str) – The name of the site for this schedule.

  • telescope_name (str) – The name of the telescope for this schedule.

read(file, comm=None, sort=False)

Load a satellite observing schedule from a file.

This loads scans from a file and appends them to the internal list of scans. The resulting combined scan list is optionally sorted.

Parameters
  • file (str) – The file to load.

  • comm (MPI.Comm) – Optional communicator to broadcast the schedule across.

  • sort (bool) – If True, sort the combined scan list by name.

Returns

None

write(file)

Write satellite schedule to a file.

This writes the internal scan list to the specified file.

Parameters

file (str) – The file to write.

Returns

None

For generating large schedules, it is best to use the included commandline tool:

usage: toast_satellite_schedule [-h] [--out OUT] [--start START]
                                [--num_obs NUM_OBS]
                                [--obs_minutes OBS_MINUTES]
                                [--gap_minutes GAP_MINUTES]
                                [--prec_minutes PREC_MINUTES]
                                [--spin_minutes SPIN_MINUTES]

Create a satellite observing schedule.

optional arguments:
  -h, --help            show this help message and exit
  --out OUT             The output schedule file.
  --start START         The start time of the mission as an ISO-8601 string.
  --num_obs NUM_OBS     The number of observations.
  --obs_minutes OBS_MINUTES
                        The length of each observation in minutes.
  --gap_minutes GAP_MINUTES
                        The length of the gaps between observations in
                        minutes.
  --prec_minutes PREC_MINUTES
                        The precession period in minutes.
  --spin_minutes SPIN_MINUTES
                        The spin period in minutes.

Which writes the schedule to an ECSV file. This file can then be loaded before passing it to the SimSatellite operator. Alternatively, for small tests, you can build a schedule directly in memory by calling the underlying function:

toast.schedule_sim_satellite.create_satellite_schedule(prefix='', mission_start=None, observation_time=<Quantity 10. min>, gap_time=<Quantity 0. min>, num_observations=1, prec_period=<Quantity 10. min>, spin_period=<Quantity 2. min>, site_name='space', telescope_name='satellite')

Generate a satellite observing schedule.

This creates a series of scans with identical lengths and rotation rates, as well as optional gaps between.

Parameters
  • prefix (str) – The prefix for the name of each scan.

  • mission_start (datetime) – The overall start time of the schedule.

  • observation_time (Quantity) – The length of each observation.

  • gap_time (Quantity) – The time between observations.

  • num_observations (int) – The number of observations.

  • prec_period (Quantity) – The time for one revolution about the precession axis.

  • spin_period (Quantity) – The time for one revolution about the spin axis.

  • site_name (str) – The name of the site to include in the schedule.

  • telescope_name (str) – The name of the telescope to include in the schedule.

Returns

The resulting schedule.

Return type

(SatelliteSchedule)

After you have a SatelliteSchedule created or read from disk, you can use the SimSatellite operator to actually generate observations:

class toast.ops.SimSatellite(*, API=0, boresight='boresight_radec', det_data='signal', det_flags='flags', detset_key=None, distribute_time=False, enabled=True, hwp_angle=None, hwp_rpm=None, hwp_step=None, hwp_step_time=None, name=None, position='position', prec_angle=<Quantity 65. deg>, schedule, shared_flags='flags', spin_angle=<Quantity 30. deg>, telescope, times='times', velocity='velocity', **kwargs)

Simulate a generic satellite motion.

This simulates satellite pointing in regular intervals (“science scans”) that may have some gaps in between for cooler cycles or other events. The precession axis (anti-sun direction) is continuously slewed.

Note

The following traits can be set at construction or afterwards

Variables
  • API (int) – Internal interface version for this operator (default = 0)

  • boresight (str) – Observation shared key for boresight (default = ‘boresight_radec’)

  • det_data (str) – Observation detdata key to initialize (default = ‘signal’)

  • det_flags (str) – Observation detdata key for flags to initialize (default = ‘flags’)

  • detset_key (str) – If specified, use this column of the focalplane detector_data to group detectors (default = ‘None’)

  • distribute_time (bool) – Distribute observation data along the time axis rather than detector axis (default = False)

  • enabled (bool) – If True, this class instance is marked as enabled (default = True)

  • hwp_angle (str) – Observation shared key for HWP angle (default = ‘None’)

  • hwp_rpm (float) – The rate (in RPM) of the HWP rotation (default = None)

  • hwp_step (Quantity) – For stepped HWP, the angle of each step (default = None)

  • hwp_step_time (Quantity) – For stepped HWP, the time between steps (default = None)

  • name (str) – The ‘name’ of this class instance (default = ‘None’)

  • position (str) – Observation shared key for position (default = ‘position’)

  • prec_angle (Quantity) – The opening angle of the spin axis from the precession axis (default = 65.0 deg)

  • schedule (SatelliteSchedule) – Instance of a SatelliteSchedule (default = traitlets.Undefined)

  • shared_flags (str) – Observation shared key for common flags (default = ‘flags’)

  • spin_angle (Quantity) – The opening angle of the boresight from the spin axis (default = 30.0 deg)

  • telescope (Telescope) – This must be an instance of a Telescope (default = traitlets.Undefined)

  • times (str) – Observation shared key for timestamps (default = ‘times’)

  • velocity (str) – Observation shared key for velocity (default = ‘velocity’)

This operator will append observations (using the schedule) to the Data container passed to the exec() method. The observations will contain simulated telescope pointing, and will have the detector timestreams initialized to zero- ready for calling other simulation operators to generate detector signals.