Commit 5a34780d authored by Sean Leavey's avatar Sean Leavey
Browse files

Implemented scale and pdtype for detector pd

parent 8c01a414
......@@ -24,7 +24,7 @@ class Detector(object) :
self.__node = None
self._params = []
self._mask = {}
self.__scale = ""
self.__scale = None
if node.find('*'):
self._alternate_beam = True
......@@ -81,12 +81,14 @@ class Detector(object) :
class pd(Detector):
def __init__(self, name, num_demods, node_name, senstype=None, alternate_beam=False, **kwargs):
def __init__(self, name, num_demods, node_name, senstype=None, alternate_beam=False, pdtype=None, **kwargs):
Detector.__init__(self, name, node_name)
self.__num_demods = num_demods
self.__senstype = senstype
self.__alternate_beam = alternate_beam
self.__pdtype = pdtype
# create the parameters for all 5 demodulations regardless
# of how many the user specifies. Later we add properties to
# those which correspond to the number of demodulations
......@@ -129,6 +131,11 @@ class pd(Detector):
self.__num_demods = value
self.__set_demod_attrs()
@property
def pdtype(self): return self.__pdtype
@pdtype.setter
def pdtype(self, value): self.__pdtype = value
def __get_fphi(self, name):
return getattr(self, '_'+ self.__class__.__name__ +'__' + name)
......@@ -195,6 +202,12 @@ class pd(Detector):
senstype = ""
rtn.append("pd{0}{1} {2}{3} {4}{5}".format(senstype, self.num_demods, self.name, fphi_str, self.node.name, alt_str))
if self.scale != None:
rtn.append("scale {1} {0}".format(self.name, self.scale))
if self.pdtype != None:
rtn.append("pdtype {0} {1}".format(self.name, self.pdtype))
for p in self._params:
rtn.extend(p.getFinesseText())
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment