Simulated Ground-Based Observing#

Simulating observing with a ground-based telescope also consists of generating an observing schedule and using that schedule to simulate telescope pointing. A ground-based schedule contains a list of scans, each of which describes the high-level motion of the telescope for some length of time:

class toast.schedule.GroundScan(name=None, start=None, stop=None, boresight_angle=<Quantity 0. deg>, az_min=<Quantity 0. deg>, az_max=<Quantity 0. deg>, el=<Quantity 0. deg>, scan_indx=0, subscan_indx=0)[source]#

Simulated ground telescope scan properties for one observation.

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.

  • boresight_angle (Quantity) – Boresight rotation angle.

  • az_min (Quantity) – The minimum Azimuth value of each sweep.

  • az_max (Quantity) – The maximum Azimuth value of each sweep.

  • el (Quantity) – The nominal Elevation of the scan.

  • scan_indx (int) – The current pass of this patch in the overall schedule.

  • subscan_indx (int) – The current sub-pass of this patch in the overall schedule.

min_sso_dist(sso_az_begin, sso_el_begin, sso_az_end, sso_el_end)[source]#

Rough minimum angle between the boresight and a solar system object.

Parameters
  • sso_az_begin (Quantity) – Object starting Azimuth

  • sso_el_begin (Quantity) – Object starting Elevation

  • sso_az_end (Quantity) – Object final Azimuth

  • sso_el_end (Quantity) – Object final Elevation

Returns

The minimum angle.

Return type

(Quantity)

class toast.schedule.GroundSchedule(scans=None, site_name='Unknown', telescope_name='Unknown', site_lat=<Quantity 0. deg>, site_lon=<Quantity 0. deg>, site_alt=<Quantity 0. m>)[source]#

Class representing a ground based observing schedule.

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

Parameters
  • scans (list) – A list of GroundScan 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.

  • site_lat (Quantity) – The site latitude.

  • site_lon (Quantity) – The site longitude.

  • site_alt (Quantity) – The site altitude.

read(file, file_split=None, comm=None, sort=False)[source]#

Load a ground 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.

  • file_split (tuple) – If not None, only use a subset of the schedule file. The arguments are (isplit, nsplit) and only observations that satisfy ‘scan index modulo nsplit == isplit’ are included.

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

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

Returns

None

Because ground schedules are more complex, they are usually generated with a commandline tool:

/home/docs/checkouts/readthedocs.org/user_builds/toast-cmb/checkouts/toast3/docs/create_help_inc.sh: line 13: toast_ground_schedule: command not found

This writes the schedule to a custom format that can later be loaded before passing it to the SimGround operator:

class toast.ops.SimGround(*, API=0, azimuth='azimuth', boresight_azel='boresight_azel', boresight_radec='boresight_radec', det_data='signal', det_data_units=Unit("K"), det_flags='flags', detset_key=None, distribute_time=False, el_mod_amplitude=<Quantity 1. deg>, el_mod_rate=<Quantity 0. Hz>, el_mod_sine=False, el_mod_step=<Quantity 0. deg>, elevation='elevation', elnod_end=False, elnod_every_scan=False, elnod_interval='elnod', elnod_mask=7, elnod_start=False, elnods, enabled=True, fix_rate_on_sky=True, hwp_angle=None, hwp_rpm=None, hwp_step=None, hwp_step_time=None, invalid_mask=1, kernel_implementation=ImplementationType.DEFAULT, leftright_mask=8, max_pwv=None, median_weather=False, name=None, position='position', randomize_phase=False, realization=0, rightleft_mask=16, scan_accel_az=<Quantity 1. deg / s2>, scan_accel_el=<Quantity 1. deg / s2>, scan_cosecant_modulation=False, scan_leftright_interval='scan_leftright', scan_rate_az=<Quantity 1. deg / s>, scan_rate_el=<Quantity 1. deg / s>, scan_rightleft_interval='scan_rightleft', scanning_interval='scanning', schedule, session_split_key=None, shared_flags='flags', sun_angle_min=<Quantity 90. deg>, sun_close_distance=<Quantity 45. deg>, sun_close_interval='sun_close', sun_close_mask=64, sun_up_interval='sun_up', sun_up_mask=32, telescope, throw_interval='throw', throw_leftright_interval='throw_leftright', throw_rightleft_interval='throw_rightleft', times='times', timezone=0, turn_leftright_interval='turn_leftright', turn_rightleft_interval='turn_rightleft', turnaround_interval='turnaround', turnaround_mask=3, velocity='velocity', weather=None, **kwargs)[source]#

