def read_param(F):
    """
    Reads the sampling parameters. used by sampling_load()
    """
    """
        given F, an opend file , retrieve all parameters found in file header
        read_param returns  values in a plain dictionnary
    """
    dic = {}
    for l in F:
        if not l.startswith('#'):
            break
        v = l.rstrip().split(':')
        if len(v) < 2:
            pass
        else:
            entry = v[0][1:].strip()
            dic[entry] = v[1].lstrip()
    return dic
