= Most of the info here is obsolete as of Jun 2021 = ## page was renamed from All Scripts . This page describes, or has links to descriptions of, all scripts used at the 40m. Find the [[Computers_and_Scripts/Locking_Scripts| Locking scripts]] here. . {{attachment:ninja.jpg}} || '''''Name of script''''' || '''''Computer where it lives''''' || '''''What it does ''''' || '''''Notes ''''' || ||<:-5> {{attachment:infrared.png}} '''''Category: IFO ''''' {{attachment:infrared.png}} || || [[#C1IFO_OPTICrestore.cmd|C1IFO_OPTICrestore.cmd]] (bash) || any machine {{{ medm/c1ifo/cmd/ }}} || restore the DC alignment of a suspension || usually called from C1IFO_CONFIGURE.adl|| || [[#C1IFO_OPTICmisalign.cmd|C1IFO_OPTICmisalign.cmd]] (bash) || any machine {{{ medm/c1ifo/cmd/ }}} || misalign a suspension || usually called from C1IFO_CONFIGURE.adl|| ||<:-5> {{attachment:infrared.png}} '''''Category: IOO ''''' {{attachment:infrared.png}} || || [[#PSLWatch|PSLWatch]] || op340m || Runs lockFSS, lockMZ, lockPMC when appropriate ||broken || || [[#autolockMCmain40m|autolockMCmain40m]] || op340m || watches the MC. Runs mcup and mcdown || || || [[#autolockMCmain40m|autolockMCmain40m_low_power]] || op340m || low power version of [[#autolockMCmain40m|autolockMCmain40m]] || For atmospheric pressure || || [[#FSSSlowServo|FSSSlowServo]] || op340m || Watches C1:PSL-FAST_MON and servos C1:PSL-SLOW_DC || || ||<:-5> {{attachment:infrared.png}} '''''Category: EPICS ''''' {{attachment:infrared.png}} || || [[#offset|offset]] (csh) || any machine in {{{scripts/LSC}}} || zeros offset of a given filter bank module || using ezcaservo || || [[#offset2|offset2]] (csh) || any machine in {{{scripts/LSC}}} || zeros offset of a given filter bank module l|| using tdsavg || || [[#blinky|blinky]] || anywhere || blinks a light if a script is alive || forked by mother script || || [[#RGAlogger|RGAlogger]] || op340m || gets data from RGA nightly || Runs as a cron job || || rsync.backup || fb40m || backup minute trend files and /cvs/cds/caltech to the archive in Powell-Booth || Runs as a cron job || || [[ndsproxy]] || nodus || Provides NDS access from off-site || || || [[EPICS_gateway]] || nodus || Provides DAQ channel access from off-site || || || [[#bobafett|bobafett]] || any || Useful for aligning suspended optics by hand || broken || || [[Computers_and_Scripts/statScreen]] || mafalda || Takes MEDM screen snapshots periodically || || ||<:-5> {{attachment:infrared.png}} '''''Category: LSC ''''' {{attachment:infrared.png}} || || [[#armLoss|armLoss]] (csh) || any machine in {{{scripts/LSC}}}|| measures visibility at ASDC when an arm is locked/unlocked and thus allows to estimate loss in the arm || || || [[#LSCoffsets|LSCoffsets]] (bash) || any machine in {{{scripts/LSC}}} || zeros all the LSC offsets || many error messageses|| || [[#orthogonality.py|orthogonality.py]] (python) || {{{ scripts/demphase }}} || measures the orthogonality of I and Q signal || || ||<:-5> {{attachment:infrared.png}} '''''Category: ASS ''''' {{attachment:infrared.png}} || || [[#assUpX(Y)arm|assUpX(Y)arm]] || {{{ scripts/ASS/X(Y)arm/}}}|| setup initial condition for X(Y)arm dither-alignment || || || [[#assonX(Y)arm|assonX(Y)arm]] || {{{ scripts/ASS/X(Y)arm/}}}|| start dither-alignment || || || [[#assDown|assDown]] || {{{ scripts/ASS/}}} || || || || [[#offloadX(X)armASSctrl|offloadX(X)armASSctrl]] || {{{ scripts/ASS}}}|| || || ||<:-5> {{attachment:infrared.png}} '''''Category: MCASS ''''' {{attachment:infrared.png}} || || [[#mcassUp|mcassUp]] (csh)|| {{{ scripts/ASS }}}|| restores MCASS settings|| || || [[#mcassOn|mcassOn]] (csh)|| {{{ scripts/ASS }}}|| turns ON the dithering || || || [[#mcassOff|mcassOff]] (csh)|| {{{ scripts/ASS }}}|| turns OFF the dithering|| || || [[#senseMCdecenter|senseMCdecenter]] (csh)|| {{{ scripts/ASS }}}|| measures the response of MCL demod signal to decentering|| many EPICS error messages|| || [[#senseMCmirror|senseMCmirror]] (csh)|| {{{ scripts/ASS }}}|| measures the response of MCL demod signal to mirror offsets || || || [[#senseMCdofs|senseMCdofs]] (csh) || {{{ scripts/ASS }}}|| measures response of DOF || not yet done || ||<:-5> {{attachment:infrared.png}} '''''Category: MEDM ''''' {{attachment:infrared.png}} || || [[#medmrun|medmrun]] (bash) || {{{scripts }}} || pop up a new window when a code is called from medm || very nice ! :) || ||[[#updatesnap|updatesnap]] (sh) || {{{scripts/MEDMsnapshots/ }}} || takes a snapshot of medm screens || usually available from any of the screens by pressing the yellow button || ||[[#generate_KisselButton.py|generate_KisselButton.py ]] (python) || {{{scripts/KisselButtonGenerator/ }}} || makes a nice matrix view || [[http://nodus.ligo.caltech.edu:8080/40m/4820|elog #4820]] || || [[#generate_PDscreens.py|generate_PDscreens.py]] (python) || {{{medm/c1lsc_txt/master/PD/ }}} || || /!\ ''' Move this to an appropriate place !!''' || || [[#generate_CHscreens.py|generate_CHscreens.py ]] (python) || {{{medm/c1lsc_txt/master/CHX/ }}} || || /!\ ''' Move this to an appropriate place !!''' || || [[#generate_FMscreens.py|generate_FMscreens.py ]] (python) || {{{medm/c1lsc_txt/master/fmX/ }}} || || /!\ ''' Move this to an appropriate place !!''' || ||<:-5> {{attachment:infrared.png}} '''''Category: MEDM/EPICS ''''' {{attachment:infrared.png}} || || [[#setTRAMP|setTRAMP]] (tcsh) || {{{scripts/general }}} || set all of the TRMAPs to a specific time in a model || newly made on 2011 May 5th || ||<:-5> {{attachment:infrared.png}} '''''Category: SUS ''''' {{attachment:infrared.png}} || || [[#opticshutdown|opticshutdown]] (bash) ||any machine in {{{ scripts/SUS/}}} || shutdown watchdogs for 5 hrs || useful for SUS diagnostic. || || [[#freeswing|freeswing]] (tcsh) || {{{ scripts/SUS}}}|| give a kick and leave an optic free swinging || || [[#F2P_LOCKIN.py|F2P_LOCKIN.py]] (python) || any machine in {{{ scripts/SUS/}}} || measures the F2P coefficients || requires python science packages (e.g. pylab, scilab, numpy) || || [[#peakfind|peakfind]] (matlab) || {{{ scripts/SUS/peakfind }}} || finds peaks in shadow sensor spectra || [[http://nodus.ligo.caltech.edu:8080/40m/4746|elog #4746]]|| || [[#Drift|Drift]] (matlab) || {{{ /cvs/cds/caltech/apps/mDV/extra/C1/ }}} || Monitors for amounts of suspensions drift || Is this still available ? || ||<:-5> {{attachment:infrared.png}} '''''Category: VIDEO ''''' {{attachment:infrared.png}} || || [[#videoswitch|videoswitch]] (python)|| any machine in {{{ scripts/general}}} || switches the video matrix || see also [[Electronics/VideoMUX| VideoMUX]] || ||<:-5> {{attachment:infrared.png}} '''''Category: CDS ''''' {{attachment:infrared.png}} || ||[[#daqconfig|daqconfig]] (wish)|| any machine in {{{ scripts/}}} || configure the DAQ channels with a GUI window || || || [[#activateDQ.py|activateDQ.py]] (python) || {{{ /cvs/cds/rtcds/caltech/c1/userapps/trunk/cds/c1/scripts}}} || activate necessary DQ channels on SUS || || ||<:-5> {{attachment:infrared.png}} '''''Category: NDS ''''' {{attachment:infrared.png}} || || [[#pynds_40mtest.py|pynds_40mtest.py]](python) || any machine in {{{ scripts/pynds}}}|| a demo for pynds || || ||<:-5> {{attachment:infrared.png}} '''''Category: GENERAL ''''' {{attachment:infrared.png}} || || [[#killdataviewer|killdataviewer ]] (bash)|| any machine in {{{scripts/general }}} || kills dataviewer process || || || [[#time_machine_conlog|time_machine_conlog ]] (perl)|| any machine in {{{scripts/general}}} || || || || [[#pmath|pmath]] (perl)|| any machine in {{{scripts/general}}} || calculates simple mathematics || || ||<:-5> {{attachment:infrared.png}} '''''Category: BURT ''''' {{attachment:infrared.png}} || || autoburt || op340m || backs up EPICS control settings hourly || Runs as a cron job || || [[#burttoday|burttoday]] || || || || || [[#burtlatest|burtlatest]] || || || || ---------- <
><
> <> == PSLWatch == . '''PSLWatch''' is a perl script running on '''op340m'''. It watches the PSL, and dispatches the appropriate of '''lockMZ''', '''lockPMC''', or '''lockFSS'''. It has a '''blinky'''. <> == FSSSlowServo == . The '''FSSSS''' is a perl script running on '''op340m'''. It implements a PID servo that uses the PSL-FAST (the NPRO PZT control signal) as an error signal, and feeds back to PSL-SLOWDC (which changes the crystal temperature). You can manipulate the gain, settings, timeouts, etc. on the C1PSL_SLOW.adl screen. It blinks its light everytime it does something. Can be disabled with the channel C1:PSL-FSS_SLOWLOOP. <> == offset == . This code zeros the offset of a filter bank. The digital offset will be adjusted by {{{ ezcaservo}}}. . {{{ Example usage : offset C1:LSC-AS55Q }}} <> == offset2 == . This code zeros the offset of a filter bank. The digital offset will be adjusted based on the measurement of {{{tdsavg}}}, . {{{ Example usage : offset2 C1:LSC-AS55Q }}} <> == RGA logger == . '''RGAlogger''' In $SCRIPTS/RGA, it polls the RGA for data and settings, and puts these into two files: RGA-date.data RGA-date.settings both in the $SCRIPTS/RGA/logs directory. It also checks the file $SCRIPTS/RGA/alarms/RGAalarms.spec for limits on certain AMUs, and compares the current data to the limits. If the current partial pressure of a given AMU exceeds its specified limit, it puts that information into a file called RGA-date.alarms. Run as a cronjob every day at 12.05 am by '''op340m'''. <> == autolockMCmain40m == . '''autolockMCmain40m''' is the Mode Cleaner autolocker script. It watches the mode cleaner transmitted power level, and runs the appropriate script when certain conditions are reached. . The subscript '''mcup''' ramps gains, engages boosts, and turns on the WFS. . '''mcdown''' is the inverse of '''mcup'''. It can be enabled or disabled by using a button on the C1IOO_LockMC.adl screen. This script runs all the time on [[op340m]]. It's written in '''csh''', and is fairly robust. It may crash when [[c1psl]] is rebooted. . A cron job on op340m occasionally checks whether it's running and restarts it if it isn't. Any changes to the mode cleaner states (lock acquisition or in-lock) should be made in the '''mcup''' and '''mcdown''' scripts, in the $SCRIPTS/MC/ directory. '''autolockMCmain40m''' should not be edited. . {{{ ssh op340m cd /opt/rtcds/caltech/c1/scripts/MC ./autolockerMCmain40m & }}} <> == bobafett.pl == * Location: $SCRIPTS/starwars/ * Name: bobafett.pl * Use: run without additional arguments This script can be used to manually align a component (TM or TT-PZT stage) in the PIT and YAW using the keypad on the keyboard. It does exactly what the (1D) sliders do in the EPCIS screens, but you don't have to move the mouse around when swapping axis. When started, the user will be presented with a menu with the choice of all the components of the 40m. With the Num Lock 'ON', the up(8) and down(2) arrows will move the component in positive and negative PIT respectivily. While the left(4) and right(6) will move in positive and negative YAW, respectivily. To change the step size, you use the (7) and (9) keys to increase and decrease, respectivily. The change is written directly to the '_COMM' channel of the component. When one of the PZT stages is chosen, the step size is automatically multiplied by 10k (which will be shown). The script can be ended by pressing 'q'. <> == blinky == * Location: $SCRIPTS/general/blinky * Name: blinky.pl * Use: . blinky is used to provide heart beat functions to scripts (e.g. PSLwatch and mcautolock40m) when that script dies, this one dies too. . {{{ usage: blinky usage: blinky usage: blinky option 3 is for calling this function inside a perl script where the grandparent pid is needed. default blink rate is 1 pulse per seconds }}} . Run on OP340m. E.g. if the MC autolocker is not blinking log into OP340m, find the PID of autolockMCmain40m (1234, say) and type 'blinky C1:IOO-MC_AUTOLOCK_BEAT 1 1234 &' <> == Cron jobs == . You are encouraged to make a copy of crontab files in /cvs/cds/caltech/crontab/ whenever you edit a crontab on a machine '''after confirming it works fine'''. This directory is svn managed. So do {{{svn ci}}} after you update a file. === nodus === . The current crontab of controls@nodus is the following: . {{{ 0 10 * * * /cvs/cds/caltech/scripts/backup/check_backup.sh 0,5,10,15,20,25,30,35,40,45,55 * * * * /cvs/cds/caltech/statScreen/bin/cronjob.sh 2,12,22,32,42,52 * * * * /cvs/cds/caltech/scripts/webStatus/webStatus.sh }}} . {{{check_backup.sh}}} will check the daily backup status. === mafalda === . {{attachment:mafalda_s.jpg}} . {{{statScreen/bin/cronjob.sh}}} will take screen shots of MEDM screens and post it on the web. . {{{webStatus.sh}}} uses tdsread to get a bunch of EPICS values and post them on some web page. <> == armLoss == . This code measures the visibility at ASDC while continuously lock and unlock an arm. Hence it allows us to measure the arm loss. . The measurements will take place forever, so one has to force-quit the command at some point. . The measured values will be acquired in a text file in the same directly and the file name will be loss-Y-XXXXX.log, where XXXXX is the time when the measurement starts. . {{{ Example usage : armLoss (to stop the measurement) Ctrl-C }}} <> == LSCoffsets == . This code zeros all the LSC offsets. First this code will shut out the PSL mechanical shutter so that no lights go into any PDs. . Then it runs ezcaservos for all the LSC PDs (e.g. AS55, REFL11 and so on) and all the DC PDs (e.g. ASDC, REFLDC,..) to cancel the electrical offsets by adjusting the digital offsets. . {{{ Example usage : LSCoffsets }}} <> == orthogonality.py == . This script will measure the orthogonality of a set of I and Q signal. . {{{ Example usage : orthogonality.py -c REFL11 help : orthogonality.py -h }}} <> == assUpX(Y)arm == <> == medmrun == . This script is a wrapper for running scripts from medm in an xterm. It expects at least one argument, which is the script to run. A second argument, if provided, is the xterm title. If not provided, the title of the xterm will be the name of the script. . {{{ example usage : medmrun assUpYarm }}} <> == updatesnap == . This script takes a snapshot of medm screens. This is usually available on any of the medm screens. . {{{ example usage : PRESS YELLOW BUTTON on a SCREEN }}} <> == generate_KisselButton.py == . {{{ Help : generate_KisselButton.py -- help }}} <> == generate_PDscreens.py == . {{{ example usage : }}} <> == generate_CHscreens.py == . {{{ example usage : }}} <> == generate_FMscreens.py == . {{{ example usage : }}} <> == setTRAMP == . This script will set all the TRAMP values to a specific value in a model. The TRAMP time can be specified as an argument of the script. . {{{ example usage : setTRAMP LSC 1 }}} <> == opticshutdown == . This script, written in bash, shutdowns all the suspensions at once and keeps it for 5 hrs. After the 5 hrs then this script brings the suspensions back to normal. It is useful when you want to diagnose the suspensions. . {{{ /cvs/cds/rtcds/caltech/c1/scripts/SUS/opticshutdown }}} <> == freeswing == . This code gives a kick on an optic of interest and leaves it free swing forever. Unlike [[#opticshudown|opticshutdown]], this code doesn't automatically return the watchgods on. So one should turn the watchdogs on after the measurement/diagnosis. .{{{ example 1: freeswing ITMY (let ITMY free swing) example 2: freeswing (let ALL of the optics free swing) }}} <> == F2P_LOCKIN.py == . This script measures the f2p ratio on an optics of interest .{{{ Example usage : F2P_LOCKIN.py -o ITMY Display help : F2P_LOCKIN.py -h }}} <> == peakfind == . This script . {{{ how to use it ? }}} <> == Drift == . '''If you want to update the reference values in the Drift Monitor here's the procedure. ''' . The script is run by Matlab from the mDV environment. . {{{ 1.go to /cvs/cds/caltech/apps/mDV/extra/C1/ 2. run matlab 3. run mdv_config.m 4. run setsvals.m (use the help to see how to give it the parameters). 5. run setHILO.m (this will set the red color thresholds) }}} <> == videoswitch == . This scripts switches the video matrix .{{{ Example usage : videoswitch.py Mon2 REFL Display help : videoswitch.py -h }}} <> == daqconfig == . Configures the DAQ channels . {{{ Example usage : daqconfig }}} <> == activateDQ.py == . Activates the necessary DQ channels on the SUS machine. . {{{ Example usage : activatedDQ.py }}} <> == pynds_40mtest.py == . a demo for pynds . {{{ Example usage : pynds_40mtest.py }}} <> == killdataviewer == . kills dataviewer processes <> == pmath == . This perl code does simple calculations. .{{{ usage: pmath Example 1: pmath '2 * 3' Example 2: set goo = `pmath '2 < 3'` }}} <> == burttoday == . An alias command which brings you to a directly where today's snapshots files are stored. . {{{ example usage: burttoday }}} <> == burtlatest == . Similar to [[#burttoday|burttoday]] this is an alias command which brings you to a directly where the latest snapshots files are stored. . {{{ example usage: burtlatest }}}