diff --git a/createInterstitialCondorSubmitFile.py b/createInterstitialCondorSubmitFile.py index b340d6333bc17e640b5ab5ffc04bb93c99189167..7f6b887e216f5700e683a38845da1d539e9f5436 100755 --- a/createInterstitialCondorSubmitFile.py +++ b/createInterstitialCondorSubmitFile.py @@ -10,7 +10,7 @@ import os, commands, shutil, sys, re def h(text): result = fileObject.write(text + '\n') return result -analysisDate = "2012/06/19" +analysisDate = "2013/05/12" # Make a directory for the output logs os.system('mkdir -p interstitialLogs') @@ -62,7 +62,7 @@ def queuer(n, observatory, duration, analysisDate): h("queue") h("") -[queuer(n, 'H', 128, analysisDate) for n in range(9310, 9327+1)] +[queuer(n, 'H', 128, analysisDate) for n in range(9330, 9330+1)] fileObject.close diff --git a/interstitial.py b/interstitial.py index eeac980d6cd8b72891c7bb9f8a001a649bcb76ea..2380fb7e427a79de0f19f3f62aa349e98e7d80e9 100755 --- a/interstitial.py +++ b/interstitial.py @@ -2,7 +2,7 @@ import os, sys, re, time # Grant David Meadors -# 02012-06-18 +# 02013-05-13 # gmeadors@umich.edu # Run on all the frame files in a given directory @@ -37,36 +37,41 @@ def interstate(n, cacheHoft, observatory, duration, analysisDate): # The idea will be to do a comparison between cacheHoft and filesFilter and run # the interstitialFrame function on the difference. filterList = [] + filterDurationList = [] refFrameList = [] refList = [] + refDurationList = [] for filterLine in fileFilter: filterFrame = str(filterLine) # Search for the time of a filtered frame file. - regexpFilter = re.search('-(?P<GPS>\d+)-(\d+)\.', filterFrame) + regexpFilter = re.search('-(?P<GPS>\d+)-(?P<DUR>\d+)\.', filterFrame) # Create a list of filtered Hoft frame times. filterList.append(regexpFilter.group(1)) + filterDurationList.append(regexpFilter.group(2)) fileRef = open(cacheHoft, "r") for refLine in fileRef: refFrame = str(refLine) # Search for the reference file - regexpRef = re.search('-(?P<GPS>\d+)-(\d+)\.', refFrame) + regexpRef = re.search('-(?P<GPS>\d+)-(?P<DUR>\d+)\.', refFrame) # Create the list of reference, baseline Hoft frame times. regexpRefTime = regexpRef.group(1) + regexpRefDur = regexpRef.group(2) # First, limit our search only to files in the range of n, # to avoid edge effects of overwriting files in adjacent directories if ((int(regexpRefTime) >= int(n)*(10**5)) and \ (int(regexpRefTime) < (int(n)+1)*(10**5))): # Only then add it to the list refList.append(regexpRefTime) + refDurationList.append(regexpRefDur) fileRef.close # Take the difference between the lists diffList = filter(lambda x:x not in filterList, refList) runScript = analysisDate + 'run_interstitialFrame-well.sh' - [os.system(runScript + ' ' + frame + ' ' + cacheHoft + ' ' + observatory + ' ' + duration) for frame in diffList] + [os.system(runScript + ' ' + frame + ' ' + cacheHoft + ' ' + observatory + ' ' + refDurationList[refList.index(frame)]) for frame in diffList] interstate(sys.argv[1], sys.argv[2], sys.argv[3], sys.argv[4], sys.argv[5]) # For testing below: -#interstate(9310, '../../18/AMPS/cache/injectionCache-Hoft-931000000-931100000.txt', 'H', 128, '/archive/home/gmeadors/2012/06/19/AMPS/') +#interstate(9330, '/archive/home/gmeadors/2013/05/12/AMPS/cache/interstitialCache-Hoft-933000000-933100000.txt', 'H', 128, '/archive/home/gmeadors/2013/05/12/AMPS/') diff --git a/interstitialFrame.m b/interstitialFrame.m index 6668477f5acc9dce7c35678f6bf3d27a286457ab..f06ff8403fb8fe8753ad15e156a4341baed4a6e0 100644 --- a/interstitialFrame.m +++ b/interstitialFrame.m @@ -1,7 +1,7 @@ function output = interstitialFrame(frame, cache, observatory, duration) % Grant David Meadors % gmeadors@umich.edu -% 02012-06-19 +% 02013-05-13 % interstitialFrame.m % % interstitialFrame accepts a frame input from S6 Hoft and