Reading from a C version FastPM snapshot file.

We will

  • create a parameter file, a simple power spectrum in units of Mpc/h,
  • run FastPM to obtain a snapshot at z=0
  • load the result with nbodykit

In [1]:
%pylab inline


Populating the interactive namespace from numpy and matplotlib

In [3]:
from nbodykit.source.catalog.file import BigFileCatalog
from nbodykit.source.mesh import BigFileMesh

In [4]:
from nbodykit.cosmology import Planck15
from nbodykit.cosmology import EHPower

In [5]:
k = numpy.logspace(-4, 2, 1000)
p = EHPower(Planck15, redshift=0.0)(k)
numpy.savetxt('powerspec.txt', numpy.array((k, p)).T)

In [6]:
%%file nbodykit.lua

nc = 128
boxsize = 384.0

time_step = linspace(0.1, 1, 10)

output_redshifts= {0.0}  -- redshifts of output

omega_m = 0.307494
h       = 0.6774

read_powerspectrum= "powerspec.txt"
random_seed= 100

pm_nc_factor = 2

np_alloc_factor= 4.0      -- Amount of memory allocated for particle

write_snapshot= "fastpm" 
write_nonlineark= "fastpm" 

-- 1d power spectrum (raw), without shotnoise correction
write_powerspectrum = "powerspec-debug"


Overwriting nbodykit.lua

In [7]:
%%bash
export OMP_NUM_THREADS=1
mpirun -n 4 ../src/fastpm nbodykit.lua


