40m QIL Cryo_Lab CTN SUS_Lab TCS_Lab OMC_Lab CRIME_Lab FEA ENG_Labs OptContFac Mariner WBEEShop
  40m Log  Not logged in ELOG logo
Entry  Tue Jun 14 03:15:29 2011, Koji, HowTo, Computer Scripts / Programs, Kissel Button Generator kissel_button.png
    Reply  Wed Jun 15 00:50:11 2011, Koji, HowTo, Computer Scripts / Programs, Kissel Button Generator 
       Reply  Mon Oct 3 17:06:27 2011, Jenne, HowTo, Computer Scripts / Programs, Kissel Button Generator 
Message ID: 4813     Entry time: Tue Jun 14 03:15:29 2011     Reply to this: 4820
Author: Koji 
Type: HowTo 
Category: Computer Scripts / Programs 
Subject: Kissel Button Generator 

I have made a python script to generate the button designed by Jeff Kissel for his ISI screen.

It is currently located at the following location:
/cvs/cds/rtcds/caltech/c1/medm/c1lsc_tst/master/KisselButtonGenerator/generate_KisselButton.py
but should be relocated to somewhere appropriate.
It also uses fragmented medm files named "MATRIX*.adl_parts".

# Jamie, could you suggest the right place?

The parameters are assigned at the beggining of the script.
This script print the result to stdout. So you need to redirect the output into a file.
e.g.

> ./generate_KisselButton.py >tmp.adl

The script should be modified such that it accepts the command line options.
It needs more python learning for me.


# Number of the column
mat_h = 20;

# Number of the row
mat_v = 10;

# horizontal pixel size of the rectangular display for each matrix element
button_width = 8;

# vertical pixel size of the rectangular display for each matrix element
button_height = 8;

replace_dict = {
# Title
    '${DISPLAY_LABEL}':'ITMX_INMATRIX', 
# Path of the MEDM file to be open by clicking the button
    '${DISPLAY_NAME}':'/cvs/cds/rtcds/caltech/c1/medm/c1sus/master/C1SUS_ITMX_INMATRI
X_MASTER.adl',
# The channel name of the matrix element
# ($V and $H are replaced to the numbers i.e. "_3_4")
    '${MATRIX_CHAN}':'C1:SUS-ITMX_INMATRIX_$V_$H'
    };


 

Attachment 1: kissel_button.png  27 kB  Uploaded Tue Jun 14 04:26:54 2011  | Hide | Hide all
kissel_button.png
ELOG V3.1.3-