Ejemplo n.º 1
0
 def ModelMap(self, xml):
     """Run gtmodel tool for binned analysis and make a subtraction of the produced map
      with the count map to produce a residual map"""
     if (self.clobber == "no" and os.path.isfile(self.ModelMapFile)):
         #print("File exists and clobber is False")
         return (0)
     model_map['expcube'] = self.Cubename
     model_map['srcmaps'] = self.srcMap
     model_map['bexpmap'] = self.BinnedMapfile
     model_map['srcmdl'] = xml
     #if  self.irfs != 'CALDB':
     #    model_map['evtype']= self.Configuration['event']['evtype']
     #else :
     #    model_map['evtype']= 'INDEF'
     model_map["irfs"] = self.irfs
     model_map['outfile'] = self.ModelMapFile
     model_map['clobber'] = self.clobber
     #model_map.run()
     run_retry(model_map)
     #Compute the residual map
     utils.SubtractFits(self.cmapfile,
                        self.ModelMapFile,
                        self.Configuration,
                        tag=self.inttag,
                        rel_diff_file=self.rel_diff_file,
                        abs_diff_file=self.abs_diff_file)
Ejemplo n.º 2
0
 def ModelMaps(self, xml):
     """Run gtmodelmap tool for binned analysis and make a subtraction of the produced map
      with the count map to produce a residual map"""
     model_map['expcube'] = self.Cubename
     model_map['srcmaps'] = self.scrMap
     model_map['bexpmap'] = self.BinnedMapfile
     model_map['srcmdl'] = xml
     model_map["irfs"] = self.irfs
     model_map['outfile'] = self.ModelMap
     model_map['clobber'] = self.clobber
     model_map.run()
     #Compute the residual map
     utils.SubtractFits(self.cmapfile, self.ModelMap, self.Configuration)