ebe_scripts/average_event_eccn_ep_corr_h5.py
def pack_arrays(data, data_ideal, data_shear, data_full, ntau, ntau_loc):
    """package the first ntau elements to data"""
    if ntau_loc < ntau:
        data[:ntau_loc, 1] += data_ideal**2.
        data[:ntau_loc, 2] += data_ideal**4.
        data[:ntau_loc, 3] += data_shear**2.
        data[:ntau_loc, 4] += data_shear**4.
        data[:ntau_loc, 5] += data_full**2.
        data[:ntau_loc, 6] += data_full**4.
    else:
        data[:, 1] += data_ideal[:ntau]**2.
        data[:, 2] += data_ideal[:ntau]**4.
        data[:, 3] += data_shear[:ntau]**2.
        data[:, 4] += data_shear[:ntau]**4.
        data[:, 5] += data_full[:ntau]**2.
        data[:, 6] += data_full[:ntau]**4.
package the first ntau elements to data
package the first ntau elements to data
package the first ntau elements to data
def pack_arrays(data, data_ideal, data_shear, data_full, ntau, ntau_loc):
    if ntau_loc < ntau:
        data[:ntau_loc, 1] += data_ideal**2.
        data[:ntau_loc, 2] += data_ideal**4.
        data[:ntau_loc, 3] += data_shear**2.
        data[:ntau_loc, 4] += data_shear**4.
        data[:ntau_loc, 5] += data_full**2.
        data[:ntau_loc, 6] += data_full**4.
    else:
        data[:, 1] += data_ideal[:ntau]**2.
        data[:, 2] += data_ideal[:ntau]**4.
        data[:, 3] += data_shear[:ntau]**2.
        data[:, 4] += data_shear[:ntau]**4.
        data[:, 5] += data_full[:ntau]**2.
        data[:, 6] += data_full[:ntau]**4.
def pack_arrays ( data , data_ideal , data_shear , data_full , ntau , ntau_loc ) : if ntau_loc < ntau : data [ : ntau_loc , 1 ] += data_ideal ** 2. data [ : ntau_loc , 2 ] += data_ideal ** 4. data [ : ntau_loc , 3 ] += data_shear ** 2. data [ : ntau_loc , 4 ] += data_shear ** 4. data [ : ntau_loc , 5 ] += data_full ** 2. data [ : ntau_loc , 6 ] += data_full ** 4. else : data [ : , 1 ] += data_ideal [ : ntau ] ** 2. data [ : , 2 ] += data_ideal [ : ntau ] ** 4. data [ : , 3 ] += data_shear [ : ntau ] ** 2. data [ : , 4 ] += data_shear [ : ntau ] ** 4. data [ : , 5 ] += data_full [ : ntau ] ** 2. data [ : , 6 ] += data_full [ : ntau ] ** 4.
package the first ntau elements to data
package the first ntau elements to data
"""package the first ntau elements to data"""
data
data_ideal
data_shear
data_full
ntau
ntau_loc