pol = Config.getboolean("reconstruction", "pol") shape_sim, wcs_sim, shape_dat, wcs_dat = aio.enmaps_from_config(Config, "sims", "analysis", pol=pol) parray_sim = aio.patch_array_from_config(Config, exp_name, shape_sim, wcs_sim, dimensionless=True) parray_dat = aio.patch_array_from_config(Config, expf_name, shape_dat, wcs_dat, dimensionless=True) lmax, tellmin, tellmax, pellmin, pellmax, kellmin, kellmax = aio.ellbounds_from_config( Config, "reconstruction") if cluster: gradCut = 2000 else: gradCut = None if pol: pol_list = ['TT', 'EB', 'EE', 'ET', 'TE', 'TB'] else: pol_list = ['TT'] debug = False out_dir = os.environ['WWW'] + "plots/halotest/smallpatch_"
# Efficiently distribute sims over MPI cores num_each, each_tasks = mpi_distribute(Nsims, numcores) # Initialize a container for stats and stacks mpibox = MPIStats(comm, num_each, tag_start=333) if rank == 0: print(("At most ", max(num_each), " tasks...")) # What am I doing? my_tasks = each_tasks[rank] # === COSMOLOGY === theory, cc, lmax = aio.theory_from_config(Config, cosmology_section, dimensionless=False) parray_dat.add_theory(theory, lmax, orphics_is_dimensionless=False) parray_sim.add_theory(theory, lmax, orphics_is_dimensionless=False) lb = aio.ellbounds_from_config(Config, "reconstruction_pol", min_ell) tellmin = lb['tellminY'] tellmax = lb['tellmaxY'] pellmin = lb['pellminY'] pellmax = lb['pellmaxY'] kellmin = lb['kellmin'] kellmax = lb['kellmax'] lxmap_dat, lymap_dat, modlmap_dat, angmap_dat, lx_dat, ly_dat = fmaps.get_ft_attributes_enmap( shape_dat, wcs_dat) lxmap_sim, lymap_sim, modlmap_sim, angmap_sim, lx_sim, ly_sim = fmaps.get_ft_attributes_enmap( shape_sim, wcs_sim) kellmin = 200 kellmax = 6000 lbin_edges = np.arange(kellmin, kellmax, 50) lbinner_dat = stats.bin2D(modlmap_dat, lbin_edges)
# Efficiently distribute sims over MPI cores num_each, each_tasks = mpi_distribute(Nsims, numcores) # Initialize a container for stats and stacks mpibox = MPIStats(comm, num_each, tag_start=333) if rank == 0: print(("At most ", max(num_each), " tasks...")) # What am I doing? my_tasks = each_tasks[rank] # === COSMOLOGY === theory, cc, lmax = aio.theory_from_config(Config, cosmology_section, dimensionless=False) parray_dat.add_theory(theory=theory, lmax=lmax, orphics_is_dimensionless=False) parray_sim.add_theory(theory=theory, lmax=lmax, orphics_is_dimensionless=False) lb = aio.ellbounds_from_config(Config, recon_section, min_ell) tellmin = lb['tellminY'] tellmax = lb['tellmaxY'] pellmin = lb['pellminY'] pellmax = lb['pellmaxY'] kellmin = lb['kellmin'] kellmax = lb['kellmax'] lxmap_dat, lymap_dat, modlmap_dat, angmap_dat, lx_dat, ly_dat = fmaps.get_ft_attributes_enmap( shape_dat, wcs_dat) lxmap_sim, lymap_sim, modlmap_sim, angmap_sim, lx_sim, ly_sim = fmaps.get_ft_attributes_enmap( shape_sim, wcs_sim) lbin_edges = np.arange(kellmin, kellmax, 200) lbinner_dat = stats.bin2D(modlmap_dat, lbin_edges) lbinner_sim = stats.bin2D(modlmap_sim, lbin_edges) bin_edges = np.arange(0., 20., analysis_resolution * 2.)