def calibrate_calibrator(cal): source = table( "%s::OBSERVATION" % (cal, )).getcol("LOFAR_TARGET")['array'][0].lower().replace( ' ', '') skymodel = os.path.join(input_parset.getString("skymodel_dir"), "%s.skymodel" % (source, )) print "Calibrating %s with skymodel %s" % (cal, skymodel) run_calibrate_standalone(calcal_parset, cal, skymodel, replace_parmdb=True, replace_sourcedb=True)
def phaseonly(target_info): # We chdir to the scratch directory initially, so that logs get dumped # there, then we'll copy the logs to the output directory when we're # done. try: os.chdir(os.path.dirname(target_info["combined_ms"])) run_calibrate_standalone( get_parset_subset(input_parset, "phaseonly.parset", scratch), target_info["combined_ms"], target_info["skymodel"]) for logfile in glob.glob( os.path.join(os.path.dirname(target_info["combined_ms"]), "*log")): shutil.copy(logfile, target_info["output_dir"]) except Exception, e: print "Error in phaseonly with %s" % (target_info["combined_ms"]) print str(e) raise
def phaseonly(target_info): # We chdir to the scratch directory initially, so that logs get dumped # there, then we'll copy the logs to the output directory when we're # done. try: os.chdir(os.path.dirname(target_info["combined_ms"])) run_calibrate_standalone( get_parset_subset(input_parset, "phaseonly.parset", scratch), target_info["combined_ms"], target_info["skymodel"], ) for logfile in glob.glob(os.path.join(os.path.dirname(target_info["combined_ms"]), "*log")): shutil.copy(logfile, target_info["output_dir"]) except Exception, e: print "Error in phaseonly with %s" % (target_info["combined_ms"]) print str(e) raise
def calibrate_calibrator(cal): source = table("%s::OBSERVATION" % (cal,)).getcol("LOFAR_TARGET")["array"][0].lower().replace(" ", "") skymodel = os.path.join(input_parset.getString("skymodel_dir"), "%s.skymodel" % (source,)) print "Calibrating %s with skymodel %s" % (cal, skymodel) run_calibrate_standalone(calcal_parset, cal, skymodel, replace_parmdb=True, replace_sourcedb=True)