Preset

Introduction

Preset is issued to start an observation in the requested telescope mode. There are simple modes and complex modes. The complex modes include AO.
These are the simple telescope modes in order:

MODE_TRACK               Point and track
MODE_ACQUIRE             Point, track, and start acquiring guide images
MODE_GUIDE               Point, track, and start guiding
MODE_ACTIVE              Point, track, guide, and start active optics

In general, a simple mode includes all functionality of all lower modes.
These are the complex modes:

MODE_ADAPTIVETTM_TRACK         Point, track, and start adaptive optics in tip/tilt mode
MODE_ADAPTIVETTM_GUIDE         Point, track, guide, and start adaptive optics in tip/tilt mode
MODE_ADAPTIVETTM_ACTIVE        Point, track, guide, start active optics, and start adaptive optics in tip/tilt mode
MODE_ADAPTIVEACE_TRACK         Point, track, and start adaptive optics in automatic mode
MODE_ADAPTIVEACE_GUIDE         Point, track, guide, and start adaptive optics in automatic mode
MODE_ADAPTIVEACE_ACTIVE        Point, track, guide, start active optics, and start adaptive optics in automatic mode
MODE_ADAPTIVEICE_TRACK         Point, track, and start adaptive optics in interactive mode
MODE_ADAPTIVEICE_GUIDE         Point, track, guide, and start adaptive optics in interactive mode
MODE_ADAPTIVEICE_ACTIVE        Point, track, guide, start active optics, and start adaptive optics in interactive mode
MODE_INTERFEROMETRIC           TBD

Prologue

  1. If pseudo-monocular, use authorized instrument and focal station for pseudo-monocular passive preset. Mark passive side instrument preset as bad, to force a warning later.
  2. Force non-sidereal target if override flag is set, but only if original target does not contain non-sidereal data.
  3. Force non-sidereal guide star if override flag is set, but only if original guide star does not contain non-sidereal data.
    Non-sidereal guide stars are not yet supported.
  4. Force non-sidereal reference star if override flag is set, but only if original reference star does not contain non-sidereal data.
    Non-sidereal reference stars are not yet supported.
  5. Return error if not authorized.
  6. Return error for unsupported parameters and modes:
    COORD_FOCAL_MM is not supported.
    Proper motion is only allowed for COORD_RADEC.
    Non-sidereal target must be recognized type.
    Non-sidereal coordinate system must be COORD_RADEC.
    ROTATOR_NATIVE and ROTATOR_GRAV are not supported.
    Equinox ICRS is not supported.
    Modes above MODE_ADAPTIVEACE_ACTIVE are not supported.
    Binocular MODE_STATIC must have side 'both'.
    Guiding in parallactic mode is not supported.
    Adaptive mode without a reference star is not supported.
    Adaptive mode with a rigid secondary is not supported.
    Embedded CS offset is not supported.
    Embedded CS offset for coordinate systms other than COORD_RADEC is not supported.
  7. Return error if rotation angle is NAN, INF, or not in [-2PI,2PI].
  8. Return error if target, guide star(s), offset, hotspot, non-sidereal, or AO reference values are NAN, INF, or out-of-range.
  9. Return error if a Preset command is already in progress.
  10. Return error for a PCS weight of zero.
  11. Return error for side 'both' when synchronous.
  12. Return error for duplicate synchronous Preset.
  13. Set target not OK for GetTrajectory.
  14. If asynchronous wait for any asynchronous Preset on the other side.
  15. If asynchronous binocular return error if other Preset is not same tracking mode (sidereal, non-sidereal).
  16. If synchronous wait for both Presets to arrive. Require same tracking modes (sidereal, non-sidereal), and targets if non-sidereal.
  17. If synchronous Offset waiting, clear OffsetPointing synchronous state, and cancel any pending synchronous OffsetPointing commands.
  18. Save information in the Data Dictionary.
  19. Set up MCS unwrap flags
    Command side rotator can unwrap, other side rotator no change.
    AZ can unwrap for both, mono, sync, command side async and other side not active, else no change.

