Commit bd5e995a authored by Camras Demo (local)'s avatar Camras Demo (local)
Browse files

test backend in DT during clubday

parent 6f05f9be
......@@ -12,7 +12,7 @@ config.readfp(open(os.path.join(os.path.dirname(__file__), 'backend.ini')))
logging.basicConfig(level=logging.DEBUG)
class Backend():
def __init__(self,currentMode='Pulsar', setmode=None):
def __init__(self,currentMode='None', setmode=None):
'''
Initializes a backend instance. The mode for writing can be
Pulsar', 'Line','Raw' or 'SDR'.
......@@ -59,7 +59,7 @@ class Backend():
'''
Note: in the stub runimpact I added /bin/bash, otherwise you get an Exec format error.
'''
self.cli = subprocess.Popen(self.runimpactTool, 10, stdout=subprocess.PIPE)
self.cli = subprocess.Popen([self.runimpactTool, argument], stdout=subprocess.PIPE)
self.cli.wait()
logging.info('runimpact completed')
......@@ -72,7 +72,7 @@ class Backend():
Note: in the stub runimpact I added /bin/bash, otherwise you get an Exec format error.
'''
if self.LSREnabled == False:
self.cli = subprocess.Popen(self.LSRTool, stdout=subprocess.PIPE)
self.cli = subprocess.Popen(command, stdout=subprocess.PIPE)
self.cli.wait()
self.LSREnabled = True
logging.info('LSR compensation is enabled')
......@@ -81,15 +81,5 @@ class Backend():
if __name__ == '__main__':
myBackend = Backend()
myBackend.enableLSR()
myBackend.enableLSR()
myBackend.setMode('Pulsar')
myBackend.setMode('Hydrogen')
myBackend.setMode('Hydrogen')
myBackend.setMode('Raw')
myBackend.setMode('Raw')
myBackend.setMode('SDR')
myBackend.setMode('SDR')
myBackend.setMode('Pulsar')
\ No newline at end of file
[Tools]
runimpact: /home/marc/bin/runimpact
runimpact: /usr/local/bin/runimpact
vlsr: /home/marc/bin/trackHI.py
[Modes]
pulsar: pulsar.batch
hydrogen: line
pulsar: pulsar
hydrogen: HI
raw: raw
SDR: sdr
\ No newline at end of file
SDR: sdr
[Tools]
runimpact: /usr/local/bin/runimpact
vlsr: /home/marc/bin/trackHI.py
[Modes]
pulsar: pulsar
hydrogen: HI
raw: raw
SDR: sdr
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment