print " *************** CREATED_IMAGES: " print created_images best_images = [] for ii in created_images: if not (re.match(".*\.pb$", ii) or re.match(".*\.residual$", ii) or re.match(".*\.weight$", ii)): best_images.append(ii) print " **** Selected images to calculate fidelity on: " print best_images for mm in best_images: combut.calc_fidelity(mm, truth_image, INT_imagename + '.pb', outfile=mm + '.fiderr', pb_thresh=0.5) ########## #inimg,refimg,pbimg='',psfimg='',fudge_factor=1.0,scale_factor=1.0,pb_thresh=0.25,clean_up=True,outfile=''): # run shell script do_sba_jvm here - it's a 1% effect on peak brightness, # total flux, and flux of the brightest "object" #sd_img_fixed = "sd_30dor_zeroTau/sd_30dor_zeroTau.ngvla-sd.sdbetter.tp.fix2" #int_map = 'sba_30dor_new/sba_30dor_new.ngvla-sba-revC.autoDev5.sdmod.image' #int_pb = 'sba_30dor_new/sba_30dor_new.ngvla-sba-revC.autoDev5.sdmod.pb' #outfile=int_map+'_plusTpFixed' #rmtables(sd_map+".TMP.intGrid.intPb")
def do_fidelity(flnm, refimg): my_stats = combut.calc_fidelity(flnm, refimg) my_stats['metric'] = 'fidelity' my_stats['inimg'] = flnm my_stats['refimg'] = refimg return my_stats