diff --git a/Appl/CEP/CS1/CS1_Run/src/CS1.parset b/Appl/CEP/CS1/CS1_Run/src/CS1.parset index 96dac7c44b1d342d26c99eb24ca8af24c48213fd..f36233507e87781b23dd026db3859c5cedb54f6d 100644 --- a/Appl/CEP/CS1/CS1_Run/src/CS1.parset +++ b/Appl/CEP/CS1/CS1_Run/src/CS1.parset @@ -23,7 +23,7 @@ Connections.BGLProc_Storage.TransportHolder = SOCKET # one of SOCKET, FILE, NULL Connections.BGLProc_Storage.BaseFileName = "Correlations" # The format of the data -Observation.NSubbands = 1 +Observation.NSubbands = 16 Observation.NChannels = 256 Observation.NPolarisations=2 Observation.PositionType = ITRF # should be ITRF @@ -46,21 +46,23 @@ Observation.NBeams = 1 # number of beams used Observation.DirectionType = J2000 # direction type Observation.BeamDirections = [\ # pair of RA/DEC per beam (angle in rad) 6.1234876806221052, 1.0265153995604648] + Observation.DelayCompensation = T -Observation.RefFreqs = [ 33281250, 38281250, 44218750, 52187500, 57187500, 60000000, 65156250, 74218750 ] + +Observation.SubbandIDs = [213, 245, 283, 334, 366, 384, 417, 475, 150, 151, 152, 153, 154, 155, 156, 157] # General Variables -General.SubbandsPerPset = 1 +General.SubbandsPerPset = 2 # Variables for the DelayCompensation DelayComp.ConverterType=IMPL # should be one of IMPL, CLIENT # Variables for the InputSection Input.NTimesInFrame=16 -Input.NSubbandsPerFrame=8 +Input.NSubbandsPerFrame=32 Input.SzEPAheader=16 Input.IPHeaderSize=32 -Input.NSamplesToBuffer=12000000 +Input.NSamplesToBuffer=6000000 Input.WriteRawDataToFile = F Input.OutputRawDataFiles = ["/dev/null", "/dev/null"] Input.Transport.Station0.Rsp0.th = NULL # should be one of NULL, FILE, SOCKET, NULL diff --git a/Appl/CEP/CS1/CS1_Run/src/CS1_Parset.py b/Appl/CEP/CS1/CS1_Run/src/CS1_Parset.py index c3370327b46ef0a26cd15e91dbf0748f891acb82..694f9702b9005201c296d1c74d360086289d2081 100644 --- a/Appl/CEP/CS1/CS1_Run/src/CS1_Parset.py +++ b/Appl/CEP/CS1/CS1_Run/src/CS1_Parset.py @@ -144,12 +144,17 @@ class CS1_Parset(LOFAR_Parset.Parset): if not self.__dict__.has_key('nSubbands'): return - sbs = list() - for sb in range(0, self.nSubbands): - sbs.append(self.firstSB + sb * subbandwidth) + + subbandIDs = self.getInt32Vector('Observation.SubbandIDs') + if len(subbandIDs) != self.nSubbands: + raise Exception('nSubbands(%d) != SubbandIDs(%d).' % (self.nSubbands, len(subbandIDs))) + + sbs = list() + for sb in range(0, len(subbandIDs)): + sbs.append(subbandIDs[sb] * subbandwidth) # create the frequencies for all subbands - #self['Observation.RefFreqs'] = '[' + ','.join(str(sb) for sb in sbs) + ']' + self['Observation.RefFreqs'] = '[' + ', '.join(str(sb) for sb in sbs) + ']' self['Observation.NSubbands'] = self.nSubbands #the number of subbands should be dividable by the number of subbands per pset diff --git a/Appl/CEP/CS1/CS1_Run/src/CS1_Run.py b/Appl/CEP/CS1/CS1_Run/src/CS1_Run.py index 8ff4878e31266bcaf9a46564844e17f0584244ca..5711d41de481727ec2bd1b33242fb0770b5b0db4 100755 --- a/Appl/CEP/CS1/CS1_Run/src/CS1_Run.py +++ b/Appl/CEP/CS1/CS1_Run/src/CS1_Run.py @@ -1,5 +1,6 @@ #!/usr/bin/env python +import math import time import os import sys @@ -29,7 +30,8 @@ def doObservation(obsID, parset): ] - noRuns = int(parset['Observation.StopTime']) - int(parset['Observation.StartTime']) - 10 + stepTime = float(parset['Observation.NSubbandSamples']) / parset['Observation.SampleRate'] + sz = int(math.ceil((parset['Observation.StopTime'] - parset['Observation.StartTime']) / stepTime)) #print int(parset['Observation.StopTime']), int(parset['Observation.StartTime']), noRuns logdir = '/log/' @@ -46,8 +48,10 @@ def doObservation(obsID, parset): # todo 27-10-2006 this is a temporary hack because storage doesn't close neatly. # This way all sections run longer than needed and storage stops before the rest does if not isinstance(section, StorageSection): - section.run(runlog, noRuns+10) + noRuns = ((sz+15)&~15) + 16; + section.run(runlog, noRuns) else: + noRuns = (sz+15)&~15 section.run(runlog, noRuns) print @@ -70,7 +74,7 @@ if __name__ == '__main__': parser.add_option('--clock' , dest='clock' , default='160MHz' , type='string', help='clock frequency (either 160MHz or 200MHz) [%default]') parser.add_option('--subbands' , dest='subbands' , default='60MHz,8' , type='string', help='freq of first subband and number of subbands to use [%default]') parser.add_option('--runtime' , dest='runtime' , default='600' , type='int' , help='length of measurement in seconds [%default]') - parser.add_option('--starttime' , dest='starttime', default=int(time.time() + 150), type='int', help='start of measurement in UTC seconds [now + 100s]') + parser.add_option('--starttime' , dest='starttime', default=int(time.time() + 150), type='int', help='start of measurement in UTC seconds [now + 150s]') parser.add_option('--integrationtime', dest='integrationtime', default='60' , type='int' , help='length of integration interval in seconds [%default]') parser.add_option('--msname' , dest='msname' , type='string', help='name of the measurement set') parser.add_option('--stationlist' , dest='stationlist' , default='CS10_4dipoles', type='string', help='name of the station or stationconfiguration (see CS1_Stations.py) [%default]') @@ -100,7 +104,7 @@ if __name__ == '__main__': parset.setSubbands(first, nsb) # read the runtime (optional start in utc and the length of the measurement) - parset.setInterval(options.starttime, options.runtime+10) + parset.setInterval(options.starttime, options.runtime) # convert beamdirections from RA and Dec to Radians #parset.setBeamdir() diff --git a/Appl/CEP/CS1/CS1_Run/src/CS1_Sections.py b/Appl/CEP/CS1/CS1_Run/src/CS1_Sections.py index 824904491f213ba64819a53fc721ed178b4ffc90..c7713208b9445f18e9774a854fad482fa731769b 100644 --- a/Appl/CEP/CS1/CS1_Run/src/CS1_Sections.py +++ b/Appl/CEP/CS1/CS1_Run/src/CS1_Sections.py @@ -148,7 +148,8 @@ class BGLProcSection(Section): # todo: We should check here if the executable exists nstations = parset.getNStations() clock = parset.getClockString() - self.executable = 'CS1_BGL_Processing.' + str(nstations) + 'st.' + clock + #self.executable = 'CS1_BGL_Processing.' + str(nstations) + 'st.' + clock + self.executable = 'CS1_BGL_Processing' def run(self, runlog, noRuns, runCmd = None): nodesPerCell = self.parset.getInt32('BGLProc.NodesPerPset') * self.parset.getInt32('BGLProc.PsetsPerCell') diff --git a/Appl/CEP/CS1/CS1_Run/src/CS1_Stations.py b/Appl/CEP/CS1/CS1_Run/src/CS1_Stations.py index db32e81df89543f7b7b2583c2581ddd1aa35ee87..654c79cce0c79315592ca38fd2624a41dcc2018d 100644 --- a/Appl/CEP/CS1/CS1_Run/src/CS1_Stations.py +++ b/Appl/CEP/CS1/CS1_Run/src/CS1_Stations.py @@ -66,6 +66,30 @@ CS16_dipole12 = [Station('CS16_dipole12', 12, (0.119964779015, 0.920270965005, CS16_4dipoles = CS16_dipole0 + CS16_dipole4 + CS16_dipole8 + CS16_dipole12 Fourstations_4dipoles = CS10_4dipoles + CS01_4dipoles + CS08_4dipoles + CS16_4dipoles -Treestations_4dipoles = CS01_4dipoles + CS08_4dipoles + CS16_4dipoles -Twostations_4dipoles = CS08_4dipoles + CS16_4dipoles -#Twostations_4dipoles = CS01_4dipoles + CS08_4dipoles + CS16_4dipoles + +CS10_centre0 = [Station('CS10_centre0' , 1, (0.119880687209, 0.920274829586, 6364096.65669), 0, '10:fa:00:0a:01:00')] +CS10_centre1 = [Station('CS10_centre1' , 1, (0.119889696308, 0.920277341969, 6364096.62516), 1, '10:fa:00:0a:01:01')] +CS10_centre2 = [Station('CS10_centre2' , 2, (0.119878836045, 0.920272809664, 6364096.71911), 2, '10:fa:00:0a:01:02')] +CS10_centre3 = [Station('CS10_centre3' , 3, (0.119884676596, 0.920276007334, 6364096.63253), 3, '10:fa:00:0a:01:03')] +CS10_4centra = CS10_centre0 + CS10_centre1 + CS10_centre2 + CS10_centre3 + +CS08_centre0 = [Station('CS08_centre0' , 4, (0.119869165515, 0.920301856536, 6364096.36841), 0, '10:fa:00:08:01:05')] +CS08_centre1 = [Station('CS08_centre1' , 4, (0.119875783416, 0.920305703002, 6364096.28953), 1, '10:fa:00:08:01:07')] +CS08_centre2 = [Station('CS08_centre2' , 5, (0.119898867625, 0.920297715596, 6364096.45334), 2, '10:fa:00:08:01:0a')] +CS08_centre3 = [Station('CS08_centre3' , 6, (0.119892249725, 0.920293869179, 6364096.53222), 3, '10:fa:00:08:01:0d')] +CS08_4centra = CS08_centre0 + CS08_centre1 + CS08_centre2 + CS08_centre3 + +CS01_centre0 = [Station('CS01_centre0' , 7, (0.119852010383, 0.920247381584, 6364097.49361), 0, '10:fa:00:01:01:00')] +CS01_centre1 = [Station('CS01_centre1' , 7, (0.119858627702, 0.920251228144, 6364097.41472), 1, '10:fa:00:01:01:01')] +CS01_centre2 = [Station('CS01_centre2' , 8, (0.119864979052, 0.920247220481, 6364097.49691), 2, '10:fa:00:01:01:02')] +CS01_centre3 = [Station('CS01_centre3' , 9, (0.119858361733, 0.92024337397 , 6364097.5778 ), 3, '10:fa:00:01:01:03')] +CS01_4centra = CS01_centre0 + CS01_centre1 + CS01_centre2 + CS01_centre3 + +CS16_centre0 = [Station('CS16_centre0' , 10, (0.119959335866, 0.92027496129 , 6364096.62399), 0, '10:fa:00:10:01:00')] +CS16_centre1 = [Station('CS16_centre1' , 10, (0.119965953961, 0.920278807463, 6364096.54511), 1, '10:fa:00:10:01:01')] +CS16_centre2 = [Station('CS16_centre2' , 11, (0.119972304923, 0.920274799507, 6364096.6273 ), 2, '10:fa:00:10:01:02')] +CS16_centre3 = [Station('CS16_centre3' , 12, (0.119965686829, 0.920270953334, 6364096.70718), 3, '10:fa:00:10:01:03')] +CS16_4centra = CS16_centre0 + CS16_centre1 + CS16_centre2 + CS16_centre3 + +Fourstations_4centra = CS10_4centra + CS01_4centra + CS08_4centra + CS16_4centra + diff --git a/Appl/CEP/CS1/CS1_Run/src/LOFAR_Parset.py b/Appl/CEP/CS1/CS1_Run/src/LOFAR_Parset.py index 50f8d0a817eba32dfe32b35dea955f78ccc6a6e1..dac565617951ea5801e5dfd38ea9a161260ca31d 100644 --- a/Appl/CEP/CS1/CS1_Run/src/LOFAR_Parset.py +++ b/Appl/CEP/CS1/CS1_Run/src/LOFAR_Parset.py @@ -40,9 +40,10 @@ class Parset(object): return line.split(',') def getInt32Vector(self, key): - line = self.parameters[key] - line.strip('[').strip(']') - return [int(lp) for lp in line.split(',')] + ln = self.parameters[key] + ln_tmp = ln.split('[') + line = ln_tmp[1].split(']') + return [int(lp) for lp in line[0].split(',')] def getFloatVector(self, key): line = self.parameters[key]