# Path: killMS/Other/MyPickle.py
# def Save(Obj,fileout):
# def Load(filein):
#     G= pickle.load( open( filein, "rb" ) )
# 
# Path: killMS/Other/logo.py
# def report_version():
# def print_logo():
# 
# Path: killMS/Other/ModColor.py
# HEADER = '\033[95m'
# OKBLUE = '\033[94m'
# OKGREEN = '\033[92m'
# WARNING = '\033[93m'
# FAIL = '\033[91m'
# ENDC = '\033[0m'
#     HEADER = ''
#     OKBLUE = ''
#     OKGREEN = ''
#     WARNING = ''
#     FAIL = ''
#     ENDC = ''
# def Str(strin0,col="red",Bold=True):
# def Sep(strin=None,D=1):
# def Title(strin,Big=False):
# def disable():
# 
# Path: killMS/Array/ModLinAlg.py
# def invertChol(A):
# def invertLU(A):
# def sqrtSVD(A,Rank=None):
# def BatchInverse(A,H=False):
# def BatchH(A):
# def BatchDot(A,B):
# def BatchDot2(A,B):
# def PlotMatSVD(A,s,Ainv):
# def invSVD(A):
# def SVDw(A):
# def EigClean(A):
# def Dot_ListBlockMat_Mat(ListBlocks,Mat):
# def Dot_ListBlockMat_Mat_Iregular(ListBlocks,Mat):
# def test_Dot_ListBlockMat_Mat():
# def test_Dot_ListBlockMat_Mat_Big():
#     L=np.linalg.cholesky(A)
#     A=(A+A.T)/2.
#     A=A.reshape((A.size//4,2,2))
#     A=A.reshape((A.size//4,2,2))
#     AH=np.zeros_like(A)
#     AH[:,0,0]=a0
#     AH[:,1,1]=d0
#     AH[:,0,1]=b0
#     AH[:,1,0]=c0
#     AH=AH.reshape(shapeOut)
#     A=A.reshape((A.size//4,2,2))
#     B=B.reshape((B.size//4,2,2))
#     C=np.zeros_like(A)
#     C00=C[:,0,0]
#     C01=C[:,0,1]
#     C10=C[:,1,0]
#     C11=C[:,1,1]
#     C00[:]=a0*a1+c0*b1
#     C01[:]=a0*c1+c0*d1
#     C10[:]=b0*a1+d0*b1
#     C11[:]=b0*c1+d0*d1
#     C=C.reshape(shapeOut)
#     A=A.reshape((NDir_a,nf,na,2,2))
#     B=B.reshape((NDir_b,nf,na,2,2))
#     C=np.zeros_like(A)
#     C00=C[:,:,:,0,0]
#     C01=C[:,:,:,0,1]
#     C10=C[:,:,:,1,0]
#     C11=C[:,:,:,1,1]
#     C00[:,:,:]=a0*a1+c0*b1
#     C01[:,:,:]=a0*c1+c0*d1
#     C10[:,:,:]=b0*a1+d0*b1
#     C11[:,:,:]=b0*c1+d0*d1
#     C=C.reshape(shapeOut)
#     I=np.dot(Ainv,A)
#     B=np.random.randn(nblocks*n,m)
#     T=ClassTimeIt.ClassTimeIt()
#     R0=Dot_ListBlockMat_Mat(ListBlocks,B)
#     R1=np.dot(BlocksMat,B)
#     R2=Dot_ListBlockMat_Mat_Iregular(ListBlocks,B)
#     B=np.random.randn(nblocks*n,m)
#     T=ClassTimeIt.ClassTimeIt()
#     R0=Dot_ListBlockMat_Mat(ListBlocks,B)


import optparse
import sys
import matplotlib.gridspec as gridspec
    import matplotlib
