Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master'
Browse files Browse the repository at this point in the history
  • Loading branch information
domeckert committed May 7, 2021
2 parents f419ad5 + a911845 commit f0f1884
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions pyproffit/profextract.py
Original file line number Diff line number Diff line change
Expand Up @@ -361,6 +361,7 @@ def SBprofile(self, ellipse_ratio=1.0, rotation_angle=0.0, angle_low=0., angle_h
else:
nbin = int(self.maxrad / self.binsize * 60. + 0.5)
self.bins = np.arange(self.binsize / 60. / 2., (nbin + 0.5) * self.binsize / 60., self.binsize / 60.)
self.bins = self.bins[self.bins<self.maxrad]
self.ebins = np.ones(nbin) * self.binsize / 60. / 2.
self.nbin = nbin
else:
Expand Down Expand Up @@ -837,7 +838,7 @@ def SaveModelImage(self, outfile, model=None, vignetting=True):
ytil = -np.sin(ellang) * (x - self.cx) * pixsize + np.cos(ellang) * (y - self.cy) * pixsize
rads = ellipse_ratio * np.hypot(xtil, ytil / ellipse_ratio)
if model is not None:
outmod = model.model(rads, *model.params)
outmod = model(rads, *model.params)
else:
outmod = np.interp(rads, self.bins, self.profile)
if vignetting:
Expand Down Expand Up @@ -925,7 +926,7 @@ def Plot(self, model=None, hmcmod=None, outfile=None, axes=None, figsize=(13, 10
if self.bkgprof is not None:
plt.plot(rads, self.bkgprof, color=bkg_color, lw=lw, label='Background')
if model is not None:
tmod = model.model(rads, *model.params)
tmod = model(rads, *model.params)
if self.psfmat is not None:
tmod = np.dot(self.psfmat, tmod)

Expand Down

0 comments on commit f0f1884

Please sign in to comment.