Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
for a1 in range(Nants):
for a2 in range(a1, Nants):
if bi >= Nbls:
break
blsel.append('({},{})'.format(a1, a2))
bi += 1
# ----------------
# Sky Model setup
# Full frequency HEALPix shell.
# ----------------
fmin, fmax = 0.0, 1.0 # K (fluxes)
skydat = np.random.uniform(fmin, fmax, (Nfreqs, Nsrcs))
write_healpix_hdf5(os.path.join(confdir, hpx_fname), skydat, range(Nsrcs), freqs)
# ----------------
# Make config dictionaries
# ----------------
filedict = {
'outdir': outdir,
'outfile_name': 'benchmark',
'output_format': 'uvh5'
}
freqdict = freq_array_to_params(freqs)
srcdict = {
'catalog': hpx_fname
}
if bi >= Nbls:
break
blsel.append('({},{})'.format(a1, a2))
bi += 1
# ----------------
# Sky Model setup
# Full frequency HEALPix shell.
# ----------------
fmin, fmax = 0.0, 1.0 # K (fluxes)
skydat = np.random.uniform(fmin, fmax, (Nfreqs, Nsrcs))
hpx_fname = 'benchmark_skymodel.hdf5'
write_healpix_hdf5(os.path.join(confdir, hpx_fname), skydat, range(Nsrcs), freqs)
# ----------------
# Make config dictionaries
# ----------------
filedict = {
'outdir': outdir,
'outfile_name': 'benchmark',
'output_format': 'uvh5'
}
freqdict = freq_array_to_params(freqs)
srcdict = {
'catalog': hpx_fname