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

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):
"mJy")
best_sed_table.write(OUT_DIR + obs_name + 'bestSED.fits',
verbose=False)
# 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),
indent=2,
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