import time
import os
import numpy as np
import pickle
import pylab
import numpy as np
from killMS.Other import MyPickle
from killMS.Other import logo
from killMS.Other import ModColor
from DDFacet.Other import logger
from itertools import product as ItP
from killMS.Array import ModLinAlg
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
"""
#!/usr/bin/env python
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function

log=logger.getLogger("killMS")
#logger.itsLog.logger.setLevel(logger.logging.CRITICAL)

sys.path=[name for name in sys.path if not(("pyrap" in name)&("/usr/local/lib/" in name))]

# test

#import numpy
#print numpy.__file__
#import pyrap
#print pyrap.__file__
#stop


if "nocol" in sys.argv:
    print("nocol")
    ModColor.silent=1
if "nox" in sys.argv:
    matplotlib.use('agg')

# Path: killMS/Other/MyPickle.py
# def Save(Obj,fileout):
# def Load(filein):
#     G= pickle.load( open( filein, "rb" ) )
# 
# Path: killMS/Other/logo.py
# def report_version():
# def print_logo():
# 
# Path: killMS/Other/ModColor.py
# HEADER = '\033[95m'
# OKBLUE = '\033[94m'
# OKGREEN = '\033[92m'
# WARNING = '\033[93m'
# FAIL = '\033[91m'
# ENDC = '\033[0m'
#     HEADER = ''
#     OKBLUE = ''
#     OKGREEN = ''
#     WARNING = ''
#     FAIL = ''
#     ENDC = ''
# def Str(strin0,col="red",Bold=True):
# def Sep(strin=None,D=1):
# def Title(strin,Big=False):
# def disable():
# 
# Path: killMS/Array/ModLinAlg.py
# def invertChol(A):
# def invertLU(A):
# def sqrtSVD(A,Rank=None):
# def BatchInverse(A,H=False):
# def BatchH(A):
# def BatchDot(A,B):
# def BatchDot2(A,B):
# def PlotMatSVD(A,s,Ainv):
# def invSVD(A):
# def SVDw(A):
# def EigClean(A):
# def Dot_ListBlockMat_Mat(ListBlocks,Mat):
# def Dot_ListBlockMat_Mat_Iregular(ListBlocks,Mat):
# def test_Dot_ListBlockMat_Mat():
# def test_Dot_ListBlockMat_Mat_Big():
#     L=np.linalg.cholesky(A)
#     A=(A+A.T)/2.
#     A=A.reshape((A.size//4,2,2))
#     A=A.reshape((A.size//4,2,2))
#     AH=np.zeros_like(A)
#     AH[:,0,0]=a0
#     AH[:,1,1]=d0
#     AH[:,0,1]=b0
#     AH[:,1,0]=c0
#     AH=AH.reshape(shapeOut)
#     A=A.reshape((A.size//4,2,2))
#     B=B.reshape((B.size//4,2,2))
#     C=np.zeros_like(A)
#     C00=C[:,0,0]
#     C01=C[:,0,1]
#     C10=C[:,1,0]
#     C11=C[:,1,1]
#     C00[:]=a0*a1+c0*b1
#     C01[:]=a0*c1+c0*d1
#     C10[:]=b0*a1+d0*b1
#     C11[:]=b0*c1+d0*d1
#     C=C.reshape(shapeOut)
#     A=A.reshape((NDir_a,nf,na,2,2))
#     B=B.reshape((NDir_b,nf,na,2,2))
#     C=np.zeros_like(A)
#     C00=C[:,:,:,0,0]
#     C01=C[:,:,:,0,1]
#     C10=C[:,:,:,1,0]
#     C11=C[:,:,:,1,1]
#     C00[:,:,:]=a0*a1+c0*b1
#     C01[:,:,:]=a0*c1+c0*d1
#     C10[:,:,:]=b0*a1+d0*b1
#     C11[:,:,:]=b0*c1+d0*d1
#     C=C.reshape(shapeOut)
#     I=np.dot(Ainv,A)
#     B=np.random.randn(nblocks*n,m)
#     T=ClassTimeIt.ClassTimeIt()
#     R0=Dot_ListBlockMat_Mat(ListBlocks,B)
#     R1=np.dot(BlocksMat,B)
#     R2=Dot_ListBlockMat_Mat_Iregular(ListBlocks,B)
#     B=np.random.randn(nblocks*n,m)
#     T=ClassTimeIt.ClassTimeIt()
#     R0=Dot_ListBlockMat_Mat(ListBlocks,B)


# Path: killMS/PlotSolsIm.py
import optparse
import sys
import matplotlib.gridspec as gridspec
    import matplotlib
import time
import os
import numpy as np
import pickle
import pylab
import numpy as np
from killMS.Other import MyPickle
from killMS.Other import logo
from killMS.Other import ModColor
from DDFacet.Other import logger
from itertools import product as ItP
from killMS.Array import ModLinAlg

GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
"""
#!/usr/bin/env python
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function

log=logger.getLogger("killMS")
#logger.itsLog.logger.setLevel(logger.logging.CRITICAL)

sys.path=[name for name in sys.path if not(("pyrap" in name)&("/usr/local/lib/" in name))]

# test

#import numpy
#print numpy.__file__
#import pyrap
#print pyrap.__file__
#stop


if "nocol" in sys.argv:
    print("nocol")
    ModColor.silent=1
if "nox" in sys.argv:
    matplotlib.use('agg')

    print(ModColor.Str(" == !NOX! =="))