Skip to content
Snippets Groups Projects
Commit 84daa1bf authored by Marcel Loose's avatar Marcel Loose :sunglasses:
Browse files

Task #3172: Added option to specify blackboard database used by the demixing recipe.

parent c5d10d47
No related branches found
No related tags found
No related merge requests found
......@@ -42,6 +42,11 @@ class demixing(BaseRecipe, RemoteCommandRecipeMixIn):
dest='demixdir',
help="Directory containing the demixing parset-files",
),
'db_host': ingredient.StringField(
'--db-host',
dest="db_host",
help="Database host with optional port (e.g. ldb001)"
),
'skymodel': ingredient.FileField(
'--skymodel',
help="File containing the sky model to use",
......@@ -145,7 +150,8 @@ class demixing(BaseRecipe, RemoteCommandRecipeMixIn):
self.inputs['half_window'],
self.inputs['threshold'],
self.inputs['demix_parset_dir'],
self.inputs['skymodel']
self.inputs['skymodel'],
self.inputs['db_host']
]
)
)
......
......@@ -70,7 +70,7 @@ class demixing(LOFARnodeTCP):
def run(self, infile, working_dir, initscript, remove, target,
clusterdesc, timestep, freqstep, half_window, threshold,
demixdir, skymodel):
demixdir, skymodel, db_host):
with log_time(self.logger):
if os.path.exists(infile):
......@@ -91,6 +91,7 @@ class demixing(LOFARnodeTCP):
self.logger.debug("threshold = %f", threshold)
self.logger.debug("demixdir = %s", demixdir)
self.logger.debug("skymodel = %s", skymodel)
self.logger.debug("db_host= %s", db_host)
# Initialise environment
self.environment = read_initscript(self.logger, initscript)
......@@ -221,7 +222,7 @@ class demixing(LOFARnodeTCP):
'-f',
'--key', key,
'--cluster-desc', clusterdesc,
'--db', 'ldb001',
'--db', db_host,
'--db-user', 'postgres',
gds_file,
os.path.join(demixdir, 'bbs_'+i+'.parset'),
......@@ -250,7 +251,7 @@ class demixing(LOFARnodeTCP):
'--instrument-name', 'instrument_smoothed',
'--key', key,
'--cluster-desc', clusterdesc,
'--db', 'ldb001',
'--db', db_host,
'--db-user', 'postgres',
gds_file,
os.path.join(demixdir, 'bbs_'+i+'_smoothcal.parset'),
......
......@@ -72,6 +72,7 @@ recipe = flag_baseline
recipe = demixing
initscript = %(lofarroot)s/lofarinit.sh
demix_parset_dir = %(lofarroot)s/share/pipeline/demixing
db_host = ldb002
skymodel = %(lofarroot)s/share/pipeline/skymodels/Ateam_LBA_CC.skymodel
demix_sources = CasA,CygA
mapfile = %(runtime_directory)s/jobs/%(job_name)s/mapfiles/demix.mapfile
......
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