def first_calibration(self,star_list): cali = Calibration(self.Cam.camera) cali.first_calibration(star_list)
self.bgImage_exptime_calibration(star_id) def first_calibration(self,star_list): ''' Calibrates useBrightest, backgrounds, exptime times, subap locations and reference centroids for given stars ''' #Main loop. Calibrates for each star #First we flush self.bbbc.flush_all_leds() self.Set_useBrightest() for star_id in star_list: estrella = Star(star_id) if(estrella.valid): print '\nCalibrating star:%3.0f ' %star_id self.pupil_location(star_id) self.subap_calibration(star_id) self.bgImage_exptime_calibration(star_id) raw_input('First calibration concluded.\nSet phase screen and press enter to continue') def grab(self,stream,niter): taken = pp.unpack(self.c.GetStreamBlock(self.Cam.name+stream,niter)).sum(0)/float(niter) return taken if __name__ == '__main__': from General_Calibration import Calibration cali = Calibration('sbig') array = cali.grab('rtcPxlBuf',10)