Observing ========= Not written yet. .. If you need to dither manually, .. you need to do the following from a python session running on the DRPC: .. >>> from hcam_widgets.gtc.corba import get_telescope_server .. >>> server = get_telescope_server() .. >>> server.requestTelescopeOffset(20,20) .. Where here the telescope offsets entered are absolute and are in arcseconds, .. as entered in the json file during phase II. .. Another way is to import from hcam_drivers.utils.gtc a function called .. calculate_sky_offset: .. ngclin7 insuser:~/hcam-drivers/hcam_drivers/utils 1036 > more gtc.py .. # This is open-source software licensed under a BSD license. .. # Please see the file LICENSE.txt for details. .. # .. from __future__ import print_function, absolute_import, unicode_literals, divisi .. on .. import numpy as np .. from astropy.coordinates.matrix_utilities import rotation_matrix .. def calculate_sky_offset(xoff, yoff, sky_pa): .. """ .. Convert pixel offset to sky offset in arcseconds .. Arguments .. xoff, yoff : float .. desired pixel offsets .. sky_pa : float .. current instrument PA .. px_scale = 0.081 # arcseconds per pixel .. flipEW = True # is E to the right in the image? .. EofN = True # does increasing rotator PA move us to E? .. paOff = 74.0 # pa when rotator = 0 .. if EofN: .. theta = sky_pa - paOff .. else: .. theta = -sky_pa - paOff .. # only take 3d of 3d rotation matrix .. rmat = rotation_matrix(theta)[:2, :2] .. # +ve shifts should move stars right and up .. # offset for skyPA = 0 are: .. ra_shift_arcsecs = -xoff*px_scale if flipEW else xoff*px_scale .. dec_shift_arcsecs = -yoff*px_scale .. pix_shift = np.array([ra_shift_arcsecs, dec_shift_arcsecs]) .. return rmat.dot(pix_shift) .. ngclin7 insuser:~/hcam-drivers/hcam_drivers/utils 1037 >