Skip to content
Snippets Groups Projects
Commit 0169bc5d authored by Grant David Meadors's avatar Grant David Meadors
Browse files

Should have enabled the interstitial frames jobs to take on frames of odd length

parent 3b5bd23b
No related branches found
No related tags found
No related merge requests found
......@@ -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
......@@ -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/')
......
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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment