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:
- location
astropy.coordinates.EarthLocation
The location of the telescope. If None, defaults to rubin_sim.utils.Site info
- park_alt
float
(86.5) The altitude the telescope gets parked at (degrees)
- park_az
float
(0) The azimuth for telescope park position (degrees)
- start_filter
str
(‘r’) The filter that gets loaded when the telescope is parked
- mjd0
float
(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.
- location
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
- 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:
- readtime
float
(2) The readout time of the CCDs (seconds)
- shuttertime
float
(1.) The time it takes the shutter to go from closed to fully open (seconds)
- filter_changetime
float
(120) The time it takes to change filters (seconds)
- fov
float
(3.5) The camera field of view (degrees)
- rotator_min
float
(-90) The minimum angle the camera rotator can move to (degrees)
- rotator_max
float
(90) The maximum angle the camera rotator can move to (degrees)
- maxspeed
float
(3.5) The maximum speed of the rotator (degrees/s)
- accel
float
(1.0) The acceleration of the rotator (degrees/s^2)
- shutter_2motion_min_time
float
(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.
- readtime
- 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_maxspeed
float
(1.75) Maximum speed for altitude movement (degrees/second)
- altitude_accel
float
(0.875) Maximum acceleration for altitude movement (degrees/second**2)
- altitude_decel
float
(0.875) Maximum deceleration for altitude movement (degrees/second**2)
- altitude_freerange
float
(0) The range over which there is 0 delay
- azimuth_maxspeed
float
(1.5) Maximum speed for azimuth movement (degrees/second)
- azimuth_accel
float
(0.75) Maximum acceleration for azimuth movement (degrees/second**2)
- azimuth_decel
float
(0.75) Maximum deceleration for azimuth movement (degrees/second**2)
- azimuth_freerange
float
(4.0) The range in which there is 0 delay
- settle_time
float
(1.0) Settle time after movement (seconds)
- altitude_maxspeed
- setup_optics(ol_slope=0.2857142857142857, cl_delay=[0.0, 36.0], cl_altlimit=[0.0, 9.0, 90.0])¶
- Parameters:
- ol_slope
float
(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]
- ol_slope
- 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_minpos
float
(20.0) Minimum altitude for the telescope (degrees)
- altitude_maxpos
float
(86.5) Maximum altitude for the telescope (degrees)
- azimuth_minpos
float
(-270.0) Minimum azimuth position (degrees)
- azimuth_maxpos
float
(270.0) Maximum azimuth position (degrees)
- altitude_maxspeed
float
(3.5) Maximum speed for altitude movement (degrees/second)
- altitude_accel
float
(3.5) Maximum acceleration for altitude movement (degrees/second**2)
- altitude_decel
float
(3.5) Maximum deceleration for altitude movement (degrees/second**2)
- azimuth_maxspeed
float
(7.0) Maximum speed for azimuth movement (degrees/second)
- azimuth_accel
float
(7.0) Maximum acceleration for azimuth movement (degrees/second**2)
- azimuth_decel
float
(7.0) Maximum deceleration for azimuth movement (degrees/second**2)
- settle_time
float
(3.0) Settle time required for telescope after movement (seconds)
- altitude_minpos
- 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_rad
np.ndarray
The RA(s) of the location(s) we wish to slew to (radians)
- dec_rad
np.ndarray
The declination(s) of the location(s) we wish to slew to (radians)
- mjd
float
The current moodified julian date (days)
- rot_sky_pos
np.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_pos
np.ndarray
The desired rot_tel_pos(s) (radians).
- filtername
str
The filter(s) of the desired observations. Set to None to compute only telescope and dome motion times.
- alt_rad
np.ndarray
The altitude(s) of the destination pointing(s) (radians). Will override ra_rad,dec_rad if provided.
- az_rad
np.ndarray
The azimuth(s) of the destination pointing(s) (radians). Will override ra_rad,dec_rad if provided.
- lax_dome
bool
, 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_rad
float
(None) The starting altitude for the slew (radians). If None, will use internally stored last pointing.
- starting_az_rad
float
(None) The starting azimuth for the slew (radians). If None, will use internally stored last pointing.
- starting_rot_tel_pos_rad
float
(None) The starting camera rotation for the slew (radians). If None, will use internally stored last pointing.
- update_tracking
bool
(False) If True, update the internal attributes to say we are tracking the specified RA,Dec,RotSkyPos position.
- ra_rad
- Returns:
- slew_time
np.ndarray
The number of seconds between the two specified exposures. Will be np.nan or np.inf if slew is not possible.
- slew_time
- visit_time(observation)¶