Observe Routines

Executing an "Observing" script

On one of the LBT observer computers, obs1-4, login as LBTO or AOeng. Change your directory to the "base" directory. The "base" directory is where the observing scripts will be executed from. For example, the base directory could be /OldRepository/PISCES_Data/"date". The command would be:

% cd /OldRepository/PISCES_Data/20110908

The scripts themselves are in a subdirectory of the base directory, for example in the directory /OldRepository/PISCES_Data/20110908/scripts. Scripts should have the suffix .obs.

The observing scripts are executed by routine written in IDL, so start IDL:
% idl

To "connect" to the IIF to send requests, you must execute the commands:
IDL> agw_set_station, PISCES
IDL> iif_register

At the beginning of the night, to set up the saving of Pisces images with the correct date in the name and reset the counter to 0, execute the command:
IDL> pisces_set_archive
This should only be executed once a night, at the beginning of the night. If this command is executed more than once a night, the counter will be reset and Pisces files will be overwritten in /newdata.

The IDL routine that executes the observing script is observe.pro. The definition of this routine is:
  • pro observe, filename, logname, obs, retval, ACQUIRE=acquire, DEBUG=debug, TEST=test, SEND=send, $ NO_CAMERA=no_camera, NO_TCS=no_tcs, START=start, STOP=stop, OPEN=open
Flag Description
/ACQUIRE Send an Acquire preset with the rotator in IDLE mode
/DEBUG Print out debug information as the observe script is executing
/TEST Put in full test mode. No commands are sent to TCS or Pisces
/SEND Send commands to TCS and Pisces, if they are not in test mode
/NO_CAMERA Do not send any commands to Pisces
/NO_TCS Do not send any commands to the TCS
START=3 Start the script at the 3rd executable command
STOP=5 Stop executing the script at the 5th executable command
/OPEN AO system will be in Open loop, so don't warn the observer

To execute a specific script, you can enter the name of the script on the command line. If you are in the base directory and the script you wish to execute is 'test.obs' (with the full path name /OldRepository/PISCES_Data/20110908/scripts/test.obs) type
IDL> observe, 'test.obs', logname, obs, retval

If a filename is not given on the command line, the user will be prompted for a file:
IDL> observe

Available Observe Commands in Scripts

Observe Commands Required Flag Description
#     # Comment line
all comments must be before the other commands
header     Define required header information - must be the first command in the script
  DONE PARTNER ... PARTNER=ARIZONA
Defines which partner has access to these data in the LBT Archive: ARIZONA, LBTB, INAF, OSU, RC, COMMISSIONING, ALL, INAF_ARIZONA
  DONE OBSERVER ... OBSERVER='MILLER'
Note the SINGLE quotes around the PI's name
    OBJECT ... OBJECT='BS9107'
Note the SINGLE quotes around the object name
preset     Move the telescope to the given coordinates in the requested mode
  DONE OBJECT ... OBJECT=HD8799
Target name: There must exist a catalog file with the name HD8799.catalog
  DONE MODE ... MODE=ACE
Preset mode: TRACK, ACQUIRE, GUIDE, ACTIVE, ACE
  DONE GS ... GS=5
Guide star line number from the file "Target".catalog
    ROT ... ROT=ADI
Rotator mode: POSITION (moving = default), ADI (fixed), IDLE
    RS ... RS=1
AO reference star number from the file "Target".catalog
    PA ... PA=90.
Position angle for observation. Default is 0.0 deg (North Up)
    TS ... TS=3
Target star line number from the file "Target".catalog. The default is 0
    GCS ... GCS=TRACK
GCS Mode: TRACK, GUIDE, ACTIVE. GUIDE should be used if a Guide star is not available. The default is ACTIVE
manual_collimate     Collimate with Active Optics, one iteration at a time
auto_collimate     Collimate with Active Optics until the wavefront error is below a set amount
set_position     Set the current target position on Pisces to be 0,0. All offsets and dithers will be from this position
(essential for ADI scripts in TRACK mode)
pause     Pause this Observing script until the users pressed OK on the popup box
runao     Request AO Closed Loop
    CHECK ... /CHECK
Run CheckRefAO rather than the default AcquireRefAO
camera     Set Pisces camera parameters
  DONE EXP ... EXP=10.0
The exposure time in seconds
  DONE FRAMES ... FRAMES=5
The number of images to acquire each with the exposure given (5 files written)
Do not use a very large number of FRAMES because once PISCES starts taking them there is no way to stop.
  DONE FILTER ... FILTER=3
PISCES filter number: List in the table below
    COADDS ... COADDS=1
Number of coadds (images to average) each with the exposure time given (one file written)
getimage     Acquire a Pisces image and save it in the Repository
    IMAGE ... IMAGE=SKY
Add keyword IMAGETYP to the image header: DARK, SKY, SCIENCE, FLAT_DOME, FLAT_SKY, CALIBRATION, STANDARD
dither     Execute a dither pattern, taken images at each position
  DONE COORD ... COORD=RADEC
