예제 #1
0
def TwoDimensionallyHistogram(xnum, xlow, xhigh, xquantity,
                              ynum, ylow, yhigh, yquantity,
                              selection=unweighted):
    """Convenience function for creating a conventional, two-dimensional histogram."""
    return Select.ing(selection,
        Bin.ing(xnum, xlow, xhigh, xquantity,
            Bin.ing(ynum, ylow, yhigh, yquantity)))
예제 #2
0
def TwoDimensionallySparselyHistogram(xbinWidth, xquantity,
                                      ybinWidth, yquantity,
                                      selection=unweighted,
                                      xorigin=0.0, yorigin=0.0):
    """Convenience function for creating a sparsely binned, two-dimensional histogram."""
    return Select.ing(selection,
        SparselyBin.ing(xbinWidth, xquantity,
            SparselyBin.ing(ybinWidth, yquantity,
                Count.ing(), Count.ing(), yorigin), Count.ing(), xorigin))
예제 #3
0
def SparselyProfileErr(binWidth,
                       binnedQuantity,
                       averagedQuantity,
                       selection=unweighted,
                       origin=0.0):
    """Convenience function for creating a physicist's sparsely binned "profile plot," which is a Profile with variances."""
    return Select.ing(
        selection,
        SparselyBin.ing(binWidth, binnedQuantity,
                        Deviate.ing(averagedQuantity), Count.ing(), origin))
예제 #4
0
def ProfileErr(num,
               low,
               high,
               binnedQuantity,
               averagedQuantity,
               selection=unweighted):
    """Convenience function for creating a physicist's "profile plot," which is a Profile with variances."""
    return Select.ing(
        selection,
        Bin.ing(num, low, high, binnedQuantity, Deviate.ing(averagedQuantity)))
예제 #5
0
def SparselyProfile(binWidth,
                    binnedQuantity,
                    averagedQuantity,
                    selection=unweighted,
                    origin=0.0):
    """Convenience function for creating sparsely binned binwise averages."""
    return Select.ing(
        selection,
        SparselyBin.ing(binWidth, binnedQuantity,
                        Average.ing(averagedQuantity), Count.ing(), origin))
예제 #6
0
def Profile(num,
            low,
            high,
            binnedQuantity,
            averagedQuantity,
            selection=unweighted):
    """Convenience function for creating binwise averages."""
    return Select.ing(
        selection,
        Bin.ing(num, low, high, binnedQuantity, Average.ing(averagedQuantity)))
예제 #7
0
def HistogramCut(num, low, high, quantity=identity, selection=unweighted):
    """Create a conventional histogram that is capable of being filled and added, with a selection cut.

    Parameters:
        num (int): the number of bins; must be at least one.
        low (float): the minimum-value edge of the first bin.
        high (float): the maximum-value edge of the last bin; must be strictly greater than `low`.
        quantity (function returning float or string): function that computes the quantity of interest from
            the data. pass on all values by default. If a string is given, quantity is set to identity(string),
            in which case that column is picked up from a pandas df.
        selection (function returning boolean): function that computes if data point is accepted or not.
            default is: lamba x: True
    """
    return Select.ing(selection, Bin.ing(num, low, high, quantity, Count.ing(), Count.ing(), Count.ing(), Count.ing()))
예제 #8
0
def SparselyHistogram(binWidth, quantity, selection=unweighted, origin=0.0):
    "Convenience function for creating a sparsely binned histogram."
    return Select.ing(
        selection,
        SparselyBin.ing(binWidth, quantity, Count.ing(), Count.ing(), origin))
예제 #9
0
def Histogram(num, low, high, quantity, selection=unweighted):
    """Convenience function for creating a conventional histogram."""
    return Select.ing(
        selection,
        Bin.ing(num, low, high, quantity, Count.ing(), Count.ing(),
                Count.ing(), Count.ing()))
def ProfileErr(num, low, high, binnedQuantity, averagedQuantity, selection=unweighted):
    """Convenience function for creating a physicist's "profile plot," which is a Profile with variances."""
    return Select.ing(selection,
        Bin.ing(num, low, high, binnedQuantity,
            Deviate.ing(averagedQuantity)))
def SparselyProfileErr(binWidth, binnedQuantity, averagedQuantity, selection=unweighted, origin=0.0):
    """Convenience function for creating a physicist's sparsely binned "profile plot," which is a Profile with variances."""
    return Select.ing(selection,
        SparselyBin.ing(binWidth, binnedQuantity,
            Deviate.ing(averagedQuantity), Count.ing(), origin))
def SparselyProfile(binWidth, binnedQuantity, averagedQuantity, selection=unweighted, origin=0.0):
    """Convenience function for creating sparsely binned binwise averages."""
    return Select.ing(selection,
        SparselyBin.ing(binWidth, binnedQuantity,
            Average.ing(averagedQuantity), Count.ing(), origin))
def Profile(num, low, high, binnedQuantity, averagedQuantity, selection=unweighted):
    """Convenience function for creating binwise averages."""
    return Select.ing(selection,
        Bin.ing(num, low, high, binnedQuantity,
            Average.ing(averagedQuantity)))
예제 #14
0
def CategorizeHistogram(quantity, selection=unweighted):
    """Convenience function for creating a categorize histogram."""
    return Select.ing(selection, Categorize.ing(quantity, Count.ing()))
def SparselyHistogram(binWidth, quantity, selection=unweighted, origin=0.0):
    """Convenience function for creating a sparsely binned histogram."""
    return Select.ing(selection,
        SparselyBin.ing(binWidth, quantity, Count.ing(), Count.ing(), origin))
def Histogram(num, low, high, quantity, selection=unweighted):
    """Convenience function for creating a conventional histogram."""
    return Select.ing(selection, Bin.ing(num, low, high, quantity,
        Count.ing(), Count.ing(), Count.ing(), Count.ing()))