[ 0000000.0000 ]: This is FastPM, with libfastpm version 1.0.097fdf5eb9-dirty.
[ 0000000.0015 ]: Configuration {
	boxsize = 384.0,
	compute_potential = false,
	dealiasing_type = "none",
	dh_factor = 1.0,
	enforce_broadband_kmax = 4,
	f_nl_type = "none",
	force_mode = "fastpm",
	h = 0.677400000000000002,
	inverted_ic = false,
	kernel_type = "3_4",
	kmax_primordial_over_knyquist = 0.25,
	nc = 128,
	np_alloc_factor = 4.0,
	omega_m = 0.30749399999999999,
	painter_support = 2,
	painter_type = "cic",
	pm_nc_factor = 2,
	random_seed = 100,
	read_powerspectrum = "powerspec.txt",
	remove_cosmic_variance = false,
	set_mode_method = "override",
	shift = false,
	sigma8 = 0,
	write_nonlineark = "fastpm",
	write_powerspectrum = "powerspec-debug",
	write_snapshot = "fastpm",
	za = false,
	aout = {
		1.0,
	},
	output_redshifts = {
		0.0,
	},
	time_step = {
		0.100000000000000006,
		0.190000000000000002,
		0.280000000000000027,
		0.369999999999999996,
		0.459999999999999964,
		0.550000000000000044,
		0.640000000000000013,
		0.729999999999999982,
		0.819999999999999951,
		0.90999999999999992,
		1,
	},
}
[ 0000000.0016 ]: np_alloc_factor = 4
[ 0000000.0017 ]: mass of a particle is 230.353 1e10 Msun/h
[ 0000000.0071 ]: BaseProcMesh : 2 x 2
[ 0000000.0072 ]: Powerspecectrum file: powerspec.txt
[ 0000000.0088 ]: Found 1000 pairs of values in input spectrum table
[ 0000000.0096 ]: Input power spectrum sigma8 0.815898
[ 0000000.2138 ]: Inducing correlation to the white noise.
[ 0000000.4665 ]: writing linear power spectrum to powerspec-debug_linear.txt
[ 0000001.7880 ]: dx1  : 5.13658 5.5179 6.16024 5.60491
[ 0000001.7882 ]: dx2  : 0.853765 0.841076 0.847693 0.847511
[ 0000001.8062 ]: ==== -> 001 [000 000 000] a_i = 0.1000 a_f = 0.1000 a_r = 0.1000 Action = FORCE(0) ====
[ 0000003.9335 ]: Force Calculation Nmesh = 256 ====
[ 0000003.9455 ]: Load imbalance is - 0.99091 / + 1.00439
[ 0000003.9458 ]: Peak memory usage on rank 0: 225.141 MB
[ 0000004.0870 ]: D^2(0.1, 1.0) P(k<0.0654167) = 13929.2 Sigma8 = 6.4495
[ 0000004.0871 ]: writing power spectrum to powerspec-debug_0.1000.txt
[ 0000004.1119 ]: Checking Snapshots (0.1000 0.1000) with K(0.1000 0.1000 0.1000) D(0.1000 0.1000 0.1000)
[ 0000004.1120 ]: ==== -> 002 [000 001 000] a_i = 0.1000 a_f = 0.1378 a_r = 0.1000 Action = KICK(1) ====
[ 0000004.1380 ]: ==== -> 003 [001 001 000] a_i = 0.1000 a_f = 0.1378 a_r = 0.1378 Action = DRIFT(2) ====
[ 0000004.1606 ]: Checking Snapshots (0.1000 0.1378) with K(0.1000 0.1378 0.1000) D(0.1378 0.1000 0.1378)
[ 0000004.1740 ]: ==== -> 004 [002 001 000] a_i = 0.1378 a_f = 0.1900 a_r = 0.1378 Action = DRIFT(2) ====
[ 0000004.1980 ]: ==== -> 005 [002 001 002] a_i = 0.1000 a_f = 0.1900 a_r = 0.1900 Action = FORCE(0) ====
[ 0000006.1621 ]: Force Calculation Nmesh = 256 ====
[ 0000006.1622 ]: Load imbalance is - 0.989521 / + 1.00418
[ 0000006.1623 ]: Peak memory usage on rank 0: 225.141 MB
[ 0000006.3022 ]: D^2(0.19, 1.0) P(k<0.0654167) = 13919 Sigma8 = 3.41523
[ 0000006.3022 ]: writing power spectrum to powerspec-debug_0.1900.txt
[ 0000006.3048 ]: ==== -> 006 [002 002 002] a_i = 0.1378 a_f = 0.1900 a_r = 0.1900 Action = KICK(1) ====
[ 0000006.3288 ]: Checking Snapshots (0.1378 0.1900) with K(0.1900 0.1378 0.1900) D(0.1378 0.1900 0.1378)
[ 0000006.3453 ]: ==== -> 007 [002 003 002] a_i = 0.1900 a_f = 0.2307 a_r = 0.1900 Action = KICK(1) ====
[ 0000006.3750 ]: ==== -> 008 [003 003 002] a_i = 0.1900 a_f = 0.2307 a_r = 0.2307 Action = DRIFT(2) ====
[ 0000006.3989 ]: Checking Snapshots (0.1900 0.2307) with K(0.1900 0.2307 0.1900) D(0.2307 0.1900 0.2307)
[ 0000006.4147 ]: ==== -> 009 [004 003 002] a_i = 0.2307 a_f = 0.2800 a_r = 0.2307 Action = DRIFT(2) ====
[ 0000006.4412 ]: ==== -> 010 [004 003 004] a_i = 0.1900 a_f = 0.2800 a_r = 0.2800 Action = FORCE(0) ====
[ 0000008.5560 ]: Force Calculation Nmesh = 256 ====
[ 0000008.5561 ]: Load imbalance is - 0.986502 / + 1.0053
[ 0000008.5562 ]: Peak memory usage on rank 0: 225.141 MB
[ 0000008.7405 ]: D^2(0.28, 1.0) P(k<0.0654167) = 13905 Sigma8 = 2.35069
[ 0000008.7406 ]: writing power spectrum to powerspec-debug_0.2800.txt
[ 0000008.7433 ]: ==== -> 011 [004 004 004] a_i = 0.2307 a_f = 0.2800 a_r = 0.2800 Action = KICK(1) ====
[ 0000008.7656 ]: Checking Snapshots (0.2307 0.2800) with K(0.2800 0.2307 0.2800) D(0.2307 0.2800 0.2307)
[ 0000008.7806 ]: ==== -> 012 [004 005 004] a_i = 0.2800 a_f = 0.3219 a_r = 0.2800 Action = KICK(1) ====
[ 0000008.8078 ]: ==== -> 013 [005 005 004] a_i = 0.2800 a_f = 0.3219 a_r = 0.3219 Action = DRIFT(2) ====
[ 0000008.8467 ]: Checking Snapshots (0.2800 0.3219) with K(0.2800 0.3219 0.2800) D(0.3219 0.2800 0.3219)
[ 0000008.8599 ]: ==== -> 014 [006 005 004] a_i = 0.3219 a_f = 0.3700 a_r = 0.3219 Action = DRIFT(2) ====
[ 0000008.8842 ]: ==== -> 015 [006 005 006] a_i = 0.2800 a_f = 0.3700 a_r = 0.3700 Action = FORCE(0) ====
[ 0000011.2747 ]: Force Calculation Nmesh = 256 ====
[ 0000011.2747 ]: Load imbalance is - 0.982624 / + 1.00655
[ 0000011.2748 ]: Peak memory usage on rank 0: 225.141 MB
[ 0000011.4741 ]: D^2(0.37, 1.0) P(k<0.0654167) = 13884.5 Sigma8 = 1.81628
[ 0000011.4743 ]: writing power spectrum to powerspec-debug_0.3700.txt
[ 0000011.4768 ]: ==== -> 016 [006 006 006] a_i = 0.3219 a_f = 0.3700 a_r = 0.3700 Action = KICK(1) ====
[ 0000011.4992 ]: Checking Snapshots (0.3219 0.3700) with K(0.3700 0.3219 0.3700) D(0.3219 0.3700 0.3219)
[ 0000011.5146 ]: ==== -> 017 [006 007 006] a_i = 0.3700 a_f = 0.4126 a_r = 0.3700 Action = KICK(1) ====
[ 0000011.5446 ]: ==== -> 018 [007 007 006] a_i = 0.3700 a_f = 0.4126 a_r = 0.4126 Action = DRIFT(2) ====
[ 0000011.5674 ]: Checking Snapshots (0.3700 0.4126) with K(0.3700 0.4126 0.3700) D(0.4126 0.3700 0.4126)
[ 0000011.5809 ]: ==== -> 019 [008 007 006] a_i = 0.4126 a_f = 0.4600 a_r = 0.4126 Action = DRIFT(2) ====
[ 0000011.6049 ]: ==== -> 020 [008 007 008] a_i = 0.3700 a_f = 0.4600 a_r = 0.4600 Action = FORCE(0) ====
[ 0000013.5458 ]: Force Calculation Nmesh = 256 ====
[ 0000013.5459 ]: Load imbalance is - 0.978743 / + 1.00771
[ 0000013.5459 ]: Peak memory usage on rank 0: 225.141 MB
[ 0000013.6907 ]: D^2(0.46, 1.0) P(k<0.0654167) = 13858.1 Sigma8 = 1.50035
[ 0000013.6909 ]: writing power spectrum to powerspec-debug_0.4600.txt
[ 0000013.6937 ]: ==== -> 021 [008 008 008] a_i = 0.4126 a_f = 0.4600 a_r = 0.4600 Action = KICK(1) ====
[ 0000013.7175 ]: Checking Snapshots (0.4126 0.4600) with K(0.4600 0.4126 0.4600) D(0.4126 0.4600 0.4126)
[ 0000013.7326 ]: ==== -> 022 [008 009 008] a_i = 0.4600 a_f = 0.5030 a_r = 0.4600 Action = KICK(1) ====
[ 0000013.7633 ]: ==== -> 023 [009 009 008] a_i = 0.4600 a_f = 0.5030 a_r = 0.5030 Action = DRIFT(2) ====
[ 0000013.7859 ]: Checking Snapshots (0.4600 0.5030) with K(0.4600 0.5030 0.4600) D(0.5030 0.4600 0.5030)
[ 0000013.7999 ]: ==== -> 024 [010 009 008] a_i = 0.5030 a_f = 0.5500 a_r = 0.5030 Action = DRIFT(2) ====
[ 0000013.8259 ]: ==== -> 025 [010 009 010] a_i = 0.4600 a_f = 0.5500 a_r = 0.5500 Action = FORCE(0) ====
[ 0000015.7916 ]: Force Calculation Nmesh = 256 ====
[ 0000015.7917 ]: Load imbalance is - 0.975693 / + 1.00892
[ 0000015.7917 ]: Peak memory usage on rank 0: 225.141 MB
[ 0000015.9312 ]: D^2(0.55, 1.0) P(k<0.0654167) = 13828.3 Sigma8 = 1.29591
[ 0000015.9314 ]: writing power spectrum to powerspec-debug_0.5500.txt
[ 0000015.9339 ]: ==== -> 026 [010 010 010] a_i = 0.5030 a_f = 0.5500 a_r = 0.5500 Action = KICK(1) ====
[ 0000015.9564 ]: Checking Snapshots (0.5030 0.5500) with K(0.5500 0.5030 0.5500) D(0.5030 0.5500 0.5030)
[ 0000015.9834 ]: ==== -> 027 [010 011 010] a_i = 0.5500 a_f = 0.5933 a_r = 0.5500 Action = KICK(1) ====
[ 0000016.0097 ]: ==== -> 028 [011 011 010] a_i = 0.5500 a_f = 0.5933 a_r = 0.5933 Action = DRIFT(2) ====
[ 0000016.0408 ]: Checking Snapshots (0.5500 0.5933) with K(0.5500 0.5933 0.5500) D(0.5933 0.5500 0.5933)
[ 0000016.0542 ]: ==== -> 029 [012 011 010] a_i = 0.5933 a_f = 0.6400 a_r = 0.5933 Action = DRIFT(2) ====
[ 0000016.0784 ]: ==== -> 030 [012 011 012] a_i = 0.5500 a_f = 0.6400 a_r = 0.6400 Action = FORCE(0) ====
[ 0000018.3860 ]: Force Calculation Nmesh = 256 ====
[ 0000018.3861 ]: Load imbalance is - 0.972651 / + 1.01064
[ 0000018.3861 ]: Peak memory usage on rank 0: 225.141 MB
[ 0000018.5332 ]: D^2(0.64, 1.0) P(k<0.0654167) = 13797.2 Sigma8 = 1.15603
[ 0000018.5333 ]: writing power spectrum to powerspec-debug_0.6400.txt
[ 0000018.5360 ]: ==== -> 031 [012 012 012] a_i = 0.5933 a_f = 0.6400 a_r = 0.6400 Action = KICK(1) ====
[ 0000018.5604 ]: Checking Snapshots (0.5933 0.6400) with K(0.6400 0.5933 0.6400) D(0.5933 0.6400 0.5933)
[ 0000018.5767 ]: ==== -> 032 [012 013 012] a_i = 0.6400 a_f = 0.6835 a_r = 0.6400 Action = KICK(1) ====
[ 0000018.6047 ]: ==== -> 033 [013 013 012] a_i = 0.6400 a_f = 0.6835 a_r = 0.6835 Action = DRIFT(2) ====
[ 0000018.6288 ]: Checking Snapshots (0.6400 0.6835) with K(0.6400 0.6835 0.6400) D(0.6835 0.6400 0.6835)
[ 0000018.6442 ]: ==== -> 034 [014 013 012] a_i = 0.6835 a_f = 0.7300 a_r = 0.6835 Action = DRIFT(2) ====
[ 0000018.6689 ]: ==== -> 035 [014 013 014] a_i = 0.6400 a_f = 0.7300 a_r = 0.7300 Action = FORCE(0) ====
[ 0000020.7692 ]: Force Calculation Nmesh = 256 ====
[ 0000020.7728 ]: Load imbalance is - 0.969954 / + 1.01201
[ 0000020.7729 ]: Peak memory usage on rank 0: 225.141 MB
[ 0000020.9355 ]: D^2(0.73, 1.0) P(k<0.0654167) = 13766.4 Sigma8 = 1.05672
[ 0000020.9357 ]: writing power spectrum to powerspec-debug_0.7300.txt
[ 0000020.9428 ]: ==== -> 036 [014 014 014] a_i = 0.6835 a_f = 0.7300 a_r = 0.7300 Action = KICK(1) ====
[ 0000020.9686 ]: Checking Snapshots (0.6835 0.7300) with K(0.7300 0.6835 0.7300) D(0.6835 0.7300 0.6835)
[ 0000020.9885 ]: ==== -> 037 [014 015 014] a_i = 0.7300 a_f = 0.7737 a_r = 0.7300 Action = KICK(1) ====
[ 0000021.0224 ]: ==== -> 038 [015 015 014] a_i = 0.7300 a_f = 0.7737 a_r = 0.7737 Action = DRIFT(2) ====
[ 0000021.0451 ]: Checking Snapshots (0.7300 0.7737) with K(0.7300 0.7737 0.7300) D(0.7737 0.7300 0.7737)
[ 0000021.0593 ]: ==== -> 039 [016 015 014] a_i = 0.7737 a_f = 0.8200 a_r = 0.7737 Action = DRIFT(2) ====
[ 0000021.0846 ]: ==== -> 040 [016 015 016] a_i = 0.7300 a_f = 0.8200 a_r = 0.8200 Action = FORCE(0) ====
[ 0000023.0345 ]: Force Calculation Nmesh = 256 ====
[ 0000023.0346 ]: Load imbalance is - 0.967896 / + 1.01337
[ 0000023.0346 ]: Peak memory usage on rank 0: 225.141 MB
[ 0000023.1990 ]: D^2(0.82, 1.0) P(k<0.0654167) = 13737.4 Sigma8 = 0.984016
[ 0000023.1991 ]: writing power spectrum to powerspec-debug_0.8200.txt
[ 0000023.2020 ]: ==== -> 041 [016 016 016] a_i = 0.7737 a_f = 0.8200 a_r = 0.8200 Action = KICK(1) ====
[ 0000023.2263 ]: Checking Snapshots (0.7737 0.8200) with K(0.8200 0.7737 0.8200) D(0.7737 0.8200 0.7737)
[ 0000023.2428 ]: ==== -> 042 [016 017 016] a_i = 0.8200 a_f = 0.8638 a_r = 0.8200 Action = KICK(1) ====
[ 0000023.2723 ]: ==== -> 043 [017 017 016] a_i = 0.8200 a_f = 0.8638 a_r = 0.8638 Action = DRIFT(2) ====
[ 0000023.2964 ]: Checking Snapshots (0.8200 0.8638) with K(0.8200 0.8638 0.8200) D(0.8638 0.8200 0.8638)
[ 0000023.3106 ]: ==== -> 044 [018 017 016] a_i = 0.8638 a_f = 0.9100 a_r = 0.8638 Action = DRIFT(2) ====
[ 0000023.3381 ]: ==== -> 045 [018 017 018] a_i = 0.8200 a_f = 0.9100 a_r = 0.9100 Action = FORCE(0) ====
[ 0000025.3723 ]: Force Calculation Nmesh = 256 ====
[ 0000025.3724 ]: Load imbalance is - 0.966106 / + 1.01439
[ 0000025.3724 ]: Peak memory usage on rank 0: 225.141 MB
[ 0000025.5182 ]: D^2(0.91, 1.0) P(k<0.0654167) = 13710.8 Sigma8 = 0.929605
[ 0000025.5192 ]: writing power spectrum to powerspec-debug_0.9100.txt
[ 0000025.5217 ]: ==== -> 046 [018 018 018] a_i = 0.8638 a_f = 0.9100 a_r = 0.9100 Action = KICK(1) ====
[ 0000025.5443 ]: Checking Snapshots (0.8638 0.9100) with K(0.9100 0.8638 0.9100) D(0.8638 0.9100 0.8638)
[ 0000025.5592 ]: ==== -> 047 [018 019 018] a_i = 0.9100 a_f = 0.9539 a_r = 0.9100 Action = KICK(1) ====
[ 0000025.5860 ]: ==== -> 048 [019 019 018] a_i = 0.9100 a_f = 0.9539 a_r = 0.9539 Action = DRIFT(2) ====
[ 0000025.6286 ]: Checking Snapshots (0.9100 0.9539) with K(0.9100 0.9539 0.9100) D(0.9539 0.9100 0.9539)
[ 0000025.6421 ]: ==== -> 049 [020 019 018] a_i = 0.9539 a_f = 1.0000 a_r = 0.9539 Action = DRIFT(2) ====
[ 0000025.6853 ]: ==== -> 050 [020 019 020] a_i = 0.9100 a_f = 1.0000 a_r = 1.0000 Action = FORCE(0) ====
[ 0000027.9858 ]: Force Calculation Nmesh = 256 ====
[ 0000027.9859 ]: Load imbalance is - 0.964375 / + 1.0153
[ 0000027.9859 ]: Peak memory usage on rank 0: 225.141 MB
[ 0000028.1494 ]: D^2(1, 1.0) P(k<0.0654167) = 13687 Sigma8 = 0.88807
[ 0000028.1495 ]: writing power spectrum to powerspec-debug_1.0000.txt
[ 0000028.1520 ]: ==== -> 051 [020 020 020] a_i = 0.9539 a_f = 1.0000 a_r = 1.0000 Action = KICK(1) ====
[ 0000028.1747 ]: Checking Snapshots (0.9539 1.0000) with K(1.0000 0.9539 1.0000) D(0.9539 1.0000 0.9539)
[ 0000028.1749 ]: Setting up snapshot at a = 1.0000 (z=0.0000)
[ 0000028.1750 ]: Growth factor of snapshot 1.0000 (a=1.0000)
[ 0000028.2625 ]: Writing snapshot fastpm_1.0000 at z = 0.0000 a = 1.0000 with 4 writers
[ 0000028.2626 ]: RSD factor 1.000000e-02
[ 0000029.2835 ]: Writing block 1/Position
[ 0000029.3254 ]: Writing block 1/Velocity
[ 0000029.3523 ]: Writing block 1/ID
[ 0000029.3697 ]: snapshot fastpm_1.0000 written
[ 0000030.1169 ]: Peak memory usage on rank 0: 280.547 MB
[ 0000030.1170 ]:      min      max     mean 
[ 0000030.1171 ]: --------------------------------------------------------------------------
[ 0000030.1171 ]:    28.32    28.33    28.32        evolve : run_fastpm : fastpm.c 
[ 0000030.1172 ]:     1.78     1.78     1.78            ic : run_fastpm : fastpm.c 
[ 0000030.1172 ]:     0.01     0.01     0.01          init : run_fastpm : fastpm.c 
[ 0000030.1172 ]: --------------------------------------------------------------------------
[ 0000030.1172 ]:     1.11     1.11     1.11            io : take_a_snapshot : fastpm.c 
[ 0000030.1173 ]:     0.00     0.00     0.00          meta : take_a_snapshot : fastpm.c 
[ 0000030.1173 ]: --------------------------------------------------------------------------
[ 0000030.1173 ]:     1.73     1.73     1.73       compute : write_powerspectrum : fastpm.c 
[ 0000030.1174 ]:     0.00     0.01     0.00            io : write_powerspectrum : fastpm.c 
[ 0000030.1174 ]: --------------------------------------------------------------------------
[ 0000030.1174 ]:     6.47     7.29     7.02           c2r : fastpm_gravity_calculate : gravity.c 
[ 0000030.1175 ]:     2.62     2.62     2.62        ghosts : fastpm_gravity_calculate : gravity.c 
[ 0000030.1175 ]:     1.31     1.51     1.40         paint : fastpm_gravity_calculate : gravity.c 
[ 0000030.1175 ]:     2.53     2.58     2.56           r2c : fastpm_gravity_calculate : gravity.c 
[ 0000030.1175 ]:     2.85     2.94     2.90       readout : fastpm_gravity_calculate : gravity.c 
[ 0000030.1176 ]:     0.79     1.04     0.89        reduce : fastpm_gravity_calculate : gravity.c 
[ 0000030.1176 ]:     4.71     5.21     4.89      transfer : fastpm_gravity_calculate : gravity.c 
[ 0000030.1176 ]: --------------------------------------------------------------------------
[ 0000030.1177 ]:     0.26     0.27     0.27         drift : fastpm_do_drift : solver.c 
[ 0000030.1177 ]: --------------------------------------------------------------------------
[ 0000030.1177 ]:     1.74     1.76     1.75    afterforce : fastpm_do_force : solver.c 
[ 0000030.1177 ]:     0.87     0.87     0.87     decompose : fastpm_do_force : solver.c 
[ 0000030.1178 ]:    22.31    22.33    22.32         force : fastpm_do_force : solver.c 
[ 0000030.1178 ]: --------------------------------------------------------------------------
[ 0000030.1178 ]:     1.95     1.97     1.96  interpolation : fastpm_do_interpolation : solver.c 
[ 0000030.1179 ]: --------------------------------------------------------------------------
[ 0000030.1179 ]:     0.29     0.31     0.30          kick : fastpm_do_kick : solver.c 
[ 0000030.1179 ]: --------------------------------------------------------------------------
[ 0000030.1179 ]:     0.02     0.02     0.02        warmup : fastpm_do_warmup : solver.c 
[ 0000030.1180 ]: --------------------------------------------------------------------------
[ 0000030.1180 ]:     0.00     0.00     0.00  aftertransit : fastpm_solver_evolve : solver.c 
[ 0000030.1180 ]:     0.06     0.11     0.09  beforetransit : fastpm_solver_evolve : solver.c 

In [8]:
!ls -l fastpm_1.0000


total 0
drwxrwxr-x. 1 yfeng1 yfeng1 36 Apr  3 14:39 1
drwxrwxr-x. 1 yfeng1 yfeng1 38 Apr  3 14:39 DensityK
drwxrwxr-x. 1 yfeng1 yfeng1 38 Apr  3 14:39 Header

In [7]:
part = BigFileCatalog('fastpm_1.0000', dataset='1/', header='Header')

In [8]:
mesh = BigFileMesh('fastpm_1.0000/', 'DensityK')

In [9]:
field = mesh.to_field(mode='complex')

In [10]:
image = mesh.preview(axes=(0, 1))

In [11]:
imshow(image)


Out[11]:
<matplotlib.image.AxesImage at 0x7fc9d27e3240>

In [12]:
image = part.to_mesh(Nmesh=128).preview(axes=(0, 1))

In [13]:
imshow(image)


Out[13]:
<matplotlib.image.AxesImage at 0x7fc9d0f255f8>

In [ ]: