Package: sarabande
A usefulpythonpackage to measure the 3/4 PCFs of discrete periodic data in NlogN time. This is done using Fast Fourier Transforms.Installation:The package is available on PyPi via the commandpip install sarabande. To check if the code is working properly after pip installation, runimportsarabandesarabande.check_install()which will display a message stating if the package was properly installed.Basic Usage:importsarabandeNPCF_obj=sarabande.measure(**kwargs)sarabande.calc_zeta(NPCF_obj)zeta=NPCF_obj.zetaWhere**kwargscan be any of the arguments to the measure constructor function. The possible arguments are:Args:nPCF([int]): Must be either 3 or 4. Determines how many points we use in our nPCF.projected([bool]): Flag to determine whether the user wants a projected 3/4 PCF or the Full. Defaults to False.ifprojected:m_max([int]): If user chooses projected, we set an m_max (similar to theell_maxin 3D)if notprojected:ell_max([int]): If user choosees not projected (full nPCF) then ell_max is the highest order for calculation.density_field_data([ndarray]): A square ndarray of data that is periodic. Must be 2D for projected and 3D for full.save_dir([string]): A string to tell the algorithm where to save and store files. All temporary files will be stored here.save_name([string]): A string to tell the algorithm what to name the files.nbins([int]): Number of bins to be used in nPCF calculation.bin_spacing([string]): A string to determine the spacing of bins. Options are'LIN','INV', or'LOG'bin_min([int]): The lower bound of the inner most bin. Default is 1. Optional.physical_boxsize([float]): An optional parameter if using a physical scale. The length of one side of the data.rmin([float]): minimum calculation distance (determinsbin_min)rmax([float]): maximum calculation distance (determinsbin_max)normalize([bool]): A boolean flag to normalize the 3/4 PCFs. Defaults to True. Can't use normalize without giving aphysical_boxsize,rmin, andrmaxfirst.particles_on_grid([bool]): An optional boolean flag to modify the normalization scheme slightly. This is recommended if you are working with particles on the grid mesh where a given cell corresponds to a particle.We note that thecalc_zetamethod has an optional boolean argumentverbose_flagwhich can be turned on and off depending on if the user wants to see the steps of the code printed. We also add an optional boolean argumentparallelizedwhich can be turned on and off if the user wishes to compute the Full 4PCF serially. This is added due to the instability ofconcurrent.futuresand parallel processing in python across different machines.We also provide an implementation of the connected 4PCF, this will be further documented in a future paper.For an example, please visit the demo notebook in the analysis notebooks folder:notebooks/Application_Example.ipynbWorkflow:The map of SARABANDE is as follows:For more information about each algorithm, please readSunseri et al. 2022CoverageWe provide a sunburst plot of the code coverage for sarabande below provided by codecov.io. The inner-most circle is the entire project, moving away from the center are folders then, finally, a single file. The size and color of each slice is representing the number of statements and the coverage, respectively.