Skip to content
Snippets Groups Projects
Commit 3e8d2fd4 authored by Martin Gels's avatar Martin Gels
Browse files

BugID: 1005

CS1.parset
 Added option 'Observation.SubbandIDs'

CS1_Parset.py
 Added lines for calculate the RefFreqs from array of 'Observation.SubbandIDs'

LOAFR_Parset.py
 Corrected function getInt32Vector()

CS1_Stations.py
 Added centre positions for Beamforming

CS1_Sections.py
 Changed BGLProc bin name in CS1_BGL_Processing

CS1_Run
 Corrected NoRuns
parent cdbaa559
No related branches found
No related tags found
No related merge requests found
...@@ -23,7 +23,7 @@ Connections.BGLProc_Storage.TransportHolder = SOCKET # one of SOCKET, FILE, NULL ...@@ -23,7 +23,7 @@ Connections.BGLProc_Storage.TransportHolder = SOCKET # one of SOCKET, FILE, NULL
Connections.BGLProc_Storage.BaseFileName = "Correlations" Connections.BGLProc_Storage.BaseFileName = "Correlations"
# The format of the data # The format of the data
Observation.NSubbands = 1 Observation.NSubbands = 16
Observation.NChannels = 256 Observation.NChannels = 256
Observation.NPolarisations=2 Observation.NPolarisations=2
Observation.PositionType = ITRF # should be ITRF Observation.PositionType = ITRF # should be ITRF
...@@ -46,21 +46,23 @@ Observation.NBeams = 1 # number of beams used ...@@ -46,21 +46,23 @@ Observation.NBeams = 1 # number of beams used
Observation.DirectionType = J2000 # direction type Observation.DirectionType = J2000 # direction type
Observation.BeamDirections = [\ # pair of RA/DEC per beam (angle in rad) Observation.BeamDirections = [\ # pair of RA/DEC per beam (angle in rad)
6.1234876806221052, 1.0265153995604648] 6.1234876806221052, 1.0265153995604648]
Observation.DelayCompensation = T 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 Variables
General.SubbandsPerPset = 1 General.SubbandsPerPset = 2
# Variables for the DelayCompensation # Variables for the DelayCompensation
DelayComp.ConverterType=IMPL # should be one of IMPL, CLIENT DelayComp.ConverterType=IMPL # should be one of IMPL, CLIENT
# Variables for the InputSection # Variables for the InputSection
Input.NTimesInFrame=16 Input.NTimesInFrame=16
Input.NSubbandsPerFrame=8 Input.NSubbandsPerFrame=32
Input.SzEPAheader=16 Input.SzEPAheader=16
Input.IPHeaderSize=32 Input.IPHeaderSize=32
Input.NSamplesToBuffer=12000000 Input.NSamplesToBuffer=6000000
Input.WriteRawDataToFile = F Input.WriteRawDataToFile = F
Input.OutputRawDataFiles = ["/dev/null", "/dev/null"] Input.OutputRawDataFiles = ["/dev/null", "/dev/null"]
Input.Transport.Station0.Rsp0.th = NULL # should be one of NULL, FILE, SOCKET, NULL Input.Transport.Station0.Rsp0.th = NULL # should be one of NULL, FILE, SOCKET, NULL
......
...@@ -144,12 +144,17 @@ class CS1_Parset(LOFAR_Parset.Parset): ...@@ -144,12 +144,17 @@ class CS1_Parset(LOFAR_Parset.Parset):
if not self.__dict__.has_key('nSubbands'): if not self.__dict__.has_key('nSubbands'):
return return
sbs = list()
for sb in range(0, self.nSubbands): subbandIDs = self.getInt32Vector('Observation.SubbandIDs')
sbs.append(self.firstSB + sb * subbandwidth) 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 # 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 self['Observation.NSubbands'] = self.nSubbands
#the number of subbands should be dividable by the number of subbands per pset #the number of subbands should be dividable by the number of subbands per pset
......
#!/usr/bin/env python #!/usr/bin/env python
import math
import time import time
import os import os
import sys import sys
...@@ -29,7 +30,8 @@ def doObservation(obsID, parset): ...@@ -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 #print int(parset['Observation.StopTime']), int(parset['Observation.StartTime']), noRuns
logdir = '/log/' logdir = '/log/'
...@@ -46,8 +48,10 @@ def doObservation(obsID, parset): ...@@ -46,8 +48,10 @@ def doObservation(obsID, parset):
# todo 27-10-2006 this is a temporary hack because storage doesn't close neatly. # 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 # This way all sections run longer than needed and storage stops before the rest does
if not isinstance(section, StorageSection): if not isinstance(section, StorageSection):
section.run(runlog, noRuns+10) noRuns = ((sz+15)&~15) + 16;
section.run(runlog, noRuns)
else: else:
noRuns = (sz+15)&~15
section.run(runlog, noRuns) section.run(runlog, noRuns)
print print
...@@ -70,7 +74,7 @@ if __name__ == '__main__': ...@@ -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('--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('--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('--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('--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('--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]') 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__': ...@@ -100,7 +104,7 @@ if __name__ == '__main__':
parset.setSubbands(first, nsb) parset.setSubbands(first, nsb)
# read the runtime (optional start in utc and the length of the measurement) # 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 # convert beamdirections from RA and Dec to Radians
#parset.setBeamdir() #parset.setBeamdir()
......
...@@ -148,7 +148,8 @@ class BGLProcSection(Section): ...@@ -148,7 +148,8 @@ class BGLProcSection(Section):
# todo: We should check here if the executable exists # todo: We should check here if the executable exists
nstations = parset.getNStations() nstations = parset.getNStations()
clock = parset.getClockString() 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): def run(self, runlog, noRuns, runCmd = None):
nodesPerCell = self.parset.getInt32('BGLProc.NodesPerPset') * self.parset.getInt32('BGLProc.PsetsPerCell') nodesPerCell = self.parset.getInt32('BGLProc.NodesPerPset') * self.parset.getInt32('BGLProc.PsetsPerCell')
......
...@@ -66,6 +66,30 @@ CS16_dipole12 = [Station('CS16_dipole12', 12, (0.119964779015, 0.920270965005, ...@@ -66,6 +66,30 @@ CS16_dipole12 = [Station('CS16_dipole12', 12, (0.119964779015, 0.920270965005,
CS16_4dipoles = CS16_dipole0 + CS16_dipole4 + CS16_dipole8 + CS16_dipole12 CS16_4dipoles = CS16_dipole0 + CS16_dipole4 + CS16_dipole8 + CS16_dipole12
Fourstations_4dipoles = CS10_4dipoles + CS01_4dipoles + CS08_4dipoles + CS16_4dipoles Fourstations_4dipoles = CS10_4dipoles + CS01_4dipoles + CS08_4dipoles + CS16_4dipoles
Treestations_4dipoles = CS01_4dipoles + CS08_4dipoles + CS16_4dipoles
Twostations_4dipoles = CS08_4dipoles + CS16_4dipoles CS10_centre0 = [Station('CS10_centre0' , 1, (0.119880687209, 0.920274829586, 6364096.65669), 0, '10:fa:00:0a:01:00')]
#Twostations_4dipoles = CS01_4dipoles + CS08_4dipoles + CS16_4dipoles 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
...@@ -40,9 +40,10 @@ class Parset(object): ...@@ -40,9 +40,10 @@ class Parset(object):
return line.split(',') return line.split(',')
def getInt32Vector(self, key): def getInt32Vector(self, key):
line = self.parameters[key] ln = self.parameters[key]
line.strip('[').strip(']') ln_tmp = ln.split('[')
return [int(lp) for lp in line.split(',')] line = ln_tmp[1].split(']')
return [int(lp) for lp in line[0].split(',')]
def getFloatVector(self, key): def getFloatVector(self, key):
line = self.parameters[key] line = self.parameters[key]
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment