Skip to content

Commit c2bd195

Browse files
authored
Merge pull request #29 from lsst-camera-dh/develop
Develop
2 parents 3034ba0 + 56a29a3 commit c2bd195

3 files changed

Lines changed: 19 additions & 3 deletions

File tree

bot-data.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
from ccs import aliases
88
from ccs import proxies
99
from ccs import versions
10+
from ccs import configs
1011
from java.time import Duration
1112

1213
# Temporary work around for problems with CCS responsiveness
@@ -36,6 +37,9 @@
3637
fp = CCS.attachProxy('focal-plane')
3738
time.sleep(10.0)
3839
versions.write_versions(fp)
40+
configs.write_config(fp, ['Sequencer', 'Rafts'])
41+
42+
3943

4044
import config
4145

lib/ccs/configs.py

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
#!/usr/bin/env ccs-script
2+
from org.lsst.ccs.scripting import CCS
3+
from ccs import proxies
4+
from java.util import HashSet
5+
import time
6+
7+
def write_config(fp, categories):
8+
args = HashSet()
9+
for c in categories:
10+
args.add(c)
11+
config = fp.printConfigurationParameters(args)
12+
with open("ccs_config.txt", "w") as file:
13+
file.write(config)

lib/fp.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
fp = CCS.attachProxy("focal-plane") # this will be override by CCS.aliases
1212
agentName = fp.getAgentProperty("agentName")
13-
if agentName != "focal-plane":
13+
if agentName != "focal-plane":
1414
fp = CCS.attachProxy(agentName) # re-attach to ccs subsystem
1515
autoSave = True
1616
imageTimeout = Duration.ofSeconds(60)
@@ -33,7 +33,6 @@ def sanityCheck():
3333
def clear(n=1):
3434
if n == 0:
3535
return
36-
endIdleFlush()
3736
print "Clearing CCDs (%d)" % n
3837
fp.clear(n)
3938
fp.waitForSequencer(Duration.ofSeconds(2))
@@ -48,7 +47,7 @@ def takeExposure(exposeCommand=None, fitsHeaderData=None, annotation=None, locat
4847
sanityCheck()
4948
print "Setting FITS headers %s" % fitsHeaderData
5049
fp.setHeaderKeywords(fitsHeaderData)
51-
imageName = fp.allocateImageName()
50+
imageName = fp.allocateImageName()
5251
print "Image name: %s" % imageName
5352

5453
# Horrible fix for using "fast" gpfs disk at SLAC

0 commit comments

Comments
 (0)