KinemModel

class rubin_sim.scheduler.model_observatory.KinemModel(location=None, park_alt=86.5, park_az=0.0, start_filter='r', mjd0=0)

Bases: object

A Kinematic model of the telescope.

Parameters:
locationastropy.coordinates.EarthLocation

The location of the telescope. If None, defaults to rubin_sim.utils.Site info

park_altfloat (86.5)

The altitude the telescope gets parked at (degrees)

park_azfloat (0)

The azimuth for telescope park position (degrees)

start_filterstr (‘r’)

The filter that gets loaded when the telescope is parked

mjd0float (0)

The MJD to assume we are starting from

Note there are additional parameters in the methods setup_camera, setup_dome, setup_telescope,
and setup_optics. Just breaking it up a bit to make it more readable.

Methods Summary

current_alt_az(mjd)

return the current alt az position that we have tracked to.

mount_filters(filter_list)

Change which filters are mounted

observe(observation, mjd[, rot_tel_pos, ...])

observe a target, and return the slewtime and visit time for the action

park()

Put the telescope in the park position.

setup_camera([readtime, shuttertime, ...])

Parameters:

setup_dome([altitude_maxspeed, ...])

Parameters to define the DOME movement.

setup_optics([ol_slope, cl_delay, cl_altlimit])

Parameters:

setup_telescope([altitude_minpos, ...])

Parameters to define the TELESCOPE movement and position.

shutter_stall(observation)

Time we need to stall after shutter closes to let things cool down

slew_times(ra_rad, dec_rad, mjd[, ...])

Calculates ``slew'' time to a series of alt/az/filter positions from the current position (stored internally).

visit_time(observation)

Methods Documentation

current_alt_az(mjd)

return the current alt az position that we have tracked to.

mount_filters(filter_list)

Change which filters are mounted

Parameters:
filter_listlist [str]

List of the mounted filters.

observe(observation, mjd, rot_tel_pos=None, lax_dome=True)

observe a target, and return the slewtime and visit time for the action

If slew is not allowed, returns np.nan and does not update state.

park()

Put the telescope in the park position.

setup_camera(readtime=2.0, shuttertime=1.0, filter_changetime=120.0, fov=3.5, rotator_min=-90, rotator_max=90, maxspeed=3.5, accel=1.0, decel=1.0, shutter_2motion_min_time=15.0)
Parameters:
readtimefloat (2)

The readout time of the CCDs (seconds)

shuttertimefloat (1.)

The time it takes the shutter to go from closed to fully open (seconds)

filter_changetimefloat (120)

The time it takes to change filters (seconds)

fovfloat (3.5)

The camera field of view (degrees)

rotator_minfloat (-90)

The minimum angle the camera rotator can move to (degrees)

rotator_maxfloat (90)

The maximum angle the camera rotator can move to (degrees)

maxspeedfloat (3.5)

The maximum speed of the rotator (degrees/s)

accelfloat (1.0)

The acceleration of the rotator (degrees/s^2)

shutter_2motion_min_timefloat (15.)

The time required for two shutter motions (seconds). If one takes a 1-snap 10s exposure, there will be a 5s of overhead before the next exposure can start.

setup_dome(altitude_maxspeed=1.75, altitude_accel=0.875, altitude_decel=0.875, altitude_freerange=0.0, azimuth_maxspeed=1.5, azimuth_accel=0.75, azimuth_decel=0.75, azimuth_freerange=4.0, settle_time=1.0)

Parameters to define the DOME movement.

Parameters:
altitude_maxspeedfloat (1.75)

Maximum speed for altitude movement (degrees/second)

altitude_accelfloat (0.875)

Maximum acceleration for altitude movement (degrees/second**2)

altitude_decelfloat (0.875)

Maximum deceleration for altitude movement (degrees/second**2)

altitude_freerangefloat (0)

The range over which there is 0 delay

azimuth_maxspeedfloat (1.5)

Maximum speed for azimuth movement (degrees/second)

azimuth_accelfloat (0.75)

Maximum acceleration for azimuth movement (degrees/second**2)

azimuth_decelfloat (0.75)

Maximum deceleration for azimuth movement (degrees/second**2)

azimuth_freerangefloat (4.0)

The range in which there is 0 delay

settle_timefloat (1.0)

Settle time after movement (seconds)

setup_optics(ol_slope=0.2857142857142857, cl_delay=[0.0, 36.0], cl_altlimit=[0.0, 9.0, 90.0])
Parameters:
ol_slopefloat (1.0/3.5)

seconds/degree in altitude slew.

cl_delaylist ([0.0, 36])

The delays for closed optics loops (seconds)

cl_altlimitlist ([0.0, 9.0, 90.0])

The altitude limits (degrees) for performing closed optice loops. Should be one element longer than cl_delay.

A given movement in altitude will cover X degrees; if X > cl_altlimit[i] there is
an additional delay of cl_delay[i]
setup_telescope(altitude_minpos=20.0, altitude_maxpos=86.5, azimuth_minpos=-250.0, azimuth_maxpos=250.0, altitude_maxspeed=3.5, altitude_accel=3.5, altitude_decel=3.5, azimuth_maxspeed=7.0, azimuth_accel=7.0, azimuth_decel=7.0, settle_time=3.0)

Parameters to define the TELESCOPE movement and position.

Parameters:
altitude_minposfloat (20.0)

Minimum altitude for the telescope (degrees)

altitude_maxposfloat (86.5)

Maximum altitude for the telescope (degrees)

azimuth_minposfloat (-270.0)

Minimum azimuth position (degrees)

azimuth_maxposfloat (270.0)

Maximum azimuth position (degrees)

altitude_maxspeedfloat (3.5)

Maximum speed for altitude movement (degrees/second)

altitude_accelfloat (3.5)

Maximum acceleration for altitude movement (degrees/second**2)

altitude_decelfloat (3.5)

Maximum deceleration for altitude movement (degrees/second**2)

azimuth_maxspeedfloat (7.0)

Maximum speed for azimuth movement (degrees/second)

azimuth_accelfloat (7.0)

Maximum acceleration for azimuth movement (degrees/second**2)

azimuth_decelfloat (7.0)

Maximum deceleration for azimuth movement (degrees/second**2)

settle_timefloat (3.0)

Settle time required for telescope after movement (seconds)

shutter_stall(observation)

Time we need to stall after shutter closes to let things cool down

slew_times(ra_rad, dec_rad, mjd, rot_sky_pos=None, rot_tel_pos=None, filtername='r', lax_dome=True, alt_rad=None, az_rad=None, starting_alt_rad=None, starting_az_rad=None, starting_rot_tel_pos_rad=None, update_tracking=False)

Calculates ``slew’’ time to a series of alt/az/filter positions from the current position (stored internally).

Assumptions (currently): Assumes we have been tracking on ra,dec,rot_sky_pos position. Ignores the motion of the sky while we are slewing (this approx should probably average out over time). No checks for if we have tracked beyond limits. (this assumes folks put telescope in park if there’s a long gap.) Assumes the camera rotator never needs to (or can’t) do a slew over 180 degrees.

Calculates the ``slew’’ time necessary to get from current state to alt2/az2/filter2. The time returned is actually the time between the end of an exposure at current location and the beginning of an exposure at alt2/az2, since it includes readout time in the ``slew’’ time.

Parameters:
ra_radnp.ndarray

The RA(s) of the location(s) we wish to slew to (radians)

dec_radnp.ndarray

The declination(s) of the location(s) we wish to slew to (radians)

mjdfloat

The current moodified julian date (days)

rot_sky_posnp.ndarray

The desired rot_sky_pos(s) (radians). Angle between up on the chip and North. Note, it is possible to set a rot_sky_pos outside the allowed camera rotator range, in which case the slewtime will be np.inf. If both rot_sky_pos and rot_tel_pos are set, rot_tel_pos will be used.

rot_tel_posnp.ndarray

The desired rot_tel_pos(s) (radians).

filternamestr

The filter(s) of the desired observations. Set to None to compute only telescope and dome motion times.

alt_radnp.ndarray

The altitude(s) of the destination pointing(s) (radians). Will override ra_rad,dec_rad if provided.

az_radnp.ndarray

The azimuth(s) of the destination pointing(s) (radians). Will override ra_rad,dec_rad if provided.

lax_domebool, default True

If True, allow the dome to creep, model a dome slit, and don’t require the dome to settle in azimuth. If False, adhere to the way SOCS calculates slew times (as of June 21 2017) and do not allow dome creep.

starting_alt_radfloat (None)

The starting altitude for the slew (radians). If None, will use internally stored last pointing.

starting_az_radfloat (None)

The starting azimuth for the slew (radians). If None, will use internally stored last pointing.

starting_rot_tel_pos_radfloat (None)

The starting camera rotation for the slew (radians). If None, will use internally stored last pointing.

update_trackingbool (False)

If True, update the internal attributes to say we are tracking the specified RA,Dec,RotSkyPos position.

Returns:
slew_timenp.ndarray

The number of seconds between the two specified exposures. Will be np.nan or np.inf if slew is not possible.

visit_time(observation)