#!/usr/bin/env python from ccsTools import ccsProducer ccsProducer('fe55_acq', 'ccseofe55.py')
#!/usr/bin/env python from ccsTools import ccsProducer ccsProducer('Room-Temp-Measurement-After-Thermal-Cycle', 'Room-Temp-Measurement-After-Thermal-Cycle.py')
top = Tkinter.Tk() # def startappsmsg(apptxt): # top.stop() # A = Tkinter.Button(top, text = apptxt, command = lambda : startappsmsg(apptxt), bg = "red") A = Tkinter.Button(top, text = apptxt, command = top.destroy, bg = "red", font = ("Helvetica",24)) A.pack() top.title('Please start missing CCS apps using the widget') # top.title('Please start missing CCS apps using the widget that will appear after you click on this button.') # subprocess.Popen(["gnome-terminal","--geometry=1x1","--working-directory=$CCS_BIN_DIR","--command=/usr/bin/ccsapps"]); top.mainloop() else: print "All required CCS apps running" ccsProducer('preflight_acq', 'ccseopreflight.py') files = sorted(glob.glob('*.fits')) pdfiles = sorted(glob.glob('pd-*.txt')) #for flat in flats: hdu1 = pyfits.open(files[2]) hdr1 = hdu1[0].header exptime1 = hdr1['EXPTIME'] mondiode1 = hdr1['MONDIODE'] filter1 = hdr1['FILTER'] hdu2 = pyfits.open(files[3]) hdr2 = hdu2[0].header exptime2 = hdr2['EXPTIME'] mondiode2 = hdr2['MONDIODE']
#!/usr/bin/env python from ccsTools import ccsProducer import Tkinter import glob import os import sys for i in range(5) : print " " print "Enter the setting for OD - " sys.stdout.flush() OD = raw_input(" ") print "\n\nEnter the setting for RD - " sys.stdout.flush() RD = raw_input(" ") fp = open("od_rd_settings.txt","w"); fp.write("OD %f\n" % float(OD)) fp.write("RD %f\n" % float(RD)) fp.close() ccsProducer('REB_set_OD_RD', 'ccseo_set_od_rd.py')
#!/usr/bin/env python from ccsTools import ccsProducer import Tkinter import glob import os apptxt = "Warning, this script will turn on the Polycold\nand ramp the temperature to the operating setpoint.\nClick on this button only if this OK. If this is not OK, type abort in any terminal window or click on the abort button on the GUI." print apptxt top = Tkinter.Tk() A = Tkinter.Button(top, text = apptxt, command = top.destroy, bg = "yellow", font = ("Helvetica",24)) A.pack() top.title('Ready for cooling?') top.mainloop() ccsProducer('ts3_cool_down', 'ccseots3_cool_down.py')
#!/usr/bin/env python from ccsTools import ccsProducer import Tkinter import glob import os ccsProducer('ready_acq', 'ccseoready.py') apptxt = "Please check the FLAT image that is about to be projected in ds9\nfor correct bias regions.\nClick on this window when ready." print apptxt topq = Tkinter.Tk() q = Tkinter.Button(topq, text=apptxt, command=topq.destroy, bg="yellow", font=("Helvetica", 24)) q.pack() topq.title('FLAT image check') topq.mainloop() qefiles = sorted(glob.glob('*lambda*.fits')) os.system("ds9 -scale datasec no -scale histequ %s" % qefiles[0]) apptxt = "Please check the Fe55 image that is about to be projected in ds9\nfor clearly identifiable X-ray hits that should appear as clusters of pixels.\nClick on this window when ready." print apptxt topf = Tkinter.Tk() f = Tkinter.Button(topf, text=apptxt, command=topf.destroy,
#!/usr/bin/env python from ccsTools import ccsProducer import Tkinter import glob import os ccsProducer('ready_acq', 'ccseoready.py') apptxt = "Please check the FLAT image that is about to be projected in ds9\nfor correct bias regions.\nClick on this window when ready." print apptxt topq = Tkinter.Tk() q = Tkinter.Button(topq, text = apptxt, command = topq.destroy, bg = "yellow", font = ("Helvetica",24)) q.pack() topq.title('FLAT image check') topq.mainloop() qefiles = sorted(glob.glob('*lambda*.fits')) os.system("ds9 -scale datasec no -scale histequ %s" % qefiles[0]) apptxt = "Please check the Fe55 image that is about to be projected in ds9\nfor clearly identifiable X-ray hits that should appear as clusters of pixels.\nClick on this window when ready." print apptxt topf = Tkinter.Tk() f = Tkinter.Button(topf, text = apptxt, command = topf.destroy, bg = "yellow", font = ("Helvetica",24)) f.pack() topf.title('FE55 image check') topf.mainloop() fe55files = sorted(glob.glob('*fe55*.fits'))
#!/usr/bin/env python from ccsTools import ccsProducer ccsProducer('RTM_acq', 'ccseometro.py')
#!/usr/bin/env python from ccsTools import ccsProducer import Tkinter import glob import os import sys for i in range(5) : print " " print "Enter the setting for SCLKHI - " sys.stdout.flush() SCLKHI = raw_input(" ") fp = open("sclkhi_settings.txt","w"); fp.write("SCLKHI %f\n" % float(SCLKHI)) fp.close() ccsProducer('REB_set_SCLKHI', 'ccseo_set_sclkhi.py')
#!/usr/bin/env python from ccsTools import ccsProducer ccsProducer('qe_acq', 'ccseoqe.py')
import glob import os import sys import siteUtils for i in range(5) : print " " jobname = siteUtils.getJobName() if '_OG_' in jobname : parts = jobname.split('_') np = len(parts) sOG = parts[np-2]+'.'+parts[np-1] print "sOG = ",sOG OG = float(sOG) if 'minus' in parts[np-3] : OG = -OG else : print "Enter the setting for OG - " sys.stdout.flush() OG = raw_input(" ") fp = open("og_settings.txt","w"); fp.write("OG %f\n" % float(OG)) fp.close() ccsProducer('REB_set_OG', 'ccseo_set_og.py')
print 'Manufacturer ID: ', rsp got_manu_info = True except ValueError,msg: print 'Operation failed with ValueError: ', msg except Exception,msg: print 'Operation failed with exception: ' print msg sys.exit(1) iDict +=1 # sys.exit(0) except Exception,msg: print 'Operation failed with exception: ' print msg sys.exit(1) #dictArray = conn.getHardwareHierarchy(noBatched='true') #print dictArray ccsProducer('fe55_acq', 'ccseofe55.py') #examining array element 15 #For key child_hardwareTypeName value is ITL-CCD #For key parent_experimentSN value is LCA-10753_RSA-002_CTE_ETU #For key level value is 0 #For key relationshipTypeName value is RSA_contains_ITL-CCDs #For key child_experimentSN value is ITL-NULL5_CTE-ETU #For key parent_hardwareTypeName value is LCA-10753_RSA #For key parent_id value is 704 #For key child_id value is 756 #For key slotName value is S20
#!/usr/bin/env python from ccsTools import ccsProducer import siteUtils import os import sys for i in range(20) : print "This test may be skipped if the sensors are already fully powered and you have the authorization. Skip the step (N/y)?" sys.stdout.flush() answer = raw_input("\n\nThis test may be skipped if the sensors are already fully powered and you have the authorization. Skip the step (N/y)? \n\n") if "y" in answer.lower() : print "Operator requested to skip the step. BYE" else : ccsProducer('rebalive_power', 'ccseorebalive_power.py') if (False) : if "connectivity0" in siteUtils.getJobName() : os.system("cp -p ~/c0/* .") if "connectivity1" in siteUtils.getJobName() : os.system("cp -p ~/c1/* .") if "connectivity2" in siteUtils.getJobName() : os.system("cp -p ~/c2/* .")
#!/usr/bin/env python from ccsTools import ccsProducer ccsProducer('ccd22_acq', 'ccseometro.py')
#!/usr/bin/env python from ccsTools import ccsProducer import Tkinter import glob import os ccsProducer('RTM_thermal', 'ccsthermal.py') #ccsProducer('RTM_thermal', 'ts7_stats.py')
import Tkinter import glob import os import sys import siteUtils for i in range(5) : print " " jobname = siteUtils.getJobName() if '_RGLOW_' in jobname : parts = jobname.split('_') np = len(parts) sRGLOW = parts[np-2]+'.'+parts[np-1] print "sRGLOW = ",sRGLOW RGLOW = float(sRGLOW) if 'minus' in parts[np-3] : RGLOW = -RGLOW else : print "Enter the setting for RGLOW - " sys.stdout.flush() RGLOW = raw_input(" ") fp = open("rglow_settings.txt","w"); fp.write("RGLOW %f\n" % float(RGLOW)) fp.close() ccsProducer('REB_set_RGLOW', 'ccseo_set_rglow.py')
#!/usr/bin/env python from ccsTools import ccsProducer import Tkinter import glob import os ccsProducer('RTM_thermal_powered', 'ccsthermal.py')
#!/usr/bin/env python from ccsTools import ccsProducer ccsProducer('Pump-and-Room-Temp-Measurement', 'Pump-and-Room-Temp-Measurement.py')
#!/usr/bin/env python from ccsTools import ccsProducer import Tkinter import glob import os import sys for i in range(5) : print " " print "Enter the setting for CSGATE - " sys.stdout.flush() CSGATE = raw_input(" ") fp = open("csgate_settings.txt","w"); fp.write("CSGATE %f\n" % float(CSGATE)) fp.close() ccsProducer('REB_set_CSGATE', 'ccseo_set_csgate.py')
#!/usr/bin/env python from ccsTools import ccsProducer ccsProducer('rebalive_current_dacsloaded', 'ccseorebalive_current_dacsloaded.py')
#!/usr/bin/env python from ccsTools import ccsProducer ccsProducer('rebalive_power_down_down', 'ccseorebalive_power_down_down.py')
from ccsTools import ccsProducer import Tkinter import glob import shutil import os import matplotlib.pyplot as plt import ccs_trending import siteUtils import time jobDir = siteUtils.getJobDir() shutil.copy("%s/ts_quantities.cfg" % jobDir, os.getcwd()) shutil.copy("%s/ts8_quantities.cfg" % jobDir, os.getcwd()) ccsProducer('RTM_thermo', 'ccsthermal.py') #ccsProducer('RTM_thermo', 'ts7_stats.py') raft_id = siteUtils.getLSSTId() run_number = siteUtils.getRunNumber() host = 'localhost' ccs_subsystem = 'ts' tm = time.time() start = time.strftime('%Y-%m-%dT%H:%M:%S', time.localtime(tm - 300)) end = time.strftime('%Y-%m-%dT%H:%M:%S', time.localtime(tm)) milestones = ('2017-10-06T00:00:00', '2017-10-06T23:59:59') config_file = 'ts_quantities.cfg'
print 'Operation failed with ValueError: ', msg except Exception, msg: print 'Operation failed with exception: ' print msg sys.exit(1) iDict += 1 # sys.exit(0) except Exception, msg: print 'Operation failed with exception: ' print msg sys.exit(1) #dictArray = conn.getHardwareHierarchy(noBatched='true') #print dictArray ccsProducer('eo_acq', 'ccseo.py') try: os.system("cp -p %s ." % sequence_file) except: pass #examining array element 15 #For key child_hardwareTypeName value is ITL-CCD #For key parent_experimentSN value is LCA-10753_RSA-002_CTE_ETU #For key level value is 0 #For key relationshipTypeName value is RSA_contains_ITL-CCDs #For key child_experimentSN value is ITL-NULL5_CTE-ETU #For key parent_hardwareTypeName value is LCA-10753_RSA #For key parent_id value is 704 #For key child_id value is 756
#!/usr/bin/env python from ccsTools import ccsProducer ccsProducer('persist_acq', 'ccseopersist.py')
#!/usr/bin/env python from ccsTools import ccsProducer ccsProducer('Cooling-Measurement-2', 'Cooling-Measurement-2.py')
#!/usr/bin/env python from ccsTools import ccsProducer ccsProducer('fluxcal_acq', 'ccseofluxcal.py')
#!/usr/bin/env python from ccsTools import ccsProducer import Tkinter import glob import os import sys for i in range(20): print "This POWER ON test may be skipped if the sensors are already fully powered and you have the authorization. \n *** THE HV BIAS MUST BE OFF TO PROCEED! *** \n Skip this part of the step (Y (default)/n)?" sys.stdout.flush() answer = raw_input("\n\nThis POWER ON test may be skipped if the sensors are already fully powered and you have the authorization. \n *** THE HV BIAS MUST BE OFF TO PROCEED! *** \n Skip this part of the step (Y (default)/n)? \n\n") if "n" not in answer.lower() : print "Operator requested to skip this part (POWER ON) of the step." else : ccsProducer('ready_acq', 'ccseorebalive_power.py') ccsProducer('ready_acq', 'ccseoREB_retrieve_versions.py') for i in range(20): print "This EXPOSURES test may be skipped if you have the authorization. Skip this part of the step (N (default)/y)?" sys.stdout.flush() answer = raw_input("\n\nThis EXPOSURES test may be skipped if you have the authorization. Skip this part of the step (N (default)/y)? \n\n") if "y" in answer.lower() : print "Operator requested to skip the EXPOSURES part of the step." else : os.system('ts7VQMoff') ccsProducer('ready_acq', 'ccseorebalive_exposure.py') os.system('ts7VQMon') sys.stdout.flush()
#!/usr/bin/env python from ccsTools import ccsProducer import os ccsProducer('rebalive_exposure', 'ccseorebalive_exposure.py') if (False) : os.system("cp -p ~/ex0/* .")
#!/usr/bin/env python from ccsTools import ccsProducer ccsProducer('dark_acq', 'ccseodark.py')
#!/usr/bin/env python from ccsTools import ccsProducer import Tkinter import glob import os ccsProducer('RTM_thermal', 'ccsthermal.py') ccsProducer('RTM_thermal', 'ts7_stats.py')
#!/usr/bin/env python from ccsTools import ccsProducer ccsProducer('warmup_acq', 'ccseowarmup.py')
#!/usr/bin/env python import os import glob import numpy as np import matplotlib.pyplot as plt from ccsTools import ccsProducer, CcsRaftSetup ccsProducer('ts8_ready_acq', 'ccs_ts8_ready_acq.py', ccs_setup_class=CcsRaftSetup, sys_paths=(os.path.join(os.environ['CRJOBSDIR'], 'python'),))
#!/usr/bin/env python from ccsTools import ccsProducer ccsProducer('flat_acq', 'ccseoflat.py')
#!/usr/bin/env python from ccsTools import ccsProducer import Tkinter import glob import os apptxt = "Warning, this script will turn on the Polycold\nand ramp the temperature to the operating setpoint.\nClick on this button only if this OK. If this is not OK, type abort in any terminal window or click on the abort button on the GUI." print apptxt top = Tkinter.Tk() A = Tkinter.Button(top, text=apptxt, command=top.destroy, bg="yellow", font=("Helvetica", 24)) A.pack() top.title('Ready for cooling?') top.mainloop() ccsProducer('ts3_cool_down', 'ccseots3_cool_down.py')
#!/usr/bin/env python from ccsTools import ccsProducer import Tkinter import glob import os import sys for i in range(5): print " " print "Enter the setting for GD - " sys.stdout.flush() GD = raw_input(" ") fp = open("gd_settings.txt", "w") fp.write("GD %f\n" % float(GD)) fp.close() ccsProducer('REB_set_GD', 'ccseo_set_gd.py')
#!/usr/bin/env python from ccsTools import ccsProducer import Tkinter import glob import os import sys for i in range(5) : print " " print "Enter the setting for GD - " sys.stdout.flush() GD = raw_input(" ") fp = open("gd_settings.txt","w"); fp.write("GD %f\n" % float(GD)) fp.close() ccsProducer('REB_set_GD', 'ccseo_set_gd.py')
'scan': 'scan_mode_acq', 'ppump': 'ppump_raft_acq' } # Find the raft-level EO configuration file. acq_config_file = os.path.join(os.environ['LCATR_CONFIG_DIR'], 'acq.cfg') with open(acq_config_file, 'r') as acq_config: for line in acq_config: if line.startswith('rtmacqcfgfile'): eo_acq_config_file = line.split('=')[1].strip() # Read in the acquisition sequence. with open(eo_acq_config_file, 'r') as eo_acq: acqs = [ x.split('#')[0].split()[1] for x in eo_acq if x.startswith('ACQUIRE') ] # Loop over the acquisition sequence, running the jython script # associated with the single acquisition harnessed jobs. for acq in acqs: try: job_name = job_names[acq] except KeyError: # harnessed job does not exist so skip. continue ccs_script = 'ccs_{}.py'.format(job_name) ccsProducer(job_name, ccs_script, ccs_setup_class=CcsRaftSetup, sys_paths=(os.path.join(os.environ['CRJOBSDIR'], 'python'), ))
#!/usr/bin/env python from ccsTools import ccsProducer import Tkinter import glob import os apptxt = "Warning, this script will turn on the turbo pump.\nClick on this button only if this OK. If this is not OK, type abort in any terminal window or click on the abort button on the GUI." print apptxt top = Tkinter.Tk() A = Tkinter.Button(top, text = apptxt, command = top.destroy, bg = "yellow", font = ("Helvetica",24)) A.pack() top.title('Ready for turbo pumping?') top.mainloop() ccsProducer('ts3_pump', 'ccseots3_pump.py')
#!/usr/bin/env python from ccsTools import ccsProducer import Tkinter import glob import os ccsProducer('RTM_xtalk', 'ccsxtalk.py')
#!/usr/bin/env python from ccsTools import ccsProducer ccsProducer('Cold-Measurement', 'Cold-Measurement.py')
#!/usr/bin/env python import os from ccsTools import ccsProducer, CcsRaftSetup ccsProducer('rtm_aliveness_power_on', 'ccs_rtm_aliveness_power_on.py', ccs_setup_class=CcsRaftSetup, sys_paths=(os.path.join(os.environ['CRJOBSDIR'], 'python'), ))
#!/usr/bin/env python from ccsTools import ccsProducer import siteUtils import os ccsProducer('rebalive_power', 'ccseorebalive_power.py') if (False) : if "connectivity0" in siteUtils.getJobName() : os.system("cp -p ~/c0/* .") if "connectivity1" in siteUtils.getJobName() : os.system("cp -p ~/c1/* .") if "connectivity2" in siteUtils.getJobName() : os.system("cp -p ~/c2/* .")
#!/usr/bin/env python from ccsTools import ccsProducer ccsProducer('test_scan', 'ccseotest.py')
#!/usr/bin/env python from ccsTools import ccsProducer ccsProducer('shutter_acq', 'ccseoshutter.py')
#!/usr/bin/env python from ccsTools import ccsProducer ccsProducer('rebalive_current_precheck', 'ccseorebalive_current_precheck.py')
#!/usr/bin/env python from ccsTools import ccsProducer ccsProducer('Cooling-Measurement-1', 'Cooling-Measurement-1.py')
print 'Operation failed with exception: ' print msg sys.exit(1) iDict +=1 # sys.exit(0) except Exception,msg: print 'Operation failed with exception: ' print msg sys.exit(1) #dictArray = conn.getHardwareHierarchy(noBatched='true') #print dictArray os.system('ts7VQMoff') ccsProducer('eo_acq', 'ccseo.py') os.system('ts7VQMon') try: os.system("cp -p %s ." % sequence_file) except: pass #examining array element 15 #For key child_hardwareTypeName value is ITL-CCD #For key parent_experimentSN value is LCA-10753_RSA-002_CTE_ETU #For key level value is 0 #For key relationshipTypeName value is RSA_contains_ITL-CCDs #For key child_experimentSN value is ITL-NULL5_CTE-ETU #For key parent_hardwareTypeName value is LCA-10753_RSA
#!/usr/bin/env python from ccsTools import ccsProducer import Tkinter import glob import os apptxt = "Warning, this script will turn on the turbo pump.\nClick on this button only if this OK. If this is not OK, type abort in any terminal window or click on the abort button on the GUI." print apptxt top = Tkinter.Tk() A = Tkinter.Button(top, text=apptxt, command=top.destroy, bg="yellow", font=("Helvetica", 24)) A.pack() top.title('Ready for turbo pumping?') top.mainloop() ccsProducer('ts8_pump', 'ccseots8_pump.py')
#!/usr/bin/env python from ccsTools import ccsProducer ccsProducer('BASEPLATE_acq', 'ccseometro.py')