Index

Updating the pointing model of the 40m telescope

Performing dedicated pointing observations

To perform a dedicated session of pointing and focus measurements, schedule the pointing script from the telviewer program, as follows:
  schedule pointing.sch
This will repeatedly perform pointing and focus observations on a set of bright pointing sources until the schedule is explicitly aborted. Sources that are outside the elevation range 20 to 75 degrees are skipped.

Using the normal pointing observations

During standard fermi observations, a pointing measurement is performed at the start of the observations of each region. These write the same pointing information to the archive as the dedicated pointing script.

Extracting the measured pointing offsets and associated data

Before the parameters of the pointing model can be fit to the results of a set of pointing measurements, the details of those measurements must be extracted from the archive, and written to a text file. This can be done by running the following script:
  /scr/glast/ovro40m/bin/read_pointing
To read all of the pointing measurements since a particular date, pass the script just the starting date and time, and redirect the output to a file, as follows:
  read_pointing -start 16-May-2012 > points_after_01may2012
To subsequently append newly read pointing measurements to this file, without having to figure out the appropriate starting date and time, use the append option, passing it the name of the file to append the new data to, as follows:
  read_pointing -append points_after_01may2012
In this case the script will look in the specified file, determine the date and time of the last measurement in the file, search for new measurements in the archive that follow this time, and append these to the existing list of measurements in the file. Finally, if you want to restrict the measurements that are read to a given time range, specify both the starting and ending times, as follows:
  read_pointing -start 1-May-2012 -end 2-May-2012 > points_1may2012_2may2012

Fitting a pointing model to the measured offsets

Once the results of the pointing measurements have been written to a text file, the following program can be run on this file, to fit for the parameters of the pointing model.
  /scr/glast/ovro40m/bin/fit_pointing
Using one of the text files that was generated in one of the examples above, a new model could be fit by running the above program as follows.
  fit_pointing -fit 'def' -model /scr/glast/ovro40m/conf/pointing_commands -write model_after_01may2012 points_after_01may2012 > fit_after_01may2012
The "-fit 'def'" argument, specifies that the default set of model parameters should be fit. The parameter of the -model argument, indicates the name of the file that contains the commands that currently configure the pointing model on the 40m. The parameters set by these commands are used as the starting values for the new model fit. The parameter of the -write argument, specifies a file in which to write the pointing model configuration commands that reflect the newly fitted model parameters. The final argument is the name of the text file that was written by read_pointing in one of the previous examples. In the above example, the main output of running fit_pointing is written to a file called fit_after_01may2012. This lists the parameters of the starting model, the parameters of the newly fitted model, the root-mean-square deviations of the two models, and finally all of the input points are listed, along with the fitted model at those positions. In the above example, using data from 01-may-2012 to the current date (18-may-2012), the first few lines of this file look as follows:
# There are 12 model parameters to fit, and 474 pointings.
# This gives 474 - 12 = 462 degrees of freedom.
# To be fit: az_offset el_offset north_tilt east_tilt af_scale lr_scale
#            lr_offset collim flexure el_tc az_tc tail_wind
# To be held: af_offset el_sun_az az_sun_az el_sun_el az_sun_el
# Starting model (RMS: sky=19.67  az*cos(el)=12.16  el=15.46 arcsec):
#  az_offset=0.0801553  el_offset=-0.0488078 degrees
#  north_tilt=0.000527786  east_tilt=0.00200103 degrees
#  af_scale=0.455475 lr_scale=0.260743
#  af_offset=0 lr_offset=-0.00696076
#  collim=-0.109707
#  flexure=0.0160042
#  az_tc=-0.000181735 el_tc=0.000192825
#  az_sun_az=0 el_sun_az=0
#  az_sun_el=0 el_sun_el=0
#  tail_wind=6.66632e-05
# Ending model (RMS: sky=12.45  az*cos(el)=9.62  el=7.90 arcsec):
#  az_offset=0.0692186  el_offset=-0.0454185 degrees
#  north_tilt=-0.00176687  east_tilt=0.00160888 degrees
#  af_scale=0.551749 lr_scale=0.432778
#  af_offset=0 lr_offset=0.00645524
#  collim=-0.0922955
#  flexure=0.0156095
#  az_tc=-0.000211425 el_tc=0.000175817
#  az_sun_az=0 el_sun_az=0
#  az_sun_el=0 el_sun_el=0
#  tail_wind=6.30573e-05
# Date time MJD Source topo_az topo_el mount_az mount_el model_az model_el residual air_temp wind_speed wind_dir sun_az sun_el sun_dist ant-ref focus_posn ref method
#   1    2   3     4       5      6        7        8        9       10        11      12       13         14      15     16      17     18         19     20    21
01-MAY-2012 00:10:28 56048.0072685 "j0825+0309"  142.791763 49.908365  142.718390 49.873684  142.713416 49.871674  0.003783  29.277 6 150  267.486 28.84916 87.3167  -306.813  -14.236  26974.7  1
01-MAY-2012 00:41:59 56048.0291551 "pks0727-115"  178.490336 41.054734  178.429103 41.012279  178.429314 41.010669  0.001618  28.388 4 2  272.27 22.58867 78.1495  -109.059  -16.521  27681.8  1
01-MAY-2012 01:02:36 56048.0434722 "j0631-1410"  202.554046 35.653882  202.497882 35.613216  202.498007 35.612377  0.000846  27.777 6 358  275.293 18.50444 65.6089  -304.512  -19.034  28183.8  1
...etc...
Note that the columns of data points are preceded by two comment lines that indicate the names of the columns on the first line, and the corresponding column numbers on the second. To look at how well the new model fits the data, extract the above data from the file, in whatever plotting program you prefer, and plot the following items against the Modified Julian date in the 3rd column.

