@@ -982,8 +982,9 @@ def isFrameClockAligned(self):
982982 logger .error ('Frame clock NOT aligned.\n {0}' .format (str (errs )))
983983 return False
984984
985- def rampTest (self , nchecks = 300 , retry = False ):
986- chips = self .adcList
985+ def rampTest (self , chips = None , nchecks = 300 , retry = False ):
986+ if chips is None :
987+ chips = self .adcList
987988 self .logger .debug ('Ramp test on ADCs: %s' % str (chips ))
988989 failed_chips = {}
989990 self .setDemux (numChannel = 1 )
@@ -992,7 +993,7 @@ def rampTest(self, nchecks=300, retry=False):
992993 self .adc .test ("en_ramp" )
993994 for cnt in range (nchecks ):
994995 self .snapshot ()
995- for chip ,d in self .readRAM (signed = False ).items ():
996+ for chip ,d in self .readRAM (chips , signed = False ).items ():
996997 ans = (predicted + d [0 ,0 ]) % 256
997998 failed_lanes = np .sum (d != ans , axis = 0 )
998999 if np .any (failed_lanes ) > 0 :
@@ -1040,7 +1041,7 @@ def isLaneBonded(self, bondAllAdcs=False):
10401041 def from_device_info (cls , parent , device_name , device_info , initialize = False , ** kwargs ):
10411042 """
10421043 Process device info and the memory map to get all the necessary info
1043- and return a SKARAB ADC instance.
1044+ and return a ADC instance.
10441045 :param parent: The parent device, normally a casperfpga instance
10451046 :param device_name:
10461047 :param device_info:
@@ -1049,4 +1050,8 @@ def from_device_info(cls, parent, device_name, device_info, initialize=False, **
10491050 :param kwargs:
10501051 :return:
10511052 """
1052- return cls (parent , device_name , device_info , initialize , ** kwargs )
1053+ host = parent
1054+ #return cls(parent, device_name, device_info, initialize, **kwargs)
1055+ # XXX should device_info be passed as kwargs to cls? Would require renaming
1056+ # some parameters, so am not for now.
1057+ return cls (host )
0 commit comments