Two Point Functions Framework.
yt.analysis_modules.two_point_functions.two_point_functions.
FcnSet
(tpf, function, min_edge, out_labels, sqrt, corr_norm)[source]¶Bases: yt.analysis_modules.two_point_functions.two_point_functions.TwoPointFunctions
add_function
(function, out_labels, sqrt, corr_norm=None)¶Add a function to the list that will be evaluated at the generated pairs of points.
Parameters: 


Examples
>>> f1 = tpf.add_function(function=rms_vel, out_labels=['RMSvdiff'],
... sqrt=[True])
comm
= None¶get_dependencies
(fields)¶partition_index_2d
(axis)¶partition_index_3d
(ds, padding=0.0, rank_ratio=1)¶partition_index_3d_bisection_list
()¶Returns an array that is used to drive _partition_index_3d_bisection, below.
partition_region_3d
(left_edge, right_edge, padding=0.0, rank_ratio=1)¶Given a region, it subdivides it into smaller regions for parallel analysis.
run_generator
()¶After all the functions have been added, run the generator.
Examples
>>> tpf.run_generator()
set_pdf_params
(bin_type='lin', bin_number=1000, bin_range=None)[source]¶Set the parameters used to build the Probability Distribution Function for each ruler length for this function. The values output by the function are slotted into the bins described here.
Parameters: 


Examples
>>> f1.set_pdf_params(bin_type='log', bin_range=[5e4, 5.5e13],
... bin_number=1000)
write_out_arrays
(fn='%s.h5')¶Writes out the raw probability bins and the bin edges to an HDF5 file for each of the functions. The files are named ‘function_name.txt’ and saved in the current working directory.
Examples
>>> tpf.write_out_arrays()
write_out_correlation
()¶A special output function for doing two point correlation functions. Outputs the correlation function xi(r) in a text file ‘function_name_corr.txt’ in the current working directory.
Examples
>>> tpf.write_out_correlation()
write_out_means
(fn='%s.txt')¶Writes out the weightedaverage value for each function for each dimension for each ruler length to a text file. The data is written to files of the name ‘function_name.txt’ in the current working directory.
Examples
>>> tpf.write_out_means()
yt.analysis_modules.two_point_functions.two_point_functions.
TwoPointFunctions
(ds, fields, left_edge=None, right_edge=None, total_values=1000000, comm_size=10000, length_type='lin', length_number=10, length_range=None, vol_ratio=1, salt=0, theta=None, phi=None)[source]¶Bases: yt.utilities.parallel_tools.parallel_analysis_interface.ParallelAnalysisInterface
Initialize a two point functions object.
Parameters: 


Examples
>>> tpf = TwoPointFunctions(ds, ["velocity_x", "velocity_y", "velocity_z"],
... total_values=1e5, comm_size=10000,
... length_number=10, length_range=[1./128, .5],
... length_type="log")
add_function
(function, out_labels, sqrt, corr_norm=None)[source]¶Add a function to the list that will be evaluated at the generated pairs of points.
Parameters: 


Examples
>>> f1 = tpf.add_function(function=rms_vel, out_labels=['RMSvdiff'],
... sqrt=[True])
comm
= None¶get_dependencies
(fields)¶partition_index_2d
(axis)¶partition_index_3d
(ds, padding=0.0, rank_ratio=1)¶partition_index_3d_bisection_list
()¶Returns an array that is used to drive _partition_index_3d_bisection, below.
partition_region_3d
(left_edge, right_edge, padding=0.0, rank_ratio=1)¶Given a region, it subdivides it into smaller regions for parallel analysis.
run_generator
()[source]¶After all the functions have been added, run the generator.
Examples
>>> tpf.run_generator()
write_out_arrays
(fn='%s.h5')[source]¶Writes out the raw probability bins and the bin edges to an HDF5 file for each of the functions. The files are named ‘function_name.txt’ and saved in the current working directory.
Examples
>>> tpf.write_out_arrays()