Skip to content

Commit

Permalink
Do not need mjds
Browse files Browse the repository at this point in the history
  • Loading branch information
Michael Coughlin committed Aug 20, 2018
1 parent 6cc33b9 commit caef008
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions ztfsub/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -388,9 +388,14 @@ def forcedphotometry(imagefile,ra=None,dec=None,x=None,y=None,fwhm=5.0,zp=0.0,ga
if len(hdulist) == 1:
header = hdulist[0].header
image = hdulist[0].data
dateobs = utcparser(header["UTCSTART"])
mag,magerr,flux,fluxerr,sky,skyerr,badflag,outstr = pp.aper.aper(image,x0,y0,phpadu=gain,apr=fwhm,zeropoint=zp,skyrad=[3*fwhm,5*fwhm],exact=False)
return dateobs.mjd, mag, magerr, flux, fluxerr
if "UTCSTART" in header:
dateobs = utcparser(header["UTCSTART"])
mjd = dateobs.mjd
else:
mjd = -1

return mjd, mag, magerr, flux, fluxerr

else:
mjds, mags, magerrs, fluxes, fluxerrs = [], [], [], [], []
Expand Down

0 comments on commit caef008

Please sign in to comment.