Esempio n. 1
0
 def _set_step(self, step):
     # int() will give floor() casted to an Int
     try:
         self.numPoints = int(
             (self.stop - self.start) / floatbits.prevfloat(step)) + 1
     except ValueError, e:
         print("ERROR: Sweep named %s issue computing Num. Points: %s" %
               (self.label, e))
Esempio n. 2
0
def validate_sweepLib():     
    errors = []

    for key in sweeps.keys():
        if isinstance(sweeps[key],Sweeps.PointsSweep):            
            try:
                numPoints = int((sweeps[key].stop - sweeps[key].start)/floatbits.prevfloat(sweeps[key].step)) + 1
            except ValueError, e:
                errors.append("Sweep named %s issue computing Num. Points: %s" % (sweeps[key].label,e))
Esempio n. 3
0
 def _set_step(self, step):
     # int() will give floor() casted to an Int
     try:
         self.numPoints = int((self.stop - self.start)/floatbits.prevfloat(step)) + 1
     except ValueError, e:
         print("ERROR: Sweep named %s issue computing Num. Points: %s" % (self.label,e))
Esempio n. 4
0
 def _set_step(self, step):
     # int() will give floor() casted to an Int
     self.numPoints = int(
         (self.stop - self.start) / floatbits.prevfloat(step)) + 1
Esempio n. 5
0
 def _set_step(self, step):
     # int() will give floor() casted to an Int
     self.numPoints = int((self.stop - self.start)/floatbits.prevfloat(step)) + 1