Commit b57a16af by Daniel Brown

fixing ordering. Adding more intelligent remove in BlockedKatFile

parent 4081eabd
Pipeline #1762 passed with stage
in 19 seconds
 ... @@ -216,7 +216,13 @@ class BlockedKatFile(object): ... @@ -216,7 +216,13 @@ class BlockedKatFile(object): self.blocks = {self.__NO_BLOCK:""} self.blocks = {self.__NO_BLOCK:""} self.__currentBlock = self.__NO_BLOCK self.__currentBlock = self.__NO_BLOCK def remove(self, block): def remove(self, *blocks): if len(blocks[0]) > 1 and not isinstance(blocks[0], six.string_types): # if we've got an iterable thing that isn't a string, eg list or tuple # just use that blocks = blocks[0] for block in blocks: if block not in self.ordering or block not in self.blocks: if block not in self.ordering or block not in self.blocks: raise Exception("%s block not found") raise Exception("%s block not found") ... ...
 ... @@ -14,11 +14,6 @@ from scipy.special import hermite ... @@ -14,11 +14,6 @@ from scipy.special import hermite from pykat.math.jacobi import jacobi from pykat.math.jacobi import jacobi from pykat.SIfloat import SIfloat from pykat.SIfloat import SIfloat class gauss_param(BeamParam): pass class beam_param(BeamParam): pass class BeamParam(object): class BeamParam(object): """ """ ... @@ -499,3 +494,13 @@ def LG2HG(p,l): ... @@ -499,3 +494,13 @@ def LG2HG(p,l): coefficients[j] = c * (-1.0)**p * (-2)**j * jacobi(j,n-j,m-j,0.0) coefficients[j] = c * (-1.0)**p * (-2)**j * jacobi(j,n-j,m-j,0.0) return coefficients, ns, ms return coefficients, ns, ms # These classes are here as legacy classes, BeamParam should throw a warning if they are used instead. class gauss_param(BeamParam): pass class beam_param(BeamParam): pass \ No newline at end of file
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!