Skip to content

Commit

Permalink
--fixed bug with number of pixels being counted
Browse files Browse the repository at this point in the history
  • Loading branch information
fraserw committed Jul 15, 2019
1 parent 1fd6677 commit 5c9995d
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
setup(
name = 'trippy',
packages = ['trippy','trippy.scamp','trippy.MCMCfit'],
version = '1.0',
version = '1.1',
description = 'Pill aperture photometry for trailed astronomical sources',
author = 'Wesley Fraser',
author_email = 'westhefras@gmail.com',
Expand Down
2 changes: 1 addition & 1 deletion trippy/__init__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# -*- coding: utf-8 -*-
__version__='1.0'
__version__='1.1'
__author__='Wesley Fraser (github: fraserw, westhefras@gmail.com)'
__all__=['psf','pill','bgFinder','utils','psfStarChooser','MCMCfit','scamp','tzscale']

Expand Down
5 changes: 4 additions & 1 deletion trippy/pill.py
Original file line number Diff line number Diff line change
Expand Up @@ -322,14 +322,17 @@ def __call__(self,xi,yi,radius=4.,l=5.,a=0.01,width=20.,skyRadius=8.,zpt=27.0,ex
if singleAperture:
W = np.where(mask != 0.0)
flux = np.sum(image) - len(W[0]) * bg / float(self.repFact ** 2)
self.nPix = np.sum(mask) / float(self.repFact ** 2)
elif multipleApertures:
flux = []
self.nPix = []
for jj in range(len(radius)):
W = np.where(mask[jj] != 0.0)
flux.append(np.sum(image[jj]) - len(W[0]) * bg / float(self.repFact ** 2))
self.nPix.append(np.sum(mask[jj]) / float(self.repFact ** 2))
flux = np.array(flux)
self.nPix = np.array(self.nPix)

self.nPix = np.sum(mask) / float(self.repFact ** 2)
self.sourceFlux = flux
self.bg = bg
self.bgstd = bgstd
Expand Down

0 comments on commit 5c9995d

Please sign in to comment.