Previous: Standard types of List
Up: No Title
Next: Summary of main LEXT internal parameters
Previous Page: Standard types of List
Next Page: Summary of main LEXT internal parameters
The following listing of the procedure FIND_TWEAK, used for target acqusition, serves as an example of how to write LEXT procedures.
#************************# # Authors - Keith Taylor # # Nial Tanvir # # # #************************# set echo #*******************************************************************# #* FIND_TWEAK - operates on an acquisition image (ie. a direct image# #* of the target through the mask) and its corresponding # #* catalogue file which it uses to determine the shift # #* between the stars and their respective holes. # #* It then predicts the offsets to feed into the # #* WHT's TCS TWEAK proceedure. # #*******************************************************************# #*******************************************************************# #* # #* Calling Sequence: FIND_TWEAK p1 [p2 p3] # #* where: p1 = number of fiducial holes [compulsory] # #* p2 = Name of acquisition image [optional] # #* p3 = Name of catalogue file [optional] # #* # #*******************************************************************# ok # # Have you selected a display device ? # :query :goto kt1 dev :label kt1 image # # Have you already read in an acquisition image ? # :query :goto kt2 # # Read in the image. # image read/3 $2 :goto kt3 :label kt2 image dir # # Are you pointing at the relevant image ? # :query :goto kt4 use :label kt4 :label kt3 list dir # # Have you already a catalogue file ? # ... it has to be in slot 1 with all other slots empty. # :query :goto kt5 # # Read in the catalogue file and predict rectangular regions (in pixels) # surrounding slits and fiducial holes. # # NB: all list slots will be emptied. If any are required you should # answer `n' here, write them out to disk, and then type `continue'. # ok list empty/all y read/cat $3 $3 :label kt5 list clean 8 use 1 free empty copy 2 1 use 2 free empty use 1 create/mask 21 21 #************************************************************************** # Finding the geometric centres of the fiducial holes. #************************************************************************** fiducial clean 1 match 4 2 matched_fibox use 2 rety fbx use 4 #************************************************************************** # Now finding the centroids of the fiducial stars within the holes. #************************************************************************** fit/fid 2 #************************************************************************** # Each fiducial hole image will now be displayed with the calculated centre # of hole and star for inspection. # # Note that, you will have an opportunity later to interactively edit out # any bad holes/stars. For now, only leave at the exit points if you # think that you will be able to perform a fix outside this procedure. # #************************************************************************** :loop $1 reg/fibox $$$ disp/1/fast use 4 set pen 3 set marker 4 plot use 6 set pen 4 set marker 5 plot ok :back #************************************************************************** # # The full image will now be displayed with the vectors between the # calculated positions of the stars and the centres of the holes. For # clarity the lengths of the vectors are scaled up by a factor of 50(!). # #************************************************************************** ok region/full er set pen 2 plot/join/1 6 4 50 set pen 4 plot/num 0 #************************************************************************** # # Now is your opportunity to reject any stars/holes which you think should # not be included in the fit. # # Use the cursor to edit out bad vectors (keep at least 3 !) # The cursor should be placed at the base of the vector. #************************************************************************** free cursor/edit lfit/noscale/field 6 4 #************************************************************************** # OK - you got it, Bud - now be so good as to tell your friendly T.O. # to perform the TWEAK. #************************************************************************** set noecho exit