Commit 768dc809 authored by Yannick Roehlly's avatar Yannick Roehlly
Browse files

Write best SED parameters to a file

parent 52a4866c
......@@ -20,6 +20,7 @@ and the best fitting model (the one with the least reduced χ²) is given.
import os
import sys
import atpy
import json
import numpy as np
from copy import deepcopy
from scipy import stats
......@@ -281,6 +282,11 @@ class Module(common.AnalysisModule):
best_sed_table.write(OUT_DIR + obs_name + 'bestSED.fits',
# Write the SED modules parameters to a file
with open(OUT_DIR + obs_name + "bestSED.params", "w") as f:
f.write(json.dumps(zip(sed_modules, best_params),
separators=(',', ': ')))
# Plot the best SED
if plot_best_sed:
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