Set offset type for this dither pattern: RADEC, AZALT (future), DETXY, GALACTIC (future)
  DONE TYPE ... TYPE=BOX
The type of dither pattern to use: LIST, BOX.
If LIST then a list must follow on the next line.
If BOX then the SIZE and DIST flags are needed
  DONE InformationTechnologyER ... InformationTechnologyER=3
Number of times to cycle through the dither pattern
    SIZE ... SIZE=2
The dithering pattern: 1 = Two positions, 2 = Dice-Five pattern, 3 = 3x3 pattern
  DONE IMAGE ... IMAGE=SKY
Add keyword IMAGETYP to the image header: DARK, SKY, SCIENCE, FLAT_DOME, FLAT_SKY, CALIBRATION, STANDARD
    DIST ... DIST=5.0 Distance in X/Y or Ra/Dec in arcsec to offset from the center position
offset     Offset the telescope
  DONE COORD ... COORD=RADEC
Coordinate system for offset.
If RADEC then RA and DEC flags required.
If DETXY then X and Y flags required
    RA ... RA=5.0
Absolute offset in Right Ascension (arcsec)
    DEC ... DEC=10.0
Absolute offset in Declination (arcsec)
    X ... X=2.0
Absolute offset in Detector X (arcsec)
+X is up on the PISCES image
    Y ... Y= 0.0
Absolute offset in Detector Y (arcsec)
+Y is left on the PISCES image
    ROT ... ROT=30.0
Absolute offset of position angle from the preset value (degrees)

Pisces Filters

# filter encoder#
0 2.14 um 105
1 H2 2.12 um 205
2 open 305
3 dark 405
4 J 505
5 Ks 605
6 H 705
7 Br-g 2.16 um 805
8 [FeII] 1.64 um 905
9 2.086 um 005

Predicting Position Angles for scripts to keep PISCES upright

pisces_position_angle, TARGET, /DEBUG
gives POSANGLE for POSITION MODE

pisces_adi_angle, TARGET,/DEBUG
gives POSANGLE for ADI/PARALLACTIC MODE

Example Observe Scripts

Test Observe Script
# Test of observing script
# 21Jun2011  DLM
preset, OBJECT=BS9177, MODE=ace, GS=3, RS=0, PA=90
auto_collimate
runao
camera, EXP=1.0, FRAMES=10, COADDS=1, FILTER=6
offset, COORD=detxy, X=-2.0, Y=2
getimage, TYPE=SCIENCE
offset, COORD=radec, RA=30, DEC=0
getimage, TYPE=SKY
pause
camera, EXP=1.0, FRAMES=2, COADDS=1, FILTER=6
dither, COORD=detxy, TYPE=box, SIZE=1, DIST=1.0, ITER=3
dither, COORD=radec, TYPE=box, SIZE=2, DIST=1.0, ITER=1
dither, TYPE=list, COORD=detxy, ITER=1
        LIST, START
        LIST, 1.0, 2.0
        LIST, -1.0, -3.0
        LIST, -10.4, 20.0
        LIST, END
dither, COORD=detxy, TYPE=box, SIZE=3, DIST=1.0, ITER=1

Real Observe Script
# Observing script for Mkn231
# 22June2011  DLM
preset, OBJECT=SDT_Mkn231, MODE=ace, GS=2, RS=0, PA=-45
auto_collimate
runao
set_position
camera, EXP=1.0, FRAMES=1, COADDS=1, FILTER=5
dither, TYPE=list, COORD=detxy, ITER=1
        LIST, START
        LIST,    0.00,     0.00  
        LIST,    2.64,     2.72  
        LIST,    0.98,    -0.87  
        LIST,  -40.00,    -4.00  
        LIST,  -37.36,     2.72  
        LIST,  -39.02,    -0.87  
        LIST, END

ADI Script
#  Beta Script ADI Pisces AO
#  Ks filter
header, PARTNER=ARIZONA, OBSERVER='Hill', OBJECT='HD119214'
preset, OBJECT=AO459, MODE=ace, ROT=ADI, GS=3, RS=0, PA=-65
runao
set_position
camera, EXP=2, FRAMES=20, COADDS=1, FILTER=5
getimage, IMAGE=SCIENCE
getimage, IMAGE=SCIENCE
getimage, IMAGE=SCIENCE
getimage, IMAGE=SCIENCE
getimage, IMAGE=SCIENCE
getimage, IMAGE=SCIENCE
getimage, IMAGE=SCIENCE
getimage, IMAGE=SCIENCE
getimage, IMAGE=SCIENCE
getimage, IMAGE=SCIENCE

-- DougMiller - 07 Sep 2011
Topic revision: r17 - 25 Jul 2014, DouglasFisher
This site is powered by FoswikiCopyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding Foswiki? Send feedback