Public Member Functions | Public Attributes | List of all members
generic.controllers.MakeCanvases.CanvasMaker._ReferenceHistComp Class Reference
Inheritance diagram for generic.controllers.MakeCanvases.CanvasMaker._ReferenceHistComp:
object

Public Member Functions

def __init__ (self, comparison_function, ignore_ref=False)
 
def __call__ (self, reference, subject)
 

Public Attributes

 comp_fn
 
 ignore_ref
 
short int type
 
short int number
 
char name [SIZE_OF_OBJ_NAME]
 
cat_entry star
 

Detailed Description

Helper type to do comparisons to a reference histogram.
    Used in the display variations within CanvasMaker. 

Definition at line 152 of file MakeCanvases.py.

Constructor & Destructor Documentation

def generic.controllers.MakeCanvases.CanvasMaker._ReferenceHistComp.__init__ (   self,
  comparison_function,
  ignore_ref = False 
)

Definition at line 156 of file MakeCanvases.py.

156  def __init__(self, comparison_function, ignore_ref=False):
157  self.comp_fn = comparison_function
158  self.ignore_ref = ignore_ref # basically a hack so that area normalization works (where you don't want the ref). better solutions welcome
159 
def __init__(self, comparison_function, ignore_ref=False)

Member Function Documentation

def generic.controllers.MakeCanvases.CanvasMaker._ReferenceHistComp.__call__ (   self,
  reference,
  subject 
)

Definition at line 160 of file MakeCanvases.py.

References generic.controllers.MakeCanvases.CanvasMaker._ReferenceHistComp.comp_fn, and generic.controllers.MakeCanvases.CanvasMaker._ReferenceHistComp.ignore_ref.

160  def __call__(self, reference, subject):
161  if not self.ignore_ref:
162  ref_val = self.comp_fn(reference)
163  sub_val = self.comp_fn(subject)
164 
165  try:
166 # print self.comp_fn
167 # print reference, ref_val
168 # print subject, sub_val
169  return ref_val/sub_val if not self.ignore_ref else sub_val
170  except:
171  return None
172 
173  # variations in the arguments to the ImageMaker

Member Data Documentation

generic.controllers.MakeCanvases.CanvasMaker._ReferenceHistComp.comp_fn
generic.controllers.MakeCanvases.CanvasMaker._ReferenceHistComp.ignore_ref
char object::name
inherited
short int object::number
inherited

Definition at line 115 of file novas.h.

cat_entry object::star
inherited

Definition at line 117 of file novas.h.

short int object::type
inherited

Definition at line 114 of file novas.h.


The documentation for this class was generated from the following file: