def load_h5_data(path='<STR_LIT>', data_type='<STR_LIT>', y=None, electrode=None,<EOL>warmup=<NUM_LIT:0.>, scaling=<NUM_LIT:1.>):
assert y is not None or electrode is not None<EOL>if y is not None:<EOL><INDENT>f = h5py.File(os.path.join(path, '<STR_LIT>' %(y,data_type)))<EOL>data = f['<STR_LIT:data>'].value[:,:, warmup:]<EOL>if scaling != <NUM_LIT:1.>:<EOL><INDENT>np.random.shuffle(data)<EOL>num_cells = int(len(data)*scaling)<EOL>data = data[:num_cells,:, warmup:]<EOL><DEDENT><DEDENT>else:<EOL><INDENT>f = h5py.File(os.path.join(path, '<STR_LIT>' %data_type))<EOL>data = f['<STR_LIT:data>'].value[:, warmup:]<EOL><DEDENT>return data<EOL>
Function loading results from hdf5 file


Parameters
----------
path : str
    Path to hdf5-file
data_type : str
    Signal types in ['CSD' , 'LFP', 'CSDsum', 'LFPsum'].
y : None or str
    Name of population.
electrode : None or int
    TODO: update, electrode is NOT USED
warmup : float
    Lower cutoff of time series to remove possible transients
scaling : float,
    Scaling factor for population size that determines the amount of loaded
    single-cell signals


Returns
----------
numpy.ndarray
    [electrode id, compound signal] if `y` is None
numpy.ndarray
    [cell id, electrode, single-cell signal] otherwise