expf_name, shape_sim, wcs_sim, dimensionless=False) # 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(cc, theory, lmax, orphics_is_dimensionless=False) parray_sim.add_theory(cc, theory, lmax, orphics_is_dimensionless=False) 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 = args.kellmin kellmax = args.kellmax lbin_edges = np.arange(kellmin, kellmax, 200) lbinner_dat = stats.bin2D(modlmap_dat, lbin_edges) lbinner_sim = stats.bin2D(modlmap_sim, lbin_edges) sverif_cmb = SpectrumVerification(mpibox,
dimensionless=True) if rank == 0: print("Attributes...") lxmap_dat, lymap_dat, modlmap_dat, angmap_dat, lx_dat, ly_dat = fmaps.get_ft_attributes_enmap( shape_dat, wcs_dat) if rank == 0: print("Binners...") lbin_edges = np.arange(kellmin, kellmax, 200) lbinner_dat = stats.bin2D(modlmap_dat, lbin_edges) if rank == 0: print("Cosmology...") # === COSMOLOGY === theory, cc, lmax = aio.theory_from_config(Config, cosmology_section) parray_dat.add_theory(cc, theory, lmax) taper_percent = 14.0 pad_percent = 2.0 Ny, Nx = shape_dat taper = fmaps.cosineWindow(Ny, Nx, lenApodY=int(taper_percent * min(Ny, Nx) / 100.), lenApodX=int(taper_percent * min(Ny, Nx) / 100.), padY=int(pad_percent * min(Ny, Nx) / 100.), padX=int(pad_percent * min(Ny, Nx) / 100.)) w2 = np.mean(taper**2.) w3 = np.mean(taper**3.) w4 = np.mean(taper**4.) if rank == 0: