plots_post_processing
plots_post_processing.plots_post_processing
— Moduleplots_post_processing.allocate_global_zr_fields
— Methodfunctions to allocate arrays that are used at run-time to postprocess data that is stored in the netcdf files
plots_post_processing.analyze_and_plot_data
— Methodanalyze_and_plot_data(prefix...; run_index=nothing)
Make some plots for the simulation at prefix
. If more than one argument is passed to prefix
, plot all the simulations together.
The strings passed to prefix
should be either a directory (which contains run output) or the prefix of output files, like <directory>/<prefix>
where the output files are <directory>/<prefix>.moments.h5
and <directory>/<prefix>.dfns.h5
.
If a single value is passed for prefix
the plots/movies are created in the same directory as the run, and given names based on the name of the run. If multiple values are passed, the plots/movies are given names beginning with compare_
and are created in the comparison_plots/
subdirectory.
By default plots output from all restarts in a directory. To select a single run, pass the run_index
argument - the value corresponds to the _<i>
suffix given to output files when restarting. run_index
can be an integer (which is applied to all directories in prefix...
), or a tuple of integers (which should have the same length as the number of directories passed to prefix...
). Use run_index=-1
to get the most recent run (which does not have a _<i>
suffix). Note that run_index
is only used when a directory (rather than the prefix of a specific output file) is passed to prefix...
plots_post_processing.calculate_differences
— MethodFind the maximum difference, as a function of time, between two or more outputs for each variable.
plots_post_processing.compare_fields_symbolic_test
— Methodplots_post_processing.draw_v_parallel_zero!
— MethodAdd a thin, red, dashed line showing vparallel=(vth*wparallel+upar)=0 to a 2d plot with axes (z,vpa).
plots_post_processing.get_tuple_of_return_values
— Methodget_tuple_of_return_values(func, arg_tuples...)
Suppose func(args...)
returns a tuple of return values, then get_tuple_of_return_values(func, arg_tuples...)
returns a tuple (with an entry for each return value of func
) of tuples (one for each argument in each of arg_tuples...
) of return values.
plots_post_processing.init_postprocessing_options
— Methodplots_post_processing.plot_1D_1V_diagnostics
— Methodplots_post_processing.plot_dfns
— Methodplots_post_processing.plot_fields
— Methodplots_post_processing.plot_ion_pdf
— Methodplots various slices of the ion pdf (1d and 2d, stills and animations)
plots_post_processing.plot_moments
— Methodplots_post_processing.plot_neutral_pdf
— Methodplots various slices of the neutral pdf (1d and 2d, stills and animations)
plots_post_processing.plot_unnormalised_f2d
— MethodMake a 2d plot of an unnormalised f on unnormalised coordinates, as returned from getunnormalisedf_coords()
Note this function requires using the PyPlot backend to support 2d coordinates being passed to heatmap()
.
plots_post_processing.read_distributed_zwallr_data!
— MethodRead data which is a function of (r,t) or (r,species,t) and associated to one of the wall boundaries
run_names is a tuple. If it has more than one entry, this means that there are multiple restarts (which are sequential in time), so concatenate the data from each entry together.
plots_post_processing.trygif
— MethodCall gif, but catch the exception if there is an error
plots_post_processing.trysavefig
— MethodCall savefig, but catch the exception if there is an error
plots_post_processing.post_processing_input
— Moduleplots_post_processing.shared_utils.calculate_and_write_frequencies
— Method