To see the discrepancy in the azimuth fit, in arc-seconds:

  (column(7) - column(9)) * cos(column(8)) * 3600

  In terms of the column names this is equivalent to:

  (mount_az - model_az) * cos(mount_el) * 3600
To see the discrepancy in the elevation fit, in arc-seconds:
  (column(8) - column(10)) * 3600

  In terms of the column names this is equivalent to:

  (mount_el - model_el) * 3600
To see the overall residuals on the sky, in arcseconds:
  column(11) * 3600

  In terms of the column names this is equivalent to:

  residual * 3600

Installing the new pointing model

The model can be installed for the current session, by taking the model file whose name followed the -write argument of the fit_model program, copying this to the sched directory on obs40m, and running it as a schedule. Using the file that was written in the example above, this would be run like:
 schedule model_after_01may2012  
To arrange that this model continues to be used after the next reboot, edit the following file:
 /home/observer/model/pointing_commands
Comment out the current pointing model configuration commands at the end of this file, and append the contents of the new model file (ie. model_after_01may2012 in this example), to the end of the file. Then type the following in telviewer:
 load_reboot_script /home/engineer/ovro/TCS/conf/rtc.init

Reading the results of focus measurements

Just in case the data analysis pipeline doesn't already read focus results from the archive, a simple script has been provided to extract focus measurements that were made by running the pointing schedule. This can be found at:
  /scr/glast/ovro40m/bin/read_focus
In common with the read_pointing script, it takes optional -start and -end arguments for specifying the starting and ending dates and times over which to search for focus measurements in the archive. For example:
  /scr/glast/ovro40m/bin/read_focus -start 11-aug-2010 -end 14-aug-2010 > focus_11aug2010_14aug2010
The results, redirected in the above example to a file called focus_11aug2010_14aug2010, look as follows:
#  Columns:
#                        Topo   Mount  Focus   Air      Wind        Sun
# Date Time  MJD  Source az el  az el  target  Temp  Speed Dir  Az El Dist
# 1    2     3    4      5  6   7  8   9       10    11    12   13 14 15

11-AUG-2010 18:21:03 55419.76462 "j0854+201" 134.990659 67.473225 134.806632 67.426332 -7.075 26.888 10.00 211.00 129.211629 59.137866 8.703127
11-AUG-2010 18:50:37 55419.78515 "j1331+305" 70.512943 26.422374 70.464280 26.395447 -20.239 27.833 11.00 182.00 141.312617 63.284492 57.987569
11-AUG-2010 19:04:14 55419.79461 "j1327+2210" 80.740625 25.593951 80.694400 25.560152 -22.809 27.888 10.00 209.00 147.921617 64.852540 57.331476
11-AUG-2010 19:19:11 55419.80499 "j1229+020" 110.722619 27.982736 110.671887 27.940231 -19.315 27.944 15.00 170.00 155.965454 66.251051 47.151150
11-AUG-2010 19:33:50 55419.81516 "j1058+015" 135.840706 45.180158 135.761357 45.127408 -11.896 28.222 16.00 172.00 164.574331 67.234107 26.706980
...etc...
The measurements are preceded by comments that indicate the labels of each column. No program is provided for fitting a focus curve to these measurements, but Walter's existing code could presumably be modified to use the above data, if it doesn't work with the processing pipeline.
Martin Shepherd (17-May-2012)