def run_sims(maxscale=3): for scale in range(1,maxscale): synthetically_image_fitsfile(paths.simpath("simimage_scale{0}_gaussian.fits".format(scale)), base_name='casa_simimage_scale{0}_gaussian'.format(scale), cleanup=True) synthetically_image_fitsfile(paths.simpath("simimage_scale{0}_tophat.fits".format(scale)), base_name='casa_simimage_scale{0}_tophat'.format(scale), cleanup=True)
def run_sims(maxscale=3): for scale in range(1, maxscale): synthetically_image_fitsfile( paths.simpath("simimage_scale{0}_gaussian.fits".format(scale)), base_name='casa_simimage_scale{0}_gaussian'.format(scale), cleanup=True) synthetically_image_fitsfile( paths.simpath("simimage_scale{0}_tophat.fits".format(scale)), base_name='casa_simimage_scale{0}_tophat'.format(scale), cleanup=True)
def ridiculous_tests(): for unit in ('Jy/beam', 'Jy/pixel', 'Jy', 'K'): fh = simulate_grid_for_fitsfile(paths.dpath("w51_te_continuum_best.fits"), separation=45*3, amplitude_range=[0.001,0.1], scale=3, random_offset=20) assert fh[0].data.max() > 0 fh[0].header['BUNIT'] = unit fh.writeto(paths.simpath("stupidtest_{0}.fits".format(unit.replace("/","_"))), clobber=True) synthetically_image_fitsfile(paths.simpath("stupidtest_{0}.fits".format(unit.replace("/","_"))), base_name="casa_stupidtest_{0}".format(unit.replace("/","_")), cleanup=True )
def setup_sims(maxscale=3): for scale in range(1,maxscale): fh = simulate_grid_for_fitsfile(paths.dpath("w51_te_continuum_best.fits"), separation=45*scale, amplitude_range=[0.001,0.1], scale=scale, random_offset=20) fh[0].header['BUNIT'] = 'Jy/beam' fh.writeto(paths.simpath("simimage_scale{0}_gaussian.fits".format(scale)), clobber=True) fh = simulate_grid_for_fitsfile(paths.dpath("w51_te_continuum_best.fits"), separation=45*scale, amplitude_range=[0.001,0.1], kernel=Tophat2DKernel, scale=scale, random_offset=20) fh[0].header['BUNIT'] = 'Jy/beam' fh.writeto(paths.simpath("simimage_scale{0}_tophat.fits".format(scale)), clobber=True)
def ridiculous_tests(): for unit in ('Jy/beam', 'Jy/pixel', 'Jy', 'K'): fh = simulate_grid_for_fitsfile( paths.dpath("w51_te_continuum_best.fits"), separation=45 * 3, amplitude_range=[0.001, 0.1], scale=3, random_offset=20) assert fh[0].data.max() > 0 fh[0].header['BUNIT'] = unit fh.writeto(paths.simpath("stupidtest_{0}.fits".format( unit.replace("/", "_"))), clobber=True) synthetically_image_fitsfile( paths.simpath("stupidtest_{0}.fits".format(unit.replace("/", "_"))), base_name="casa_stupidtest_{0}".format(unit.replace("/", "_")), cleanup=True)
def setup_sims(maxscale=3): for scale in range(1, maxscale): fh = simulate_grid_for_fitsfile( paths.dpath("w51_te_continuum_best.fits"), separation=45 * scale, amplitude_range=[0.001, 0.1], scale=scale, random_offset=20) fh[0].header['BUNIT'] = 'Jy/beam' fh.writeto(paths.simpath( "simimage_scale{0}_gaussian.fits".format(scale)), clobber=True) fh = simulate_grid_for_fitsfile( paths.dpath("w51_te_continuum_best.fits"), separation=45 * scale, amplitude_range=[0.001, 0.1], kernel=Tophat2DKernel, scale=scale, random_offset=20) fh[0].header['BUNIT'] = 'Jy/beam' fh.writeto(paths.simpath( "simimage_scale{0}_tophat.fits".format(scale)), clobber=True)