def trackandphot(init_x,init_y, plottingThings): [xCenter,yCenter,averageRadius, _] = trackSmooth.trackSmooth(imagedata,init_y, init_x, \ smoothconst, plottingThings, preCropped=False, zoom=zoomfactor, plots=trackplots) flux, error, photFlags, _ = photometry.phot(imagedata, xCenter, yCenter, apertureradius, plottingThings, ccdGain=1.0, plots=trackplots,\ # annulusOuterRadiusFactor=4.0, annulusInnerRadiusFactor=1.5,\ annulusOuterRadiusFactor=2.5, annulusInnerRadiusFactor=1.1,\ sigmaclipping=True, returnsubtractedflux=True) return xCenter, yCenter, flux, error
def trackandphot(init_x, init_y, plottingThings): [xCenter,yCenter,averageRadius, _] = trackSmooth.trackSmooth(imagedata,init_y, init_x, \ smoothconst, plottingThings, preCropped=False, zoom=zoomfactor, plots=trackplots) flux, error, photFlags, _ = photometry.phot(imagedata, xCenter, yCenter, apertureradius, plottingThings, ccdGain=1.0, plots=trackplots,\ # annulusOuterRadiusFactor=4.0, annulusInnerRadiusFactor=1.5,\ annulusOuterRadiusFactor=2.5, annulusInnerRadiusFactor=1.1,\ sigmaclipping=True, returnsubtractedflux=True) return xCenter, yCenter, flux, error
else: init_x = ycentroids[i-1][j]#starpositions[j][i-1] init_y = xcentroids[i-1][j]#starpositions[j][i-1] if trackplots: fig = plt.figure(num=None, figsize=(18, 3), facecolor='w', edgecolor='k') fig.subplots_adjust(wspace=0.5) subplotsDimensions = 140 photSubplotsOffset = 3 statusSubplotOffset = 6 plottingThings = [fig,subplotsDimensions,photSubplotsOffset] else: plottingThings = False [xCenter,yCenter,averageRadius, _] = trackSmooth.trackSmooth(imagedata,init_y, init_x, \ smoothconst, plottingThings, preCropped=False, zoom=zoomfactor, plots=trackplots) for ap, apertureradius in enumerate(apertureradii): flux, error, photFlags, _ = photometry.phot(imagedata, xCenter, yCenter, apertureradius, plottingThings, ccdGain=1.0, plots=trackplots,\ annulusOuterRadiusFactor=2.0, annulusInnerRadiusFactor=1.5,\ sigmaclipping=True, returnsubtractedflux=True) fluxes[i, j, ap] = flux errors[i, j, ap] = error xcentroids[i, j] = xCenter ycentroids[i, j] = yCenter if trackplots:
if trackplots: fig = plt.figure(num=None, figsize=(18, 3), facecolor='w', edgecolor='k') fig.subplots_adjust(wspace=0.5) subplotsDimensions = 140 photSubplotsOffset = 3 statusSubplotOffset = 6 plottingThings = [fig, subplotsDimensions, photSubplotsOffset] else: plottingThings = False [xCenter,yCenter,averageRadius, _] = trackSmooth.trackSmooth(imagedata,init_y, init_x, \ smoothconst, plottingThings, preCropped=False, zoom=zoomfactor, plots=trackplots) for ap, apertureradius in enumerate(apertureradii): flux, error, photFlags, _ = photometry.phot(imagedata, xCenter, yCenter, apertureradius, plottingThings, ccdGain=1.0, plots=trackplots,\ annulusOuterRadiusFactor=2.0, annulusInnerRadiusFactor=1.5,\ sigmaclipping=True, returnsubtractedflux=True) fluxes[i, j, ap] = flux errors[i, j, ap] = error xcentroids[i, j] = xCenter ycentroids[i, j] = yCenter if trackplots: