Commit 5ac55965 authored by Médéric Boquien's avatar Médéric Boquien

Improve the handling when there is a / in a variable name. We replace / with _.

parent 8ffc1b39
......@@ -22,7 +22,7 @@ def save_chi2(obs, variable, models, chi2, values):
"""
fname = 'out/{}_{}_chi2-block-{}.npy'.format(obs.id, variable.replace('/',
'\/'), models.iblock)
'_'), models.iblock)
data = np.memmap(fname, dtype=np.float64, mode='w+',
shape=(2, chi2.size))
data[0, :] = chi2
......
......@@ -53,6 +53,7 @@ def _chi2_worker(obj_name, var_name):
figure = plt.figure()
ax = figure.add_subplot(111)
var_name = var_name.replace('/', '_')
fnames = glob.glob("out/{}_{}_chi2-block-*.npy".format(obj_name, var_name))
for fname in fnames:
data = np.memmap(fname, dtype=np.float64)
......@@ -79,6 +80,7 @@ def _pdf_worker(obj_name, var_name):
Name of the analysed variable..
"""
var_name = var_name.replace('/', '_')
if var_name.endswith('_log'):
fnames = glob.glob("out/{}_{}_chi2-block-*.npy".format(obj_name,
var_name[:-4]))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment