예제 #1
0
파일: image.py 프로젝트: jjdmol/LOFAR
 def get_map(self, map_name):
     """Returns requested map."""
     import functions as func
     if self.do_cache:
         map_data = func.retrieve_map(self, map_name)
     else:
         map_data = getattr(self, map_name)
     return map_data
예제 #2
0
 def get_map(self, map_name):
     """Returns requested map."""
     import functions as func
     if self.do_cache:
         map_data = func.retrieve_map(self, map_name)
     else:
         map_data = getattr(self, map_name)
     return map_data
예제 #3
0
파일: image.py 프로젝트: jjdmol/LOFAR
 def __getattribute__(self, name):
     import functions as func
     if name.endswith("_arr"):
         if self.do_cache:
             map_data = func.retrieve_map(self, name)
             if map_data is not None:
                 return map_data
             else:
                 return object.__getattribute__(self, name)
         else:
             return object.__getattribute__(self, name)
     else:
         return object.__getattribute__(self, name)
예제 #4
0
 def __getattribute__(self, name):
     import functions as func
     if name.endswith("_arr"):
         if self.do_cache:
             map_data = func.retrieve_map(self, name)
             if map_data is not None:
                 return map_data
             else:
                 return object.__getattribute__(self, name)
         else:
             return object.__getattribute__(self, name)
     else:
         return object.__getattribute__(self, name)