The gstar code was developed to give us a quick way of moving a guide probe on to a suitable star that is specified with a ds9 gui that displays a DSS image of the VIRUS field. In Jan2016 I was asked to draw in all of the probes, and then it became apparent that it is desirable to each probe labeled. In the course of adding this features to gstar, I found a lot of my documentation lacking. This doc is an attempt to rectify that state.
I wanted to draw some text label markers on top of my probe positions painted by gstar. In doing this I was drawn into a number of different scripts that were not documented so well. In my review I re-learned:
# Label the IFU names # transform the linesegs file text_trans.sh vir_ifu_pat.ifu_names $pa $ps $xc $yc >A_names.pix text_file_ds9.py A_names.pix yellow 12 > ifu_names.reg cat ifu_names.reg | xpaset ds9 regions -format ds9I'll explain these pieces of code. The place to start is the first argument of the first line: vir_ifu_pat.ifu_names. This is an ASCII files that gives the position and name of each VIRUS ifu. It is made by the routine "vir_ifu_pat.sh".
I developed vir_ifu_pat.sh to generate files that give information about the VIRUS IFU units. The idea here was to have one central source for generating VIRUS metrology. As cahnges are made, or new things are learned, only changes to this code should be required.
Now we begin to disect the snippet of code I showed at the start of this document:
# Label the IFU names # transform the linesegs file text_trans.sh vir_ifu_pat.ifu_names $pa $ps $xc $yc >A_names.pix text_file_ds9.py A_names.pix yellow 12 > ifu_names.reg cat ifu_names.reg | xpaset ds9 regions -format ds9Basically, in this example I want to generate text for positions that I will scale, shift, and rotate. I use the same approach for pieces of text as I do for circle marker and line segments. I have rather simple ASCII files that specify the marker properties (i.e. some of the files generated above with vir_ifu_pat.sh). I use a set of *_trans codes that perform the coordinate transformations and then I use (mostly python) codes that generate the ds9 region files I'll need to overplot on my image. I describe the coordinate transformation scripts for region files in the *_trans scocodes document. There I give sample runs and examples of input files for each type of region (line segments, closed-boundary region, circles, text). Next, I build the ds9 regions file with the the text_file_ds9.py code and then cat this file to the ds9 window to display the contents.