Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions snpy/sn.py
Original file line number Diff line number Diff line change
Expand Up @@ -1327,12 +1327,15 @@ def summary(self, out=sys.stdout):
line += " +/- %.3f (sys)" % systs[param]
print(line, file=out)

def dump_lc(self, epoch=0, tmin=-10, tmax=70, k_correct=0,
def dump_lc(self, outdir=None, epoch=0, tmin=-10, tmax=70, k_correct=0,
s_correct=False, mw_correct=0):
'''Outputs several files that contain the lc information: the data,
uncertainties, and the models themselves.

Args:
outdir( str or None ): To specify the directory where lighcurve files
will be dumped
(default: None)
epoch (bool): If True, output times relative to Tmax
tmin/tmax (float): the time range over which to output the model
(default: -10 days to 70 days after Tmax)
Expand All @@ -1357,7 +1360,9 @@ def dump_lc(self, epoch=0, tmin=-10, tmax=70, k_correct=0,
extra flag column that indicates if the k-corrections are valid (0) or
invalid (1).
'''
base = self.name + "_lc_"
if outdir is None:
base = self.name + "_lc_"
base = outdir + self.name + "_lc_"
if not epoch:
toff = 0
else:
Expand Down