Skip to content

Commit

Permalink
Merge pull request #29 from lsst-camera-dh/develop
Browse files Browse the repository at this point in the history
Develop
  • Loading branch information
tony-johnson authored Oct 8, 2020
2 parents 3034ba0 + 56a29a3 commit c2bd195
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 3 deletions.
4 changes: 4 additions & 0 deletions bot-data.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
from ccs import aliases
from ccs import proxies
from ccs import versions
from ccs import configs
from java.time import Duration

# Temporary work around for problems with CCS responsiveness
Expand Down Expand Up @@ -36,6 +37,9 @@
fp = CCS.attachProxy('focal-plane')
time.sleep(10.0)
versions.write_versions(fp)
configs.write_config(fp, ['Sequencer', 'Rafts'])



import config

Expand Down
13 changes: 13 additions & 0 deletions lib/ccs/configs.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#!/usr/bin/env ccs-script
from org.lsst.ccs.scripting import CCS
from ccs import proxies
from java.util import HashSet
import time

def write_config(fp, categories):
args = HashSet()
for c in categories:
args.add(c)
config = fp.printConfigurationParameters(args)
with open("ccs_config.txt", "w") as file:
file.write(config)
5 changes: 2 additions & 3 deletions lib/fp.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

fp = CCS.attachProxy("focal-plane") # this will be override by CCS.aliases
agentName = fp.getAgentProperty("agentName")
if agentName != "focal-plane":
if agentName != "focal-plane":
fp = CCS.attachProxy(agentName) # re-attach to ccs subsystem
autoSave = True
imageTimeout = Duration.ofSeconds(60)
Expand All @@ -33,7 +33,6 @@ def sanityCheck():
def clear(n=1):
if n == 0:
return
endIdleFlush()
print "Clearing CCDs (%d)" % n
fp.clear(n)
fp.waitForSequencer(Duration.ofSeconds(2))
Expand All @@ -48,7 +47,7 @@ def takeExposure(exposeCommand=None, fitsHeaderData=None, annotation=None, locat
sanityCheck()
print "Setting FITS headers %s" % fitsHeaderData
fp.setHeaderKeywords(fitsHeaderData)
imageName = fp.allocateImageName()
imageName = fp.allocateImageName()
print "Image name: %s" % imageName

# Horrible fix for using "fast" gpfs disk at SLAC
Expand Down

0 comments on commit c2bd195

Please sign in to comment.