Execution

  1. Ignore and return warning for preset from passive side instrument if pseudo-monocular.
  2. Tell PCS to stop accepting demands from the TCS and stop sending pointing corrections to the PSF.
  3. Tell PCS to clear target buffers for synchronous Presets. Do not clear more than once for each pair or on a release.
    Tell PCS to clear target buffers for asynchronous Preset if other side has no Preset (This replaces BinocularControl CLEARPRESET operation.)
  4. Reset standby level to zero.
  5. Return error if needed subsystems are not running.
    The PCS, MCS, PMC, and PSF are always needed.
    The OSS is needed for all focal stations except PRIME.
    The GCS is needed for focal stations BENTGREGORIANFRONT, BENTGREGORIANARGOS, BENTGREGORIANREARFIBERFEED, and DIRECTGREGORIAN.
    The AOS is needed if the focal station is not PRIME and the adaptive secondary mirror is present.
  6. Check for correct swing arm configuration. If incorrect, the Preset will continue but return a warning.
  7. Send the rotator mode to MCS.
    Return error if MCS reports failure and not pseudo-monocular.
  8. Stop WFS, guiding, and acquiring if GCS is running.
    Return error if GCS reports failure and not pseudo-monocular.
  9. Stop adaptive optics if AOS is being used.
    Return error if AOS reports failure and not pseudo-monocular.
  10. Perform secondary active optics offload calculation.
    This will apply any held WFS correction.
    Return error if PSF reports failure and not pseudo-monocular.
  11. Send unwrap flags to MCS.
    Return error if MCS reports failure and not pseudo-monocular.
  12. Send target to PCS.
    Set target as OK for GetTrajectory.
    If asynchronous, unlock mutex so an asynchronous preset waiting on the other side is released.
    Update synchronous state flags.
    Return error if PCS reports failure and not pseudo-monocular.
  13. Tell PCS to start tracking for all modes.
    If the mode is MODE_STATIC the PCS will do a SLEW_TO_HOLD, otherwise a SLEW_TO_TRACK.
    Return error if PCS reports failure, or there are any pseudo-monocular accumulated errors.
  14. If simplemode is greater than or equal to MODE_ACQUIRE send guide star list to GCS.
    If the guide star list is empty and the simplemode is MODE_ACQUIRE tell GCS to put the probe on axis.
    If simplemode is less than MODE_ACQUIRE and the focal station has an AGW, tell GCS to park the probe.
    Do not wait for the GCS.
  15. If adaptive mode invoke PresetAO in the AOS.
    Do not wait for the AOS.
  16. Wait for elevation to get there.
    Return error if wait times out or is aborted.
    • The wait time out is set in iif.conf (default 400 seconds) and can be aborted from the IIF GUI.
  17. If not mono set up mount balancing.
    Issue PSF adjustPointing with zero tip and tilt to tell the PCS the PSF desired tip tilts.
    Wait for three PCS fast loop cycles.
    Get the PCS optics tip/tilt and send it to the PSF but do not move the optics at this time.
  18. Collimate all needed mirrors.
    This will include any secondary offload and PCS tip/tilts
    Return error if any collimation fails.
  19. Tell PCS to start accepting demands from the TCS and start sending pointing corrections to the PSF.
  20. Wait for telescope (azimuth and rotators) to get there.
    Return error if wait times out or is aborted.
    • The wait will time out as set in iif.conf (minus the already used wait time in step 16) and can be aborted from the IIF GUI.
  21. Wait for the GCS to finish the probe motion.
    Return error if GCS reports failure.
  22. Lock the PCS.
  23. Return success for MODE_STATIC and MODE_TRACK.
  24. If mode is MODE_ACQUIRE tell GCS to start acquire loop.
    Return error if GCS reports failure.
    Return success for MODE_ACQUIRE.
  25. If simplemode is at least guiding
    If target is non-sidereal, guide star list is not empty, and configuration variable IIFResendGSList is true, resend guide star list to GCS. This is to re-position the guide probe after a potentially long slew.
    Tell GCS to send centroids to PCS and start guiding. This will do the guide star acquisition and leave the guide loop 'paused'.
    Return error if GCS reports failure.
    Tell the GCS to resume guiding.
    Return error if GCS reports failure.
    Return success for MODE_GUIDE.
  26. If simplemode is at least active tell GCS to send Zernikes to PSF and start the WFS loop.
    Return error if GCS reports failure.
    Return success for MODE_ACTIVE.
  27. If adaptive mode wait for the PresetAO.
    Return error if AOS reports failure.
    Return success for MODE_ADAPTIVExxx.

Epilogue

  1. Unlock asynchronous mutex if necessary.
  2. If command is success or warning, tell PCS to accept demands from the TCS and start sending pointing corrections to the PSF.
  3. Lock the PCS if needed.
  4. Clear all MCS unwrap flags.
  5. Clear non-sidereal override states for SUCCESS and WARNING.
  6. If command is error or warning, make events from CommandReturn results.

-- ChrisBiddick - 02 Mar 2012
Topic revision: r39 - 16 May 2017, ChrisBiddick
This site is powered by FoswikiCopyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding Foswiki? Send feedback