Binning

1D

PyPlotUtility.bin_1DFunction
bin_1D( quantity, bin_lim; 
        calc_mean::Bool=true, Nbins::Int=100,
        show_progress::Bool=true)

Get a 1D histogram of quantity in the limits bin_lim, over a number if bins Nbins. If calc_mean is set to true it will calculate the mean of the quantity per bin, otherwise the sum is returned.

source
PyPlotUtility.bin_1D!Function
bin_1D!(count, quantity, bin_lim; 
        Nbins::Int=100, show_progress::Bool=true)

Get a 1D histogram of quantity in the limits bin_lim, over a number if bins Nbins for pre-allocated arrays count and quantity_count. Should be used if computing a 1D histogram over multiple files.

source
PyPlotUtility.bin_1D_quantity!Function
bin_1D_quantity!(count, quantity_count, 
                 quantity, bin_lim; 
                 Nbins::Int=100, show_progress::Bool=true)

Get a 1D histogram of quantity in the limits bin_lim, over a number if bins Nbins for pre-allocated arrays count and quantity_count. Should be used if computing the mean over multiple files.

source
PyPlotUtility.bin_1D_logFunction
bin_1D_log( quantity, bin_lim; 
            calc_mean::Bool=true, Nbins::Int=100,
            show_progress::Bool=true)

Get a 1D histogram of quantity in the limits bin_lim, over a number if bins Nbins in $log$-space for pre-allocated arrays count and quantity_count. If calc_mean is set to true it will calculate the mean of the quantity per bin, otherwise the sum is returned.

source
PyPlotUtility.bin_1D_log!Function
bin_1D_log!(count, quantity, bin_lim; 
            Nbins::Int=100, show_progress::Bool=true)

Get a 1D histogram of quantity in the limits bin_lim, over a number if bins Nbins in $log$-space for pre-allocated arrays count and quantity_count. Should be used if computing a 1D histogram over multiple files.

source
PyPlotUtility.bin_1D_quantity_log!Function
bin_1D_quantity_log!(count, quantity_count, 
                     quantity, bin_lim; 
                     Nbins::Int=100, show_progress::Bool=true)

Get a 1D histogram of quantity in the limits bin_lim, over a number if bins Nbins in $log$-space for pre-allocated arrays count and quantity_count. Should be used if computing the mean over multiple files.

source
PyPlotUtility.σ_1D_quantityFunction
σ_1D_quantity(quantity_sum, bin_count)

Compute the standard deviation per bin. From: https://math.stackexchange.com/questions/198336/how-to-calculate-standard-deviation-with-streaming-inputs

source

2D

PyPlotUtility.bin_2DFunction
bin_2D( x_q, y_q, x_lim, y_lim, bin_q=nothing; 
        calc_mean::Bool=true, Nbins::Int=100,
        show_progress::Bool=true)

Get a 2D histogram of x_q and y_q in the limits x_lim, y_lim over a number if bins Nbins. If you want to bin an additional quantity bin_q you can pass it as an optional argument. If calc_mean is set to true it will calculate the mean of the quantity per bin, otherwise the sum is returned.

source
PyPlotUtility.bin_2D!Function
bin_2D!( phase_map_count,  
         x_q, y_q, x_lim, y_lim; 
         Nbins::Int=100,
         show_progress::Bool=true)

Get a 2D histogram of x_q and y_q in the limits x_lim, y_lim over a number if bins Nbins for pre-allocated array phase_map_count. Should be used if computing a 2D phase map over multiple files.

source
PyPlotUtility.bin_2D_quantity!Function
bin_2D_quantity!( phase_map_count, phase_map, 
                  x_q, y_q, bin_q, x_lim, y_lim; 
                  Nbins::Int=100,
                  show_progress::Bool=true )

Get a 2D histogram of x_q and y_q in the limits x_lim, y_lim over a number of bins Nbins for pre-allocated arrays phase_map_count and phase_map. Should be used if computing a 2D phase map over multiple files.

source
PyPlotUtility.bin_2D_logFunction
bin_2D_log( x_q, y_q, x_lim, y_lim, bin_q=nothing; 
        calc_mean::Bool=true, Nbins::Int=100,
        show_progress::Bool=true)

Get a 2D histogram of x_q and y_q in the limits x_lim, y_lim over a number if bins Nbins in $log$-space. If you want to bin an additional quantity bin_q you can pass it as an optional argument. If calc_mean is set to true it will calculate the mean of the quantity per bin, otherwise the sum is returned.

source
PyPlotUtility.bin_2D_log!Function
bin_2D_log!( phase_map_count,  
             x_q, y_q, x_lim, y_lim; 
             Nbins::Int=100,
            show_progress::Bool=true)

Get a 2D histogram of x_q and y_q in the limits x_lim, y_lim over a number if bins Nbins in $log$-space for pre-allocated array phase_map_count. Should be used if computing a 2D phase map over multiple files.

source
PyPlotUtility.bin_2D_quantity_log!Function
bin_2D_quantity_log!( phase_map_count, phase_map, 
                      x_q, y_q, bin_q, x_lim, y_lim; 
                      Nbins::Int=100,
                      show_progress::Bool=true)

Get a 2D histogram of x_q and y_q in the limits x_lim, y_lim over a number if bins Nbins in $log$-space for pre-allocated arrays phase_map_count and phase_map. Should be used if computing a 2D phase map over multiple files.

source