Example #1
0
 def get_match_display_in_scene(self):
     query = PNGJP_SAND2Queries.get_match_display(self.session_uid)
     match_display = pd.read_sql_query(query, self.rds_conn.db)
     match_display = match_display[match_display[SceneInfoConsts.SCENE_FK].\
                                             isin(self.scene_info[SceneInfoConsts.SCENE_FK].values)]
     match_display = match_display.merge(self.scene_info[[
         SceneInfoConsts.SCENE_FK, SceneInfoConsts.TEMPLATE_FK
     ]],
                                         on=SceneInfoConsts.SCENE_FK,
                                         how='left')
     match_display = match_display.merge(self.all_templates,
                                         on=SceneInfoConsts.TEMPLATE_FK,
                                         how='left',
                                         suffixes=['', '_y'])
     return match_display
 def get_match_display(self):
     """
     This function extracts the display matches data and saves it into one global data frame.
     The data is taken from probedata.match_display_in_scene.
     """
     query = PNGJP_SAND2Queries.get_match_display(self.session_uid)
     match_display = pd.read_sql_query(query, self.rds_conn.db)
     match_display = match_display.merge(self.scene_info[[
         SceneInfoConsts.SCENE_FK, SceneInfoConsts.TEMPLATE_FK
     ]],
                                         on=SceneInfoConsts.SCENE_FK,
                                         how='left')
     match_display = match_display.merge(self.all_templates,
                                         on=TemplatesConsts.TEMPLATE_FK,
                                         how='left',
                                         suffixes=['', '_y'])
     return match_display