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'))) ...@@ -12,7 +12,7 @@ config.readfp(open(os.path.join(os.path.dirname(__file__), 'backend.ini')))
logging.basicConfig(level=logging.DEBUG) logging.basicConfig(level=logging.DEBUG)
class Backend(): 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 Initializes a backend instance. The mode for writing can be
Pulsar', 'Line','Raw' or 'SDR'. Pulsar', 'Line','Raw' or 'SDR'.
...@@ -59,7 +59,7 @@ class Backend(): ...@@ -59,7 +59,7 @@ class Backend():
''' '''
Note: in the stub runimpact I added /bin/bash, otherwise you get an Exec format error. 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() self.cli.wait()
logging.info('runimpact completed') logging.info('runimpact completed')
...@@ -72,7 +72,7 @@ class Backend(): ...@@ -72,7 +72,7 @@ class Backend():
Note: in the stub runimpact I added /bin/bash, otherwise you get an Exec format error. Note: in the stub runimpact I added /bin/bash, otherwise you get an Exec format error.
''' '''
if self.LSREnabled == False: 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.cli.wait()
self.LSREnabled = True self.LSREnabled = True
logging.info('LSR compensation is enabled') logging.info('LSR compensation is enabled')
...@@ -81,15 +81,5 @@ class Backend(): ...@@ -81,15 +81,5 @@ class Backend():
if __name__ == '__main__': if __name__ == '__main__':
myBackend = Backend() myBackend = Backend()
myBackend.enableLSR()
myBackend.enableLSR()
myBackend.setMode('Pulsar') myBackend.setMode('Pulsar')
myBackend.setMode('Hydrogen') 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] [Tools]
runimpact: /home/marc/bin/runimpact runimpact: /usr/local/bin/runimpact
vlsr: /home/marc/bin/trackHI.py vlsr: /home/marc/bin/trackHI.py
[Modes] [Modes]
pulsar: pulsar.batch pulsar: pulsar
hydrogen: line hydrogen: HI
raw: raw raw: raw
SDR: sdr SDR: sdr
\ No newline at end of file
[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