Commit 77d92d87 authored by Yannick Roehlly's avatar Yannick Roehlly
Browse files

Close matplotlib figure in psum module

parent bf60e3f6
* Tasks
** DONE Correctly evaluate True and False in configuration file
CLOSED: [2013-09-17 mar. 22:14]
** TODO Close matplotlib figures in psum.py
** DONE Close matplotlib figures in psum.py
CLOSED: [2013-09-17 mar. 22:38]
** TODO Check the age of the Universe at observation redshift.
In the psum module, when dealing with an observation, only use the models aged
less than the age of the Universe at observation redshift.
......
......@@ -322,6 +322,7 @@ class Module(common.AnalysisModule):
' best fitting SED - reduced chi2:' +
str(best_chi2))
figure.savefig(OUT_DIR + obs_name + '_bestSED.pdf')
plt.close(figure)
# Compute the statistics for the desired variables. First, we
# build the probability distribution function (PDF) for the
......@@ -409,6 +410,7 @@ class Module(common.AnalysisModule):
ax.set_title(variable)
figure.savefig(OUT_DIR +
obs_name + '_' + variable + '_chi2plot.pdf')
plt.close(figure)
if save_pdf:
pdf_table = atpy.Table()
......@@ -444,6 +446,7 @@ class Module(common.AnalysisModule):
ax.set_ylabel('Probability')
figure.savefig(OUT_DIR + obs_name + "_" + variable +
"_pdf.pdf")
plt.close(figure)
# Write the computation table FITS
fits_table.write(OUT_DIR + obs_name + '_comptable.fits', verbose=False)
......
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