API
ReconTPCF.C2_initialise — MethodCompute the C2 count in an image. Serves as a starting point for a reconstruction
ReconTPCF.C2_pdist4 — FunctionC2_pdist4(im, maxrng::Int64, SN::Array{Float64,1}=Array{Float64}(undef, 0))Fast total computation of the C2 count for a
ReconTPCF.S2_finalise — MethodNormalise S2 count into S2 proper by dividing by BN and ϕ
ReconTPCF.S2_initialise — MethodFind the S2 count for an image
ReconTPCF.blas_stat4 — Methodblas_stat4(indx, step::Float64, maxrng)::Array{Int64,1}Computes a very fast multithreaded probabilistic S2 count. Employs kernel density estimation in place of a true histogram. Gives hilarious results when used for reconstruction.
ReconTPCF.blas_stat5 — MethodCompute the S2 count (multithreaded, O(N) memory)
For a list of N CartesianIndex tuples, compute and bin the L2 norm between all pixel pairs in the list.
ReconTPCF.blas_stat_st2 — Methodblas_stat_st2(indx, step, maxrng)For a set of N points, compute the unique distance between all possible pairs of points. Bins distance measurements with a histogram of bin width step and length maxrng Single threaded implementation, greedy with memory. Good for smaller computations
ReconTPCF.check_edge — MethodPrevent fetch_locale from colliding with image edges by providing a reduced window if an edge is collided with
ReconTPCF.cluster_stat — Methodcluster_stat(clusters, step::Float64, maxrng)Fast compution of S2 count for an array of arrays of cartesian indices. Multithreaded in the sense that
ReconTPCF.compute_change! — MethodSloppy computation to find the contribution to C2 count from the old state and the new, and hence the difference between them.
ReconTPCF.disk_strel — MethodCompute a binary disk-shaped structure element given radius r on the basis of (areal) interpolation
ReconTPCF.fetch_locale — MethodFetch the region around a pixel selection; give a reduced window if near an edge
ReconTPCF.find_equivalent — MethodComputes equivalent position of unique entry in a shortlist to an entry in a master list. Uses a much more sensible tupled pick
ReconTPCF.find_unique_regions — MethodExamine which clusters are present in multiple windows simultaneously to determine which clusters are due to change from a pixel swap
ReconTPCF.fragment! — MethodCompute the L2 norm between points (xi, yi) and the arrays (arrx, arry) and write to preallocated array dist
ReconTPCF.get_clusters — MethodFuses clusters to reduce the scale of the problem
ReconTPCF.get_rand_pix — Methodget_rand_pix((pix))::Tuple{Array{CartesianIndex{2},1},Array{CartesianIndex{2},1}}Select a random white and black pixel from a tupled pair of lists of cartesian coordinates
ReconTPCF.get_region_names — MethodFind all unique values present in a small window into the region adjacent to a pixel selection. Used to interrogate a cluster labelled image
ReconTPCF.inner_blas2 — Methodinner_blas2(x, y, dist, len)compute the lower triangular self-interaction matrix of a list of N items. gives a flat vector of F32, of length (N(N-1)/2). Interaction here is computing the L2 norm, but could be otherwise.
ReconTPCF.loadim — MethodLoads and thresholds an image
ReconTPCF.make_rand_im — Methodmake_rand_im(philen, dims)create a random binary array of size dims with philen white pixels set within it. Also return a coordinate list for white and black pixels
ReconTPCF.monodisp_circ — MethodGenerate isotropically distributed circles that may overlap. Keep the implied phase fraction ϕ below 0.3 if possible
ReconTPCF.naninf — MethodEliminates NaN and Inf in an array
ReconTPCF.nonzero — Methodnonzero(image)evaluate where an image is nonzero
ReconTPCF.pick_rand_coord — MethodSelects random elements in a pair of lists
ReconTPCF.pre_proc — Methodpre_proc(im)convolve image with a disk-shaped structure element
ReconTPCF.subtract_cluster — MethodDeduct the contribution of a given set of pixels from a previously calculated S2 count
ReconTPCF.surf_opt — MethodGet list of all surface pixels from a 2d binary image using convolution to discriminate Sanitised version to prevent the function returning nothing
ReconTPCF.surf_opt2 — MethodGet list of all surface pixels from a 2d binary image using convolution to discriminate
ReconTPCF.surf_rand — MethodFind the intersection between two tupled lists of cartesian indices We use this to create a segment of a list that maintains ordering
ReconTPCF.swap_pix — MethodUpdate tuple of 2 cartesian indices by swapping elements from each list at linear index wpick (for 1) and bpick (for 0)
ReconTPCF.update_C2_BN — MethodComputes the C2 count change between a pair of images with one pixel swapped between them
ReconTPCF.update_S2_BN — MethodCompute the update to S2 count. Find the contribution from all white pixel's distance from wpick and bpick, and the difference between them