Background
The following tables list scripts that can be used to control
LRIS and/or the telescope. These are useful for two things:
- As shortcuts, they can be entered on any
punaluu command line to run the instrument in a
command-line mode (as is done with NIRC, NIRC2, etc.)
- As building blocks in LRIS
shell scripts which can perform complex operations.
These commands are always available from any LRIS account when
logged into the LRIS workstation, punaluu.
Contents
LRIS Script Library
ADC - Scripts for controlling ADC
- adcinit -- force the ADC to home itself and then await further instructions
- adcreset -- reset the ADC to halt existing motion and turn tracking back on
- adcstow -- send ADC to NULL position and halt it
CCD - Scripts for CCD control
EXAMPLES - Examples of complex scripts
FRAME - Scripts for image names/numbers
- fnameb -- Build full BLUE path file name from frame number
- fnamer -- Build full RED path file name from frame number
- frameb -- set or show the BLUE frame number
- framer -- set or show the RED frame number
- lastfileb -- return the FRAMENO for the last saved BLUE image
- lastfiler -- return the FRAMENO for the last saved RED image
- lastframeb -- reset frameno to overwrite the last BLUE image
- lastframer -- reset frameno to overwrite the last RED image
- lastimageb -- return full disk name of the most recently acquired BLUE image
- lastimager -- return full disk name of the most recently acquired RED image
- nextfileb -- return one plus the FRAMENO of the last saved BLUE image
- nextfiler -- return one plus the FRAMENO of the last saved RED image
- nextframeb -- reset BLUE FRAMENO to the specified value, or 1+last frame
- nextframer -- reset RED FRAMENO to the specified value, or 1+last frame
- nextimageb -- return full disk name of the next BLUE image
- nextimager -- return full disk name of the next RED image
IMG - Scripts for taking images
- abortb -- kill any ongoing LRIS blue exposure
- abortbr -- kill any ongoing LRIS red or blue exposure
- abortr -- kill any ongoing LRIS red exposure
- bxy5b -- acquire BLUE images in 5-pos box pattern in DETECTOR coords
- bxy5br -- acquire BLUE and RED images in 5-pos box pattern in DETECTOR coords
- bxy5m -- acquire RED/BLUE images in 5-pos box pattern in DETECTOR coords
- bxy5r -- acquire RED images in 5-pos box pattern in DETECTOR coords
- bxy8b -- acquire BLUE images in 8-pos box pattern in DETECTOR coords
- bxy8br -- acquire RED/BLUE images in 8-pos box pattern in DETECTOR coords
- bxy8m -- acquire RED/BLUE images in 8-pos box pattern in DETECTOR coords
- bxy8r -- acquire RED images in 8-pos box pattern in DETECTOR coords
- bxy9_skew_br -- acquire RED and BLUE images in skewed 9-position dither pattern
- bxy9b -- acquire BLUE images in 9-pos box pattern in DETECTOR coords
- bxy9br -- acquire RED/BLUE images in 9-pos box pattern in DETECTOR coords
- bxy9m -- acquire RED/BLUE images in 9-pos box pattern in DETECTOR coords
- bxy9r -- acquire RED images in 9-pos box pattern in DETECTOR coords
- cal_trap_cd_zn_blue -- acquire LRIS cd/zn spectra;trapdoor as shutter.
- cal_trap_flat_blue -- acquire LRIS blue-side flat data:trapdoor shutter
- cal_trap_hg_blue -- acquire spectra of Hg lamp using trapdoor as shutter.
- driftscan -- acquire image while drifting target across the slit
- focusloop -- acquire images over a range of red or blue focus positions
- focuslooptrap -- acquire images over a range of red or blue focus positions
- goib -- acquire LRIS blue-side image(s)
- goibde -- acquire LRIS blue-side image(s) when operating the shutter
- goibr -- acquire LRIS blue AND red image(s)
- goibufb -- take blue image(s) without saving to disk
- goibufbr -- take red and blue image(s) without saving to disk
- goibufr -- take red image(s) without saving to disk
- goidarkb -- acquire dark LRIS blue-side image(s)
- goidarkbr -- acquire dark images on red and blue-side
- goidarkr -- acquire dark LRIS red-side image(s)
- goir -- acquire LRIS red-side image(s)
- goitrapb -- acquire LRIS images in blue-side shutterless mode
- goitrapr -- acquire LRIS images in red-side shutterless mode
- level_checkb -- acquire a quick BLUE image to check exposure levels
- level_checkr -- acquire a quick RED image to check exposure levels
- mosaicb -- acquire BLUE images in nx by ny mosaic pattern
- mosaicbr -- acquire BLUE/RED images in nx by ny mosaic pattern
- mosaicm -- driver script for mosaicing data
- mosaicr -- acquire RED images in nx by ny mosaic pattern
- oneampfocusb -- acquire BLUE focus data in one-amp trapshut mode
- pause_guider --
- resume_guider --
- resume_script --
- sex2dec -- convert from sexagesimal to decimal
- take_test_flat -- acquire LRIS red-side image(s)
- telfocloop -- acquire images over a range of secondary piston positions
- twiflatb -- acquire twilight flats on BLUE side
INFO - Scripts for gathering information
- bells -- ring the terminal bell one or more times
- best_scratch_disk -- report the name of the scratch disk with most space
- consort -- print a sorted list of stage configurations
- datadirs -- print summary of recent data directories
- dir -- list FITS images in the current output directory
- disks -- print out a listing of available data disks
- fixkeywords -- make keyword values reflect current state of instrument
- help -- print documentation for an LRIS script, or list all scripts
- is_float -- check whether the argument is floating point number
- name2pos -- return the position corresponding to a named element
- newdir -- create a new output directory for red and/or blue images
- nightpath -- return the path of the 'nightly' directory
- object -- show/change the OBJECT name
- observer -- set/show observer name(s)
- obslog -- generate logsheet data from image headers
- obslog_oldformat -- generate logsheet data from image headers
- pause -- suspend execution until user presses <RETURN>
- restore_state -- restore previously saved LRIS configuration
- runname -- set/show the current output directory
- save_state -- store LRIS settings for future restoration
- save_state_new -- store LRIS settings for future restoration
- scratchdisks -- list available summit and HQ scratch disks
- script_error --
- set_state -- reconfigure LRIS
- setuser -- add LRIS scripts to user's PATH
- showkeywords -- list all LRIS (red) keywords
- sleepdots -- print dots out while sleeping
- state_defs.pl --
- temps -- show LRIS temperatures
- tolower -- convert argument(s) to lower case
- toupper -- convert argument(s) to upper case
- ut_date -- return tonight's UT date
- verify_keyword --
- wfi -- wait for the specified image to appear
- wfib -- wait for new LRISBLUE image to be written to disk
- wfir -- wait for new LRIS image to be written to disk
MATH - Scripts for doing math
- abs -- return the absolute value
- ampangb -- compute distance + bearing between two locations on BLUE image
- ampangr -- compute distance + bearing between two locations on RED image
- calc -- evaluate an arbitrary arithmetic statement using GAWK
- grand -- generate a normal (Gaussian) random value
- irand -- generate a uniform random integer value between 0 and 32768
- math -- evaluate simple binary mathematical expressions
- rand -- generate a uniform random value between 0 and 1
MOT - Scripts for motor control
- calname -- set/show the position of the polarimeter calibration wheel
- dichroic -- set/show the LRIS dichroic
- domelamps -- turn spectral or imaging dome lamps on or off
- filterb -- set/show the blue filter (by name)
- filterr -- set/show the red filter (by name)
- focusb -- set/show the blue dewar focus
- focusr -- set/show the red dewar focus
- grate_monitor --
- grating -- insert a grating and set it to a central wavelength
- grism -- set/show the LRIS grism
- grwait -- wait for a grating move to finish.
- home_redfocus -- home the red focus stage
- lamp1 -- set/show the state of LRIS lamp 1
- lamp2 -- set/show the state of LRIS lamp 2
- lamp3 -- set/show the state of LRIS lamp 3
- lamp4 -- set/show the state of LRIS lamp 4
- lamp5 -- set/show the state of LRIS lamp 5
- lamp6 -- set/show the state of LRIS lamp 6
- lampnum -- turn a single LRIS lamp on or off, or show its status
- lamps -- turn LRIS calibration lamps on/off and show status
- mask -- set/show the LRIS slitmask
- plangle -- set/show the LRIS polarimeter waveplate position angle
- redfocus --
- slit -- set/show the LRIS slitmask
- sltclr -- move the slitmask out of the beam
- trapclose -- close the LRIS front hatch
- trapdoor -- set or show the position of the LRIS front hatch
- trapopen -- open the LRIS front hatch
POL - Scripts for polarimeter control
- cpol-acq -- acquire polarimeter images at a series of PLANGLE settings
- pol_acq_movbr -- acquire polarimetry images while moving along slit in B+R
- pol_acqb -- acquire polarimetry images on the BLUE CCD
- pol_acqbr -- acquire polarimetry images on the BLUE and RED CCDs
- pol_acqr -- acquire polarimetry images on the RED CCD
- pol_status -- report whether LRIS is configured for polarimetry
- calname -- set calibration unit by name
- calnum -- set the calibration Unit by number
- plangle -- sets the polarizer angle
POW - Scripts for power control
- allpower -- control power to the LRIS red and blue sides
- bluepower -- control power to the LRIS blue side
- ccdpower -- control power to the LRIS ccd saddelbags
- guiderpower -- control power to the LRIS guiders
- nbc_pon -- turn on high voltage power supplies to the NBC CCD.
- redabsinit -- initialize absolute encoders on LRIS red side
- redpower -- control power to the LRIS red side
- showpower -- display the state of all LRIS power keywords (annotated)
- showpower_raw -- display the state of all LRIS power keywords
TEL - Scripts for telescope control
- abba_br -- acquire BLUE and RED images in an ABBA dither pattern
- abbam -- acquire BLUE and/or RED images in an ABBA dither pattern
- az -- move the telescope x arcsec in azimuth
- azel -- move the telescope x arcsec in azimuth and y arcsec in elevation
- centr -- move an object to the center of the LRIS red detector
- east -- move the telescope east
- el -- move the telescope x arcsec in elevation
- en -- move the telescope east and north
- fmrun -- set/show the ACS focus mode run number
- gcent -- move an object to the center of the LRIS guider
- gmov -- move an object to a given position on the LRIS guider
- gocent -- move an object to the center of the LRIS offset guider
- gomov -- move an object to a given position on the LRIS offset guider
- gopxy --
- gotobase -- move the telescope to return to the base coordinates
- gox --
- goxy -- move the telescope in GUIDER coordinates
- goy --
- gpxy --
- gscent -- move an object to the center of the LRIS guider
- gsmov -- move an object to a given position on the LRIS guider
- gspxy --
- gsx --
- gsxy -- move the telescope in GUIDER coordinates
- gsy --
- gx --
- gxy -- move the telescope in GUIDER coordinates
- gy --
- markbase -- set the base telescope coordinates to the current coordinates
- movb -- move an object to a given position on the LRIS blue array. To use with IRAF cooridnates
- movb_f2d -- move an object to a given position on the LRIS blue array.
- movb_figdisp -- move an object to a given position on the LRIS blue array. To use with IRAF cooridnates
- movb_iraf -- move an object to a given position on the LRIS blue array.
- movr -- move an object to a given position on the LRIS red detector
- mx -- move telescope along rows in detector coordinate system
- mxy -- move telescope in instrument (detector) coordinates
- my -- move telescope along columns in detector coordinate system
- north -- move the telescope north
- pmfm -- set/show the amount of focus mode in the telescope primary
- polist -- list all of the defined pointing origins
- poname -- set or show the current pointing origin
- pxr -- move telescope along the "x" direction on the LRIS red detector
- pxyb -- move telescope in pixel coordinates of the LRIS blue detector
- pxyr -- move telescope in pixel coordinates of the LRIS red detector
- pyr -- move telescope along the "y" direction on the LRIS red detector
- refm -- show/set position of the LRIS movable guider
- rotpposn -- set or show the instrument rotator physical position angle
- scentr -- move a target at a given pixel location to the slit center
- skypa -- set rotator celestial position angle in position angle mode
- sltmov -- move telescope along the slit direction in arcsec
- south -- move the telescope south
- telfoc -- set/show the telescope secondary position
- west -- move the telescope west
TV - Scripts for guider control