The Holton Utilities


User start-up

Alignment Tools Data Collection Tools Data Archiving Tools Diagnostic Tools Visualization Tools Building Blocks
  • blmotor.com
  • This is a little jiffy for talking to devices in the "beamline" (everything up to the shutter).  You can use this to get motor positons and gauge readings and to command motors to move to new values.
    usage: blmotor.com Motor [destination]
    where:
    Motor        is the motor or gauge name you are interested in
    destination  is where you want it to go
    example: blmotor.com Mono eV
    returns: Mono eV is now at 11271.2
    will report the current photon energy setting.
    example: blmotor.com Iend
    returns: Iend is now at 78.476
    will report the current signal on the "Iend" channel.  This is usually the photodiode.
    example: blmotor.com Mono eV 12398.42
    returns: Mono eV is now at 12398.4
    will move the photon energy to 12398.42 eV.  The final "report" line will only appear once the motor has actually stopped moving.  The exit status will be non-zero if the motor did not arrive at it's destination.  This is usually because the frontend computer is in "Local control" mode.

    Caveats:
    blmotor.com will sometimes misreport a failed move if the motor is already close to 0.
     

  • fluorescence.com
  • reports the number of photons to hit the fluorescence detector for a given interval.  It will open and close the shutter at the appropriate moments to do this.
    usage: fluorescence.com [time]
    where:
    time   is the count time in seconds
    example: fluorescence.com 0.5
    returns: 12345 fluorescent photons were counted in 0.5 s.
    Make sure you use scintilator.com to insert the fluorescence detector first.
     
  • scintilator.com
  • report or change the fluorescence detector position.
    usage: scintilator.com [in|out]
    example: scintilator.com
    returns: scintilator is out
    example: scintilator.com in
    returns: scintilator is in
    Where "in" is when the scintillator is close to the beam and "out" is when it is far away from the beam.  The command will return the prompt once the plunger has finished moving.  A non-zero exit $status means that the plunger failed to move to the desired position.
    scintilator.com is used by optimize_fluorescence.com and scan.com to insert the fluorescence detector.

     
  • shutter.com
  • report or change the fast shutter position.  (That is: last shutter in the beamline)
    usage: shutter.com [open|close]
    example: shutter.com
    returns: shutter is open
    example: shutter.com close
    returns: shutter is closed
    Where "open" is when the shutter is allowing the beam to pass and "closed" is when it is not (in case there was any confusion).  The command will return the prompt once the shutter has finished moving.  A non-zero exit $status means that the shutter failed to move to the desired position.
     
     
  • diode.com
  • report or change the PIN diode plunger position.
    usage: diode.com [in|out]
    example: diode.com
    returns: diode is out
    example: diode.com in
    returns: diode is in
    Where "in" is when the diode is reading to the beam intensity and "out" is when it is far away from the beam.  The command will return the prompt once the plunger has finished moving.  A non-zero exit $status means that the plunger failed to move to the desired position.

    Tip script:
    diode.com in
    if($status) then
        echo "diode failed to extend"
        echo "air pressure might be too low "
    endif
     

    diode.com is used by tuneup.com , tune_M2.com and tune_chi2.com to insert the fluorescence detector.

     

     

  • cover.com
  • report or change the position of the detector's protective cover.
    usage: cover.com [on|off]
    example: cover.com
    returns: cover is off
    example: cover.com on
    returns: cover is on
    Where "on" is when the detector is protected and "off" is when it is not.  The command will return the prompt once the plunger has finished moving.  A non-zero exit $status means that the plunger failed to move to the desired position.

    Tip script:
    # excercise the detector cover
    while(1) then
        cover.com on
        if($status) echo "ERROR: cover failed to close"
        cover.com off
        if($status) echo "ERROR: cover failed to come off"
    endif
     

  • door.com
  • report the condition of the hutch door and tray table.  Also get/set the hutch door lock status.
    usage: door.com [lock|unlock]
    example: door.com
    returns: hutch door is closed and locked
    example: door.com unlock
    returns: hutch door is closed and unlocked
    This is useful for diagnostics from home.  If the tray table is not put away properly, the door will register as "open".  You can also use door.com to unlock the hutch door when it undesireably locked.  (such as when you want to adjust the light).

    Caveat:
    door.com will not work on 8.2.x because dcss_adapter does not support this functionality.
     
     

  • attenuator.com
  • report or change foil plunger positions.
    usage: attenuator.com [Ee] [in|out]
    example: attenuator.com
    returns: Al foil is out
    example: attenuator.com Se
    returns: Se foil is in
    example: attenuator.com Se out
    returns: Se foil is out
    Where "in" is when the metal foil is blocking the beam and "out" is when it is far away from the beam.  The default foil is "Al" but you can specify another one on the command line.  The command will return the prompt once the plunger has finished moving.  A non-zero exit $status means that the plunger failed to move to the desired position.

    Tip script:
    # recover from fluorescence scan
    attenuator.com Al out
    attenuator.com Se out
    attenuator.com Cu out
    divergence.com 2 0.35
     
     

  • sample.com
  • report or change the crystal position.  All distances are in millimeters.
    usage: sample.com [x y z]
    where:
    x   is the distance to move in the direction of the x-ray beam
    y   is the distance to move in the direction of gravity (down)
    z   is the distance to move in the spindle direction (right-hand-rule)
    or:   sample.com to [x y z]
    to  implies that (x,y,z) is an absolute positon of the three sample motors
    x   is the desired position of the first sample motor
    y   is the desired position of the second sample motor
    z   is the desired position of the third sample motor
    example: sample.com
    returns: sample motors are now -0.623 -0.357 2.088
    example: sample.com 0 0.1 0
    returns: sample motors are now -0.722 -0.373 2.088
    example: sample.com to -0.623 -0.357 2.088
    returns: sample motors are now -0.623 -0.357 2.088
    Note in the second example that the relative move "down" by 100 microns changed both the x and y motors.  This is because relative moves are done in the lab frame (x-ray beam, gravity, and spindle axis) and the motor moves are calculated with the current value of phi rotation in mind.  This way, you can use the x coordinate to focus the sample in the mircoscope.  Note: this script does work for the kinematic stage in 8.2.2.

    On the other hand, absolute moves are done in the goniometer frame because you almost always want to return to a particular setting and you don't really care where the goniometer "origin" is with respect to the sample.  (In the past the absolute move was calculated with a give phi value, but the "origin" of the sample position would change with phi.  Many disasters convinced me to make the absolute moves phi-independent.)

    Tip script:
    # take diffraction images of different parts of the crystal
    set start = `sample.com | awk '{print $5,$6,$7}'`
    foreach shift ( "0 0" "0.1 0" "-0.2 0" "0.1 0.1" "0 -0.2" )
    snapshot.com
    snap.com -mark -nodisplay
    sample.com 0 $shift
    end
    sample.com to $start
     
     

  • stage.com
  • report or change the position of the collimator/backstop vertical stage.  All distances are in millimeters.
    usage: stage.com [to|by] [y]
    or:    stage.com [up|low|down|save|zero]
    where:
    to   implies that y is an absolute positon of the vertical stage motor [default]
    by   implies that y is a relative move of the vertical stage motor
    y    is the desired distance in millimeters
    up   implies an absolute move to put the pinhole in the beam
    low  implies an absolute move to drop the stage to 1 inch below the beam
    down implies an absolute move to drop the stage all the way down
    save saves the current position as "up"
    zero saves the current position as "up"
    example: stage.com up
    returns: stage position is now -0.240 mm
    example: stage.com 0
    returns: stage position is now 0.000 mm
    example: stage.com low
    returns: stage postion is now -30.000 mm
    The "low" position is where the low-mag camera just barely clears the pinhole.  This optimally positions the backlight foam in 8.3.1 for the low-mag camera.

    Caveats:
    the "up" position can be unreliable on 8.2.# because dcss_adapter does not provide information on the currently-stored "in" position.
     
     

  • hstage.com
  • report or change the position of the collimator/backstop vertical stage.  All distances are in millimeters.
    usage: hstage.com [to|by] [y]
    where:
    to   implies that y is an absolute positon of the horizontal stage motor [default]
    by   implies that y is a relative move of the horizontal stage motor
    y    is the desired distance in millimeters
    example: hstage.com
    returns: horizontal position is now 0.123 mm
    example: hstage.com 0
    returns: horizontal position is now 0.000 mm
     
  • distance.com
  • report or change the sample-to-detector distance.  All distances are in millimeters.
    usage: distance.com [to|by] [x]
    where:
    to   implies that x is an absolute detector distance [default]
    by   implies that x is a relative move of the detector distance [why?]
    x    is the desired distance in millimeters
    example: distance.com
    returns: detector distance is now 250.0 mm
    example: distance.com 600
    returns: detector distance is now 600.0 mm
    example: distance.com 2000
    returns: detector distance is now 600.0 mm
    Note that ridiculous values are filtered out.  However, none of these scripts have access to limits-of-travel information.  They all rely on DCSS, dcss_adapter, or the PMACs to prevent collisions.
     
     
  • twotheta.com
  • report or change the detector 2theta angle in degrees.
    usage: twotheta.com [to|by] [x]
    where:
    to   implies that x is an absolute detector angle [default]
    by   implies that x is a relative move of the detector angle [why?]
    x    is the desired angle in degrees
    example: twotheta.com
    returns: detector 2theta is now 0.0 deg
    example: twotheta.com 10
    returns: detector 2theta is now 10.0 deg
    An attempt is made to keep the distance constant during the 2theta move, but it is not gaurenteed.
     
     
  • beamstop.com
  • report or change the position of the backstop stage.  All distances are in millimeters.
    usage: beamstop.com [to|by] [right] [up]
    where:
    to    implies a move to an absolute motor positon
    by    implies a relative move of the backstop motors [default]
    right is the desired horizontal distance in millimeters
    up    is the desired vertical distance in millimeters
    example: beamstop.com
    returns: beamstop motors are now -1.465 2.673
    example: beamstop.com 0.01 -0.02
    returns: beamstop motors are now -1.455 2.653
    The second example will move the beamstop ten microns to the right and twenty microns down (looking at the detector image in ADXV).  Likewise, "negative right" is left.  In practice, one should bear in mind that the beamstop is only about 0.3 mm wide, and moves should always be smaller than that.  I recommend 0.01 or 0.02 mm moves at a time.

    Caveats:
    Picomotors are not exactly reversible, so the absolute moves should not be trusted too much.
    beamstop.com is currently only calibrated for the orthogonal stage in 8.3.1.  The NewFocus stages in 8.2.# will not respond as expected!


     
  • wave.com
  • report or change the sample-to-detector distance.  All distances are in millimeters.
    usage: wave.com [energy|wavelength|Ee|element]
    where:
    energy     is the desired photon energy (in eV)
    wavelength is the desired x-ray wavelength (in Angstroms)
    Ee         is the element symbol of the desired edge
    Element    is the element name of the desired edge
    example: wave.com
    returns: Energy: 11271.282 eV
             Wavelength: 1.10000 A
    example: wave.com 1
    returns: Energy: 12398.424 eV
             Wavelength: 1.00000 A
    example: wave.com Se
    returns: Energy: 12660.000 eV
             Wavelength: 0.97934 A
    Numerical values less that 3 are considered wavelengths.  Numerical values between 3 and 1000 are ignored.  If an element symbol or name is provided, then the lowest-energy accessible edge of that element is used.  This is almost always what you want to use for MAD.  The elements utility is used to list the edges.

     
     
  • divergence.com
  • report or change the position of the slits that control the convergance angle of the x-ray beam.  This becomes divergence after the sample position.  These angles are in miliradians.
    usage: divergence.com [horizontal] [vertical]
    where:
    horizontal is the desired horizontal divergence in mrad (millimeters/meter)
    vertical   is the desired vertical divergence in mrad (millimeters/meter)
    example: divergence.com
    returns: Beam Divergance: 3.0000 0.3498
    example: divergence.com 2
    returns: moving slits to 2 x 0.349782 mrad.......
             Beam Divergance: 2.0000 0.3498
    Note that you don't have to specify the vertical divergence angle.
     
  • light.com
  • report or change the intensity of the frontlight and backlight.
    usage: light.com [light] [intensity%]
    example: light.com
    returns: light #1 is at: 100%
             light #2 is at: 0%
    example: light.com 2 50%
    returns: light #1 is at: 100%
             light #2 is at: 50%

    This is useful adjusting the light levels in automated scripts.  For example, you want to make sure the light is turned off before finding the beam spot in find_beam.com and you want to make sure it is turned on before centering the crystal in center.com.

    Caveat:
    light.com will not work on 8.2.x because dcss_adapter does not support this functionality.
     
     

  • beamline.com
  • This program simply reports what beamline you are currently controlling.  (This may not be obvious if you are on the bl82c machine), however, the script is smart enough to see if you ssh-ed in from bl821c or the like and can almost always figure out which beamline is the appropriate one to control.  beamline.com is mainly used by other control scripts to decide what hostnames to talk to, etc, but you can run it by hand to check.  You can override any automatic beamline detection by setting the environment variable: "beamline"
    usage: beamline.com
    example: beamline.com
    returns: 821
    This means any other commands you type will try to control devices in 8.2.1.
    example: setenv beamline 822
             beamline.com
    returns: 822
    Any commands you type from here on out will apply to 8.2.2, and not 8.2.1.
     
     
  • beam.com
  • This program reports the currently-stored beam coordinates in the current video channel.  The numbers used are in fractional coordinates (range [0:1]) to avoid confusion about how many pixels were in the video image.  The first coordinate is right->left and the second in top->bottom on the video screen.
    usage: beam.com [camera] [newx newy]
    example: beam.com
    returns: beam center in camera 1 is 0.5115 0.4692
    example: beam.com 2
    returns: beam center in camera 2 is 0.502841 0.45

    example: beam.com 0.5 0.5
    returns: updated beam center in database.
             you must restart DCS for changes to take effect.
             beam center in camera 1 is 0.5 0.5

    This utility is used by find_beam.com in order to update the various programs about the beam position once the beam position is found automatically.

    Caveat:
    As indicated above, MCF/DCS must be restarted before it will update the beam crosshairs in the display.  BLU-ICE will update it immediately.
     
     

  • fov.com
  • This program reports the field of view (in mm) of the current video channel. This number is independent of how many pixels were used to sample the video.  The first coordinate is the actual right->left size (in mm) and the second is the actual top->bottom size (in mm) of the image on the video screen.  Negative numbers indicate mirror flips.
    usage: fov.com [camera]
    example: fov.com
    returns: field of view in camera 1 is 0.586 -0.461
    example: fov.com 2
    returns: field of view in camera 2 is 4.365 3.285

    This utility is used to relate the video image to motor moves by various image-iterpretation programs when generating moves for the sample.
     


    Nuts 'n' Bolts

  • sock_exchange.tcl
  • is basically a hands-off version of telnet.  The unix "standard input" is sent to the remote computer and whatever comes back from the remote computer goes to "standard output".  Command-line options are used to specify which computer, which port, etc.  An error code is set in the $status varible if anything goes wrong with the transation.
    usage: echo "command" | sock_exchange.tcl computername port lines terminator timeout
    where:
    command       is the text you want to send to the remote computer
    computername  is the name of the remote computer to connect to (default: localhost)
    port          is the TCP port to connect on (default: 80)
    lines         the number of lines you expect back in the reply (default: infinite)
    terminator    the character sequence used to mark the end of a "line" (default: "\n")
    timeout       number of seconds to wait for the reply before giving up (default: 30)
    example: echo "GET /\r" | sock_exchange.tcl www.als.lbl.gov
    returns: the html source of the ALS home page
    example: echo -n "M412=1\rM411=1\r" | sock_exchange.tcl pmac-0 14001 2 "\006" 10
    returns: two PMAC acknowlege characters: "\006\006"
             and opens the x-ray shutter
             if the PMAC doesn't respond it ten seconds, $status will be set to 9
    example: echo "getpos Iend\r" | sock_exchange.tcl bl821b 10001 1
    returns: "76.370239!0\r\n" which is the diode current on 8.2.1
  • xos_exchange.tcl
  •  
    is like sock_exchange.tcl, but is specifically designed to deal with the BLU-ICE/DCSS communication protocol (version 1.0).  This protocol exchanges messages to move motors, etc as 200-byte strings.  It can get a little unweildly to do this with sock_exchange.tcl.
    usage: echo "gtos_command" | xos_exchange.tcl computername lines keytext timeout
    where:
    command       is the text you want to send to the remote computer
    computername  is the name of the remote computer to connect to (default: localhost)
    lines         the number of "interesting lines" you expect back in the reply (default: infinite)
    keytext       a character sequence contained by an "interesting line" (default: nothing)
    timeout       number of seconds to wait for the reply before giving up (default: 30)
    example: echo "gtos_set_shutter_state shutter open" | xos_exchange.tcl bl821c 1 "shutter shutter" 10
       will: open the x-ray shutter and exit when it sees that the shutter state has changed.
    returns: 
    stoc_send_client_type
    stog_update_client_list 1
    stog_update_client "alias" "555-5555" "Presidente" 1
    stog_become_slave
    stog_become_master
    stog_configure_shutter shutter hardwareHost registerName 1 1 shutterType description open
    stog_configure_real_motor gonio_phi hardwareHost hardwareName 179.807318 0 0 1 0 0 0 0 0 0 0 0 0
    stog_configure_real_motor sample_x hardwareHost hardwareName -482.878125 0 0 1 0 0 0 0 0 0 0 0 0
    stog_configure_real_motor sample_y hardwareHost hardwareName 345.030014 0 0 1 0 0 0 0 0 0 0 0 0
    stog_configure_real_motor sample_z hardwareHost hardwareName -4603.081841 0 0 1 0 0 0 0 0 0 0 0 0
    stog_configure_real_motor horizontal_collimator hardwareHost hardwareName -2.500000 0 0 1 0 0 0 0 0 0 0 0 0
    stog_configure_real_motor vertical_collimator hardwareHost hardwareName 0.000000 0 0 1 0 0 0 0 0 0 0 0 0
    stog_configure_real_motor detector_z hardwareHost hardwareName 301.001000 1000 90 1 0 0 0 0 0 0 0 0 0
    stog_configure_real_motor detector_2theta hardwareHost hardwareName -0.001213 20 0 1 0 0 0 0 0 0 0 0 0
    stog_configure_real_motor energy hardwareHost hardwareName 12681.058987 18000 2400 1 0 0 0 0 0 0 0 0 0
    stog_configure_runs 0 -1 0
    stog_configure_run_text run0 0 test /data/dcsuser
    stog_configure_run run0 0.000000 1 0 1 1.000000 1.000000 243.000531 0 4 0 0.000000 0 e0 e1 e2 e3 e4 1 0.000000 0.000000 0.000000 0.000000 0.000000
    stog_configure_crystal_alignment crystal_alignment 131.243.74.112 16283 173 107 1.700000 -1.900000 2 0 2 99 54
    stog_configure_shutter Al hardwareHost registerName 1 1 attenuator description open
    stog_configure_shutter Cu hardwareHost registerName 1 1 attenuator description open
    stog_configure_shutter Se hardwareHost registerName 1 1 attenuator description open
    stog_configure_bistable Diode extended retracted retracted
    stog_configure_bistable xtal_illum extended retracted extended
    stog_configure_bistable Fluorescence in out out
    stog_configure_bistable Det Cover out in out
    stog_set_shutter_state shutter open
    Which is a lot of information, but you don't have to look at it.  You can just "grep" or "awk" for interesting things.
    example: echo "gtos_set_shutter_state shutter open" |\
             xos_exchange.tcl bl821c 1 "shutter shutter" 10 |\
             grep "shutter_state shutter"
       will: open the x-ray shutter and exit when it sees that the shutter state has changed.
    returns: 
    stog_set_shutter_state shutter open


    xos3_exchange.tcl
    is functionally equivalent to xos_exchange.tcl except that it speaks the BLU-ICE/DCS protocol version 3.0.  This protocol is a bit more elaborate and requires a challenge-response authentication for each connection.  Therefore, xos3_echange.tcl requres the DCSS 3.0 authentication libraries.  Other than the setup, the usage is basically the same as xos_exchange.tcl:
     

    usage: echo "gtos_command" | xos3_exchange.tcl lines keytext timeout computername
    where:
    command       is the text you want to send to the remote computer
    computername  is the name of the remote computer to connect to (default: server)
    lines         the number of "interesting lines" you expect back in the reply (default: infinite)
    keytext       a character sequence contained by an "interesting line" (default: nothing)
    timeout       number of seconds to wait for the reply before giving up (default: 30)
    example: echo "gtos_set_shutter_state shutter open" | xos_exchange.tcl 1 "shutter shutter" 10
       will: open the x-ray shutter and
    returns:
    stoc_send_client_type
    stog_respond_to_challenge
    stog_login_complete 5366
    stog_set_permission_level 5
    stog_configure_hardware_host simDhs localhost online
    stog_configure_hardware_host pmac1 bl831.als.lbl.gov online
    stog_configure_hardware_host pmac2 bl831.als.lbl.gov online
    stog_configure_hardware_host wago bl831.als.lbl.gov online
    stog_configure_hardware_host beamline bl831.als.lbl.gov online
    stog_configure_hardware_host self localhost online
    stog_configure_hardware_host camera sbdr.lbl.gov offline
    stog_configure_hardware_host detector bl831.als.lbl.gov online
    stog_configure_pseudo_motor camera_zoom self camera_zoom 1.000000 1.100000 -0.100000 100 0 0 0
    stog_configure_operation detector_collect_image detector masterOnly
    stog_configure_operation detector_transfer_image detector masterOnly
    stog_configure_operation detector_oscillation_ready detector masterOnly
    stog_configure_operation detector_stop detector masterOnly
    stog_update_client_list 5
    stog_update_client 1 self {DCSS} {} {} 4 blctlxx blctlxx:0 0
    stog_configure_operation collectFrame self masterOnly
    stog_configure_operation detector_reset_run detector masterOnly
    stog_configure_operation resetRuns self masterOnly
    stog_configure_operation collectStillImage self masterOnly
    stog_configure_operation collectRun self masterOnly
    stog_configure_operation collectRuns self masterOnly
    stog_configure_operation pauseDataCollection self masterOnly
    stog_update_client 2 mcfuser {mcfuser} {486-4587} {clod} 5 sbdr sbdr.lbl.gov:0 0
    stog_update_client 3 mcfuser {mcfuser} {486-4587} {clod} 5 sbdr sbdr.lbl.gov:0 0
    stog_update_client 3446 mcfuser {mcfuser} {486-4587} {clod} 5 graphics1.bl831.als.lbl.gov :0 1
    stog_update_client 5366 jamesh {James Holton} {486-4587} {super sr. beamline scientist} 5 bl831 bl831.als.lbl.gov:0 0
    stog_configure_real_motor detector_z pmac1 detector_z 350.000000 1000.500000 76.500000 1000.000000 20000 1 -1 0 0 0 1 1 0
    stog_configure_pseudo_motor detector_horz self standardVirtualMotor -2.221170 100.000000 -100.000000 1 1 0 0
    stog_configure_pseudo_motor detector_vert self standardVirtualMotor 8.718170 500.000000 -500.000000 1 1 0 0
    stog_configure_real_motor detector_twotheta pmac1 detector_twotheta 0.000000 42.400000 -4.400000 2494.000000 500 50 0 0 0 0 0 1 0
    stog_configure_real_motor horizontal_collimator pmac1 horizontal_collimator -0.156200 -0.500500 0.500500 2000.000000 6000 100 875 0 0 0 0 0 0
    stog_configure_real_motor vertical_collimator pmac1 vertical_collimator -0.234300 9.499600 -194.000400 2000.000000 40000 100 875 0 0 0 0 0 0
    stog_configure_real_motor beamstop_horiz pmac1 beamstop_horiz -1.477200 -0.500000 0.500000 -50000.000000 900 100 0 0 0 0 0 1 0
    stog_configure_real_motor beamstop_vert pmac1 beamstop_vert 2.721000 -0.500000 0.500000 -143000.000000 900 100 0 0 0 0 0 1 0
    stog_configure_real_motor gonio_phi pmac2 gonio_phi 231.980000 0.000000 0.000000 8385.000000 9000000 2500 0 0 0 0 0 1 0
    stog_configure_real_motor sample_x pmac2 sample_x -0.745000 0.000000 0.000000 16968.000000 6000 500 0 0 0 0 0 0 0
    stog_configure_real_motor sample_y pmac2 sample_y 0.430000 0.000000 0.000000 16968.000000 6000 500 875 0 0 0 0 0 0
    stog_configure_real_motor sample_z pmac2 sample_z -2.580000 0.000000 0.000000 16968.000000 10000 100 875 0 0 0 0 0 0
    stog_configure_pseudo_motor beam_size_x self beam_size_x 0.801732 20.000000 0.050000 0 0 0 0
    stog_configure_pseudo_motor beam_size_y self beam_size_y 0.222450 20.000000 0.050000 0 0 0 0
    stog_configure_shutter shutter pmac2 open
    stog_configure_shutter Al wago open
    stog_configure_shutter Cu wago open
    stog_configure_shutter Se wago open
    stog_configure_shutter diode wago open
    stog_configure_shutter polarizer wago open
    stog_configure_shutter scintillator wago open
    stog_configure_shutter cover wago open
    stog_configure_shutter door pmac1 closed
    stog_configure_shutter door_lock pmac1 open
    stog_configure_real_motor frontlight wago frontlight 96.000000 100.000000 -100.000000 1.000000 2000 100 0 0 0 0 0 0 0
    stog_configure_real_motor backlight wago backlight 0.000000 100.000000 -100.000000 17500.000000 2000 100 875 0 0 0 0 0 0
    stog_configure_pseudo_motor energy self energy_bl11 12000.012365 17000.000000 2000.000000 0 0 0 0
    stog_configure_real_motor energy_lv beamline energy_lv 11111.105411 20000.000000 2000.000000 1.000000 100000 1 0 0 1 0 0 0 0
    stog_configure_real_motor attenuator_lv beamline attenuator_lv 1.000000 100.000000 0.000000 1.000000 100000 1 0 0 0 0 0 0 0
    stog_configure_real_motor horizontal_divergence_lv beamline horizontal_divergence_lv 2.004948 3.500000 -1.000000 1.000000 100000 1 0 0 1 0 0 0 0
    stog_configure_real_motor vertical_divergence_lv beamline vertical_divergence_lv 0.349856 0.400000 -1.000000 1.000000 100000 1 0 0 1 0 0 0 0
    stog_configure_real_motor attenuation_lv beamline attenuation_lv 100.000000 0.000000 0.000000 1.000000 100000 1 0 0 0 0 0 0 0
    stog_configure_real_motor m2_tilt beamline m2_tilt 13377.000000 0.000000 0.000000 1.000000 100000 1 0 0 1 0 0 0 0
    stog_configure_real_motor chi2 beamline chi2 1.449514 0.000000 0.000000 1.000000 100000 1 0 0 1 0 0 0 0
    stog_configure_real_motor theta2 beamline theta2 1.390000 0.000000 0.000000 1.000000 100000 1 0 0 1 0 0 0 0
    stog_configure_real_motor m1_tilt beamline m1_tilt -42700.000000 0.000000 0.000000 1.000000 100000 1 0 0 1 0 0 0 0
    stog_configure_real_motor theta beamline theta 8.692675 0.000000 0.000000 1.000000 100000 1 0 0 1 0 0 0 0
    stog_configure_real_motor y2 beamline y2 3.499500 0.000000 0.000000 1.000000 100000 1 0 0 1 0 0 0 0
    stog_configure_real_motor z2 beamline z2 60.875400 0.000000 0.000000 1.000000 100000 1 0 0 1 0 0 0 0
    stog_configure_real_motor m2_bend_up beamline m2_bend_up 8.212171 100.000000 -100.000000 17500.000000 2000 100 875 0 0 0 0 0 0
    stog_configure_real_motor m2_bend_down beamline m2_bend_down 8.212171 100.000000 -100.000000 17500.000000 2000 100 875 0 0 0 0 0 0
    stog_configure_ion_chamber i0 beamline hex1 0 rtc1 clock
    stog_configure_ion_chamber i_in beamline hex1 0 rtc1 clock
    stog_configure_ion_chamber i1 simDhs hex1 1 rtc1 clock
    stog_configure_ion_chamber i2 simDhs hex1 2 rtc1 clock
    stog_configure_ion_chamber i_sample simDhs hex1 3 rtc1 clock
    stog_configure_ion_chamber i_beamstop simDhs hex1 4 rtc1 clock
    stog_configure_ion_chamber i5 simDhs hex1 5 rtc1 clock
    stog_configure_ion_chamber i_fluor pmac2 hex1 6 rtc1 clock
    stog_configure_ion_chamber i_mono_In beamline hex1 7 rtc1 clock
    stog_configure_ion_chamber i_mono_Out beamline hex1 8 rtc1 clock
    stog_configure_ion_chamber i_end beamline hex1 9 rtc1 clock
    stog_configure_runs 1 1 0 1
    stog_configure_run run0  complete 1 0  testytt1 /data/mcfuser 25 gonio_phi  184.01 185.01 1.00 1.0 15.0 350.000  1 11111.11 0 0 0 0  2 0
    stog_configure_run run1  collecting 46 1  test-Prset1 /data/mcfuser 25 gonio_phi  185.01 249.01 1.00 1.0 15.0 350.000  1 11111.11 0 0 0 0  2 0
    stog_configure_run run2   inactive  0 2  test /data/mcfuser 1 gonio_phi  0.00 1.00  1.00 1.0  1.0  300.000  1 11111.00 0 0 0 0  2  0
    stog_configure_run run3   inactive  0 3  test /data/mcfuser 1 gonio_phi  0.00 1.00  1.00 1.0  1.0  300.000  1 11111.00 0 0 0 0  2  0
    stog_configure_run run4   inactive  0 4  test /data/mcfuser 1 gonio_phi  0.00 1.00  1.00 1.0  1.0  300.000  1 11111.00 0 0 0 0  2  0
    stog_configure_run run5   inactive  0 5  test /data/mcfuser 1 gonio_phi  0.00 1.00  1.00 1.0  1.0  300.000  1 11111.00 0 0 0 0  2  0
    stog_configure_run run6   inactive  0 6  test /data/mcfuser 1 gonio_phi  0.00 1.00  1.00 1.0  1.0  300.000  1 11111.00 0 0 0 0  2  0
    stog_configure_run run7   inactive  0 7  test /data/mcfuser 1 gonio_phi  0.00 1.00  1.00 1.0  1.0  300.000  1 11111.00 0 0 0 0  2  0
    stog_configure_run run8   inactive  0 8  test /data/mcfuser 1 gonio_phi  0.00 1.00  1.00 1.0  1.0  300.000  1 11111.00 0 0 0 0  2  0
    stog_configure_run run9   inactive  0 9  test /data/mcfuser 1 gonio_phi  0.00 1.00  1.00 1.0  1.0  300.000  1 11111.00 0 0 0 0  2  0
    stog_configure_run run10  inactive  0 10 test /data/mcfuser 1 gonio_phi  0.00 1.00  1.00 1.0  1.0  300.000  1 11111.23 0 0 0 0  2  0
    stog_configure_run run11  inactive  0 11 test /data/mcfuser 1 gonio_phi  0.00 1.00  1.00 1.0  1.0  300.000  1 11111.00 0 0 0 0  2  0
    stog_configure_run run12  inactive  0 12 test /data/mcfuser 1 gonio_phi  0.00 1.00  1.00 1.0  1.0  300.000  1 11271.23 0 0 0 0  2  0
    stog_configure_run run13  inactive  0 13 test /data/mcfuser 1 gonio_phi  0.00 1.00  1.00 1.0  1.0  300.000  1 11271.23 0 0 0 0  2  0
    stog_configure_run run14  inactive  0 14 test /data/mcfuser 1 gonio_phi  0.00 1.00  1.00 1.0  1.0  300.000  1 11271.23 0 0 0 0  2  0
    stog_configure_run run15  inactive  0 15 test /data/mcfuser 1 gonio_phi  0.00 1.00  1.00 1.0  1.0  300.000  1 11271.23 0 0 0 0  2  0
    stog_configure_run run16  inactive  0 16 test /data/mcfuser 1 gonio_phi  0.00 1.00  1.00 1.0  1.0  300.000  1 11271.23 0 0 0 0  2  0
    stog_configure_operation initializeCamera camera masterOnly
    stog_configure_operation getLoopTip camera masterOnly
    stog_configure_operation centerLoop self masterOnly
    stog_configure_operation addImageToList camera masterOnly
    stog_configure_operation findBoundingBox camera masterOnly
    stog_configure_operation normalize self masterOnly
    stog_configure_operation expose self masterOnly
    stog_configure_operation oscillation self masterOnly
    stog_configure_operation requestExposureTime self masterOnly
    stog_configure_operation requestCollectedImage self passive
    stog_configure_operation optimize self masterOnly
    stog_configure_pseudo_motor energyOptimizeTolerance self standardVirtualMotor 0.050000 100.000000 -100.000000 1 1 0 0
    stog_configure_pseudo_motor energyOptimizeEnable self standardVirtualMotor 0.050000 100.000000 -100.000000 1 1 0 0
    stog_configure_pseudo_motor energyLastOptimizedTable self standardVirtualMotor 0.050000 100.000000 -100.000000 1 1 0 0
    stog_configure_pseudo_motor energyLastTimeOptimized self standardVirtualMotor 0.000000 100.000000 -100.000000 1 1 0 0
    stog_configure_pseudo_motor energyLastOptimized self standardVirtualMotor 12000.001736 100.000000 -100.000000 1 1 0 0
    stog_configure_pseudo_motor energyOptimizedTimeout self standardVirtualMotor 120.000000 100.000000 -100.000000 1 1 0 0
    stog_configure_pseudo_motor doseStoredCounts self standardVirtualMotor 186014348.800000 100.000000 -100.000000 1 1 0 0
    stog_configure_pseudo_motor doseLastCounts self standardVirtualMotor 159062934.600000 100.000000 -100.000000 1 1 0 0
    stog_configure_pseudo_motor doseStabilityRatio self standardVirtualMotor 0.050000 1000.000000 -1.000000 0 0 0 0
    stog_configure_pseudo_motor doseThreshold self standardVirtualMotor 200.000001 1000.000000 -1.000000 0 0 0 0
    stog_configure_pseudo_motor doseIntegrationPeriod self standardVirtualMotor 0.100000 1000.000000 -1.000000 0 0 0 0
    stog_configure_pseudo_motor maxOscTime self standardVirtualMotor 60.000000 1000.000000 -1.000000 0 0 0 0
    stog_configure_operation moveSample self masterOnly
    stog_configure_operation prepareForScan self masterOnly
    stog_configure_operation recoverFromScan self masterOnly
    stog_configure_operation acquireSpectrum simDhs masterOnly
    stog_configure_operation excitationScan self masterOnly
    stog_configure_pseudo_motor optimized_energy self optimized_energy_bl831 11111.105411 16000.000000 6000.000000 0 0 0 0
    stog_configure_pseudo_motor zoomMinScale self standardVirtualMotor 11.234016 100.000000 -100.000000 1 1 0 0
    stog_configure_pseudo_motor zoomMedScale self standardVirtualMotor 6.270053 100.000000 -100.000000 1 1 0 0
    stog_configure_pseudo_motor zoomMaxScale self standardVirtualMotor 2.937147 100.000000 -100.000000 1 1 0 0
    stog_configure_pseudo_motor zoomMinXAxis self standardVirtualMotor 0.511500 100.000000 -100.000000 1 1 0 0
    stog_configure_pseudo_motor zoomMinYAxis self standardVirtualMotor 0.469200 100.000000 -100.000000 1 1 0 0
    stog_configure_pseudo_motor zoomMedXAxis self standardVirtualMotor 0.500000 100.000000 -100.000000 1 1 0 0
    stog_configure_pseudo_motor zoomMedYAxis self standardVirtualMotor 0.500000 100.000000 -100.000000 1 1 0 0
    stog_configure_pseudo_motor zoomMaxXAxis self standardVirtualMotor 0.511500 100.000000 -100.000000 1 1 0 0
    stog_configure_pseudo_motor zoomMaxYAxis self standardVirtualMotor 0.469200 100.000000 -100.000000 1 1 0 0
    stog_configure_string stringTest self Hello

    stog_set_motor_dependency detector_z
    stog_set_motor_dependency detector_twotheta
    stog_set_motor_dependency horizontal_collimator
    stog_set_motor_dependency vertical_collimator
    stog_set_motor_dependency beamstop_horiz
    stog_set_motor_dependency beamstop_vert
    stog_set_motor_dependency gonio_phi
    stog_set_motor_dependency sample_x
    stog_set_motor_dependency sample_y
    stog_set_motor_dependency sample_z
    stog_set_motor_dependency frontlight
    stog_set_motor_dependency backlight
    stog_set_motor_dependency energy_lv
    stog_set_motor_dependency attenuator_lv
    stog_set_motor_dependency horizontal_divergence_lv
    stog_set_motor_dependency vertical_divergence_lv
    stog_set_motor_dependency attenuation_lv
    stog_set_motor_dependency m2_tilt
    stog_set_motor_dependency chi2
    stog_set_motor_dependency theta2
    stog_set_motor_dependency m1_tilt
    stog_set_motor_dependency theta
    stog_set_motor_dependency y2
    stog_set_motor_dependency z2
    stog_set_motor_dependency m2_bend_up
    stog_set_motor_dependency m2_bend_down
    stog_report_shutter_state shutter closed

    You can read about what all this stuff means in the DCSS Administration Manual.

    example: echo "gtos_set_shutter_state shutter open" |\
             xos3_exchange.tcl 1 "shutter shutter" 10 |\
             grep "shutter_state shutter"
       will: open the x-ray shutter and exit when it sees that the shutter state has changed.
    returns:
    stog_set_shutter_state shutter open

    Caveat:
    xos3_exchange.tcl will only work on 8.3.1 because it is the only ALS beamline with DCSS 3.0 installed.
     

    Conversion Tools

    This page is not finished. It will never be finished, and neither will yours. Admit it.
     
    James Holton <JMHolton@lbl.gov>