Esempio n. 1
0
File: nway.py Progetto: afcarl/nway
		elif v.startswith('--out='):
			newargv.append('--out=' + shiftoutfile)
		else:
			newargv.append(v)
		i = i + 1
	print('      ' + ' '.join(newargv))
	print('   3) determining the p_any cutoff that corresponds to a false-detection rate')
	print('      nway-calibrate-cutoff.py %s %s' % (outfile, shiftoutfile))
	print()
	
# write out fits file
print()
print('creating output FITS file ...')
tbhdu = match.fits_from_columns(pyfits.ColDefs(columns))

hdulist = match.wraptable2fits(tbhdu, 'MULTIMATCH')
hdulist[0].header['METHOD'] = 'multi-way matching'
hdulist[0].header['INPUT'] = ', '.join(filenames)
hdulist[0].header['TABLES'] = ', '.join(table_names)
hdulist[0].header['BIASING'] =  ', '.join(biases.keys())
hdulist[0].header['NWAYCMD'] = ' '.join(sys.argv)
for k, v in args.__dict__.items():
	hdulist[0].header.add_comment("argument %s: %s" % (k, v))
hdulist[0].header.update(match_header)
print('    writing "%s" (%d rows, %d columns) ...' % (outfile, len(tbhdu.data), len(columns)))
hdulist.writeto(outfile, **progress.kwargs_overwrite_true)

import nwaylib.checkupdates
nwaylib.checkupdates.checkupdates()

Esempio n. 2
0
        else:
            newargv.append(v)
        i = i + 1
    print('      ' + ' '.join(newargv))
    print(
        '   3) determining the p_any cutoff that corresponds to a false-detection rate'
    )
    print('      nway-calibrate-cutoff.py %s %s' % (outfile, shiftoutfile))
    print()

# write out fits file
print()
print('creating output FITS file ...')
tbhdu = match.fits_from_columns(pyfits.ColDefs(columns))

hdulist = match.wraptable2fits(tbhdu, 'NWAYMATCH')
hdulist[0].header['METHOD'] = 'NWAY multi-way matching'
hdulist[0].header['INPUT'] = ', '.join(filenames)
hdulist[0].header['TABLES'] = ', '.join(table_names)
hdulist[0].header['BIASING'] = ', '.join(biases.keys())
hdulist[0].header['NWAYCMD'] = ' '.join(sys.argv)
for k, v in args.__dict__.items():
    hdulist[0].header.add_comment("argument %s: %s" % (k, v))
hdulist[0].header.update(match_header)
print('    writing "%s" (%d rows, %d columns) ...' %
      (outfile, len(tbhdu.data), len(columns)))
hdulist.writeto(outfile, **progress.kwargs_overwrite_true)

import nwaylib.checkupdates
nwaylib.checkupdates.checkupdates()