Skip to content

Commit

Permalink
Merge pull request #216 from rbiswas4/master
Browse files Browse the repository at this point in the history
Fixing issues with `fluxcov` and in place modifications
  • Loading branch information
kbarbary committed Apr 26, 2018
2 parents b13b684 + 813b707 commit bd98387
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions sncosmo/fitting.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ def generate_chisq(data, model, signature='iminuit', modelcov=False):
if modelcov:
_, mcov = model.bandfluxcov(data.band, data.time,
zp=data.zp, zpsys=data.zpsys)
cov += mcov
cov = cov + mcov
invcov = np.linalg.pinv(cov)

# iminuit expects each parameter to be a separate argument (including fixed
Expand Down Expand Up @@ -87,7 +87,7 @@ def chisq(data, model, modelcov=False):
if modelcov:
mflux, mcov = model.bandfluxcov(data.band, data.time,
zp=data.zp, zpsys=data.zpsys)
cov += mcov
cov = cov + mcov
else:
mflux = model.bandflux(data.band, data.time,
zp=data.zp, zpsys=data.zpsys)
Expand Down
2 changes: 1 addition & 1 deletion sncosmo/photdata.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
('fluxerr', {'fluxerr', 'fe', 'fluxerror', 'flux_error', 'flux_err'}),
('zp', {'zp', 'zpt', 'zeropoint', 'zero_point'}),
('zpsys', {'zpsys', 'zpmagsys', 'magsys'}),
('fluxcov', {'cov', 'covar', 'covariance', 'covmat'})
('fluxcov', {'cov', 'covar', 'covariance', 'covmat', 'fluxcov'})
])

PHOTDATA_REQUIRED_ALIASES = ('time', 'band', 'flux', 'fluxerr', 'zp', 'zpsys')
Expand Down

0 comments on commit bd98387

Please sign in to comment.