Simulate a generic ground-based telescope scanning.

This simulates ground-based pointing in constant elevation scans for a telescope located at a particular site and using an pre-created schedule.

The created observations define several interval lists to describe regions where the telescope is scanning left, right or in a turnaround or El-nod. A shared flag array is also created with bits sets for these same properties.

Note

The following traits can be set at construction or afterwards

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

  • azimuth (str) – Observation shared key for Azimuth (default = azimuth)

  • boresight_azel (str) – Observation shared key for boresight AZ/EL (default = boresight_azel)

  • boresight_radec (str) – Observation shared key for boresight RA/DEC (default = boresight_radec)

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

  • det_data_units (Unit) – Output units if creating detector data (default = K)

  • 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)

  • el_mod_amplitude (Quantity) – Range of elevation modulation (default = 1.00000000000000e+00)

  • el_mod_rate (Quantity) – Modulate elevation continuously at this rate (default = 0.00000000000000e+00)

  • el_mod_sine (bool) – Modulate elevation with a sine wave instead of a triangle wave (default = False)

  • el_mod_step (Quantity) – Amount to step elevation after each left-right scan pair (default = 0.00000000000000e+00)

  • elevation (str) – Observation shared key for Elevation (default = elevation)

  • elnod_end (bool) – Perform an el-nod after the scan (default = False)

  • elnod_every_scan (bool) – Perform el nods every scan (default = False)

  • elnod_interval (str) – Interval name for elnods (default = elnod)

  • elnod_mask (int) – Bit mask to raise elevation nod flags with (default = 7)

  • elnod_start (bool) – Perform an el-nod before the scan (default = False)

  • elnods (list) – List of relative el_nods (default = traitlets.Undefined)

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

  • fix_rate_on_sky (bool) – If True, scan_rate_az is given in sky coordinates and azimuthal rate on mount will be adjusted to meet it. If False, scan_rate_az is used as the mount azimuthal rate. (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)

  • invalid_mask (int) – Bit mask to raise invalid flags with (default = 1)

  • kernel_implementation (enum) – Which kernel implementation to use (DEFAULT, COMPILED, NUMPY, JAX). (default = 0)

  • leftright_mask (int) – Bit mask to raise left-to-right flags with (default = 8)

  • max_pwv (Quantity) – Maximum PWV for the simulated weather. (default = None)

  • median_weather (bool) – Use median weather parameters instead of sampling from the distributions (default = False)

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

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

  • randomize_phase (bool) – If True, the Constant Elevation Scan will begin at a randomized phase. (default = False)

  • realization (int) – The realization index (default = 0)

  • rightleft_mask (int) – Bit mask to raise right-to-left flags with (default = 16)

  • scan_accel_az (Quantity) – Mount scanning rate acceleration for turnarounds (default = 1.00000000000000e+00)

  • scan_accel_el (Quantity) – Mount elevation rate acceleration. (default = 1.00000000000000e+00)

  • scan_cosecant_modulation (bool) – Modulate the scan rate according to 1/sin(az) for uniform depth (default = False)

  • scan_leftright_interval (str) – Interval name for left to right scans (default = scan_leftright)

  • scan_rate_az (Quantity) – The sky or mount azimuth scanning rate. See fix_rate_on_sky (default = 1.00000000000000e+00)

  • scan_rate_el (Quantity) – The sky elevation scanning rate (default = 1.00000000000000e+00)

  • scan_rightleft_interval (str) – Interval name for right to left scans (default = scan_rightleft)

  • scanning_interval (str) – Interval name for scanning (default = scanning)

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

  • session_split_key (str) – Focalplane key for splitting into observations (default = None)

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

  • sun_angle_min (Quantity) – Minimum angular distance for the scan and the Sun (default = 9.00000000000000e+01)

  • sun_close_distance (Quantity) – ‘Sun close’ flagging distance (default = 4.50000000000000e+01)

  • sun_close_interval (str) – Interval name for times when the sun is close (default = sun_close)

  • sun_close_mask (int) – Bit mask to raise Sun close flags with (default = 64)

  • sun_up_interval (str) – Interval name for times when the sun is up (default = sun_up)

  • sun_up_mask (int) – Bit mask to raise Sun up flags with (default = 32)

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

  • throw_interval (str) – Interval name for scan + turnaround intervals (default = throw)

  • throw_leftright_interval (str) – Interval name for left to right scans + turnarounds (default = throw_leftright)

  • throw_rightleft_interval (str) – Interval name for right to left scans + turnarounds (default = throw_rightleft)

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

  • timezone (int) – The (integer) timezone offset in hours from UTC to apply to schedule (default = 0)

  • turn_leftright_interval (str) – Interval name for turnarounds after left to right scans (default = turn_leftright)

  • turn_rightleft_interval (str) – Interval name for turnarounds after right to left scans (default = turn_rightleft)

  • turnaround_interval (str) – Interval name for turnarounds (default = turnaround)

  • turnaround_mask (int) – Bit mask to raise turnaround flags with (default = 3)

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

  • weather (str) – Name of built-in weather site (e.g. ‘atacama’, ‘south_pole’) or path to HDF5 file (default = None)

