-
Type: Task
-
Status: Won't Fix (View Workflow)
-
Priority: Normal
-
Resolution: Won't Fix
-
Component/s: ics_mcsActor
-
Labels:
-
Sprint:Gen3 transition
After using the multi-processing, the centroid time is much faster than before. Now. the first iteration still require ~4 seconds to load the geometry. We need to think about how to reduce the overhead
def getGeometry(self, cmd): db = self.connectToDB(cmd) cmd.inform(f'text="getting geometry"') if(self.geometrySet == True): cmd.inform('text="geometry is already set"') return # boresight centre in pixels self.rotCent = dbTools.loadBoresightFromDB(db, int(self.visitId)) cmd.inform(f'text="boresight={self.rotCent[0]},{self.rotCent[1]}"') # read xmlFile instPath = os.path.join(os.environ['PFS_INSTDATA_DIR']) #if(self.geomFile == None): # self.geomFile = os.path.join(instPath, 'data/pfi/modules/ALL/ALL_final_20210920_mm.xml') if(self.dotFile == None): self.dotFile = os.path.join( instPath, "data/pfi/dot/black_dots_mm.csv") pfi = self.butler.get("moduleXml", moduleName="ALL", version="") dots = self.butler.get("black_dots", moduleName="ALL", version="") cmd.inform(f'text="loading XML from butler"') cmd.inform(f'text="loading DOT location from butler"') self.centrePos, self.armLength, self.dotPos, self.goodIdx, self.calibModel = mcsTools.readCobraGeometry( pfi, dots) fids = self.butler.get('fiducials') self.outerRingIds, self.badFidIds = mcsTools.readFiducialMasks(fids) cmd.inform('text="cobra geometry read"') self.geometrySet = True