TLC Functions¶
Summary¶
Functions¶
alignfpm_and_centerpin
pro alignfpm_and_centerpin, nopin=nopin, noclose=noclose, errout=errout
NAME:
alignfpm_and_centerpin
PURPOSE:
Wrapper for CAL system Align FPM and Center Pin routines.
EXPLANATION:
see above.
Calling SEQUENCE:
alignfpm_and_centerpin[,/nopin,/noclose]
INPUT/OUTPUT:
/nopin - Do not run CENTER PIN
/noclose - Do not reclose loops after running alignments.
OPTIONAL OUTPUT:
errout - 1 on error, otherwise 0
EXAMPLE:
DEPENDENCIES:
tlc_find_binary
tlc_move_helper
tlc_set_cal_tt_bias
tlc_cal_openclose
closeall
openall
NOTES:
This routine will zero out any exisitng cal TT bias, close the
AO loops, run the alignment (and centering if /noclose isn't
set). If /nopin isn't set, it will average the CAL tip/tilt
for 10 seconds, and then apply that to the CAL TT bias, then
reclose all loops and leave the AO PnCs tracking.
REVISION HISTORY
written 2012-11-?? ds
01.24.2013 - Added error checking to cal tt measurements
assemble_ifs_path
pro assemble_ifs_path, fname, basename=basename, camera=camera, giapi=giapi, outdr=outdr, read_dir=read_dir, write_dir=write_dir, reduced_dir=reduced_dir, datedir=datedir
NAME:
assemble_ifs_path
PURPOSE:
Generate all relavent paths for writing ifs/pupil viewer images
EXPLANATION:
Helper function for tlc_take_exposure and tlc_observe
Calling SEQUENCE:
assemble_ifs_path,fname,basename=basename,outdr=outdr,read_dir=read_dir,write_dir=write_dir,camera=camera
OPTIONAL INPUT/OUTPUT:
fname Filename for output. If not set, auto-generates based
on current time.
basename String part to use for filenames if fname is not set.
if basename is not provided, defaults to either 'ifs'
or 'pupil' depending on camera
camera Defaults to 1, set to 2 for pupil viewer
outdr On return, will contain datestring directory
read_dir On return, will contain linux formatted path from
which file can be read
write_dir On return, will return path to which file will be
written (for IFS, windows formatted subpath, for
pupil viewer, same as read_dir)
reduced_dir For IFS only - path to reduced images.
/giapi Set when using the api so that the initial write
directory (before keyword correction) is considered.
datedir - Use date directories (off by default - old behavior,
now everything goes to the IFS ramdisk top level)
EXAMPLE:
DEPENDENCIES:
None.
NOTES:
Sidecar assumes that anything without a leading slash is a
relative path, so we only need the (windows formatted)
subdirectory for writing ifs images.
REVISION HISTORY
Written, 04/02/2012. savransky1@llnl.gov
06.15.12 - switched to gemini style numbering ds
07.09.12 - Added reduced_dir output
11.06.13 - ds - added internal memory for filenames
08.15.14 - ds - fixed reduced path logic and 2pm switchover logic
check_readwrite_comm
function check_readwrite_comm, res, errs
NAME:
check_readwrite_comm
PURPOSE:
Parse output from Read/Write client and look for any error messages.
CALLING SEQUENCE:
out = check_readwrite_comm(res,errs)
INPUT/OUTPUT:
res,errs - Output of spawn command calling the read/write client.
out - 0 if no errors found, -1 otherwise
OPTIONAL OUTPUT:
None.
EXAMPLES:
DEPENDENCIES:
NOTES:
REVISION HISTORY
Written 2012-?? ds
gds_set_keywords
PRO gds_set_keywords, object=object, obsclass=obsclass, obstype=obstype, observer=observer, gcallamp=gcallamp, gcalfilt=gcalfilt, elevation=elevation, inport=inport, crpa=crpa, iaa=iaa, pos_ang=pos_ang, fname=fname, filename=filename, noepics=noepics, verb=verb, debug=debug
NAME:
gds_set_keywords
PURPOSE:
Set one or more keyword values to be written by the GDS, via
XML-RPC call to the GDS server.
Note that these values are *for one specific filename only*.
You have to re-set these for every single exposure, due to how the
GDS works.
INPUTS:
KEYWORDS:
object, obsclass, obstype, observer, gcallamp, gcalfilt, inport, crpa, iaa, pos_ang
No error checking is done on the input values - it is the calling function's
responsibility to ensure that the supplied data are allowed keyword values.
filename - The filename , relative to the root directory the GDS
is looking at. If not supplied, this is auto-generated
fname - Base filename. Auto-generated if not set (overridden by
filename).
/noepics - Don't try to grab data from epics (elevation
still read from GMB
OUTPUTS:
HISTORY:
Began 2012-05-30 09:58:10 by Marshall Perrin
07.30.12 - Added filename and verb keywords. moved xmlfile to
/tmp - ds
03.07.13 - Added elevation keyword - ds
powerbar_names
function powerbar_names
NAME:
powerbar_names
PURPOSE:
Return array of power device names
EXPLANATION:
Names used for pattern matching in tlc_move_power and tlc_query_power
CALLING SEQUENCE:
devs = powerbar_names()
INPUT/OUTPUT:
devs - 4x8 string array of device names
OPTIONAL OUTPUT:
None.
NOTES:
Must be updated anytime the powerbar device names change.
REVISION HISTORY
Written 8.25.12 - ds
run_readwrite_query
function run_readwrite_query, querycomm, verb=verb, string=string
NAME:
run_readwrite_query
PURPOSE:
Spawn query to read/write client and parse output.
CALLING SEQUENCE:
out = run_readwrite_query(querycomm,[/verb,/string])
INPUT/OUTPUT:
querycomm - String with query command.
/verb - Toggle verbosity
/string - Expected output is a string (otherwise casts to float).
out - Query output, or null if none.
OPTIONAL OUTPUT:
None.
EXAMPLES:
DEPENDENCIES:
tlc_parse_client_output
NOTES:
REVISION HISTORY
Written 2012-?? ds
tlc_ao_config
pro tlc_ao_config, useao=useao, magI=magI, r0=r0, optimize=optimize, verb=verb, debug=debug, errOut=errOut
NAME:
tlc_ao_config
PURPOSE:
Send CONFIGURE AO command to the instrument sequencer
EXPLANATION:
Wrapper for gpIsClientTester
CALLING SEQUENCE:
tlc_ao_config
INPUT/OUTPUT:
useao - Bool - Use the AO (defaults to 1)
magI = Float - I mag value (AO magnitude) (defaults to 4.)
r0 = Float - r0 estimate (defaults to 0.)
optimize - Bool - Use OFC (default to 1)
/verb - print nauseatingly detailed info about what's going on
OPTIONAL OUTPUT:
errOut - On return will contain 0 (no error) or 1 (error)
EXAMPLE:
DEPENDENCIES:
Assumes access to executables in $TLC_ROOT and accessible connection to server tlc.
tlc_parse_client_output.pro
tlc_move_helper.pro
NOTES:
REVISION HISTORY
Written 03/01/2012 - savransky1@llnl.gov
tlc_cal_config
pro tlc_cal_config, usecal=usecal, magH=magH, fpmpinholebias=fpmpinholebias, caltoaoc=caltoaoc, verb=verb, debug=debug, errOut=errOut
NAME:
tlc_cal_config
PURPOSE:
Send CONFIGURE CAL command to the instrument sequencer
EXPLANATION:
Wrapper for gpIsClientTester
CALLING SEQUENCE:
tlc_cal_config,[options]
INPUT/OUTPUT:
usecal - Bool - Use the AO (defaults to 1)
magH = Float - H mag value (CAL magnitude) (defaults to 0.)
fpmpinholebias - Bool - Determines whether you do
alignfpm+centerpin+meas offload (defaults to
0.)
caltoaoc - Bool - Offload cal data to aoc (defaults to 0)
/verb - print nauseatingly detailed info about what's going on
OPTIONAL OUTPUT:
errOut - On return will contain 0 (no error) or 1 (error)
EXAMPLE:
DEPENDENCIES:
Assumes access to executables in $TLC_ROOT and accessible connection to server tlc.
tlc_parse_client_output.pro
tlc_move_helper.pro
NOTES:
REVISION HISTORY
Written 03/01/2012 - savransky1@llnl.gov
tlc_cal_dump
pro tlc_cal_dump, time, outpaths=outpaths, verb=verb, debug=debug, errout=errout, clean=clean, nosave=nosave, howfs=howfs, rawhowfs=rawhowfs, statshowfs=statshowfs, lowfs=lowfs, rawlowfs=rawlowfs, statslowfs=statslowfs, mergehowfs=mergehowfs, mergelowfs=mergelowfs, statsmerge=statsmerge, phaseAmp=phaseAmp
NAME:
tlc_cal_dump
PURPOSE:
Send DUMP command to cal and process results
EXPLANATION:
Wrapper for gpCalRpcClientTester MT_CAL_DUMP command
CALLING SEQUENCE:
tlc_cal_dump,time,[/verb]
INPUT/OUTPUT:
time - Number of seconds of data to dump
outpaths - If set, on return will contain the paths of all
newly created fits files.
howfs,rawhowfs,statshowfs,lowfs,rawlowfs,statslowfs,mergehowfs,
mergelowfs,statsmerge,phaseAmp -
If any of these are set, on return will contain
the contents of the corresponding ouptut fits file.
/clean - Remove binary file after confirming that fits have
been written
/nosave - Do not leave any files on disk (data will only
appear in IDL). Automatically triggers /clean.
/verb - print nauseatingly detailed info about what's going on
OPTIONAL OUTPUT:
None.
EXAMPLE:
DEPENDENCIES:
Assumes access to executables accessible connection to server
tlc.
tlc_find_binary.pro
tlc_parse_client_output.pro
tlc_move_helper.pro
NOTES:
Files will only be removed if the matched data products are
new (less than 120 seconds old).
REVISION HISTORY
Written 03/23/2012. savransky1@llnl.gov
Quick fix 11/14/2012 macintosh1@llnl.gov to fix a filename
issue itnroduced by the new merge2fits
Added /clean and /nosave keywords - 1.18.13 - ds
tlc_cal_obsconfig
pro tlc_cal_obsconfig, fpm=fpm, mag=mag, verb=verb, debug=debug, errOut=errOut
NAME:
tlc_cal_obsconfig
PURPOSE:
Send READ_PARAM command to the CAL assembly
EXPLANATION:
Wrapper for gpCalAssClientTester
CALLING SEQUENCE:
tlc_cal_obsconfig,fpm=fpm &| mag=mag, [/verb]
INPUT/OUTPUT:
fpm = Integer value (FPM #)
mag = Float value (CAL magnitude)
/verb - print nauseatingly detailed info about what's going on
OPTIONAL OUTPUT:
errOut - On return will contain 0 (no error) or 1 (error)
EXAMPLE:
DEPENDENCIES:
Assumes access to executables in $TLC_ROOT and accessible connection to server tlc.
tlc_parse_client_output.pro
tlc_move_helper.pro
NOTES:
At least one of fpm or mag must be set.
REVISION HISTORY
Written 11/19/2012 - savransky1@llnl.gov
tlc_cal_openclose
pro tlc_cal_openclose, open=open, close=close, verb=verb, debug=debug, errOut=errOut
NAME:
tlc_cal_openclose
PURPOSE:
Send OPENCLOSE command to the CAL assembly
EXPLANATION:
Wrapper for gpCalAssClientTester
CALLING SEQUENCE:
tlc_cal_openclose,[/open|/close],[/verb]
INPUT/OUTPUT:
/open or /close - set one
/verb - print nauseatingly detailed info about what's going on
OPTIONAL OUTPUT:
errOut - On return will contain 0 (no error) or 1 (error)
EXAMPLE:
DEPENDENCIES:
Assumes access to executables in $TLC_ROOT and accessible connection to server tlc.
tlc_parse_client_output.pro
tlc_move_helper.pro
NOTES:
REVISION HISTORY
Written 04/02/2012 - savransky1@llnl.gov
tlc_cal_readparams
pro tlc_cal_readparams, fname, verb=verb, debug=debug, errOut=errOut
NAME:
tlc_cal_readparams
PURPOSE:
Send READ_PARAM command to the CAL assembly
EXPLANATION:
Wrapper for gpCalAssClientTester
CALLING SEQUENCE:
tlc_cal_readparams,fname,[/verb]
INPUT/OUTPUT:
fname - Filename of params file relative to cal config path
/verb - print nauseatingly detailed info about what's going on
OPTIONAL OUTPUT:
errOut - On return will contain 0 (no error) or 1 (error)
EXAMPLE:
DEPENDENCIES:
Assumes access to executables in $TLC_ROOT and accessible connection to server tlc.
tlc_parse_client_output.pro
tlc_move_helper.pro
NOTES:
REVISION HISTORY
Written 11/19/2012 - savransky1@llnl.gov
tlc_cal_saveparams
pro tlc_cal_saveparams, fname, verb=verb, debug=debug, errOut=errOut, localpath=localpath, noarchive=noarchive
NAME:
tlc_cal_readparams
PURPOSE:
Send SAVE_PARAM command to the CAL assembly
EXPLANATION:
Wrapper for gpCalAssClientTester
CALLING SEQUENCE:
tlc_cal_saveparams,fname,[/verb]
INPUT/OUTPUT:
fname - Filename relative to CAL config dir
localpath - Local mount of cal config dir. If not set
defaults to /gemsoft/opt/gpi/cal/config
/noarchive - Don't archive current file even if it exists on disk
/verb - print nauseatingly detailed info about what's going on
OPTIONAL OUTPUT:
errOut - On return will contain 0 (no error) or 1 (error)
EXAMPLE:
DEPENDENCIES:
Assumes access to executables in $TLC_ROOT and accessible connection to server tlc.
tlc_parse_client_output.pro
tlc_move_helper.pro
NOTES:
REVISION HISTORY
Written 11/23/2015 - ds
tlc_command_cal_acquire_fringe
pro tlc_command_cal_acquire_fringe, verb=verb, debug=debug, errOut=errOut, display=display, rawims=rawims, ims=ims, pos=pos
NAME:
tlc_command_cal_acquire_fringe
PURPOSE:
Send an rpc call to trigger the Acquire Fringe command via the
CAL client tester.
EXPLANATION:
Wrapper for gpCalRpcClientTester, ACQUIREFRINGE command
CALLING SEQUENCE:
tlc_command_cal_acquire_fringe
INPUT/OUTPUT:
verb set for overwhelming verbosity
OPTIONAL OUTPUT:
errOut - 1 if error occured, 0 otherwise.
EXAMPLE:
DEPENDENCIES:
Assumes access to executables in $TLC_ROOT andaccessible connection to server tlc.
tlc_parse_client_output.pro
tlc_move_helper.pro
NOTES:
The settings for this scan are supplied in the DEFAULT file in $CAL_ROOT/config
This command will perform a minimum of 2 scans (1 iteration). The output to
the data directory consists of a file for each scan, plus a motor position and image
analyis for the LAST scan ONLY.
The motor positions of the last scan are DIFFERENT than the motor positions of the
first scan. Because of a bug in the software, the motor positions of the second
scan are not positioned around the fringe and are pulled off towards the first
original motor position, for this reason, only the first scan should be used.
For the same reason, the display mode is currently disabled and the ims parameter
will not return a value.
Motor positions for the first scan are derived from parsing the DEFAULT file.
The headers for each file are created by this script and not when the file
is originally written. Therefore the timestamp is not precise.
REVISION HISTORY
Written 01.04.13 - ds
Modified 01.04.13 - bmac - to display CAL fringe scans
Modified 11.15.15 - PI - header addition, filename changing, motor position calculation
tlc_command_cal_pnc_pc
pro tlc_command_cal_pnc_pc, des_pos0, default=dflag, datum=datum, track=track, stop=stop, relative=relative, save=save, retval=retval, verb=verb, debug=debug
NAME:
tlc_command_cal_pnc_pc
PURPOSE:
Send commands to the CAL PNC case of the Track Assembly
EXPLANATION:
Wrapper for gpTrkAssClientTester
CALLING SEQUENCE:
tlc_comand_cal_pnc_pc,[des_pos,/default,/datum,/save]
INPUT/OUTPUT:
des_pos - Desired setting. If 5 elements, then [point x,
point y, center x, center y, focus]. Units are mas
for pointing and mm for centering. Alternatively,
can be 4 elements (omit focus - defaults to zero).
/default - Offset from default values. If set, des_pos may be
omitted.
/relative - Offset from current position - this attempts to
reconstruct the datum position based on all known
offset values currently in the GMB and then
applies des_pos to whatever the current net target is.
/datum - Send datum instead of move command
/track - Send track command
/stop - Send stop command
/save - Save the applied command to the default file
/verb - print nauseatingly detailed info about what's going on
OPTIONAL OUTPUT:
retval - Applied command
EXAMPLE:
DEPENDENCIES:
Assumes access to executables in $TLC_ROOT and accessible connection to server tlc.
tlc_parse_client_output.pro
tlc_move_helper.pro
load_default_cal_pnc_pc.pro
NOTES:
REVISION HISTORY
Originally written by Lisa Poyneer/Sandrine Thomas
07.17.12 - Rewritten to use tlc_move_helper, extra keywords
added. - ds
09.02.14 - Added /relative keyword - ds
tlc_command_cal_ref_cent
pro tlc_command_cal_ref_cent, fname, fullpath=fullpath, refcent=refcent, verb=verb, debug=debug, errout=errout
NAME:
tlc_command_cal_take_exp
PURPOSE:
Send an rpc call to trigger an exposre of the cal low/high
order wfs
EXPLANATION:
Wrapper for gpCalRpcClientTester, CAL_TAKE_EXP command
CALLING SEQUENCE:
tlc_command_cal_take_exp,camera,
INPUT/OUTPUT:
fname Filename for output. If not set, auto-generates based
on current time.
verb set for overwhelming verbosity
OPTIONAL OUTPUT:
refcent If set, reads in reference and assigns to this variable
(even it if it undefined)
fullpath If set, contains full path on return
errout 1 if error occurs, otherwise 0
EXAMPLE:
DEPENDENCIES:
Assumes access to executables in $TLC_ROOT and accessible
connection to server tlc.
tlc_parse_client_output.pro
tlc_move_helper.pro
NOTES:
Before issuing this command, CAL_CORRECT to the AO PnCs is
turned off and calDataOnOff on the AOC is set to 0. The CAL
loop is closed. After the command has run, CAL_CORRECT is set
back to its initial state, calDataOnOff remains 0 and the CAL
loop remains closed.
REVISION HISTORY
Written 2013/01/17 - ds
tlc_command_cal_take_darks
pro tlc_command_cal_take_darks, filename, errout=errout, verb=verb, debug=debug
NAME:
tlc_command_cal_take_darks
PURPOSE:
Send Take Dark command to CAL
CALLING SEQUENCE:
tlc_command_cal_take_darks,filename
INPUT/OUTPUT:
filename - File to write dark to (relative to CAL data path).
/verb - Toggle verbosity
OPTIONAL OUTPUT:
errout - 1 if error occured, otherwise 0
EXAMPLES:
tlc_command_cal_take_darks,'dark001.fits'
DEPENDENCIES:
tlc_move_helper
NOTES:
REVISION HISTORY
Written 2011/11/23 ST
2012/12/19 - Backend offloaded to tlc_move_helper - ds
tlc_command_cal_take_exp
pro tlc_command_cal_take_exp, fname, lowfs=lowfs, howfs=howfs, n_images=n_images, verb=verb, debug=debug, fullpath=fullpath, imageout=imageout, errout=errout
NAME:
tlc_command_cal_take_exp
PURPOSE:
Send an rpc call to trigger an exposre of the cal low/high
order wfs
EXPLANATION:
Wrapper for gpCalRpcClientTester, CAL_TAKE_EXP command
CALLING SEQUENCE:
tlc_command_cal_take_exp,camera,
INPUT/OUTPUT:
fname Filename for output. If not set, auto-generates based
on current time.
imageout If set, reads in image and assigns to this variable
(even it if it undefined)
lowfs/howfs Select low or high order wfs (only one may be
set). Defaults to low
n_images Number of images (defaults to 1)
verb set for overwhelming verbosity
fullpath If set, contains full path on return
OPTIONAL OUTPUT:
None.
EXAMPLE:
DEPENDENCIES:
Assumes access to executables in $TLC_ROOT andaccessible connection to server tlc.
tlc_parse_client_output.pro
tlc_move_helper.pro
NOTES:
REVISION HISTORY
Written by Sandrine Thomas 2011/11/23
03.15.2012 - various updates - ds
03.20.2012 - offloaded stuff onto tlc_move_helper.pro
tlc_command_inputfold
pro tlc_command_inputfold, des_pos0, default=dflag, datum=datum, track=track, stop=stop, pupil_off=pupil_off, save=save, retval=retval, verb=verb, debug=debug
NAME:
tlc_command_inputfold
PURPOSE:
Send commands to the INPUTFOLD TT case of the Track Assembly
EXPLANATION:
Wrapper for gpTrkAssClientTester
CALLING SEQUENCE:
tlc_comand_pnc_pc,[des_pos,/default,/datum,/save]
INPUT/OUTPUT:
des_pos - Desired setting. [x,y] in mm
/default - Offset from default values. If set, des_pos may be omitted.
/datum - Send datum instead of move command
/track - Send track command
/stop - Send stop command
/save - Save the applied command to the default file
/verb - print nauseatingly detailed info about what's going on
pupil_off - [0,1] (don't) Apply pupil offsets
OPTIONAL OUTPUT:
retval - Applied command
EXAMPLE:
DEPENDENCIES:
Assumes access to executables in $TLC_ROOT and accessible connection to server tlc.
tlc_parse_client_output.pro
tlc_move_helper.pro
load_default_pnc_pc.pro
NOTES:
REVISION HISTORY
Originally written by Lisa Poyneer
07.18.12 - Rewritten to use tlc_move_helper, extra keywords
added, and switched to tlc model. - ds
tlc_command_pnc_pc
pro tlc_command_pnc_pc, des_pos0, default=dflag, datum=datum, track=track, stop=stop, cal_correct=cal_correct, open_loop_model=open_loop_model, dar_residuals=dar_residuals, fpm_offsets=fpm_offsets, relative=relative, save=save, retval=retval, verb=verb, debug=debug
NAME:
tlc_command_pnc_pc
PURPOSE:
Send commands to the AO WFS PNC case of the Track Assembly
EXPLANATION:
Wrapper for gpTrkAssClientTester
CALLING SEQUENCE:
tlc_comand_pnc_pc,[des_pos,/default,/datum,/track,/save]
INPUT/OUTPUT:
des_pos - Desired setting. If 5 elements, then [point x,
point y, center x, center y, focus]. Units are mas
for pointing and mm for centering. Alternatively,
can be 4 elements (omit focus - defaults to zero).
/relative - Offset from current position - this attempts to
reconstruct the datum position based on all known
offset values currently in the GMB and then
applies des_pos to whatever the current net target is.
/default - Offset from default values. If set, des_pos may be
omitted and you will move to the default position.
/datum - Send datum instead of move command
/track - Send track instead of move command
/stop - Send stop command instead of move
cal_correct,open_loop_model, dar_residuals, fpm_offsets -
All of these take a values of 0 (don't apply) or 1 (apply)
/save - Save the applied command to the default file
/verb - print nauseatingly detailed info about what's going on
OPTIONAL OUTPUT:
retval - Applied command
EXAMPLE:
DEPENDENCIES:
Assumes access to executables in $TLC_ROOT and accessible connection to server tlc.
tlc_parse_client_output.pro
tlc_move_helper.pro
load_default_pnc_pc.pro
check_readwrite_comm.pro
NOTES:
REVISION HISTORY
Originally written by Lisa Poyneer
07.13.12 - Rewritten to use tlc_move_helper, extra keywords
added. - ds
08.27.12 - Added track and apply various offsets capability -
ds
03.21.12 - Added relative keyword
tlc_command_sf
pro tlc_command_sf, des_size, open=oflag, closed=cflag, best=best, calibrate=cal, pinhole=pflag, pos=pos, default_pos=dposflag, nowait=nowait, datum=datum, verb=verb, debug=debug, errout=errout
NAME:
tlc_command_sf
PURPOSE:
Send commands to the Spatial Filter case of the AO assembly
EXPLANATION:
Wrapper for gpAoAssClientTester, MT_AO_SPATIAL_FILTER command
CALLING SEQUENCE:
tlc_command_sf,des_size|pos=[x,y],[/verb,/best,/pinhole,/open,/cal]
INPUT/OUTPUT:
des_size - Spatial filter opening in mm (if ommited uses
current value)
pos - 2 element array of x and y spatial filter position in
mm (if ommited uses current values).
/best,/cal,/pinhole - Opening size presets
/default_pos - Use default position saved on disk. If pos is
also set, it will be added to the default position.
/verb - print nauseatingly detailed info about what's going on
/nowait - Don't wait for completion acknowledgement after
issuing command
/datum - Send DATUM instead of MOVE command.
OPTIONAL OUTPUT:
errout - 1 if error, 0 for all okay
EXAMPLE:
tlc_command_sf,/open
tlc_command_sf,5
tlc_command_sf,pos=[0.75,1.35]
tlc_command_sf,5,pos=[0.75,1.35]
tlc_command_sf, /best, /defaultpos ;;;; close it and put it at best X-Y position
tlc_command_sf, /best, /defaultpos, [0.1, -0.2] ;;; move off default a bit
DEPENDENCIES:
Assumes access to executables in $TLC_ROOT and accessible connection to server tlc.
tlc_parse_client_output.pro
tlc_move_helper.pro
COMMON BLOCKS:
gpi_globals
NOTES:
You must set either des_size, pos or datum keywords.
;;orig command
;;cmd1 = '/home/dunn/linux64/gpAoAssClientTester tlc 1 -1 1 1 0 '
REVISION HISTORY
Written 2011 Lisa Poyneer
2011-08-11 by LAP this is to auomate the sizes with new TLC calibration.
2011-08-30 - ST changes the "my_size" values to the right size
after SF change and tlc code update.
04.26.2012 - rewrite to use tlc_move_helper and addition of XY
motor controls- ds
05.24.2012 - Added datum capability - ds
03.01.2012 - Recoded to stay at current position when no
position value is passed
tlc_datum_all
pro tlc_datum_all, verb=verb, debug=debug, errOut=errOut
NAME:
tlc_datum_all
PURPOSE:
Send DATUM commands to everything
EXPLANATION:
Wrapper for MT_IS_DATUM call to gpIsClientTester.c
CALLING SEQUENCE:
tlc_datum_all
INPUT/OUTPUT:
/verb - print nauseatingly detailed info about what's going on
OPTIONAL OUTPUT:
None.
EXAMPLE:
DEPENDENCIES:
Assumes access to executables in $TLC_ROOT and accessible connection to server tlc.
tlc_parse_client_output.pro
tlc_move_helper.pro
NOTES:
REVISION HISTORY
Written 05/24/2012. savransky1@llnl.gov
tlc_datum_track
pro tlc_datum_track, wfspc=wfspc, inputtt=inputtt, calpc=calpc, howfssl=howfssl, verb=verb, debug=debug, errOut=errOut
NAME:
tlc_datum_track
PURPOSE:
Send DATUM commands to the track assembly
EXPLANATION:
Wrapper for gpTrkAssClientTester
CALLING SEQUENCE:
tlc_datum_track,[/wfspc | /inputt | /howfssl]
INPUT/OUTPUT:
/wfspc = AO WFS Pointing and Centering
/inputt = Input Fold Tip Tilt
/calpc = CAL-IFS Pointing and Centering
/howfssl = HOWFS Small Lens
/verb - print nauseatingly detailed info about what's going on
OPTIONAL OUTPUT:
None.
EXAMPLE:
DEPENDENCIES:
Assumes access to executables in $TLC_ROOT and accessible connection to server tlc.
tlc_parse_client_output.pro
tlc_move_helper.pro
NOTES:
REVISION HISTORY
Written 05/22/2012. savransky1@llnl.gov
tlc_find_binary
function tlc_find_binary, name
NAME:
tlc_find_binary
PURPOSE:
Locate binary on local machine to use with all of the various
tlc functions
EXPLANATION:
Check $TLC_ROOT and fallback locations for given binary name
Calling SEQUENCE:
fullpath = tlc_find_binary(name)
INPUT/OUTPUT:
name - Name of binary to locate
fullpath - Full path to binary, or error code
OPTIONAL OUTPUT:
None.
EXAMPLE:
DEPENDENCIES:
NOTES:
First attempts to search $TLC_ROOT/bin/linux64. If that fails,
tries the dhcp-17-33 fallback of /home/dunn/linux64
REVISION HISTORY
Written, 04/10/2012. savransky1@llnl.gov
tlc_get_cal_tt_bias
function tlc_get_cal_tt_bias
NAME:
tlc_get_cal_tt_bias
PURPOSE:
Write values to the CAL Tip/Tilt Bias fields of the GMB
EXPLANATION:
See above.
CALLING SEQUENCE:
tlc_set_cal_tt_bias,in
INPUT/OUTPUT:
in - Two element array of [Tilt, Tip] bias values (mas)
OPTIONAL OUTPUT:
None.
EXAMPLE:
;; 100 mas tilt bias:
tlc_set_cal_tt_bias,[100,0]
DEPENDENCIES:
Assumes access to executables in $TLC_ROOT and accessible connection to server tlc.
tlc_find_binary.pro
NOTES:
REVISION HISTORY
Written 08/27/2012. savransky1@llnl.gov
tlc_get_minaosnr
function tlc_get_minaosnr
NAME:
tlc_get_zenith
PURPOSE:
Read the minAoSnr field of the GMB
EXPLANATION:
See above.
CALLING SEQUENCE:
res = tlc_get_minaosnr()
INPUT/OUTPUT:
res - Min AO SNR value
OPTIONAL OUTPUT:
EXAMPLE:
DEPENDENCIES:
Assumes access to executables in $TLC_ROOT and accessible connection to server tlc.
tlc_find_binary.pro
NOTES:
REVISION HISTORY
Written 07.29.2013 - ds
tlc_get_tcsdata
function tlc_get_tcsdata, keywords=keywords
NAME:
tlc_get_tcsdata
PURPOSE:
Read the tcs data fields from the GMB and epics channels
EXPLANATION:
Get the stuff we're getting from the observatory out of the GMB
CALLING SEQUENCE:
res = tlc_get_tcsdata()
INPUT/OUTPUT:
res = [zenith, elevation, pressure, humidity, temp, windspeed, PA]
OPTIONAL OUTPUT:
keywords - IFS header keywords related to names
EXAMPLE:
DEPENDENCIES:
Assumes access to executables in $TLC_ROOT and accessible connection to server tlc.
tlc_find_binary.pro
NOTES:
REVISION HISTORY
Written 03.14.2013 - ds
tlc_get_zenith
function tlc_get_zenith
NAME:
tlc_get_zenith
PURPOSE:
Read the zenith field of the GMB
EXPLANATION:
See above.
CALLING SEQUENCE:
res = tlc_get_zenith()
INPUT/OUTPUT:
res - Zenith angle in degrees
OPTIONAL OUTPUT:
EXAMPLE:
DEPENDENCIES:
Assumes access to executables in $TLC_ROOT and accessible connection to server tlc.
tlc_find_binary.pro
NOTES:
REVISION HISTORY
Written 03.14.2013 - ds
tlc_guide
pro tlc_guide, endguide=endguide, verb=verb, debug=debug, errout=errout
NAME:
tlc_guide
PURPOSE:
Send the IS Guide or End Guide command.
EXPLANATION:
Wrapper for instrument sequencer functions
Calling SEQUENCE:
tlc_guide,[/endguide]
INPUT/OUTPUT:
/verb - Toggle verbosity
OPTIONAL OUTPUT:
errout = 1 for error, 0 for none.
EXAMPLE:
DEPENDENCIES:
tlc_find_binary
tlc_move_helper
NOTES:
REVISION HISTORY
Written 2013/02/19 - ds
tlc_move_aowfs_filter
pro tlc_move_aowfs_filter, in, datum=datum, verb=verb, debug=debug
NAME:
tlc_move_aowfs_filter
PURPOSE:
Send MOVE commands to the AO WFS filter wheel
EXPLANATION:
Attempts to match user input to known filter names, and
then sends MOVE commands via the AO assembly,
checking for errors along the way.
CALLING SEQUENCE:
tlc_move_aowfs_filter,in [,/verb]
INPUT/OUTPUT:
in - String containing filter name. Names can be partial, but
must uniquely identify the filter (i.e., '900NM' is not
acceptable as it matches 2 different filters). Running with no
inputs returns a matrix of power device names (unless
datum is set)
datum - Send datum rather than move.
/verb - print nauseatingly detailed info about what's going on
OPTIONAL OUTPUT:
None.
EXAMPLE:
;move to 600NM position
tlc_move_aowfs_filter,'600',/verb
tlc_move_aowfs_filter,/datum
DEPENDENCIES:
Assumes access to executables $TLC_ROOT and accessible connection to server tlc.
tlc_parse_client_output.pro
tlc_move_helper
NOTES:
REVISION HISTORY
Written 03/01/2012. savransky1@llnl.gov
04/26/12 switched backend to tlc_move_helper - ds
07.17.12 added datum option - ds
tlc_move_apodizer
pro tlc_move_apodizer, mask0, rot=rot, xoff=xoff, rel=rel, default=default, force=force, verb=verb, debug=debug, datum=datum, errout=errout
NAME:
tlc_move_apodizer
PURPOSE:
Send commands to the mask element of the PPM assembly
EXPLANATION:
Wrapper for gpPpmAssClientTester
CALLING SEQUENCE:
tlc_move_apodizer,mask,[/verb]
INPUT/OUTPUT:
mask - Name of apodizer mask (run with no arguments to get
list). Can omit leading 'APOD_',but trailing end of
name must be exact match (i.e., 'H' works, but 'K'
doesn't)
Set to "" to override (rot & xoff must be set)
rot - Rotation override (in degrees)
xoff - x-offset override (in mm)
/force - Force move even if mask string matches
/rel - use angles/offsets relative to current position
/default - read default values from disk instead of using TLC defaults.
/datum - Send DATUM command instead of MOVE.
/verb - print nauseatingly detailed info about what's going on
OPTIONAL OUTPUT:
None.
EXAMPLE:
DEPENDENCIES:
Assumes access to executables in $TLC_ROOT and accessible connection to server tlc.
tlc_parse_client_output.pro
tlc_move_helper.pro
validate_apod_name.pro
NOTES:
REVISION HISTORY
Written 03/19/2012. savransky1@llnl.gov
03.20.2012 - changed to reflect changes in tlc_move_helper -
ds
05.24.2012 - added datum keyword - ds
02.01.2013 - added default positions
tlc_move_cal
pro tlc_move_cal, entrance=entrance, exit=exit, ref=ref, sci=sci, datum=datum, track=track, open=open, close=close, stop=stop, verb=verb, debug=debug
NAME:
tlc_move_cal
PURPOSE:
Send commands to the shutters in the CAL assembly
EXPLANATION:
Wrapper for gpSrcAssClientTester
CALLING SEQUENCE:
tlc_move_cal,[/entrance,/exit,/ref,/sci],[/open | /close |
/datum | /track]
INPUT/OUTPUT:
/entrance,/exit,/ref,/sci - Entrance, exit, reference and
science shutters respectively
/open,/close - Select one
/datum - Set to datum
/verb - print nauseatingly detailed info about what's going on
OPTIONAL OUTPUT:
None.
EXAMPLE:
;;open the entrance and exit shutters
tlc_move_cal,/entrance,/exit,/open
;;close everything
tlc_move_cal,/entr,/exit,/ref,/sci,/close
DEPENDENCIES:
Assumes access to executables in $TLC_ROOT and accessible connection to server tlc.
tlc_parse_client_output.pro
tlc_move_helper.pro
NOTES:
/datum datums all elements
/track puts the science shutters in track
unset shutters will retain their present values
REVISION HISTORY
Written 07/17/2012. savransky1@llnl.gov
tlc_move_cal_track
pro tlc_move_cal_track, ref=ref, sci=sci, open=open, close=close, verb=verb, debug=debug
NAME:
tlc_move_cal_track
PURPOSE:
Send commands to the shutters in the CAL assembly
EXPLANATION:
Wrapper for gpSrcAssClientTester
CALLING SEQUENCE:
tlc_move_cal,[/entrance,/exit,/ref,/sci],[/open | /close |]
INPUT/OUTPUT:
/ref,/sci - reference and science shutters respectively
/open,/close - Select one
/verb - print nauseatingly detailed info about what's going on
OPTIONAL OUTPUT:
None.
EXAMPLE:
;;open the entrance and exit shutters
tlc_move_cal_track,/entrance,/exit,/open
;;close everything
tlc_move_cal_track,/entr,/exit,/ref,/sci,/close
DEPENDENCIES:
Assumes access to executables in $TLC_ROOT and accessible connection to server tlc.
tlc_parse_client_output.pro
tlc_move_helper.pro
NOTES:
REVISION HISTORY
Written 09/10/2013. ds
tlc_move_fpm
pro tlc_move_fpm, mask0, rot=rot, datum=datum, force=force, verb=verb, debug=debug, errOut=errOut
NAME:
tlc_move_apodizer
PURPOSE:
Send MOVE commands to the mask element of the FPM assembly
EXPLANATION:
Wrapper for gpFpmAssClientTester
CALLING SEQUENCE:
tlc_move_fpm,mask,[rot=rot,/verb]
INPUT/OUTPUT:
mask - Name of fp mask (run with no arguments to get
list). Can omit leading 'FPM_',but trailing end of
name must be exact match
Set to "" to override (rot must be set)
rot - Rotation override (in degrees)
/force - Do not perform check on current mask - just do it
/verb - print nauseatingly detailed info about what's going on
OPTIONAL OUTPUT:
None.
EXAMPLE:
DEPENDENCIES:
Assumes access to executables in $TLC_ROOT and accessible connection to server tlc.
tlc_parse_client_output.pro
tlc_move_helper.pro
NOTES:
REVISION HISTORY
Written 04/02/2012. savransky1@llnl.gov
05.24.2012 - added datum keyword - ds
tlc_move_helper
pro tlc_move_helper, comm, query, verb=verb, debug=debug, extrawait=extrawait, nowait=nowait, singlewait=singlewait, errOut=errOut
NAME:
tlc_move_helper
PURPOSE:
Send previously synthesized commands, look for acknwoldgement,
and then wait for cleared/error state.
EXPLANATION:
Helper for tlc_move_ifs, etc.
CALLING SEQUENCE:
tlc_move_helper,comm,ackComm,stateComm
INPUT/OUTPUT:
comm - command to execute
query - ReadWrite server command base (must have fields
.ack,.state,.ackErrMsg, .stateErrMsg)
extrawait - Additional wait time (for image exposure, etc.)
/nowait - Return immediately after issuing the command and
getting acknowledgement.
singlewait - Wait for this time before seeking
acknowledgement, but do not wait in ack loop.
/verb - print nauseatingly detailed info about what's going on
OPTIONAL OUTPUT:
errOut - Returns true if error occurs.
EXAMPLE:
DEPENDENCIES:
tlc_parse_client_output.pro
NOTES:
Primarily intended for use as a helper to other functions, but
can be called direclty if you're hip enough to assemble calls
on the fly.
REVISION HISTORY
Written 03/19/2012. savransky1@llnl.gov
03.20.2012 - changed from separate ack/state comms to single
query & added querying of error messages
04.27.2012 - added nowait flag. - ds
05.24.2012 - added singlewait flag - ds
tlc_move_ifs
pro tlc_move_ifs, filter=filter, pupil=pupil, lyot=lyot, prism=prism, modulator=modulator, modrotation=modrotation, verb=verb, debug=debug, errout=errout
NAME:
tlc_move_ifs
PURPOSE:
Send MOVE commands to various elements of the IFS assembly
EXPLANATION:
Wrapper for gpIfsAssClientTester
CALLING SEQUENCE:
tlc_move_ifs,,[/verb]
INPUT/OUTPUT:
filter - Set to named filter, or numerical override value (in
degrees)
pupil - Set to 'Extract','Deploy',or numerical value in motor
counts
lyot - Set to named mask, or numerical override value (in
degrees). You can omit the leading 'Lyot_080', but the
ends of names must be exact (because of the
ridiculously named 080_06_mirrored).
prism - Set to one of 'Extract','Wollaston','Spectral', or
numerical value in motor counts. Name matching need
not be exact but must be unique (i.e., 'Woll' will
work).
modulator - Set to 'Extract','Deploy',or numerical value in motor
counts
modrotation - Set to desired modulator rotation (in degrees)
/verb - print nauseatingly detailed info about what's going on
OPTIONAL OUTPUT:
errout - 1 on error
EXAMPLE:
DEPENDENCIES:
Assumes access to executables in $TLC_ROOT and accessible connection to server tlc.
tlc_parse_client_output.pro
tlc_move_helper.pro
validate_lyot_name.pro
NOTES:
REVISION HISTORY
Written 03/19/2012. savransky1@llnl.gov
03.20.2012 - changes to conform with new inputs to
tlc_move_helper - ds
07.18.2012 - offloaded lyot name checking to
validate_lyot_name - ds
tlc_move_power_help (tlc_move_power.pro)
pro tlc_move_power_help, dev
tlc_move_power (tlc_move_power.pro)
pro tlc_move_power, in, on=on, off=off, reboot=reboot, verb=verb, debug=debug, errOut=errOut
NAME:
tlc_move_power
PURPOSE:
Send MOVE commands to specific outlets in power bar assembly
EXPLANATION:
Attempts to match user input to known device locations, and
then sends MOVE commands to those outlets with an updated
state value, if different from the one they currently hold,
checking for errors along the way.
CALLING SEQUENCE:
tlc_move_power,in,state,[/verb]
INPUT/OUTPUT:
in - String array of outlet names. Names can be partial, but
must uniquely identify the outlet (i.e., 'CAL' is not
acceptable as it matches 7 different devices). This
restriction is mostly a safety precaution to prevent
accidentally toggling unintended outlets. Running with no
inputs returns a matrix of power device names.
/on Turn on (state = 0)
/off Turn off (state = 1)
/reboot Reboot (state = 2)
/verb - print nauseatingly detailed info about what's going on
OPTIONAL OUTPUT:
errOut - Returns true if error occurs.
EXAMPLE:
;turn on light source and AO system:
tlc_move_power,'shutter',0,/verb
tlc_move_power,['ao_tt','woofer','mems'],0,/verb
DEPENDENCIES:
Assumes access to executables in $TLC_ROOT and accessible connection to server tlc.
tlc_query_outlet.pro
tlc_query_sensors.pro
tlc_parse_client_output.pro
tlc_move_helper.pro
NOTES:
When asked to turn on power to the MEMS (i.e., in =
'MEMS_POWER',state = 0), the max MEMs humidity will first be
checked. If this value is inaccessible or greater than 15,
the code will not run.
REVISION HISTORY
Written 09/28/2011. savransky1@llnl.gov
04/26/2012 - Rewrite to use tlc_move_helper and
tlc_find_binary
06.07.12 - Changed powbar layout to match
CONFIG.PowBarAssembly
06.19.12 - Updated device names
08.24.12 - ST Updated device names
tlc_move_source
pro tlc_move_source, shutter=shutter, asu_pos=asu_pos, ir=ir, vis=vis, sc_pow=sc_pow, sc_att=sc_att, sphere_pos=sphere_pos, sphere_att=sphere_att, datum=datum, init=init, sim=sim, nocheck=nocheck, verb=verb, debug=debug, errout=errout, nomessage=nomessage
NAME:
tlc_move_source
PURPOSE:
Send MOVE commands to various elements of the source assembly
EXPLANATION:
Wrapper for gpSrcAssClientTester
CALLING SEQUENCE:
tlc_move_source,,[/verb]
INPUT/OUTPUT:
shutter - Closed|Open (0|1) OMSS shutter.
asu_pos - Extract|Deploy|[Y,X] ASU position. If string, then
'extract','deploy','omss_bore'. Otherwise, a two
element array of override positions in mm.
ir - Off|On (0|1) send -3 to retain (default)
vis - Off|On (0|1) send -3 to retain (default)
sc_pow - SC source power value in [0,100] (%)
send -3 to retain (default)
sc_att - SC source attenuation value in (-3, [2.2, 60]) (dB)
send -3 to retain (default)
sphere_pos - Extract|Deploy|X CAL sphere position. If
string, then 'extract' or 'deploy', otherwise,
override position in mm.
sphere_att - CAL sphere attenuation value in (-3, [2.2, 60]) (dB)
send -3 to retain (default)
sim - 0|1 Put component in simulated mode (1) or unsimulated (0)
/nocheck - Do not try to automatically determine whether you
are using the ASU or TELSIM.
/datum - Set to datum
/init - Set to init
/verb - print nauseatingly detailed info about what's going on
/nomessage - Suppress info message about unsimming. Mostly
for ult_sysalign so that users are not confused.
OPTIONAL OUTPUT:
None.
EXAMPLE:
;;open the shutter and extract the ASU (both commands are equivalent):
tlc_move_source,shutter = 'open',asu_pos='extract'
tlc_move_source,shutter = 1,asu_pos=0
;;change the SC power and attenuation
tlc_move_source,sc_pow = 65, sc_att=15
;;datum commands
tlc_move_source,/datum,/asu
tlc_move_source,/datum,/shutter
DEPENDENCIES:
Assumes access to executables in $TLC_ROOT and accessible connection to server tlc.
tlc_parse_client_output.pro
tlc_move_helper.pro
NOTES:
Can use either strings or indices for any of the inputs, except
for sphere_pos - there a value is always treated as an overrid.
When datumming, initing, or simming, you can just set the /asu_pos or
/shutter or /sphere_pos keywords.
If you are taking a component out of SIM, you must issue an
init command seperately.
REVISION HISTORY
Written 06/19/2012. savransky1@llnl.gov
07.17.2012 - Added cal_bore option and datum capability. - ds
08.03.2012 - Added cal sphere case. - ds
09.06.2012 - Added init. - ds
11.26.2012 - Added sim - ds
02.04.2013 - Added initial check for cal exit on low db
requests. - ds
tlc_observe
pro tlc_observe, fname, basename=basename, imageout=imageout, undispersed=undispersed, reducedout=reducedout, inttime=inttime, samplingMode=samplingMode, numReads=numReads, numCoadds=numCoadds, numGroups=numGroups, grp_mult=grp_mult, startX=startX, startY=startY, endX=endX, endY=endY, fullpath=fullpath, reducedpath=reducedpath, waitforwrite=waitforwrite, patientstart=patientstart, forceconfig=forceconfig, skipconfig=skipconfig, configonly=configonly, estimateonly=estimateonly, timing=timing, datedir=datedir, object=object, obsclass=obsclass, obstype=obstype, observer=observer, gcallamp=gcallamp, gcalfilt=gcalfilt, inport=inport, crpa=crpa, iaa=iaa, pos_ang=pos_ang, noepics=noepics, bridge=bridge, status=status, verb=verb, debug=debug
NAME:
tlc_observe
PURPOSE:
Send rpc calls to set up and perform an observation
EXPLANATION:
Wrapper for gpIsClientTester, MT_CONFIG_IFS and MT_OBSERVE commands
Calling SEQUENCE:
tlc_observe,fname
INPUT/OUTPUT:
fname Filename for output. If not set, auto-generates based
on current date and existing files.
basename String part to use for filenames if fname is not set.
if basename is not provided, defaults to 'S'
intTime Integration time PER COADD in seconds.
samplingMode 1="Single", 2="CDS", 3="MCDS", 4="UTR", defaults
to 4
numReads Defaults to 1, more if MCDS or UTR
numGroups Ignored for everything except UTR, must be >= 2
grp_mult When calculating the number of groups for UTR (if
numGroups is unset), divide by this value
numCoadds Defaults to 1 (or 20 for pupil viewer), must be >= 1
startX 0-2047
startY 0-2047
endX >startX-2047
endY >startY-2047
waitforwrite - If set, waits for file write to complete before
returning. (sorta synonymous with imageout but
ignoring the return value)
patientstart - If set, and the exposure cannot be started yet,
wait up to patientstart minutes for the camera
to become available. i.e. set patientstart=3 to
wait up to 3 minutes for availability. Defaults
to 1.
status - returns 1 if exposure happens successfully, 0
otherwise
skipconfig - If set, do not run observ_config - uses previous
configuration
forceconfig - Run observ_config even if the gmb settings are
the same as the new ones.
configonly - Only run the configuration, but not the
observation (automatically set forceconfig to
true)
datedir - Use date directories (off by default - old behavior,
now everything goes to the IFS ramdisk top level)
estimateonly - Figure out how long the exposure will take and return
object, obsclass, obstype, observer, gcallamp, gcalfilt,
inport, crpa, iaa, pa -
GDS keywords. Set for specific observation only
noepics - By default, tlc_observe queries gemini epics
channels for additional header info, and looks up
the current object name if not supplied. Set this
keyword to skip this (i.e., when GPI is in
instrument lab or doing daytime tests).
bridge - IDL bridge for background execution. If set, giapi
command will be spawned to the bridge with /nowait
and the seesion will return immediately. status
will always be set to 1, regardless of the command
execution status.
verb set for overwhelming verbosity
OPTIONAL OUTPUT:
imageout - If set, reads in image and assigns to this variable
(even it if is undefined). if /undisperesed is set,
first performs undisperesed extraction
reducedout - If set, reads in reduced image and assigns to this
variable
fullpath - On return, contains the path to the output image
reducedpath - On return, contains the path to the reduced image
(assuming that the drp is running)
timing - Structure of observation timing values. Note that
times are per coadd.
EXAMPLE:
DEPENDENCIES:
Assumes access to executables in $TLC_ROOT and accessible
connection to server tlc.
Assumes environment variable $GPI_RAW_DATA_DIR is set.
Assumes access to giapi-tester.jar.
run_readwrite_query.pro
assemble_ifs_path.pro
NOTES:
Unlike tlc_take_exposure, this can only be used for writing IFS
images.
Unless /forceconfig or /skipconfig are set, the program will
query the current values and only run the configuration step
if they differ from the new set.
REVISION HISTORY
Written 04/02/2012. savransky1@llnl.gov - branched from
tlc_take_exposure.
04.10.12 - Changed over to gpIsClientTester - ds
2012-05-30 - updated to use forward instead of back slashes -
MP
07.09.12 - Lots of minor cleanups. added auto-claculation of
numgroups for UTR and grp_mult keyword. - ds
07.24.12 - Added check for previous configuration. New
configuration issued only if there are
differences. Also added /forceconfig keyword. - ds
07.31.12 - Added auto-setting of gds keywords, integration
with gpi_globals, and calculation of clock and wall
times - ds
01.24.13 - Changed default smapling mode to UTR - ds
tlc_obsmode
pro tlc_obsmode, in, noapodoverwrite=noapodoverwrite, verb=verb, debug=debug, errout=errout
NAME:
tlc_obsmode
PURPOSE:
Set the IS observing mode
EXPLANATION:
Wrapper for instrument sequencer function MT_OBSERVATION_MODE
Calling SEQUENCE:
tlc_obsmode,in
INPUT/OUTPUT:
in - Name of observing mode. Must be sufficienct substring
for unique match. Prints available modes if no input
given
/noapodoverwirte - By default, will try to pull latest
apodizer filter wheel setting from disk,
unless this keyword is set.
/verb - Toggle verbosity
OPTIONAL OUTPUT:
errout = 1 for error, 0 for none. 2 for apodizer move related error
EXAMPLE:
DEPENDENCIES:
tlc_find_binary
tlc_move_helper
NOTES:
REVISION HISTORY
Written 2013/02/19 - ds
tlc_parse_client_output
function tlc_parse_client_output, in, num=num
NAME:
tlc_parse_client_output, res, num=num
PURPOSE:
Parse output of gpUtReadWriteClient command
EXPLANATION:
gpUtReadWriteClient returns multiple lines of information,
with queried value typically at end of the last line as
= <#####>.
CALLING SEQUENCE:
out = tlc_parse_client_output( in, [/num])
INPUT/OUTPUT:
in - Output of spawned gpUtReadWriteClient command
/num - If output is expected to be purely numeric (otherwise
string assumed)
out - Either output (string or float) or null
EXAMPLE:
out = tlc_parse_client_output(res)
DEPENDENCIES:
NOTES:
REVISION HISTORY
Written 09/29/2011. savransky1@llnl.gov
12/06/2011 Fixed format string for numerical data. ds
tlc_query_ao_centoff
function tlc_query_ao_centoff, verb=verb
NAME:
tlc_query_ao_centoff
PURPOSE:
Return the current nominal centering offsets for the AO PnC mirrors.
CALLING SEQUENCE:
res = tlc_query_ao_centoff()
INPUT/OUTPUT:
/verb - Toggle verbosity
res - 2 x 1 array of X & Y centering (mm) offsets.
Missing values are filled in with NaN.
OPTIONAL OUTPUT:
None.
EXAMPLES:
DEPENDENCIES:
tlc_find_binary
run_readwrite_query
NOTES:
REVISION HISTORY
Written 13-05-02 ds
tlc_query_ao_pnc
function tlc_query_ao_pnc, verb=verb, m1m2=m1m2, targm1m2=targm1m2
NAME:
tlc_query_ao_pnc
PURPOSE:
Return the current Net Target values of the AO PnC mirrors.
CALLING SEQUENCE:
res = tlc_query_ao_pnc()
INPUT/OUTPUT:
/verb - Toggle verbosity
res - 5 x 1 array of X & Y pointing (mas), X & Y centering (mm)
and focus (mm). Missing values are filled in with NaN.
OPTIONAL OUTPUT:
m1m2 - If set to named var, on return will contain the sensed
positions for the M1 & M2 tip & tilt
targm1m2 - If set to named var, on return will contain the target
positions for the M1 & M2 tip & tilt
EXAMPLES:
DEPENDENCIES:
tlc_find_binary
run_readwrite_query
NOTES:
These are the current Net Target values so if tracking is on
they are only a snapshot. Also, note that the current model
zero point is not zero, so that sending the output of this
directly to the PnCs will actually move you to a different
location - you need to subtract the current zero (datum) point
first.
REVISION HISTORY
Written 12-11-?? ds
tlc_query_ao_pupalign
function tlc_query_ao_pupalign, verb=verb
NAME:
tlc_query_ao_pupalign
PURPOSE:
Return the current pupil offsets reported by the AOC.
CALLING SEQUENCE:
res = tlc_query_ao_pupalign()
INPUT/OUTPUT:
/verb - Toggle verbosity
res - 2 x 1 array of X & Y pupil offsets in fractional pupils
(1 pupilis 48 60 micron subabs).
OPTIONAL OUTPUT:
None.
EXAMPLES:
DEPENDENCIES:
tlc_find_binary
run_readwrite_query
NOTES:
The pupil offsets only make sense when you have a pupil (i.e.,
not when using the ASU). They are constantly updated in a
circular buffer of 3 values. We grab the ones given by the
current index (Aoc_mostRecentDisplay).
REVISION HISTORY
Written 12-11-?? ds
tlc_query_aopnc_offs
function tlc_query_aopnc_offs, verb=verb, nom=nom, olm=olm
NAME:
tlc_query_aopnc_offs
PURPOSE:
Return the current effective datum for the AO PnC mirrors.
CALLING SEQUENCE:
res = tlc_query_aopnc_offs()
INPUT/OUTPUT:
/verb - Toggle verbosity
res - 5 x 1 array of X & Y pointing (mas), centering (mm) and focus offsets.
Missing values are filled in with NaN.
OPTIONAL OUTPUT:
nom - Nominal offsets (+dar if applied)
olm - Open loop model offsets
EXAMPLES:
DEPENDENCIES:
tlc_find_binary
run_readwrite_query
NOTES:
REVISION HISTORY
Written 13-05-02 ds
09.10.14 - ds - Added nom & olm outputs
tlc_query_apodizer_position
function tlc_query_apodizer_position, verb=verb
NAME:
tlc_query_apodizer_position
PURPOSE:
Return the current motor positions for the PPM wheel
CALLING SEQUENCE:
res = tlc_query_apodizer_position()
INPUT/OUTPUT:
/verb - Toggle verbosity
res - 2 x 1 array of mask slide position in mm and mask motor
position in degrees
OPTIONAL OUTPUT:
None
EXAMPLES:
DEPENDENCIES:
tlc_find_binary
run_readwrite_query
NOTES:
REVISION HISTORY
Written 9-14-16 ds
tlc_query_cal_flux
function tlc_query_cal_flux
NAME:
tlc_query_cal_flux
PURPOSE:
Return the current total flux as measured by the CAL LOWFS.
CALLING SEQUENCE:
res = tlc_query_cal_flux()
INPUT/OUTPUT:
res - 2x1 array with the 1st and last entries of the LOWFS
total flux circular buffer.
OPTIONAL OUTPUT:
None.
EXAMPLES:
DEPENDENCIES:
tlc_find_binary
run_readwrite_query
NOTES:
REVISION HISTORY
Written 12-11-?? ds
tlc_query_cal_pnc
function tlc_query_cal_pnc, verb=verb, m1m2=m1m2, targm1m2=targm1m2
NAME:
tlc_query_cal_pnc
PURPOSE:
Return the current Net Target values of the CAL PnC mirrors.
CALLING SEQUENCE:
res = tlc_query_cal_pnc()
INPUT/OUTPUT:
/verb - Toggle verbosity
res - 5 x 1 array of X & Y pointing (mas), X & Y centering (mm)
and focus (mm). Missing values are filled in with NaN.
OPTIONAL OUTPUT:
m1m2 - If set to named var, on return will contain the sensed
positions for the M1 & M2 tip & tilt
targm1m2 - If set to named var, on return will contain the target
positions for the M1 & M2 tip & tilt
EXAMPLES:
DEPENDENCIES:
tlc_find_binary
run_readwrite_query
NOTES:
These are the current Net Target values so if tracking is on
they are only a snapshot.
REVISION HISTORY
Written 12-11-?? ds
Added m1m2 vals 09-02-14 - ds
tlc_query_cal_tt
function tlc_query_cal_tt, rev=rev
NAME:
tlc_query_cal_tt
PURPOSE:
Return the current tip/tilt values as measured by the CAL lowfs
CALLING SEQUENCE:
res = tlc_query_cal_tt()
INPUT/OUTPUT:
res - 2 x 1 array of tilt, tip values in mas.
/rev - set to reverse output (i.e., return tip,tilt).
OPTIONAL OUTPUT:
None.
EXAMPLES:
DEPENDENCIES:
tlc_find_binary
run_readwrite_query
NOTES:
REVISION HISTORY
Written 12-11-?? ds
tlc_query_calpnc_offs
function tlc_query_calpnc_offs, verb=verb, nom=nom, olm=olm
NAME:
tlc_query_calpnc_offs
PURPOSE:
Return the current effective datum for the CAL-IFS PnC mirrors.
CALLING SEQUENCE:
res = tlc_query_calpnc_offs()
INPUT/OUTPUT:
/verb - Toggle verbosity
res - 5 x 1 array of X & Y pointing (mas), centering (mm) and focus offsets.
Missing values are filled in with NaN.
OPTIONAL OUTPUT:
nom - Nominal offsets (+lyot if applied)
olm - Open loop model offsets
EXAMPLES:
DEPENDENCIES:
tlc_find_binary
run_readwrite_query
NOTES:
REVISION HISTORY
Written 14-09-02 ds
09.10.14 - ds - Added nom & olm outputs
tlc_query_dars
function tlc_query_dars
No header information available.
tlc_query_inputfold
function tlc_query_inputfold, verb=verb
NAME:
tlc_query_inputfold
PURPOSE:
Return the current Net Target values of the inputfold.
CALLING SEQUENCE:
res = tlc_query_inputfold()
INPUT/OUTPUT:
/verb - Toggle verbosity
res - 2 x 1 array of X & Y centering (mm)
OPTIONAL OUTPUT:
None.
EXAMPLES:
DEPENDENCIES:
tlc_find_binary
run_readwrite_query
NOTES:
These are the current Net Target values so if tracking is on
they are only a snapshot. Also, note that the current model
zero point is not zero, so that sending the output of this
directly to the PnCs will actually move you to a different
location - you need to subtract the current zero (datum) point
first.
REVISION HISTORY
Written 12-11-?? ds
tlc_query_outlet
function tlc_query_outlet, powbar, outlet, name=name
NAME:
tlc_query_outlet
PURPOSE:
Return status of single outlet
EXPLANATION:
Queries TLC read/Write server for powBarAss.powBar[powbar].outelt[outlet]
CALLING SEQUENCE:
tlc_query_outlet,powbar,outlet
INPUT/OUTPUT:
powbar - 0 to 3
outlet - 0 to 7
/name - set to return name, otherwise returns state - 0 for on, 1 for off
EXAMPLE:
tlc_query_power, 0, 0
DEPENDENCIES:
Assumes access to executable in path /home/dunn/linux64 and
accessible connection to server tlc.
tlc_parse_client_output
NOTES:
REVISION HISTORY
Written 09/29/2011. savransky1@llnl.gov
tlc_query_power
pro tlc_query_power, devices, bars, name=name, seqTime=seqTime, rebootTime=rebootTime, quiet=quiet
NAME:
tlc_query_power
PURPOSE:
Return power bar assembly status
EXPLANATION:
Queries TLC read/Write server for powBarAss group readings
CALLING SEQUENCE:
tlc_query_power, [devices, bars, /name, /seqTime, /rebootTime, /quiet]
INPUT/OUTPUT:
If no keywords are set, status will be returned (0 for on, 1
for off). Otherwise:
/name - return outlet names, or, if set to array of names,
return those specific ones.
/seqTime - return outlet seq. time
/rebootTime - return outlet reboot time
/quiet - do not print output
OPTIONAL OUTPUT:
devices - 4x8 array of outlet status, names, rebootTimes or
seq. times. If name is passed in as an array, status of the
associated names
bars - array of power bar names
EXAMPLE:
tlc_query_power, devices
tlc_query_power, devices, /name
tlc_query_power, devices, /rebootTime, /quiet
DEPENDENCIES:
Assumes access to executable in path /home/dunn/linux64 and
accessible connection to server tlc.
tlc_parse_client_output
NOTES:
REVISION HISTORY
Written 09/26/2011. savransky1@llnl.gov
12/06/2011 - changed to use tlc_parse_client_output
tlc_query_sensed
function tlc_query_sensed, in, all=all, quiet=quiet
NAME:
tlc_query_sensed
PURPOSE:
Return sensed readings for spatial filter, AO WFS, Input Fold,
and ASU
EXPLANATION:
Queries TLC read/Write server for readings from the track
assembly, ao assembly, and source assembly.
CALLING SEQUENCE:
out = tlc_query_sensed( in, [/all, /quiet])
INPUT/OUTPUT:
in - String array of sensor names. Names can be partial, in
which case all possible matches will be queried (i.e.,
'aoWfs' will query all 5 sensors in the AO WFS assembly.
Running with no inputs returns list of all available sensors.
/all - set to return all available sensors.
/quiet - do not print output
OPTIONAL OUTPUT:
out - Array of structures with fields: name and value
EXAMPLE:
out = tlc_query_sensed(/all) ;show everything
out = tlc_query_sensed('opening') ;show AO spatial filter opening
out = tlc_query_sensed('wfs') ;show WFS P&C and focus
out = tlc_query_sensed(['M1','M2']) ;show only WFS P&C
DEPENDENCIES:
Assumes access to executable in $TLC_ROOT and
accessible connection to server tlc.
tlc_parse_client_output
NOTES:
REVISION HISTORY
Written 12/05/2011. savransky1@llnl.gov
tlc_query_sensors
function tlc_query_sensors, in, all=all, det=det, quiet=quiet, verb=verb
NAME:
tlc_query_sensors
PURPOSE:
Return oneWire network temperature/humidity readings
EXPLANATION:
Queries TLC read/Write server for oneWrie group readings.
CALLING SEQUENCE:
out = tlc_query_sensors( in, [/all, /quiet])
INPUT/OUTPUT:
in - String array of sensor names. Names can be partial, in
which case all possible matches will be queried (i.e.,
'humidity' will query the MemsHumidity and the
OmssHumidity. Running with no inputs (or with just /det)
returns list of all available sensors.
/all - set to return all available sensors.
/det - doesn't do anything. here for backwards compatibility
/quiet - do not print output
/verb - verbose mode
OPTIONAL OUTPUT:
out - First column: names, second column: values
EXAMPLE:
out = tlc_query_sensors(/all)
out = tlc_query_sensors('humid')
out = tlc_query_sensors(['Glycol','EE'])
out = tlc_query_sensors(['camera','inlet'],/quiet)
DEPENDENCIES:
Assumes access to executable in $TLC_ROOT and
accessible connection to server tlc.
tlc_parse_client_output
NOTES:
REVISION HISTORY
Written 09/23/2011. savransky1@llnl.gov
09/26/2011 - changed to function, added remaining sensors. ds
12/06/2011 - changed to use tlc_parse_client_output
10/09/2012 - major rewrite to reflect changes in gmb
temp. sensor layout. deprecated /det flag.
tlc_set_cal_pointing_gain
pro tlc_set_cal_pointing_gain, in
NAME:
tlc_set_cal_pointing_gain
PURPOSE:
Write values to the CAL offload pointing gain field of the GMB
EXPLANATION:
See above.
CALLING SEQUENCE:
tlc_set_cal_pointing_gain,in
INPUT/OUTPUT:
in - pointing gain value
OPTIONAL OUTPUT:
None.
EXAMPLE:
;; set gain to 0.5
tlc_set_cal_pointing_gain,0.5
DEPENDENCIES:
Assumes access to executables in $TLC_ROOT and accessible connection to server tlc.
tlc_find_binary.pro
NOTES:
REVISION HISTORY
Written 08/27/2012. savransky1@llnl.gov
tlc_set_cal_tt_bias
pro tlc_set_cal_tt_bias, in
NAME:
tlc_set_cal_tt_bias
PURPOSE:
Write values to the CAL Tip/Tilt Bias fields of the GMB
EXPLANATION:
See above.
CALLING SEQUENCE:
tlc_set_cal_tt_bias,in
INPUT/OUTPUT:
in - Two element array of [Tilt, Tip] bias values (mas)
OPTIONAL OUTPUT:
None.
EXAMPLE:
;; 100 mas tilt bias:
tlc_set_cal_tt_bias,[100,0]
DEPENDENCIES:
Assumes access to executables in $TLC_ROOT and accessible connection to server tlc.
tlc_find_binary.pro
NOTES:
REVISION HISTORY
Written 08/27/2012. savransky1@llnl.gov
tlc_set_cal_tt_correction
pro tlc_set_cal_tt_correction, in
NAME:
tlc_set_cal_tt_correction
PURPOSE:
Write values to the CAL Tip/Tilt correction fields of the GMB
EXPLANATION:
See above.
CALLING SEQUENCE:
tlc_set_cal_tt_correction,in
INPUT/OUTPUT:
in - Two element array of [Tilt, Tip] bias values (mas)
OPTIONAL OUTPUT:
None.
EXAMPLE:
;; 100 mas tilt correction:
tlc_set_cal_tt_correction,[100,0]
DEPENDENCIES:
Assumes access to executables in $TLC_ROOT and accessible connection to server tlc.
tlc_find_binary.pro
NOTES:
REVISION HISTORY
Written 08/27/2012. savransky1@llnl.gov
tlc_set_minaosnr
pro tlc_set_minaosnr, val, errout=errout
NAME:
tlc_set_minaosnr
PURPOSE:
Write values to the minAoSnr field of the GMB
EXPLANATION:
See above.
CALLING SEQUENCE:
tlc_set_minaosnr,val
INPUT/OUTPUT:
val - Min AO SNR value
OPTIONAL OUTPUT:
errout - 0 if no error, 1 otherwise
EXAMPLE:
DEPENDENCIES:
Assumes access to executables in $TLC_ROOT and accessible connection to server tlc.
tlc_find_binary.pro
NOTES:
REVISION HISTORY
Written 07.29.2013 - ds
tlc_set_zenith
pro tlc_set_zenith, theta, inport=inport, errout=errout
NAME:
tlc_set_zenith
PURPOSE:
Write values to the zenith field of the GMB and set
appropriate sticky common block fields for IFS header
keywords.
EXPLANATION:
See above.
CALLING SEQUENCE:
tlc_set_zenith,theta,[inport=inport]
INPUT/OUTPUT:
theta - Zenith angle of GPI in degrees
inport - ISS port where GPI is mounted (defaults to 1)
OPTIONAL OUTPUT:
errout - 0 if no error, 1 otherwise
EXAMPLE:
DEPENDENCIES:
Assumes access to executables in $TLC_ROOT and accessible connection to server tlc.
tlc_find_binary.pro
NOTES:
REVISION HISTORY
Written 03.14.2013 - ds
tlc_standard_settings
pro tlc_standard_settings
NAME:
tlc_standard_settings
PURPOSE:
Send currently stored default values to the inputfold, AO PnCs
and spatial filter
CALLING SEQUENCE:
tlc_standard_settings
INPUT/OUTPUT:
None.
OPTIONAL OUTPUT:
None.
EXAMPLES:
DEPENDENCIES:
tlc_command_inputfold
tlc_command_pnc_pc
tlc_command_sf
NOTES:
REVISION HISTORY
Written LAP
tlc_take_exposure
pro tlc_take_exposure, fname, verb=verb, imageout=imageout, camera=camera, intTime=intTime, samplingMode=samplingMode, numReads=numReads, numGroups=numGroups, numCoadds=numCoadds, startX=startX, startY=startY, endX=endX, endY=endY, undispersed=undispersed, debug=debug, fullpath=fullpath, basename=basename, status=status, waitforwrite=waitforwrite, patientstart=patientstart, nochecks=nochecks
NAME:
tlc_take_exposure
PURPOSE:
Send an rpc call to trigger an exposre
EXPLANATION:
Wrapper for gpIfsRpcClientTester, MT_IFS_TAKE_EXP command
Calling SEQUENCE:
tlc_take_exposure,fname
INPUT/OUTPUT:
fname Filename for output. If not set, auto-generates based
on current time.
basename String part to use for filenames if fname is not set.
if basename is not provided, defaults to either 'ifs'
or 'pupil' depending on camera.
imageout If set, reads in image and assigns to this variable
(even it if it undefined)
camera 1 for IFS, 2 for pupilviewer. Defaults to 2.
intTime Integration time in seconds
samplingMode 1="Single", 2="CDS", 3="MCDS", 4="UTR", defaults
to 2
numReads Defaults to 1, more if MCDS or UTR
numGroups Ignored for everything except UTR, must be >= 2
numCoadds Defaults to 1 (or 20 for pupil viewer), must be >= 1
startX 0-2047
startY 0-2047
endX >startX-2047
endY >startY-2047
verb set for overwhelming verbosity
waitforwrite If set, waits for file write to complete before returning.
(sorta synonymous with imageout but ignoring the return value)
patientstart If set, and the exposure cannot be started yet, wait up to
patientstart minutes for the camera to become available.
i.e. set patientstart=3 to wait up to 3 minutes for availability.
nochekcs Bypass all safety checks (ONLY USE IF YOU KNOW WHAT YOU ARE DOING)
status returns 1 if exposure happens successfully, 0 otherwise
OPTIONAL OUTPUT:
None.
EXAMPLE:
DEPENDENCIES:
Assumes access to executables in path /home/dunn/linux64 and
accessible connection to server tlc.
Assumes environment variable $GPI_RAW_DATA_DIR
tlc_parse_client_output.pro
NOTES:
Partially based on gpiifs.py by Perrin et al. Documentation
for MT_IFS_TAKE_EXP command from Jennifer Dunn:
Inputs: cmd, activityId, camera(1=Science,2=Pupil),
intTime(0-999999999), samplingMode( 1="Single", 2="CDS",3="MCDS", 4="UTR"),
numReads(1, more if MCDS or UTR), numCoadds(at least 1),
startX(0-2047), startY(0-2047), endX(>startX-2047), endY(0-2047),
numGroups(Ignored for everything except UTR, must be >1), Filename
$Tlc_ROOT/bin/linux64/gpIfsRpcClientTester localhost 6 -1 1 10000 1 1 1 1 1 100 100 2 x
(host + 13 inputs)
REVISION HISTORY
Written, with love, 02/14/2012. savransky1@llnl.gov
02.29.2012 - Multiple changes to accomodate pupil vieiwng
camera and changes to gpIfsRpcClientTester. Also
fixed query functions. ds (Happy leap day)
03.08.2012 - changed ifs write dir to windows path
03.19.2012 - changed windows write path to omit leading drive
letter in response to recent sidecar changes - ds
03.19.2012 - added basename option. -MP
03.20.2012 - added error message queries when commands fail -ds
03.20.2012 - added additional safety checks before starting
Also added status return keyword, patientstart and
waitforwrite switches. -MP
03-22-2012 Patient start is now the default. -MP
Also updated to read the 1st extenstion for
camera=1
03-30-2012 Continue the file numbering from one day to the
next. -MP
04-02-2012 Offloaded filename generation to
assemble_ifs_path - ds
04-05-2012 Added extra wait loop for ifsRpc.exposing - ds
07-23-2012 Changed default camera to pupil viewer
tlc_waveplate_sequence
pro tlc_waveplate_sequence, nsteps=nsteps, stepsize=stepsize, startrotation=startrotation, nints=nints, _extra=_extra
NAME:
tlc_waveplate_sequence
PURPOSE:
Take a series of IFS polarization mode images while rotating
the waveplate to modulate the polarization
EXPLANATION:
Wrapper for tlc_move_ifs and tlc_observe
CALLING SEQUENCE:
tlc_waveplate_sequence,nsteps=4, stepsize=22.5, startrotation=0.0, nints=1
INPUT/OUTPUT:
nsteps - number of steps to rotate. Default=4
stepsize - Angle for each step of rotation. Default=22.5
startrotation - First position for start of sequence. Default=0.0
nints - number of integrations to take at each waveplate position. Default 1
Additional keywords are passed through to tlc_observe. Use these to set
intTime, samplingMode, observer, etc.
OPTIONAL OUTPUT:
None.
EXAMPLE:
DEPENDENCIES:
Assumes access to executables in $TLC_ROOT and accessible connection to server tlc.
tlc_move_ifs
tlc_observe
NOTES:
REVISION HISTORY
Written 02/07/2013. mperrin@stsci.edu
update_log
pro update_log, tag, vec
NAME:
update_log
PURPOSE:
Write to mechanism log file.
CALLING SEQUENCE:
update_log, tag, vec
INPUT/OUTPUT:
tag - Mehanism tag (filenames will be log_tag.txt in the gpi
IDL private datapath.
vec - Vector of values to write to log.
OPTIONAL OUTPUT:
None.
EXAMPLES:
update_log,'sfpos',[1.1,1.2]
DEPENDENCIES:
None.
NOTES:
REVISION HISTORY
Written LAP
update_zenith
pro update_zenith
No header information available.
validate_apod_name
function validate_apod_name, in, index=index
NAME:
validate_apod_name
PURPOSE:
Check input against list of known Apodizers (pupil plane masks)
and return full name of desired mask.
CALLING SEQUENCE:
res = validate_apod_name(in)
INPUT/OUTPUT:
in - Name of apodizer mask (run with no arguments to get
list). Can omit leading 'APOD_',but trailing end of
name must be exact match (i.e., 'H' works, but 'K'
doesn't). Returns null if no match is found or
multiple entries are matched.
If in is an integer, then it is assumed to be the mask
number (starting with APOD_Y = 1).
res - Scalar string containing full Lyot stop name.
OPTIONAL OUTPUT:
index - Apodizer index used in the AOC. We have arbitrarily
defined apodizers Y to K2 as indices 1 to 5.
EXAMPLES:
DEPENDENCIES:
None.
NOTES:
This procedure must be updated any time new masks are
installed.
The AOC supports 8 apodizer references whereas there are 10
apodizers. We currently only care about the first five, so the
ordering of the rest is completely arbitrary. However, if you
start to care about the others, you mut be careful about how
they are ordered in the masks array.
REVISION HISTORY
Written 02/01/2013 - ds
validate_lyot_name
function validate_lyot_name, in
NAME:
validate_lyot_name
PURPOSE:
Check input against list of known Lyot Stops and return full
name of desired stop.
CALLING SEQUENCE:
res = validate_lyot_name(in)
INPUT/OUTPUT:
in - String containing some portion of the Lyot name. End of
string must be an exact match (so '12_03' will match
'080m12_03', but 'm12_0' will not). Returns null if no
match is found or multiple entries are matched.
res - Scalar string containing full Lyot stop name.
OPTIONAL OUTPUT:
None.
EXAMPLES:
DEPENDENCIES:
None.
NOTES:
This procedure must be updated any time new masks are installed.
REVISION HISTORY
Written 12-08-?? ds
10/15/2012 - Updated mask name - ds