API#

Internal interface version for this operator

telescope#

This must be an instance of a Telescope

session_split_key#

Focalplane key for splitting into observations

weather#

Name of built-in weather site (e.g. ‘atacama’, ‘south_pole’) or path to HDF5 file

realization#

The realization index

schedule#

Instance of a GroundSchedule

timezone#

The (integer) timezone offset in hours from UTC to apply to schedule

randomize_phase#

If True, the Constant Elevation Scan will begin at a randomized phase.

scan_rate_az#

The sky or mount azimuth scanning rate. See fix_rate_on_sky

fix_rate_on_sky#

If True, scan_rate_az is given in sky coordinates and azimuthal rate on mount will be adjusted to meet it. If False, scan_rate_az is used as the mount azimuthal rate.

scan_rate_el#

The sky elevation scanning rate

scan_accel_az#

Mount scanning rate acceleration for turnarounds

scan_accel_el#

Mount elevation rate acceleration.

scan_cosecant_modulation#

Modulate the scan rate according to 1/sin(az) for uniform depth

sun_angle_min#

Minimum angular distance for the scan and the Sun

el_mod_step#

Amount to step elevation after each left-right scan pair

el_mod_rate#

Modulate elevation continuously at this rate

el_mod_amplitude#

Range of elevation modulation

el_mod_sine#

Modulate elevation with a sine wave instead of a triangle wave

distribute_time#

Distribute observation data along the time axis rather than detector axis

detset_key#

If specified, use this column of the focalplane detector_data to group detectors

times#

Observation shared key for timestamps

shared_flags#

Observation shared key for common flags

det_data#

Observation detdata key to initialize

det_data_units#

Output units if creating detector data

det_flags#

Observation detdata key for flags to initialize

hwp_angle#

Observation shared key for HWP angle

azimuth#

Observation shared key for Azimuth

elevation#

Observation shared key for Elevation

boresight_azel#

Observation shared key for boresight AZ/EL

boresight_radec#

Observation shared key for boresight RA/DEC

position#

Observation shared key for position

velocity#

Observation shared key for velocity

hwp_rpm#

The rate (in RPM) of the HWP rotation

hwp_step#

For stepped HWP, the angle of each step

hwp_step_time#

For stepped HWP, the time between steps

elnod_start#

Perform an el-nod before the scan

elnod_end#

Perform an el-nod after the scan

elnods#

List of relative el_nods

elnod_every_scan#

Perform el nods every scan

scanning_interval#

Interval name for scanning

turnaround_interval#

Interval name for turnarounds

throw_leftright_interval#

Interval name for left to right scans + turnarounds

throw_rightleft_interval#

Interval name for right to left scans + turnarounds

throw_interval#

Interval name for scan + turnaround intervals

scan_leftright_interval#

Interval name for left to right scans

turn_leftright_interval#

Interval name for turnarounds after left to right scans

scan_rightleft_interval#

Interval name for right to left scans

turn_rightleft_interval#

Interval name for turnarounds after right to left scans

elnod_interval#

Interval name for elnods

sun_up_interval#

Interval name for times when the sun is up

sun_close_interval#

Interval name for times when the sun is close

sun_close_distance#

‘Sun close’ flagging distance

max_pwv#

Maximum PWV for the simulated weather.

median_weather#

Use median weather parameters instead of sampling from the distributions

invalid_mask#

Bit mask to raise invalid flags with

turnaround_mask#

Bit mask to raise turnaround flags with

leftright_mask#

Bit mask to raise left-to-right flags with

rightleft_mask#

Bit mask to raise right-to-left flags with

sun_up_mask#

Bit mask to raise Sun up flags with

sun_close_mask#

Bit mask to raise Sun close flags with

elnod_mask#

Bit mask to raise elevation nod flags with