pencil.ism_dyn
Derive auxilliary data and other diagnostics from var.h5 file and save to new h5 file
uses:
compute ‘data’ arrays of size [nz,ny,nx] as required
store ‘time’ of snapshot
compute ‘masks’ for example by temperature phase
compute summary statistics ‘stats’
compute ‘structure’ functions as required
pencil.ism_dyn.derived_h5.calc_derived_data(src, dst, key, par, gd, l1, l2, m1, m2, n1, n2, nghost=3)
compute from src data and existing dst data derived data
pencil.ism_dyn.derived_h5.derive_data(sim_path, src, dst, magic=['pp', 'tt'], par=[], comm=None, gd=[], overwrite=False, rank=0, size=1, nghost=3, status='a', chunksize=1000.0, dtype=<class 'numpy.float64'>, quiet=True, nmin=32)
Check if the variable denoted by the label key is a vector.
Derive auxilliary data and other diagnostics from var.h5 file and save to new h5 file
uses:
compute ‘data’ arrays of size [nz,ny,nx] as required
store ‘time’ of snapshot
compute ‘masks’ for example by temperature phase
compute summary statistics ‘stats’
compute ‘structure’ functions as required
pencil.ism_dyn.get_masks.derive_masks(sim_path, src, dst, data_key='data/ss', par=[], comm=None, overwrite=False, rank=0, size=1, nghost=3, status='a', chunksize=1000.0, quiet=True, nmin=32, ent_cuts=[2320000000.0], mask_keys=['hot'], unit_key='unit_entropy')
pencil.ism_dyn.get_masks.thermal_decomposition(ss, pars, unit_key='unit_entropy', ent_cut=[2320000000.0])
call signature:
thermal_decomposition(ss, pars, unit=’unit_entropy’, ent_cut=[2.32e9,])
-
Keyword Arguments
-
ss – dataset used for masks, default ‘ss’, alternate e.g.’tt’
-
pars – Param() object required for units rescaling
-
unit_key – label of physical units in pars to apply to code values
-
ent_cut – list of boundary mask values, default see thesis http://hdl.handle.net/10443/1755 Figure 5.10 may have multiple boundaries
-
Derive auxilliary data and other diagnostics from var.h5 file and save to new h5 file
uses:
compute ‘data’ arrays of size [nz,ny,nx] as required
store ‘time’ of snapshot
compute ‘masks’ for example by temperature phase
compute summary statistics ‘stats’
compute ‘structure’ functions as required
pencil.ism_dyn.get_stats.derive_stats(sim_path, src, dst, stat_keys=['Rm', 'uu', 'Ms'], par=[], comm=None, overwrite=False, rank=0, size=1, nghost=3, status='a', chunksize=1000.0, quiet=True, nmin=32, lmask=False, mask_key='hot')
pencil.ism_dyn.get_stats.plot_hist2d(xvar, yvar, par=[], xlim=None, ylim=None, xbins=100, ybins=100, figsize=[5.663105, 3.5], xlabel='$x$', ylabel='$y$', clabel='${\\cal P}\\,(\\log\\,x,\\log\\,y)$', norm=None, cmap=None, density=True, pad=0.02, fontsize=14)
xvar: array 1D.ravel() format of variable yvar: array length and format matching xvar of complementary variable par: Param object containing simulation parameters xlim: tuple with min & max bin values for xvar ylim: tuple with min & max bin values for yvar xbins: number of bins for xvar histogram ybins: number of bins for yvar histogram figsize: list of length 2 floats with width and height of figure ylabel: plot y-axis label string xlabel: plot x-axis label string clabel: plot colorbar label string norm: color table normalization from colors cmap: color table density: normalize histogram integral to 1 for PDF fontsize: size of plot fonts
Bases: object
SedovTaylor – holds blast wave parameters and radial profiles.
get_st(t_sedov=0, par=[], time=[], nt=5000, startt=0.0, endt=0.005, dims=3, quiet=True, rho0=1.6728e-24, M0=10, lsnowplough=True, lcioffi=True)
Compute analytic radial time evolution of SN blast waves for comparison with numerical results
t_sedov:
Time_series object read from the simulation sn_series.dat
par:
Param object containing the simulation parameters
time:
list of time in code units
nt:
Integer size of analytic arrays
endt
Real end time in code units for the time series
dims:
Dimension of the simulation default 3D
rho0:
Ambient ISM density
*
lsnowplough:
Include original snowplough profile
*
lcioffi:
Include Cioffi et al profile
Compute analytic radial time evolution of SN blast waves for comparison with numerical results
t_sedov:
Time_series object read from the simulation sn_series.dat
par:
Param object containing the simulation parameters
time:
list of time in code units
nt:
Integer size of analytic arrays
endt
Real end time in code units for the time series
dims:
Dimension of the simulation default 3D
rho0:
Ambient ISM density