In [1]:
from __future__ import print_function
import os
import numpy as np
import sncosmo
import matplotlib.pyplot as plt
%matplotlib inline
In [2]:
fname = sncosmo.conf.data_dir + '/models/snana/SDSS-000018.SED'
fname
Out[2]:
In [4]:
phase, wave, flux = sncosmo.read_griddata_ascii(fname)
In [5]:
phase.shape, wave.shape
Out[5]:
In [6]:
flux.shape
Out[6]:
In [7]:
source = sncosmo.TimeSeriesSource(phase, wave, flux, name='mytemplate')
In [8]:
print(source)
In [9]:
model = sncosmo.Model(source=source)
In [10]:
print(model)