<s> """<STR_LIT>""" <EOL> from matplotlib import pyplot as plt <EOL> import oscaar <EOL> import astrometry <EOL> import photometry <EOL> import dataBank <EOL> import systematics <EOL> import IO <EOL> import pyfits <EOL> plt . ion ( ) <EOL> data = dataBank . dataBank ( ) <EOL> allStars = data . getDict ( ) <EOL> outputPath = data . outputPath <EOL> N_exposures = len ( data . getPaths ( ) ) <EOL> meanDarkFrame = data . getMeanDarkFrame ( ) <EOL> masterFlat = data . masterFlat <EOL> plottingThings , statusBarFig , statusBarAx = IO . plottingSettings ( data . trackPlots , data . photPlots ) <EOL> for expNumber in xrange ( N_exposures ) : <EOL> if statusBarAx is not None and expNumber % <NUM_LIT:15> == <NUM_LIT:0> : <EOL> plt . cla ( ) <EOL> statusBarAx . set_title ( '<STR_LIT>' ) <EOL> statusBarAx . set_xlim ( [ <NUM_LIT:0> , <NUM_LIT:100> ] ) <EOL> statusBarAx . set_xlabel ( '<STR_LIT>' ) <EOL> statusBarAx . get_yaxis ( ) . set_ticks ( [ ] ) <EOL> statusBarAx . barh ( [ <NUM_LIT:0> ] , [ <NUM_LIT> * expNumber / len ( data . getPaths ( ) ) ] , <EOL> [ <NUM_LIT:1> ] , color = '<STR_LIT:k>' ) <EOL> image = ( pyfits . getdata ( data . getPaths ( ) [ expNumber ] ) - meanDarkFrame ) / masterFlat <EOL> data . storeTime ( expNumber ) <EOL> for star in allStars : <EOL> est_x , est_y = data . centroidInitialGuess ( expNumber , star ) <EOL> x , y , radius , trackFlag = astrometry . trackSmooth ( image , est_x , est_y , <EOL> data . smoothConst , <EOL> plottingThings , <EOL> zoom = data . trackingZoom , <EOL> plots = data . trackPlots ) <EOL> data . storeCentroid ( star , expNumber , x , y ) <EOL> fluxes , errors , photFlags = photometry . multirad ( image , x , y , <EOL> data . apertureRadii , <EOL> plottingThings , <EOL> ccdGain = data . ccdGain , <EOL> plots = data . photPlots ) <EOL> photFlag = any ( photFlags ) <EOL> data . storeFluxes ( star , expNumber , fluxes , errors ) <EOL> if trackFlag or photFlag and not data . getFlag ( ) : <EOL> data . setFlag ( star , False ) <EOL> if data . trackPlots or data . photPlots : <EOL> plt . draw ( ) <EOL> if statusBarAx is not None and expNumber % <NUM_LIT:15> == <NUM_LIT:0> : <EOL> plt . draw ( ) <EOL> plt . close ( ) <EOL> data . scaleFluxes_multirad ( ) <EOL> meanComparisonStars , meanComparisonStarErrors = data . calcMeanComparison_multirad ( ccdGain = data . ccdGain ) <EOL> lightCurves , lightCurveErrors = data . computeLightCurve_multirad ( meanComparisonStars , <EOL> meanComparisonStarErrors ) <EOL> oscaar . IO . save ( data , outputPath ) <EOL> data . plotLightCurve_multirad ( ) </s>
