diff --git a/build/lib.macosx-10.10-x86_64-2.7/pysar/__config__.py b/build/lib.macosx-10.10-x86_64-2.7/pysar/__config__.py
deleted file mode 100644
index 82b7493..0000000
--- a/build/lib.macosx-10.10-x86_64-2.7/pysar/__config__.py
+++ /dev/null
@@ -1,21 +0,0 @@
-# This file is generated by /Users/brentminchew/Documents/Python/PySAR/setup.py
-# It contains system_info results at the time of building this package.
-__all__ = ["get_info","show"]
-
-
-def get_info(name):
- g = globals()
- return g.get(name, g.get(name + "_info", {}))
-
-def show():
- for name,info_dict in globals().items():
- if name[0] == "_" or type(info_dict) is not type({}): continue
- print(name + ":")
- if not info_dict:
- print(" NOT AVAILABLE")
- for k,v in info_dict.items():
- v = str(v)
- if k == "sources" and len(v) > 200:
- v = v[:60] + " ...\n... " + v[-60:]
- print(" %s = %s" % (k,v))
-
\ No newline at end of file
diff --git a/build/lib.macosx-10.10-x86_64-2.7/pysar/__init__.py b/build/lib.macosx-10.10-x86_64-2.7/pysar/__init__.py
deleted file mode 100644
index 762ee09..0000000
--- a/build/lib.macosx-10.10-x86_64-2.7/pysar/__init__.py
+++ /dev/null
@@ -1,46 +0,0 @@
-"""
- ~~~ PySAR ~~~
- Python-based toolbox for post-processing
- synthetic aperture radar (SAR) data
-
-PySAR is a general-purpose set of tools for common post-processing
-tasks involving the use of SAR data. Interferometric SAR (InSAR)
-and Polarimetric SAR (PolSAR) tools are included along with tools that
-are useful for processing 1D data sets, such as GPS and seismic data.
-
-Contents:
- :ref:`image`
- :ref:`insar`
-"""
-
-#Copyright (C) 2013 Brent M. Minchew
-#--------------------------------------------------------------------
-#GNU Licensed
-#
-# This program is free software: you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# 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, see .
-#
-#--------------------------------------------------------------------
-
-import signal
-import math
-import image
-import polsar
-import insar
-import utils
-import etc
-import version
-import plot
-
-__version__ = version.version
-__all__ = ['signal','math','image','polsar','insar','utils','etc','version','plot']
diff --git a/build/lib.macosx-10.10-x86_64-2.7/pysar/etc/__init__.py b/build/lib.macosx-10.10-x86_64-2.7/pysar/etc/__init__.py
deleted file mode 100644
index 1403b4e..0000000
--- a/build/lib.macosx-10.10-x86_64-2.7/pysar/etc/__init__.py
+++ /dev/null
@@ -1,41 +0,0 @@
-"""
-Etc (:mod:`pysar.etc`)
-======================
-
-.. currentmodule:: pysar.etc
-
-Functions
----------
-
-Additional exceptions (:mod:`pysar.etc.excepts`)
-^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-
-.. autosummary::
- :toctree: generated/
-
- InputError Input errors
- InSARCorrBoundsError InSAR correlation < 0 or > 1
- cptError Error loading a CPT file
-
-Miscellaneous tools (:mod:`pysar.etc.misc`)
-^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-
-.. autosummary::
- :toctree: generated/
-
- progressbar Prints a wget-like progress bar to the screen
- nrprint No (carriage) return print
-
-Scripts
--------
-
-None
-
-"""
-import misc
-import excepts
-
-from misc import *
-from excepts import *
-
-__all__ = ['misc','excepts']
diff --git a/build/lib.macosx-10.10-x86_64-2.7/pysar/etc/excepts.py b/build/lib.macosx-10.10-x86_64-2.7/pysar/etc/excepts.py
deleted file mode 100644
index e8086ed..0000000
--- a/build/lib.macosx-10.10-x86_64-2.7/pysar/etc/excepts.py
+++ /dev/null
@@ -1,32 +0,0 @@
-"""
-Additional exceptions
-"""
-
-__all__ = ['InputError','InSARCorrBoundsError','cptError',
- 'GdalError','NetcdfError','H5pyError']
-
-###===========================================================
-class InputError(Exception):
- pass
-
-###----------------------------------------
-class InSARCorrBoundsError(Exception):
- pass
-
-###----------------------------------------
-class cptError(Exception):
- pass
-
-###----------------------------------------
-class GdalError(Exception):
- pass
-
-###----------------------------------------
-class NetcdfError(Exception):
- pass
-
-###----------------------------------------
-class H5pyError(Exception):
- pass
-
-###----------------------------------------
diff --git a/build/lib.macosx-10.10-x86_64-2.7/pysar/etc/misc.py b/build/lib.macosx-10.10-x86_64-2.7/pysar/etc/misc.py
deleted file mode 100644
index 404393e..0000000
--- a/build/lib.macosx-10.10-x86_64-2.7/pysar/etc/misc.py
+++ /dev/null
@@ -1,65 +0,0 @@
-"""
-Miscellaneous add-ons
-"""
-import sys,os
-import numpy as np
-
-__all__ = ['progressbar','nrprint']
-
-###===========================================================================
-def progressbar(index,length,modval=2,prevbar=None):
- """
- Prints a wget-like progress bar to the screen
-
- ex. [=====> ] 50%
-
- Parameters
- ----------
- index : int or float
- index value
- length : int or float
- length of iteration or loop (100% = 100*index/length)
- modval : int
- length of prog bar in characters = 100//modval [default = 2]
- prevbar : string or None
- previous output string. This could save time as it won't
- print to the screen unless the new progress bar is
- different from prevbar [default = None; prints every bar]
-
- """
- length = np.int32(length)
- index = np.int32(index)
- modval = np.max([1,np.int32(modval)])
- percent = 100*index//length
- point = True
- prog = '['
- for i in np.arange(0,100+modval,modval):
- if i <= percent:
- prog += '='
- else:
- if i < 100 and point:
- prog += '>'
- point = False
- else:
- prog += '='
- percent = 100
- prog += ']'
- if prevbar != prog:
- sys.stdout.write("%s %3d%%\r" % (prog,percent))
- sys.stdout.flush()
- return prog
-
-###===========================================================================
-def nrprint(string):
- """
- No (carriage) return print
-
- Parameter
- ---------
- string : str
- String to print
-
- """
- sys.stdout.write(string+'\r')
- sys.stdout.flush()
-
diff --git a/build/lib.macosx-10.10-x86_64-2.7/pysar/etc/setup.py b/build/lib.macosx-10.10-x86_64-2.7/pysar/etc/setup.py
deleted file mode 100644
index 518e363..0000000
--- a/build/lib.macosx-10.10-x86_64-2.7/pysar/etc/setup.py
+++ /dev/null
@@ -1,14 +0,0 @@
-import sys,os
-
-def configuration(parent_package='',top_path=None):
- from numpy.distutils.misc_util import Configuration
- config = Configuration('etc', parent_package, top_path)
- return config
-
-if __name__ == '__main__':
- from distutils.dir_util import remove_tree
- from numpy.distutils.core import setup
- if os.path.exists('./build'):
- remove_tree('./build')
- setup(**configuration(top_path='').todict())
-
diff --git a/build/lib.macosx-10.10-x86_64-2.7/pysar/image/__init__.py b/build/lib.macosx-10.10-x86_64-2.7/pysar/image/__init__.py
deleted file mode 100644
index 0bb89d1..0000000
--- a/build/lib.macosx-10.10-x86_64-2.7/pysar/image/__init__.py
+++ /dev/null
@@ -1,68 +0,0 @@
-'''
-Image (:mod:`pysar.image`)
-==========================
-
-.. currentmodule:: pysar.image
-
-Functions
----------
-
-Decimate (look) 2D images (:mod:`pysar.image.looks`)
-^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-
-.. autosummary::
- :toctree: generated/
-
- look Image decimation
- look2D Same as look
-
-Generate a mask from a 2d polygon (:mod:`pysar.image.mask_tools`)
-^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-
-.. autosummary::
- :toctree: generated/
-
- poly2mask Polygon in Cartesian coordinates
- ll2mask Polygon in latitude/longitude coordinates
- xy2mask Same as poly2mask
- buffermask Expand or contract a mask
-
-Write some standard formats (:mod:`pysar.image.write`)
-^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-
-.. autosummary::
- :toctree: generated/
-
- writeHDF5 Write data to an HDF5 file
- writeNetCDF Write data to a NetCDF file
- writeRaster Write data to a raster file
- writeGeoTiff Write data to a GeoTiff file
- writeBinary Write data to a binary file
- writeMultiBand2d Write 2D multiband data to a binary file
-
-Read some standard formats (:mod:`pysar.image.read`)
-^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-
-.. autosummary::
- :toctree: generated/
-
- readHDF5 Read data from an HDF5 file
- readNetCDF Read data from a NetCDF file
-
-Scripts
--------
-
-================ ======================================
-`sarlooks` 2D image decimation
-`sarfilter` 2D image filtering
-================ ======================================
-'''
-import numpy as np
-from pysar.signal import boxfilter, conefilter
-
-from read import *
-from write import *
-from mask_tools import *
-from looks import *
-import sarfilter
-import sarlooks
diff --git a/build/lib.macosx-10.10-x86_64-2.7/pysar/image/_looks_mod.so b/build/lib.macosx-10.10-x86_64-2.7/pysar/image/_looks_mod.so
deleted file mode 100755
index 2e65df9..0000000
Binary files a/build/lib.macosx-10.10-x86_64-2.7/pysar/image/_looks_mod.so and /dev/null differ
diff --git a/build/lib.macosx-10.10-x86_64-2.7/pysar/image/io.py b/build/lib.macosx-10.10-x86_64-2.7/pysar/image/io.py
deleted file mode 100644
index a131a99..0000000
--- a/build/lib.macosx-10.10-x86_64-2.7/pysar/image/io.py
+++ /dev/null
@@ -1,14 +0,0 @@
-'''
-I/O functions
-'''
-from __future__ import print_function
-import sys,os
-import numpy as np
-
-import read
-import write
-
-__all__ = ['read','write']
-
-from read import *
-from write import *
diff --git a/build/lib.macosx-10.10-x86_64-2.7/pysar/image/looks.py b/build/lib.macosx-10.10-x86_64-2.7/pysar/image/looks.py
deleted file mode 100644
index b3d11cf..0000000
--- a/build/lib.macosx-10.10-x86_64-2.7/pysar/image/looks.py
+++ /dev/null
@@ -1,114 +0,0 @@
-"""
-Look routine
-"""
-from __future__ import print_function, division
-
-import sys,os
-import getopt
-import numpy as np
-import _looks_mod
-from pysar.utils.gen_tools import typecomplex
-
-__all__ = ['look','look2D']
-
-def look(data,win,null=None,verbose=0):
- """
- Incoherent averaging (looking) routine
-
- Parameters
- ----------
- data : 2D array
- Input data
- win : int or list
- Filter window size in pixels
- scalar values use a square window
- list should be in order [across, down]
- null : float or complex
- Null value to exclude from filter window
- verbose : int
- 1 = print line counter to screen; 0 = don't
-
- Output
- ------
- D : 2D array
- Filtered data
- """
- out = look2D(data=data,win=win,null=null,verbose=verbose)
- return out
-
-def look2D(data,win,null=None,verbose=0):
- """
- Incoherent averaging (looking) routine
-
- Parameters
- ----------
- data : 2D array
- Input data
- win : int or list
- Filter window size in pixels
- scalar values use a square window
- list should be in order [across, down]
- null : float or complex
- Null value to exclude from filter window
- verbose : int
- 1 = print line counter to screen; 0 = don't
-
- Output
- ------
- D : 2D array
- Filtered data
- """
- try:
- a = len(win)
- if a == 1:
- d0, d1 = np.int32(win[0]), np.int32(win[0])
- elif a == 2:
- d0, d1 = np.int32(win[0]), np.int32(win[1])
- else:
- print('Incorrect window: must be list length 1 or 2')
- return None
- except:
- d0, d1 = np.int32(win), np.int32(win)
-
- if null:
- donul = 1
- else:
- donul, null = 0, -9.87654321e200
-
- shp = np.shape(data)
- data = data.flatten()
- dtyp = data.dtype
-
- outlen, inlen = (shp[0]//d1)*(shp[1]//d0), shp[0]*shp[1]
-
- if data.dtype == np.float32:
- out = _looks_mod.look2d_real(data,shp[1],d1,d0,outlen,donul,null,verbose)
- elif data.dtype == np.float64:
- out = _looks_mod.look2d_double(data,shp[1],d1,d0,outlen,donul,null,verbose)
- elif data.dtype == np.complex64:
- out = _looks_mod.look2d_cmplx(data,shp[1],d1,d0,outlen,donul,null,verbose)
- elif data.dtype == np.complex128:
- out = _looks_mod.look2d_dcmplx(data,shp[1],d1,d0,outlen,donul,null,verbose)
- else:
- print('Unsupported data type...defaulting to float or complex')
- dtyp = data.dtype
- if typecomplex(data):
- data = data.astype(np.complex64)
- out = _looks_mod.look2d_cmplx(data,shp[1],d1,d0,outlen,donul,null,verbose)
- else:
- data = data.astype(np.float32)
- out = _looks_mod.look2d_real(data,shp[1],d1,d0,outlen,donul,null,verbose)
- out = out.astype(dtyp)
-
- return out.reshape(-1,shp[1]//d0)
-
-
-
-
-
-
-
-
-
-
-
diff --git a/build/lib.macosx-10.10-x86_64-2.7/pysar/image/mask_tools.py b/build/lib.macosx-10.10-x86_64-2.7/pysar/image/mask_tools.py
deleted file mode 100644
index 67232ff..0000000
--- a/build/lib.macosx-10.10-x86_64-2.7/pysar/image/mask_tools.py
+++ /dev/null
@@ -1,169 +0,0 @@
-"""
-mask_tools.py : Tools for creating and manipulating masks
-
-Contents
---------
-poly2mask(polygon,imdim,imtype=np.float32)
-xy2mask(polygon,imdim,imtype=np.float32)
-ll2mask(latlon,imdim,corner,spacing,imtype=np.float32)
-buffermask(mask,width,dx=1.,dy=1.)
-"""
-from __future__ import print_function, division
-import numpy as np
-
-__all__ = ['poly2mask','xy2mask','ll2mask','buffermask']
-
-###==================================================================================
-def poly2mask(polygon,imdim,imtype=np.float32):
- """
- poly2mask(polygon,imdim,imtype=np.float32)
-
- Generate a region-of-interest mask from a polygon.
-
- Parameters
- ----------
- polygon : {int or float} list of tuples
- polygon vertices; format [(x0,y0),...,(xn,yn)]
- imdim : {int} list, tuple, or ndarray
- image dimension (x,y) or (columns,rows)
- imtype : {str or numpy type} (Optional)
- data type for output image [np.float32]
-
- Output
- ------
- mask : ndarray
- mask array astype(imtype)
-
- Notes
- -----
- * Values inside polygon will be True or 1 depending on imtype
-
- """
- try:
- from PIL import Image, ImageDraw
- except:
- raise ImportError('poly2mask.py requires PIL.')
-
- if polygon[-1] != polygon[0]: polygon.append(polygon[0])
-
- nx, ny = imdim[0], imdim[1]
- img = Image.new('L', (nx,ny), 0)
- ImageDraw.Draw(img).polygon(polygon, outline=1, fill=1)
- try:
- mask = np.array(img, dtype=imtype)
- except:
- mask = np.array(img)
- try:
- mask = mask.astype(imtype)
- except:
- raise TypeError('imtype is not a valid data type')
- del img
- return mask
-
-###==================================================================================
-def ll2mask(latlon,imdim,corner,spacing,imtype=np.float32):
- """
- ll2mask(latlon,imdim,corner,spacing,imtype=np.float32)
-
- Generate a region-of-interest mask from a polygon whose vertices are given in lat/lon.
-
- Parameters
- ----------
- latlon : {int or float} list of tuples
- polygon vertices in degrees lat/lon; format: [(lat0,lon0),...,(latn,lonn)]
- imdim : {int} list, tuple, or ndarray
- image dimension (x,y) or (columns,rows)
- corner : {int or float} list, tuple, or ndarray
- lat and lon of one image corner; format: [lat,lon]
- spacing : {int or float} list, tuple, or ndarray
- grid spacing (see notes below); format: [lat_space, lon_space]
- imtype : {str or numpy type} (Optional)
- data type for output image [np.float32]
-
- Output
- ------
- mask : ndarray
- mask array astype(imtype)
-
- Notes
- -----
- * Values inside polygon will be True or 1 depending on imtype
- * Spacing is sign-sensitive. The sign of spacing values defines the corner.
- Ex. [-lat_space,lon_space] is the upper left corner (i.e. stepping one pixel
- in lat and lon from the corner means going south and east)
-
- """
- polygon = [None]*len(latlon)
- for i,ent in enumerate(latlon):
- x = (ent[1] - corner[1]) / spacing[1]
- y = (ent[0] - corner[0]) / spacing[0]
- polygon[i] = (x,y)
- return poly2mask(polygon=polygon,imdim=imdim,imtype=imtype)
-
-###==================================================================================
-def xy2mask(polygon,imdim,imtype=np.float32):
- """
- xy2mask(polygon,imdim,imtype=np.float32)
-
- Generate a region-of-interest mask from a polygon given in xy image coordinates.
-
- Parameters
- ----------
- polygon : {int or float} list of tuples
- polygon vertices; format [(x0,y0),...,(xn,yn)]
- imdim : {int} list, tuple, or ndarray
- image dimension (x,y) or (columns,rows)
- imtype : {str or numpy type} (Optional)
- data type for output image [np.float32]
-
- Output
- ------
- mask : ndarray
- mask array astype(imtype)
-
- Notes
- -----
- * Values inside polygon will be True or 1 depending on imtype
-
- """
- return poly2mask(polygon=polygon,imdim=imdim,imtype=imtype)
-
-###==================================================================================
-def buffermask(mask,width,dx=1.,dy=1.):
- '''
- buffermask(mask,width,dx=1.,dy=1.)
-
- Add or remove a buffer zone from a binary mask
-
- Parameters
- ----------
- mask : ndarray
- binary mask (ROI values assumd = 1)
- width : float
- width of buffer zone (> 0 for outer buffer; < 0 for inner)
- dx : float
- grid spacing in x direction [1]
- dy : float
- grid spacing in y direaction [1]
- '''
- from pysar.signal import boxfilter
- if np.abs(width) < np.finfo(np.float32).eps:
- return mask
-
- mtype = mask.dtype
- if mask.ndim == 1:
- window = int(np.abs(width//dx))
- fmask = boxfilter.boxcar1d(mask.astype(np.float32),window)
- elif mask.ndim == 2:
- window = [int(np.abs(width//dx)), int(np.abs(width//dy))]
- fmask = boxfilter.boxcar2d(mask.astype(np.float32),window)
-
- if np.sign(width) < 0:
- onemask = fmask > 0.99
- else:
- onemask = fmask > 0.01
- fmask[onemask] = 1.
- fmask[-onemask] = 0.
- return fmask.astype(mtype)
-
-
diff --git a/build/lib.macosx-10.10-x86_64-2.7/pysar/image/read.py b/build/lib.macosx-10.10-x86_64-2.7/pysar/image/read.py
deleted file mode 100644
index 09cbb5e..0000000
--- a/build/lib.macosx-10.10-x86_64-2.7/pysar/image/read.py
+++ /dev/null
@@ -1,106 +0,0 @@
-'''
-Read routines for a few standard file formats
-'''
-from __future__ import print_function
-import sys,os
-import numpy as np
-
-__all__ = ['readHDF5','readNetCDF']
-
-###-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
-def readHDF5(filename,dataid='z',rtrnxy=False):
- '''
- Return binary data from a single band HDF5 file
-
- Parameters
- ----------
-
- filename : str
- Name of file
- dataid : str
- Data tag ['z']
- rtrnxy : bool
- Return x,y,data tuple (must be tagged 'x' and 'y') [False]
-
- Returns
- -------
-
- rtrn : ndarray or tuple of ndarrays if rtrnxy=True
- Data tagged dataid, 'x', and 'y'
- '''
- try:
- import h5py
- except ImportError:
- raise ImportError('h5py is required for readhdf5')
-
- try:
- fn = h5py.File(filename,'r')
- z = fn[dataid][...]
- try:
- x = fn['x'][...]
- y = fn['y'][...]
- except:
- x, y = None, None
- except:
- raise
- finally:
- fn.close()
-
- if rtrnxy:
- return x,y,z
- else:
- return z
-
-###-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
-def readNetCDF(filename,dataid='z',rtrnxy=False):
- '''
- Return binary data from a single band NetCDF file
-
- Parameters
- ----------
-
- filename : str
- Name of file
- dataid : str
- Data tag ['z']
- rtrnxy : bool
- Return x,y,data tuple (must be tagged 'x' and 'y') [False]
-
- Returns
- -------
-
- rtrn : ndarray or tuple of ndarrays if rtrnxy=True
- Data tagged dataid, 'x', and 'y'
- '''
- try:
- from netCDF4 import Dataset
- except:
- raise ImportError('netCDF4 for Python is required for readNetCDF')
-
- try:
- fn = Dataset(filename,'r')
- z = fn.variables[dataid][...]
- try:
- x = fn.variables['x'][...]
- y = fn.variables['y'][...]
- except:
- try: ### for backward compatability
- rows, cols = fn.variables['dimension'][1], fn.variables['dimension'][0]
- xmin, xmax = fn.variables['x_range'][0], fn.variables['x_range'][1]
- ymin, ymax = fn.variables['y_range'][0], fn.variables['y_range'][1]
- x = np.linspace(xmin,xmax,cols)
- y = np.linspace(ymin,ymax,rows)
- z = z.reshape(rows, cols)
- except:
- x, y = None, None
- except:
- raise
- finally:
- fn.close()
-
- if rtrnxy:
- return x,y,z
- else:
- return z
-
-
diff --git a/build/lib.macosx-10.10-x86_64-2.7/pysar/image/sarfilter.py b/build/lib.macosx-10.10-x86_64-2.7/pysar/image/sarfilter.py
deleted file mode 100644
index 2b04c8f..0000000
--- a/build/lib.macosx-10.10-x86_64-2.7/pysar/image/sarfilter.py
+++ /dev/null
@@ -1,129 +0,0 @@
-#!/usr/bin/env python
-
-"""
-sarfilter.py: Boxcar filter for 2D images
-
-Usage::
-
- sarfilter.py infile samples [outfile] [options]
-
-Options
--------
--a value : int
- number of looks across the image
--d value : int
- number of looks down the image
--n value : float
- null value (will be reset on output)
--z value : float
- set null to value prior to filtering
--t value : str
- data type (see notes for options)
--i :
- ouput NaN in place of null value
-
-Notes
------
-* -a and/or -d must be defined
-* if one of -a or -d are defined, the filter window will be square
-* if outfile is not given, infile will be overwritten
-* -n value must be given for -i option to work
-* data types options ['f','float','d','double','c','complex','cf','complexfloat',
- 'cd','complexdouble']. Default = float
-
-"""
-from __future__ import print_function, division
-import sys,os
-import getopt
-import numpy as np
-from pysar.signal import boxfilter
-from pysar.etc.excepts import InputError
-
-def main():
- pars = Params()
-
- with open(pars.infile,'r') as fid:
- data = np.fromfile(fid,dtype=pars.dtype).reshape(-1,pars.cols)
-
- out = boxfilter.boxcar2d(data=data,window=pars.win,null=pars.null,
- nullset=pars.nullset,thread='auto',numthrd=8,tdthrsh=1e5)
-
- if pars.outnan:
- nullmask = np.abs(out - pars.null) < 1.e-7
- out[nullmask] = np.nan
-
- with open(pars.outfile,'w') as fid:
- out.flatten().tofile(fid)
-
-class Params():
- def __init__(self):
- opts, args = getopt.gnu_getopt(sys.argv[1:], 'a:d:n:z:t:is')
-
- self.infile = args[0]
- self.cols = np.int32(args[1])
- try:
- self.outfile = args[2]
- except:
- self.outfile = self.infile
-
- self.lx,self.ld,self.null = None, None, None
- self.verbose,self.outnan = 1, False
- self.nullset = None
- dtype = 'float'
- for o,a in opts:
- if o == '-a':
- self.lx = np.int32(a)
- elif o == '-d':
- self.ld = np.int32(a)
- elif o == '-n':
- self.null = np.float64(a)
- elif o == '-z':
- self.nullset = np.float64(a)
- elif o == '-i':
- self.outnan = True
- elif o == '-s':
- self.verbose = 0
- elif o == '-t':
- dtype = a.strip()
-
- if self.outnan and self.null == None:
- raise InputError('Null value must be defined to output NaN in its place')
-
- if self.lx and self.ld:
- self.win = [self.lx,self.ld]
- elif self.lx == None and self.ld:
- self.win = self.ld
- elif self.ld == None and self.lx:
- self.win = self.lx
- else:
- raise InputError('At least one window dimension must be defined')
-
- types = ['f','float','r4','d','double','r8','c','complex','c8','cf','complexfloat',
- 'cd','complexdouble','c16']
- atype = [np.float32, np.float32, np.float32, np.float64, np.float64, np.float64,
- np.complex64, np.complex64, np.complex64,
- np.complex64, np.complex64, np.complex128,
- np.complex128, np.complex128]
- try:
- self.dtype = atype[ types.index( dtype ) ]
- except:
- print('unsupported data type: ' + dtype)
- print(' supported data types are: ' + ', '.join(types))
- sys.exit()
-
-
-if __name__ == '__main__':
- args = sys.argv[1:]
- if len(args) < 3:
- print(__doc__)
- sys.exit()
- main()
-
-
-
-
-
-
-
-
-
diff --git a/build/lib.macosx-10.10-x86_64-2.7/pysar/image/sarlooks.py b/build/lib.macosx-10.10-x86_64-2.7/pysar/image/sarlooks.py
deleted file mode 100644
index c933d08..0000000
--- a/build/lib.macosx-10.10-x86_64-2.7/pysar/image/sarlooks.py
+++ /dev/null
@@ -1,114 +0,0 @@
-#!/usr/bin/env python
-
-"""
-sarlooks.py: Basic multilooking for 2D images
-
-Usage::
-
- sarlooks.py infile samples outfile [options]
-
-Options
--------
--a value : number of looks across the image
--d value : number of looks down the image
--n value : null value to exclude from the filter
--t value : data type (see notes for options)
--i : ouput NaN in place of null value
--s : run in silent mode (verbosity = 0)
-
-Notes
------
-* -a and/or -d must be defined
-* if one of -a or -d are defined, the filter window will be square
-* -n value must be given for -i option to work
-* data types options: ['f','float','d','double','c','complex','cf','complexfloat',
- 'cd','complexdouble']. Default = float
-
-"""
-from __future__ import print_function, division
-import sys,os
-import getopt
-import numpy as np
-from pysar.image import looks
-
-def main():
- pars = Params()
-
- fid = open(pars.infile,'r')
- data = np.fromfile(fid,dtype=pars.dtype).reshape(-1,pars.cols)
- fid.close()
-
- out = looks.look(data=data,win=pars.win,null=pars.null,verbose=pars.verbose)
-
- if pars.outnan:
- nullmask = np.abs(out - pars.null) < 1.e-7
- out[nullmask] = np.nan
-
- fid = open(pars.outfile,'w')
- out.flatten().tofile(fid)
- fid.close()
-
-class Params():
- def __init__(self):
- opts, args = getopt.gnu_getopt(sys.argv[1:], 'a:d:n:t:is')
-
- self.infile = args[0]
- self.cols = np.int32(args[1])
- self.outfile = args[2]
- self.lx,self.ld,self.null = None, None, None
- self.verbose,self.outnan = 1, False
- dtype = 'float'
- for o,a in opts:
- if o == '-a':
- self.lx = np.int32(a)
- elif o == '-d':
- self.ld = np.int32(a)
- elif o == '-n':
- self.null = np.float32(a)
- elif o == '-i':
- self.outnan = True
- elif o == '-s':
- self.verbose = 0
- elif o == '-t':
- dtype = a.strip()
-
- if self.outnan and self.null == None:
- raise ValueError('Null value must be defined to output NaN in its place')
-
- if self.lx and self.ld:
- self.win = [self.lx,self.ld]
- elif self.lx == None and self.ld:
- self.win = self.ld
- elif self.ld == None and self.lx:
- self.win = self.lx
- else:
- raise ValueError('At least one window dimension must be defined')
-
- types = ['f','float','r4','d','double','r8','c','complex','c8','cf','complexfloat',
- 'cd','complexdouble','c16']
- atype = [np.float32, np.float32, np.float32, np.float64, np.float64, np.float64,
- np.complex64, np.complex64, np.complex64,
- np.complex64, np.complex64, np.complex128,
- np.complex128, np.complex128]
- try:
- self.dtype = atype[ types.index( dtype ) ]
- except:
- errstr = 'unsupported data type: ' + dtype
- errstr += '\n supported data types are: ' + ', '.join(types)
- raise ValueError(errstr)
-
-if __name__ == '__main__':
- args = sys.argv[1:]
- if len(args) < 3:
- print(__doc__)
- sys.exit()
- main()
-
-
-
-
-
-
-
-
-
diff --git a/build/lib.macosx-10.10-x86_64-2.7/pysar/image/setup.py b/build/lib.macosx-10.10-x86_64-2.7/pysar/image/setup.py
deleted file mode 100644
index 5876444..0000000
--- a/build/lib.macosx-10.10-x86_64-2.7/pysar/image/setup.py
+++ /dev/null
@@ -1,18 +0,0 @@
-import sys,os
-
-def configuration(parent_package='',top_path=None):
- from numpy.distutils.misc_util import Configuration
- config = Configuration('image', parent_package, top_path)
- config.add_extension('_looks_mod',sources=['_looks_mod.f90'],
- libraries=[],
- library_dirs=[],
- extra_f90_compile_args=['-O3'])
- return config
-
-if __name__ == '__main__':
- from distutils.dir_util import remove_tree
- from numpy.distutils.core import setup
- if os.path.exists('./build'):
- remove_tree('./build')
- setup(**configuration(top_path='').todict())
-
diff --git a/build/lib.macosx-10.10-x86_64-2.7/pysar/image/write.py b/build/lib.macosx-10.10-x86_64-2.7/pysar/image/write.py
deleted file mode 100644
index bd2fa16..0000000
--- a/build/lib.macosx-10.10-x86_64-2.7/pysar/image/write.py
+++ /dev/null
@@ -1,439 +0,0 @@
-'''
-Write routines for a few standard file formats
-'''
-from __future__ import print_function
-import sys,os
-import numpy as np
-
-__all__ = ['writeHDF5','writeNetCDF','writeRaster',
- 'writeGeoTiff','writeBinary','writeMultiBand2d']
-
-###-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
-def writeHDF5(z,filename,x=None,y=None,dataname=None):
- '''
- Write binary data to an HDF5 file
-
- Parameters
- ----------
-
- z : ndarray
- Data array
- filename : str
- Name of output file
- x : array-like
- 2-element list: (top-left x value, x spacing) [(0,1)]
- y : array-like
- 2-element list: (top-left y value, y spacing) [(z.shape[0]-1,-1)]
- dataname : str
- Optional name for dataset to be included in the header [None]
- '''
- import datetime as dt
- now = dt.datetime.now().isoformat()
- try:
- import h5py
- except ImportError:
- raise ImportError('h5py is required for writehdf5')
- try:
- rows,cols = z.shape
- except:
- raise ValueError('z must be a numpy array')
- xyerr = '%s must be None, a 2-element array-like variable, '
- xyerr += 'or a numpy array with length = width(z)'
- if x is None:
- x = np.arange(cols,dtype=z.dtype)
- elif len(x) == 2:
- x = np.asarray(x,dtype=z.dtype)
- x = x[0] + np.arange(cols)*x[1]
- elif len(x) != cols:
- raise ValueError(xyerr % 'x')
- elif x.dtype != z.dtype:
- x = x.astype(z.dtype)
- if y is None:
- y = np.arange(rows,dtype=z.dtype)
- elif len(y) == 2:
- y = np.asarray(y,dtype=z.dtype)
- y = y[0] + np.arange(rows)*y[1]
- elif len(y) != rows:
- raise ValueError(xyerr % 'y')
- elif y.dtype != z.dtype:
- y = y.astype(z.dtype)
-
- if sys.version_info[0] == 2 and isinstance(dataname,basestring):
- zname = dataname
- elif sys.version_info[0] == 3 and isinstance(dataname,str):
- zname = dataname
- else:
- zname = 'z'
-
- try:
- fn = h5py.File(filename,'w')
- fn.create_dataset('x',data=x)
- fn.create_dataset('y',data=y)
- fn.create_dataset('z',data=z)
- fn['z'].dims.create_scale(fn['x'],'x')
- fn['z'].dims.create_scale(fn['y'],'y')
- fn['z'].dims[0].attach_scale(fn['y'])
- fn['z'].dims[1].attach_scale(fn['x'])
- fn.attrs['Remark'] = 'Created by PySAR writeHDF5 on %s' % now
- fn['z'].attrs['Name'] = zname
- except:
- raise
- finally:
- fn.close()
-
-###-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
-def writeRaster(z,filename,filetype='GTiff',x=None,y=None,null=None,coords='EPSG:4326'):
- '''
- Write binary data to a raster file
-
- Parameters
- ----------
-
- z : ndarray
- Data array
- filename : str
- Name of output file
- filetype : str
- Type of GDAL-supported raster file (`list`_)
- x : array-like
- 2-element list: (top-left x value, x spacing)
- or array of x positions [(0,1)]
- y : array-like
- 2-element list: (top-left y value, y spacing)
- or array of y positions [(z.shape[0]-1,-1)]
- null : scalar type(z)
- Null or no-data value [None]
- coords : str
- Coordinate system (must be recognizable by GDAL) [EPSG:4326]
-
- Notes
- -----
-
- * Requires gdal for python
- * Only supports single-band outputs
- * If x or y are default or None, coords is set to None
-
- .. _list: http://www.gdal.org/formats_list.html
- '''
- try:
- from osgeo import gdal, osr
- except ImportError:
- try:
- import gdal, osr
- except ImportError:
- raise ImportError('gdal for Python is required for writeGeoTiff')
- try:
- ztype = z.dtype.name
- gdtp = _npdtype2gdaldtype()
- if ztype in gdtp.numpy_dtypes:
- gdt = eval('gdal.%s' % gdtp.numpy2gdal[ztype])
- else:
- raise TypeError(ztype,' is not a supported type')
- except:
- raise ValueError('z must be a numpy array')
- err = '%s must be length 2 or %d'
-
- rows,cols = np.shape(z)
- if x is None:
- x = [0,1]
- coords = None
- elif len(x) == cols:
- xt = [x[0],(x[1]-x[0])]
- x = xt
- elif len(x) != 2:
- raise ValueError(err % ('x',cols))
- if y is None:
- y = [rows-1,-1]
- coords = None
- elif len(y) == rows:
- yt = [y[0],(y[1]-y[0])]
- y = yt
- elif len(y) != 2:
- raise ValueError(err % ('y',rows))
- gxfrm = [x[0],x[1],0,y[0],0,y[1]]
-
- try:
- rast = gdal.GetDriverByName(filetype).Create(filename,cols,rows,1,gdt)
- rast.SetGeoTransform(gxfrm)
-
- if coords is not None: ### set reference coordinate system
- srs = osr.SpatialReference()
- srs.SetWellKnownGeogCS(coords)
- rast.SetProjection(srs.ExportToWkt())
-
- band = rast.GetRasterBand(1)
- band.WriteArray(z) ### write z data
- if null is not None:
- band.SetNoDataValue(null)
- band.FlushCache()
- except:
- raise
- finally:
- rast, band = None, None
-
-###-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
-def writeGeoTiff(z,filename,x=None,y=None,null=None,coords='EPSG:4326'):
- '''
- Write binary data to a GeoTiff file
-
- Parameters
- ----------
-
- z : ndarray
- Data array
- filename : str
- Name of output file
- x : array-like
- 2-element list: (top-left x value, x spacing)
- or array of x positions [(0,1)]
- y : array-like
- 2-element list: (top-left y value, y spacing)
- or array of y positions [(z.shape[0]-1,-1)]
- null : scalar type(z)
- Null or no-data value [None]
- coords : str
- Coordinate system (must be recognizable by GDAL) [EPSG:4326]
-
- Notes
- -----
-
- * Requires gdal for python
- * Only supports single-band outputs
- * If x or y are default or None, coords is set to None
- '''
- writeRaster(z,filename=filename,filetype='GTiff',x=x,y=y,null=null,coords=coords)
-
-###-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
-def writeNetCDF(z,filename,x=None,y=None,null=None,xunit=None,yunit=None,zunit=None,
- dataname=None,ncform=4,maxio=1.e8):
- '''
- Write binary data to a NetCDF file
-
- Parameters
- ----------
- z : 2d array
- data to be written to netCDF file
- filename : str
- output file name
- x : array-like
- 2-element list: (top-left x value, x spacing)
- or array of x positions [(0,1)]
- y : array-like
- 2-element list: (top-left y value, y spacing)
- or array of y positions [(z.shape[0]-1,-1)]
- null : scalar type(z)
- Null or no-data value [None]
- xunit : string or None
- units in x direction [None]
- yunit : string or None
- units in y direction [None]
- zunit : string or None
- units in z direction [None]
- dataname : str
- Optional name given to z in the header [None]
- ncform : int (either 3 or 4) or str (netcdf4 type)
- NetCDF format [4]
- maxio : int or float
- maximum single block for output [1.e8]
-
- Output
- ------
- None
-
- Notes
- -----
- * writeNetCDF outputs files with x, y referenced to lower left (GMT convention)
- * if size(z) > maxio, file is written line by line to conserve memory.
- '''
- ncformoptions = ['NETCDF4', 'NETCDF4_CLASSIC','NETCDF3_CLASSIC','NETCDF3_64BIT']
- try:
- from netCDF4 import Dataset
- except:
- raise ImportError('netCDF4 for Python is required for writeNetCDF')
- try:
- rows,cols = z.shape
- except:
- raise ValueError('z must be a numpy array')
- xyerr = '%s must be None, a 2-element array-like variable, '
- xyerr += 'or a numpy array with length = width(z)'
- if x is None:
- x = np.arange(cols,dtype=z.dtype)
- elif len(x) == 2:
- x = np.asarray(x,dtype=z.dtype)
- x = x[0] + np.arange(cols)*x[1]
- elif len(x) != cols:
- raise ValueError(xyerr % 'x')
- elif x.dtype != z.dtype:
- x = x.astype(z.dtype)
- if y is None:
- y = np.arange(rows,dtype=z.dtype)
- elif len(y) == 2:
- y = np.asarray(y,dtype=z.dtype)
- y = y[0] + np.arange(rows)*y[1]
- y = y[::-1] ### GMT expects values to start at lower left
- elif len(y) != rows:
- raise ValueError(xyerr % 'y')
- elif y.dtype != z.dtype:
- y = y.astype(z.dtype)
-
- if xunit is None: xunit = 'None'
- if yunit is None: yunit = 'None'
- if zunit is None: zunit = 'None'
- if sys.version_info[0] == 2 and isinstance(dataname,basestring):
- zname = dataname
- elif sys.version_info[0] == 3 and isinstance(dataname,str):
- zname = dataname
- else:
- zname = 'z'
-
- try:
- ncform = np.int32(ncform)
- if ncform == 4:
- ncformat = 'NETCDF4'
- elif ncform == 3:
- ncformat = 'NETCDF3_CLASSIC'
- else:
- print("ncform must be 3 or 4. Defaulting to 4")
- ncformat = 'NETCDF4'
- except:
- if ncform not in ncformoptions:
- raise ValueError('%s ncform not recognized' % str(ncform))
- else:
- ncformat = ncform
-
- try:
- fn = Dataset(filename,'w',format=ncformat)
- fn.createDimension('x',cols)
- fn.createDimension('y',rows)
- fn.createVariable('x',x.dtype,('x',))
- fn.createVariable('y',y.dtype,('y',))
- fn.createVariable('z',z.dtype,('y','x'),fill_value=null)
-
- fn.variables['x'].long_name = 'x'
- fn.variables['y'].long_name = 'y'
- fn.variables['z'].long_name = zname
-
- fn.variables['x'].units = xunit
- fn.variables['y'].units = yunit
- fn.variables['z'].units = zunit
-
- fn.variables['x'].actual_range = [np.min(x), np.max(x)]
- fn.variables['y'].actual_range = [np.min(y), np.max(y)]
- fn.variables['z'].actual_range = [np.min(z), np.max(z)]
-
- fn.variables['x'][:] = x
- fn.variables['y'][:] = y
- if z.size > maxio:
- for i in xrange(rows):
- fn.variables['z'][i,:] = z[-(i+1),:] ### match GMT convention
- else:
- fn.variables['z'][:,:] = z[::-1,:] ### match GMT convention
- except:
- raise
- finally:
- fn.close()
-
-###-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
-def writeBinary(data,filename):
- '''
- Write 2D data to a headerless binary file
-
- Parameters
- ----------
- data : ndarray
- Data to be written
- filename : str
- Output filename
- '''
- if not isinstance(data,np.ndarray):
- raise ValueError('data must be a numpy array')
- with open(filename,'w') as fid:
- data.flatten().tofile(fid)
-
-###-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
-def writeMultiBand2d(datalist,filename,inter='bil'):
- '''
- Write 2D data to multiband headerless binary file
-
- Parameters
- ----------
-
- datalist : list of ndarrays, single ndarray, or multidimensional ndarray
- - List containing data arrays; length = number of bands
- - Single array writes single band
- - 3d array with bands stacked along third axis
- filename : str
- Output file name
- inter : str {'bil','bip','bsq'}
- Interleave format ['bil']
- bil = by line
- bip = by pixel
- bsq = band sequential
-
- '''
- if inter.lower() not in ['bil','bip','bsq']:
- raise ValueError("inter must be one of 'bil','bip','bsq'. given %s" % inter)
- if isinstance(datalist,list) or isinstance(datalist,tuple):
- bands = len(datalist)
- dtype = datalist[0].dtype
- shape = datalist[0].shape
- for i in range(1,bands):
- if dtype != datalist[i].dtype:
- raise TypeError('data in list must have a consistent data type')
- elif shape != datalist[1].shape:
- raise ValueError('data in list must have a consistent shape')
- data = datalist
- elif isinstance(datalist,np.ndarray):
- dtype = datalist.dtype
- if datalist.ndim == 3:
- bands = datalist.shape[2]
- data = np.dsplit(datalist)
- shape = data[0].shape
- else:
- bands = 1
- shape = datalist.shape
- data = [datalist]
- else:
- raise ValueError('datalist must be list, tuple, or ndarray')
-
- fn = np.memmap(filename,dtype=dtype,mode='w+',shape=shape)
- if inter == 'bil' or inter == 'bsq':
- shp = (shape[0]*bands,shape[1])
- fn = np.memmap(filename,dtype=dtype,mode='w+',shape=shp)
- if inter == 'bil':
- for i in range(bands):
- fn[i::bands,:] = data[i]
- elif inter == 'bsq':
- for i in range(bands):
- fn[i*shape[0]:(i+1)*shape[0],:] = data[i]
- elif inter == 'bip':
- shp = (shape[0],shape[1]*bands)
- fn = np.memmap(filename,dtype=dtype,mode='w+',shape=shp)
- for i in range(bands):
- fn[:,i::bands] = data[i]
- del fn ### this should flush memory to file
-
-###========================================================================
-class _npdtype2gdaldtype():
- def __init__(self):
- self.gdal2numpy = { 'GDT_Byte' : 'uint8',
- 'GDT_UInt16' : 'uint16',
- 'GDT_Int16' : 'int16',
- 'GDT_UInt32' : 'uint32',
- 'GDT_Int32' : 'int32',
- 'GDT_Float32' : 'float32',
- 'GDT_Float64' : 'float64',
- 'GDT_CInt16' : 'complex64',
- 'GDT_CInt32' : 'complex64',
- 'GDT_CFloat32' : 'complex64',
- 'GDT_CFloat64' : 'complex128' }
- self.gdal_dtypes = self.gdal2numpy.keys()
- self.numpy2gdal = {}
- for k,v in self.gdal2numpy.iteritems():
- if k != 'GDT_CInt16' and k != 'GDT_CInt32':
- self.numpy2gdal[v] = k
- self.numpy_dtypes = self.numpy2gdal.keys()
-
-
-
-
diff --git a/build/lib.macosx-10.10-x86_64-2.7/pysar/insar/__init__.py b/build/lib.macosx-10.10-x86_64-2.7/pysar/insar/__init__.py
deleted file mode 100644
index e3b62a2..0000000
--- a/build/lib.macosx-10.10-x86_64-2.7/pysar/insar/__init__.py
+++ /dev/null
@@ -1,22 +0,0 @@
-'''
-InSAR (:mod:`pysar.insar`)
-==========================
-
-Interferometric SAR utilities
-
-.. currentmodule:: pysar.image
-
-Functions
----------
-
-None
-
-Scripts
--------
-
-===================== =================================================================================
-`sarcorrelation` InSAR correlation from 2 SAR scenes
-`sarphase_detrend` Remove a 2D polynomial from a scene
-===================== =================================================================================
-'''
-import sys,os
diff --git a/build/lib.macosx-10.10-x86_64-2.7/pysar/insar/_phase_detrend_sup.py b/build/lib.macosx-10.10-x86_64-2.7/pysar/insar/_phase_detrend_sup.py
deleted file mode 100644
index bce8092..0000000
--- a/build/lib.macosx-10.10-x86_64-2.7/pysar/insar/_phase_detrend_sup.py
+++ /dev/null
@@ -1,98 +0,0 @@
-
-import numpy as np
-
-def calcGmat(x,y,n,w=1):
- deg = np.arange(n+2)
- a = np.zeros((len(x),deg.sum()))
- cnt = -1
- xu = 1
- for u in deg:
- yv = 1
- for v in np.arange(n-u+1):
- cnt += 1
- a[:,cnt] = w*xu*yv
- if v < n-u:
- yv *= y
- if u < deg[-1]:
- xu *= x
- return a
-
-
-def L1norm(p,a,d):
- pro = np.dot(a,p)
- return np.sum(np.abs(pro-d))
-
-
-def polyfit2d(x,y,d,n,p=2,w=False,cor=-1,N=36):
- """
- Fits an n-order 2d polynomial to the given data d using an
- L^p norm ( default p = 2; max(order) = 5 )
- w = bool (True to weight by correlation...must provide cor image)
- cor = correlation image
- N = number of pixels in look window
- Outputs:
- array c = [c_0x^0y^0, c_1x^0y^1,..., c_nx^0y^n,
- c_(n+1)x^1y^0, ..., c_(2n)x^1y(n-1), ..., c_(-1)x^ny^0]
- """
-
- if p != 1 and p != 2:
- print('p = %d is not implemented; defaulting to p = 2' % p)
- p = 2
- if w and len(cor) <= 1:
- print('You must provide a correlation image for weighting...calculating unweighted')
- w = False
-
- if w:
- cor = cor**2
- cor = 1/np.sqrt( 1./(2.*N)* (1. - cor)/cor )
- d = cor*d
- else:
- cor = 1
-
- a = calcGmat(x=x,y=y,n=n,w=cor)
-
- if p == 1:
- from scipy.optimize import fmin
- deg = np.arange(n+2)
- init = np.linalg.lstsq(a,d)[0]
- s = fmin(L1norm,init,args=(a,d),ftol=1e-9,xtol=1e-6,maxiter=100000,
- maxfun=10000,full_output=1,disp=1)
- return s[0]
- else:
- return np.linalg.lstsq(a,d)[0]
-
-
-
-def subtract_surf(d,c,null):
- """
- Subtracts surface from entire image
- d = original data array
- c = array of coefficients from polyfit2d
- """
- from pysar.insar._subsurf import subsurf
- lenarr = np.cumsum(np.arange(1,6))
- n = np.abs(len(c)-lenarr).argmin()
-
- dsp = np.shape(d)
-
- x = np.arange(dsp[1],dtype=np.float32)
- y = np.arange(dsp[0],dtype=np.float32)
- x,y = np.meshgrid(x,y)
-
- d = np.float64(d.flatten())
- x = x.flatten()
- y = y.flatten()
-
- subsurf(d=d,x=x,y=y,c=c,deg=n,nul=null)
- return np.float32(np.reshape(d,(-1,dsp[1])))
-
-
-
-
-
-
-
-
-
-
-
diff --git a/build/lib.macosx-10.10-x86_64-2.7/pysar/insar/_subsurf.so b/build/lib.macosx-10.10-x86_64-2.7/pysar/insar/_subsurf.so
deleted file mode 100755
index 8ab1cf8..0000000
Binary files a/build/lib.macosx-10.10-x86_64-2.7/pysar/insar/_subsurf.so and /dev/null differ
diff --git a/build/lib.macosx-10.10-x86_64-2.7/pysar/insar/sarcorrelation.py b/build/lib.macosx-10.10-x86_64-2.7/pysar/insar/sarcorrelation.py
deleted file mode 100644
index 86eb0e0..0000000
--- a/build/lib.macosx-10.10-x86_64-2.7/pysar/insar/sarcorrelation.py
+++ /dev/null
@@ -1,160 +0,0 @@
-#!/usr/bin/env python
-"""
-sarcorrelation.py : Calculates interferometric correlation
-
-usage::
-
- $ sarcorrelation.py int_file amp_input [options]
-
-Parameters
-----------
-int_file : complex interferogram file
-amp_input : amplitude file(s); one of:
- -a bip_amp (bit-interleaved amplitude file)
- -s amp1_file amp2_file
- -p power1_file power2_file
-
-Options
--------
--o output_file : name of ouput file [sarcor.out]
--c str_option : output real amplitude (str_option = 'a'), real phase (str_option = 'p'),
- in radians or complex (str_option = 'c') correlation ['a']
--n value : data null value (float only) [0]
-
-Notes
------
-* input data is assumed to be single precision
-
-"""
-from __future__ import print_function, division
-import sys,os
-import numpy as np
-from pysar.etc.excepts import InputError
-np.seterr(divide='ignore')
-
-###==--==--==--==--==--==--==--==--==--==--==--==--==--==--==--==--==--==###
-def main(args):
- cor = Correlation(args)
- cor.read_data()
- cor.calculate()
- cor.write_data()
-
-###==--==--==--==--==--==--==--==--==--==--==--==--==--==--==--==--==--==###
-class Correlation():
- def __init__(self,args):
- self.intfile = args[0]
- self.null = 0.
-
- self.ampow = 'a'
- self.ampfile = None
- self.amp1file, self.amp2file = None, None
-
- self.outfile = 'sarcor.out'
- self.outap = 'a'
-
- for i,a in enumerate(args[1:]):
- if a == '-a':
- self.ampfile = args[2+i] # 2 because I skip the first argument in args
- elif a == '-s':
- self.amp1file = args[2+i]
- self.amp2file = args[3+i]
- elif a == '-p':
- self.amp1file = args[2+i]
- self.amp2file = args[3+i]
- self.ampow = 'p'
-
- elif a == '-o':
- self.outfile = args[2+i]
- elif a == '-c':
- self.outap = args[2+i]
- elif a == '-n':
- try:
- self.null = np.float32(args[2+i])
- except:
- raise InputError('null value must be float; %s given' % args[2+i])
- self._check_args()
-
- ###--------------------------------------###
- def _check_args(self):
- if self.ampfile is None:
- if self.amp1file is None or self.amp2file is None:
- errstr = 'a single bil amplitude file or two real-valued amplitude or power files '
- errstr += 'must be provided'
- raise InputError(errstr)
-
- if self.outap != 'a' and self.outap != 'p' and self.outap != 'c':
- errstr = "unrecognized option %s for output type; " % self.outap
- errstr += "must be 'a' for amplitude, 'p' for phase, or 'c' for complex"
- raise InputError(errstr)
-
- ###--------------------------------------###
- def read_data(self):
- print('reading')
- fid = open(self.intfile,'r')
- self.igram = np.fromfile(fid,dtype=np.complex64)
- fid.close()
-
- if self.ampfile is None:
- fid = open(self.amp1file,'r')
- self.amp1 = np.fromfile(fid,dtype=np.float32)
- fid.close()
-
- fid = open(self.amp2file,'r')
- self.amp2 = np.fromfile(fid,dtype=np.float32)
- fid.close()
- else:
- fid = open(self.ampfile,'r')
- amp = np.fromfile(fid,dtype=np.float32)
- fid.close()
- self.amp1, self.amp2 = amp[::2], amp[1::2]
-
- ###--------------------------------------###
- def calculate(self):
- print('calculating correlation')
- redonull, redozero = False, False
-
- teps = 2.*np.finfo(np.float32).eps
- nullmask = np.abs(self.igram - self.null) < teps
- nullmask += np.abs(self.amp1 - self.null) < teps
- nullmask += np.abs(self.amp2 - self.null) < teps
-
- zeromask = self.amp1 < teps
- zeromask += self.amp2 < teps
-
- if len(nullmask[nullmask]) > 1:
- redonull = True
- self.amp1[nullmask], self.amp2[nullmask] = 1., 1.
-
- if len(zeromask[zeromask]) > 1:
- redozero = True
- self.amp1[zeromask], self.amp2[zeromask] = 1., 1.
-
- if self.ampow == 'a':
- self.cor = self.igram/(self.amp1*self.amp2)
- else:
- self.cor = self.igram/(np.sqrt(self.amp1*self.amp2))
-
- if self.outap == 'a':
- self.cor = np.abs(self.cor)
- elif self.outap == 'p':
- self.cor = np.arctan2(self.cor.imag,self.cor.real)
-
- if redonull:
- self.cor[nullmask] = self.null
- if redozero:
- self.cor[zeromask] = self.null
-
- ###--------------------------------------###
- def write_data(self):
- print('writing')
- fid = open(self.outfile,'w')
- self.cor.tofile(fid)
- fid.close()
-
-###==--==--==--==--==--==--==--==--==--==--==--==--==--==--==--==--==--==###
-if __name__ == '__main__':
- args = sys.argv[1:]
- if len(args) < 3:
- print(__doc__)
- sys.exit()
- main(args)
diff --git a/build/lib.macosx-10.10-x86_64-2.7/pysar/insar/sarphase_detrend.py b/build/lib.macosx-10.10-x86_64-2.7/pysar/insar/sarphase_detrend.py
deleted file mode 100644
index 386f039..0000000
--- a/build/lib.macosx-10.10-x86_64-2.7/pysar/insar/sarphase_detrend.py
+++ /dev/null
@@ -1,213 +0,0 @@
-#!/usr/bin/env python
-"""
-sarphase_detrend.py : Fits a surface to an (masked) image and then removes the surface
- from the entire image
-
-usage::
-
- $ sarphase_detrend.py image_file cols [options]
-
-Parameters
-----------
-image_file : image file
-cols : number of columns (or samples) in the image
-
-Options
--------
--o order : polynomial order for the fitted surface [1]
--c cor_file : correlation filename; optionally append minimum correlation threshold [0.3]
--m mask_file : mask filename; optionally append value to exclude [1]
--f out_file : output filename [image_file + .flat]
--s bool : output best-fit surface [False]
--n value : data null value [0]
--w bool : weight data by correlation values prior to fitting (see notes) [True]
--p norm : L^p norm {1 or 2} [2]
--x factor : column decimation factor [30]
--y factor : row decimation factor [column decimation factor]
-
-Notes
------
-* values should be appended with a comma with no spaces on either side
-* weighting is only applied if correlation file is given
-* correlation threshold is not considered if weighting is applied (i.e. unless '-w False' is given)
-"""
-from __future__ import print_function, division
-import sys,os
-import getopt
-import numpy as np
-import pysar.insar._phase_detrend_sup as sup
-
-###==--==--==--==--==--==--==--==--==--==--==--==--==--==--==--==--==--==###
-def main(args):
- print('\nRunning phase_detrend.py\n')
- detrend = DeTrend(args)
- detrend.read_data()
- detrend.setup_data()
- detrend.remove_surf()
- detrend.write_data()
-
-###==--==--==--==--==--==--==--==--==--==--==--==--==--==--==--==--==--==###
-class DeTrend():
- def __init__(self,args):
- opts, args = getopt.gnu_getopt(args, 'f:o:p:c:m:n:x:y:w:s:')
-
- self.unwf = args[0]
- self.cols = np.int32(args[1])
- self.corf = None
- self.maskf = None
-
- # set defaults
- self.order = 1
- self.cthresh = 0.3
- self.maskval = 1
- self.rowdec = 30
- self.coldec = -1
- self.outf = self.unwf + '.flat'
- self.null = 0
- self.pnorm = 2
- self.wbool = True
- self.sbool = False
- self.Nlook = 1
-
- self.corarr = None
- # assign option values
- for o,a in opts:
- if o == '-f':
- self.outf = a
- elif o == '-c':
- cc = a.split(',')
- self.corf = cc[0]
- if len(cc) > 1:
- self.cthresh = np.float32(cc[1])
- elif o == '-m':
- cc = a.split(',')
- self.maskf = cc[0]
- if len(cc) > 1:
- self.maskval = np.int32(cc[1])
- elif o == '-y':
- self.rowdec = np.int32(a)
- elif o == '-x':
- self.coldec = np.int32(a)
- elif o == '-o':
- self.order = np.int32(a)
- elif o == '-p':
- self.pnorm = np.int32(a)
- elif o == '-n':
- self.null = np.float64(a)
- elif o == '-w':
- if 'F' in a or 'f' in a:
- self.wbool = False
- elif o == '-s':
- if 't' in a.lower():
- self.sbool = True
-
- if self.coldec < 0:
- self.coldec = self.rowdec
- if self.rowdec < 1 or self.coldec < 1:
- self.rowdec, self.coldec = 1, 1
- if self.order > 4:
- print('Requested order > max order; Setting to max order = 4')
- self.order = 4
-
- ###--------------------------------------###
- def read_data(self):
- print('reading data files')
- eps = np.finfo(np.float32).eps
- ceps = 1. - eps
- # read in correlation data and mask values less than threshold
- if self.corf is not None:
- fid = open(self.corf,'r')
- data = np.fromfile(fid, dtype=np.float32).reshape(-1,self.cols)
- fid.close()
-
- if self.wbool: # if weighting = True, set cor threshold so that all correlation values are included
- self.cthresh = 0.
- self.corarr = data.copy()
- self.corarr[self.corarr < eps] = eps
- self.corarr[self.corarr > ceps] = ceps
- self.mask = data > self.cthresh
- else:
- self.wbool = False
-
- # read in mask file and combine with correlation mask created above
- if self.maskf is not None:
- fid = open(self.maskf,'r')
- data = np.fromfile(fid, dtype=np.float32).reshape(-1,self.cols)
- fid.close()
-
- if self.corf is not None:
- self.mask *= data != self.maskval
- else:
- self.mask = data != self.maskval
-
- # read in data (this wipes out the correlation data in order to save memory)
- fid = open(self.unwf,'r')
- self.unw = np.fromfile(fid, dtype=np.float32).reshape(-1,self.cols)
- fid.close()
-
- if self.maskf is not None:
- self.mask *= np.abs(self.unw - self.null) > eps
- elif self.corf is not None:
- self.mask *= np.abs(self.unw - self.null) > eps
- else:
- self.mask = np.abs(self.unw - self.null) > eps
-
- self.lines = np.shape(self.unw)[0]
- print('done reading')
-
- ###--------------------------------------###
- def setup_data(self):
- print('decimating')
- xstart,ystart = self.coldec-1, self.rowdec-1
- x = np.arange(xstart, self.cols, self.coldec)
- y = np.arange(ystart, self.lines, self.rowdec)
- x,y = np.meshgrid(x,y)
- x = x.flatten()
- y = y.flatten()
-
- self.d = self.unw[y,x].copy()
- self.d, self.x, self.y = self.d[self.mask[y,x]], x[self.mask[y,x]], y[self.mask[y,x]]
-
- if self.wbool:
- self.corarr = self.corarr[y,x]
- self.corarr = self.corarr[self.mask[y,x]]
-
- ###--------------------------------------###
- def remove_surf(self):
- print('calculating coefficients: ')
- print(' order = %d' % self.order)
- print(' using %d points' % len(self.d))
- c = sup.polyfit2d(x=self.x,y=self.y,d=self.d,n=self.order,p=self.pnorm,
- w=self.wbool,cor=self.corarr,N=self.Nlook)
- del self.d, self.x, self.y
-
- if self.sbool:
- dc = self.unw.copy()
- print('removing the best-fit surface')
- self.unw = sup.subtract_surf(d=self.unw,c=c,null=self.null)
- if self.sbool:
- self.surf = dc - self.unw
- self.surf[self.unw==self.null] = self.null
-
- ###--------------------------------------###
- def write_data(self):
- print('writing')
- fid = open(self.outf,'w')
- self.unw.flatten().tofile(fid)
- fid.close()
-
- if self.sbool:
- fid = open(self.outf+'.surf','w')
- self.surf.flatten().tofile(fid)
- fid.close()
-
-###==--==--==--==--==--==--==--==--==--==--==--==--==--==--==--==--==--==###
-if __name__ == '__main__':
- args = sys.argv[1:]
- if len(args) < 2:
- print(__doc__)
- sys.exit()
- main(args)
-
-
-
diff --git a/build/lib.macosx-10.10-x86_64-2.7/pysar/insar/setup.py b/build/lib.macosx-10.10-x86_64-2.7/pysar/insar/setup.py
deleted file mode 100644
index b03e5ac..0000000
--- a/build/lib.macosx-10.10-x86_64-2.7/pysar/insar/setup.py
+++ /dev/null
@@ -1,23 +0,0 @@
-import sys,os
-import numpy as np
-
-def configuration(parent_package='',top_path=None):
- from numpy.distutils.misc_util import Configuration
- config = Configuration('insar', parent_package, top_path)
-
- CFLAGS = ['-lm','-O2','-lpthread','-fPIC']
- npdir = np.get_include() + '/numpy'
- config.add_extension('_subsurf',sources=['_subsurf.f'],
- libraries=[],
- library_dirs=[],
- include_dirs=[],
- extra_compile_args=['-O3'])
- return config
-
-if __name__ == '__main__':
- from distutils.dir_util import remove_tree
- from numpy.distutils.core import setup
- if os.path.exists('./build'):
- remove_tree('./build')
- setup(**configuration(top_path='').todict())
-
diff --git a/build/lib.macosx-10.10-x86_64-2.7/pysar/math/__init__.py b/build/lib.macosx-10.10-x86_64-2.7/pysar/math/__init__.py
deleted file mode 100644
index 4e48c0f..0000000
--- a/build/lib.macosx-10.10-x86_64-2.7/pysar/math/__init__.py
+++ /dev/null
@@ -1,20 +0,0 @@
-'''
-Math (:mod:`pysar.math`)
-========================
-
-.. currentmodule:: pysar.math
-
-Functions
----------
-
-None
-
-Scripts
--------
-
-================ ======================================
-`sarmath` Basic math operations
-================ ======================================
-'''
-import sys,os
-import numpy as np
diff --git a/build/lib.macosx-10.10-x86_64-2.7/pysar/math/_sarmath_solver.py b/build/lib.macosx-10.10-x86_64-2.7/pysar/math/_sarmath_solver.py
deleted file mode 100644
index 8e8f4e2..0000000
--- a/build/lib.macosx-10.10-x86_64-2.7/pysar/math/_sarmath_solver.py
+++ /dev/null
@@ -1,219 +0,0 @@
-"""
-_sarmath_solver
-
-Module containing the Solver class
-
-"""
-from __future__ import print_function, division
-import sys,os
-import numpy as np
-from math import pi
-from pysar.utils.gen_tools import typecomplex
-
-class Solver():
- """
-
- Solver: Calculates the output values for the command line tool sarmath.py
-
- Parameters
- ----------
- datalist : sarmath class
- Class _sarmath_tools.Databank(pars)
- pars : sarmath class
- Class _sarmath_tools.Parse_command_line(args)
-
- """
-
- def __init__(self,pars,data):
- singlelist = ['sqrt','abs','amp','power','phase',
- 'num_nan','num_inf','num_neginf','num_posinf',
- 'dB','dBi','ln','log','log10','exp','10pow',
- 'max','min','std','var','mean','med',
- 'isnan','notnan']
- doublelist = ['add','sub','mult','div','pow','mod','root','xmult',
- 'addphz','subphz','xcor','xcor_amp','xcor_phase',
- 'null2nan','nan2null','inf2null',
- 'gt','ge','lt','le','eq','ne',
- 'log_b','hypot','num_null']
- triplelist = ['null2null','num2null','num2num']
-
- if len(pars.action) < 1:
- raise NotImplementedError('Invalid action.')
-
- if len(data.data) < 2:
- answer, i = data.data[0], 0
- while i < len(pars.action):
- answer = self._singledata(answer,pars.action[i])
- i += 1
- else:
- ind, i = 0, 0
- while i < len(pars.action):
- if pars.action[i] in singlelist:
- answer = self._singledata(data.data[ind],pars.action[i])
- elif pars.action[i] in triplelist:
- answer = self._tripledata(data.data[ind],data.data[ind+1],data.data[ind+2],pars.action[i])
- ind += 2
- elif pars.action[i] == 'hypot' and pars.args.index('-hypot') == ind+3:
- answer = self._tripledata(data.data[ind],data.data[ind+1],data.data[ind+2],pars.action[i])
- ind += 2
- elif pars.action[i] == 'eq' and pars.args.index('-eq') == ind+3:
- answer = self._tripledata(data.data[ind],data.data[ind+1],data.data[ind+2],pars.action[i])
- ind += 2
- elif pars.action[i] == 'ne' and pars.args.index('-ne') == ind+3:
- answer = self._tripledata(data.data[ind],data.data[ind+1],data.data[ind+2],pars.action[i])
- ind += 2
- else:
- answer = self._doubledata(data.data[ind],data.data[ind+1],pars.action[i])
- ind += 1
- data.data[ind] = answer
- i += 1
- self.answer = answer
-
- def _singledata(self,data,action):
- if action == 'sqrt':
- return np.sqrt(data)
- elif action == 'abs': #astype(np.abs(data[0]).dtype): hack to ensure right type is returned
- return np.abs(data)
- elif action == 'amp':
- return np.abs(data)
- elif action == 'power':
- return np.abs(data)**2
- elif action == 'phase':
- if not typecomplex(data):
- return np.zeros_like(data)
- else:
- return np.arctan2(data.imag,data.real)
- elif action == 'num_nan':
- return np.sum(np.isnan(data))
- elif action == 'num_inf':
- return np.sum(np.isinf(data))
- elif action == 'num_neginf':
- return np.sum(np.isneginf(data))
- elif action == 'num_posinf':
- return np.sum(np.isposinf(data))
- elif action == 'dB':
- return 10.*np.log10(data)
- elif action == 'dBi':
- return 10.**(data/10.)
- elif action == 'ln' or action == 'log':
- return np.log(data)
- elif action == 'log10':
- return np.log10(data)
- elif action == 'exp':
- return np.exp(data)
- elif action == '10pow':
- return 10**data
- elif action == 'max':
- return np.max(data)
- elif action == 'min':
- return np.min(data)
- elif action == 'std':
- return np.std(data)
- elif action == 'var':
- return np.var(data)
- elif action == 'mean':
- return np.mean(data)
- elif action == 'med':
- return np.median(data)
- elif action == 'isnan':
- return np.isnan(data).astype(data.dtype)
- elif action == 'notnan':
- return (-np.isnan(data)).astype(data.dtype)
- else:
- return data
-
- ###--------------------------------------------------------------------------
- def _doubledata(self,data1,data2,action):
- if action == 'add':
- return data1 + data2
- elif action == 'sub':
- return data1 - data2
- elif action == 'mult':
- return data1 * data2
- elif action == 'div':
- return data1 / data2
- elif action == 'hypot':
- return np.hypot(data1,data2)
- elif action == 'pow':
- return data1**data2
- elif action == 'mod':
- return data1 % data2
- elif action == 'root':
- return data1**(1./data2)
- elif action == 'xmult':
- return data1*np.conj(data2)
- elif action == 'xcor' or action == 'xcor_amp' or action == 'xcor_phase':
- cor = (data1*np.conj(data2))/np.sqrt( data1*np.conj(data1) * data2*np.conj(data2))
- if action == 'xcor':
- return cor
- elif action == 'xcor_amp':
- return np.abs(cor)
- elif action == 'xcor_phase':
- if not typecomplex(data): return np.zeros_like(cor)
- else: return np.arctan2(cor.imag,cor.real)
- elif action == 'null2nan':
- mask = self._genmask(data1=data1,data2=data2,tol=1.e-7)
- data1[mask] = np.nan
- return data1
- elif action == 'nan2null':
- data1[np.isnan(data1)] = data2
- return data1
- elif action == 'inf2null':
- data1[np.isinf(data1)] = data2
- return data1
- elif action == 'num_null':
- mask = self._genmask(data1=data1,data2=data2,tol=1.e-7)
- return np.sum(mask)
- elif action == 'gt':
- mask = data1 > data2
- return mask.astype(data1.dtype)
- elif action == 'ge':
- mask = data1 >= data2
- return mask.astype(data1.dtype)
- elif action == 'lt':
- mask = data1 < data2
- return mask.astype(data1.dtype)
- elif action == 'le':
- mask = data1 <= data2
- return mask.astype(data1.dtype)
- elif action == 'eq':
- mask = np.abs(data1 - data2) < 1.e-7
- return mask.astype(data1.dtype)
- elif action == 'ne':
- mask = np.abs(data1 - data2) > 1.e-7
- return mask.astype(data1.dtype)
- elif action == 'log_b':
- return np.log(data1)/np.log(data2)
- elif action == 'subphz':
- return data1*np.exp(-1j*data2)
- elif action == 'addphz':
- return data1*np.exp(1j*data2)
- else:
- print('unrecognized option', action)
-
- ###-------------------------------------------------------------------------
- def _tripledata(self,data1,data2,data3,action):
- if action == 'hypot':
- return np.hypot(np.hypot(data1,data2),data3)
- elif action == 'null2null' or action == 'num2null' or action == 'num2num':
- mask = self._genmask(data1=data1,data2=data2,tol=1.e-7)
- data1[mask] = data3
- return data1
- elif action == 'eq':
- mask = self._genmask(data1=data1,data2=data2,tol=data3)
- return mask.astype(data1.dtype)
- elif action == 'ne':
- mask = self._genmask(data1=data1,data2=data2,tol=data3)
- return (-mask).astype(data1.dtype)
- else:
- print('unrecognized option', action)
-
- ###-------------------------------------------------------------------------
- def _genmask(self,data1,data2,tol=1.e-7):
- return np.abs(data1 - data2) < tol
-
- ###-------------------------------------------------------------------------
-
-
-
-
diff --git a/build/lib.macosx-10.10-x86_64-2.7/pysar/math/_sarmath_tools.py b/build/lib.macosx-10.10-x86_64-2.7/pysar/math/_sarmath_tools.py
deleted file mode 100644
index 3126886..0000000
--- a/build/lib.macosx-10.10-x86_64-2.7/pysar/math/_sarmath_tools.py
+++ /dev/null
@@ -1,176 +0,0 @@
-from __future__ import print_function, division
-import sys,os
-import numpy as np
-from math import pi
-
-__all__ = ['Databank','Parse_command_line','Writer']
-
-def option_list():
- lis = ['add','sub','mult','div','hypot','pow','root','sqrt','abs','mod',
- 'amp','power','phase','subphz','addphz',
- 'xmult','xcor','xcor_amp','xcor_phase',
- 'null2nan','nan2null','inf2null','null2null','num2null','num2num',
- 'num_null','num_nan','num_inf','num_neginf','num_posinf',
- 'gt','ge','lt','le','eq','ne','isnan','notnan',
- 'dB','dBi','ln','log','log10','log_b','exp','10pow',
- 'max','min','std','var','mean','med']
- operators = ['+','-','/','x','.','*','^','%']
- opaction = ['add','sub','div','mult','mult','mult','pow','mod']
- typeabbrevs = ['float','r4','double','r8','complex','c8','dcomplex','c16','int','i4']
- types = [np.float32, np.float32, np.float64, np.float64, np.complex64, np.complex64,
- np.complex128, np.complex128, np.int32, np.int32]
- return lis,operators,opaction,typeabbrevs,types
-
-###==============================================================================
-
-class Databank():
- """
- Class: Reads and stores data
- """
- def __init__(self,pars):
- self.data = []
- for i in np.arange(len(pars.items)):
- if pars.types[i] != 'scalar':
- fid = open(pars.items[i],'r')
- self.data.append(np.fromfile(fid,dtype=pars.types[i]))
- fid.close()
- else:
- self.data.append(np.float64(pars.items[i]))
-
-
-###==============================================================================
-
-class Parse_command_line():
- """
- A class for parsing the command line and storing parameters
- """
- def __init__(self,args):
- self.args = args
- opts, operators, opaction, typeabbrevs, nptypes = option_list()
- self.action, self.items = [], []
- self.maskfile, self.outfile = None, None
- self.rowoff, self.coloff = 0, 0
- self.cols, self.types = [], []
- self.attrib = {}
- filenum = 0
- argexcepts = ['pi','Pi','PI','2pi','2Pi','2PI','e']
- i = 0
- while i < len(args):
- a = args[i].strip()
- if a[0] == '-' and len(a) > 1 and self._testarg(a[1:]) and a[1:] not in argexcepts:
- if a[1:] in opts:
- self.action.append( a[1:] )
- elif 'offrow12' in a:
- i += 1
- self.rowoff = -np.int32(args[i])
- elif 'offcol12' in a:
- i += 1
- self.coloff = -np.int32(args[i])
- elif 'offrow21' in a:
- i += 1
- self.rowoff = np.int32(args[i])
- elif 'offcol21' in a:
- i += 1
- self.coloff = np.int32(args[i])
- elif 'mask' in a:
- i += 1
- self.maskfile = args[i]
-
- elif a == '=':
- i += 1
- self.outfile = args[i]
-
- elif a in operators:
- try:
- self.action.append(opaction[operators.index(a)])
- except ValueError:
- print(a + ' is not a valid operator')
- raise
-
- else:
- a = ','.join(k.strip() for k in a.split(',')).split(',') # strip whitespace from entries in a
- self.items.append(a[0])
- self.cols.append(None)
- self.types.append(None)
-
- try:
- fid = open(a[0],'r')
- fid.close()
- typ = np.float32 # default type
-
- if len(a) > 1:
- j = 1
- while j < len(a):
- try:
- b = np.int64(a[j])
- self.cols[-1] = np.int64(a[j])
- except:
- try:
- typ = nptypes[typeabbrevs.index(a[j].strip())]
- except ValueError:
- print('%s is not a valid type or an integer' % a[j])
- raise
- j += 1
- self.types[-1] = typ
- except IOError:
- try:
- b = np.float64(a[0])
- self.types[-1] = 'scalar'
- except:
- if 'pi' == a[0].lower():
- self.items[-1] = str(pi)
- self.types[-1] = 'scalar'
- elif '-pi' == a[0].lower():
- self.items[-1] = str(-pi)
- self.types[-1] = 'scalar'
- elif '2pi' == a[0].lower():
- self.items[-1] = str(2*pi)
- self.types[-1] = 'scalar'
- elif '-2pi' == a[0].lower():
- self.items[-1] = str(-2*pi)
- self.types[-1] = 'scalar'
- elif 'e' == a[0].lower() or 'exp' == a[0].lower():
- self.items[-1] = str(np.exp(1))
- self.types[-1] = 'scalar'
- elif '-e' == a[0].lower():
- self.items[-1] = str(-np.exp(1))
- self.types[-1] = 'scalar'
- else:
- print('Cannot open the file or convert %s to float' % a[0])
- raise
- i += 1
-
- def _testarg(self,a):
- try:
- b = np.float64(a)
- return False
- except:
- return True
-
-
-###==============================================================================
-
-class Writer():
- """
- Writer: Class to write the output file
-
- Parameters
- ----------
- output : ndarray
- Output array to be written to a file
- pars : sarmath class
- Class containing the command parameters
-
- """
-
- def __init__(self,output,pars):
- if type(output.answer) != np.ndarray:
- print(output.answer)
- elif len(output.answer) == 1:
- print(output.answer)
- else:
- print('Writing...')
- fid = open(pars.outfile,'w')
- output.answer.flatten().tofile(fid)
- fid.close()
-
diff --git a/build/lib.macosx-10.10-x86_64-2.7/pysar/math/sarmath.py b/build/lib.macosx-10.10-x86_64-2.7/pysar/math/sarmath.py
deleted file mode 100644
index b574de4..0000000
--- a/build/lib.macosx-10.10-x86_64-2.7/pysar/math/sarmath.py
+++ /dev/null
@@ -1,164 +0,0 @@
-#!/usr/bin/env python
-
-"""
-Basic mathematical operations for SAR data in pseudo reverse Polish notation
-
-Usage forms (entry_i can be a file or number; output file is required only for array outputs)::
-
- $ sarmath.py entry_1 [entry_2] [entry_3] -function_1 [entry_i] [-function_2 ... -function_n] [= output_file]
-
- $ sarmath.py entry_1 operator entry_2 [-function_1 ... -function_n] [= output_file]
-
-Operators
----------
- ========== ====================================================================
- +, -, / add, subract, divide
- x, ., '*' multiplication ('*' must be given as a string on Linux systems)
- ^ raise entry_1 to power entry_2
- % mod entry_1 by entry_2
- ========== ====================================================================
-
-Functions
----------
- symbols: f = file; r = float (double); i = int; c = complex
- adapt means the output corresponds to the input type
- a --> entry_1, b --> entry_2, and so on
-
- ========== ========================= ================ ==========
- Name Description Input Output
- ========== ========================= ================ ==========
- Arithmetic
- add addition 2 x fric adapt
- sub subtraction 2 x fric adapt
- mult multiplication 2 x fric adapt
- div division 2 x fric adapt
- ..
- Common
- hypot sqrt(a**2 + b**2 [+c**2]) 2[3] x fric adapt
- pow a**b 2 x fric adapt
- root a**(1/b) 2 x fric adapt
- sqrt sqrt(a) 1 x fric adapt
- abs abs(a) 1 x fric adapt
- mod a % b (a.k.a. mod(a,b)) 2 x fric adapt
- amp abs(a) 1 x fric adapt
- power abs(a)**2 1 x fric adapt
- phase arctan2(a,b) [-pi,pi] 2 x fric adapt
- addphz a*exp(+i*b) 2 x fric adapt
- subphz a*exp(-i*b) 2 x fric adapt
- ..
- Statistic
- max max(a) 1 x fric float
- min min(a) 1 x fric float
- mean mean(a) 1 x fric float
- med median(a) 1 x fric float
- std std(a) (std. dev.) 1 x fric float
- var var(a) (variance) 1 x fric float
- xmult a * conj(b) 2 x fric adapt
- xcor xmult/(abs(a)abs(b)) 2 x fric adapt
- xcor_amp |xcor| 2 x fric adapt
- xcor_phase arg(xcor) 2 x fric adapt
- ..
- Logarithm
- log log(a) (natural log) 1 x fric adapt
- log10 log10(a) (base 10 log) 1 x fric adapt
- log_b log(a)/log(b) (base = b) 2 x fric adapt
- exp exp(a) 1 x fric adapt
- 10pow 10**a 1 x fric adapt
- dB 10*log10(a) 1 x fric adapt
- dBi 10**(a/10) 1 x fric adapt
- ..
- Comparison
- gt mask( a > b ) 1 x f, 1 x ric adapt
- ge mask( a >= b ) 1 x f, 1 x ric adapt
- lt mask( a < b ) 1 x f, 1 x ric adapt
- le mask( a <= b ) 1 x f, 1 x ric adapt
- eq mask( a == b ) 1 x f, 1 x ric adapt
- ne mask( a != b ) 1 x f, 1 x ric adapt
- isnan mask( isnan(a) ) 1 x f, 1 x ric adapt
- notnan mask( -isnan(a) ) 1 x f, 1 x ric adapt
- ..
- Conversion
- null2nan a[a==b] = nan 1x f, 1x ric adapt
- nan2null a[isnan(a)] = b 1x f, 1x ric adapt
- inf2null a[isinf(a)] = b 1x f, 1x ric adapt
- num2null a[a==b] = c 1x f, 2x ric adapt
- null2null a[a==b] = c 1x f, 2x ric adapt
- ..
- Enumerate
- num_null sum( a == b ) 1x f, 1x ric int
- num_nan sum( a == nan ) 1 x fric int
- num_inf sum( a == |inf|) 1 x fric int
- num_neginf sum( a == -inf ) 1 x fric int
- num_posinf sum( a == inf ) 1 x fric int
- ========== ========================= ================ ==========
-
-Notes
------
- * all files must be headerless binary
-
- * default file type is single-precision floating point (32-bit);
- append type to filename for other types
-
- * append type or columns to any file as a comma separated list
- with no whitespace (ex. file1,type,cols)
-
- * all operations are element-wise unless otherwise specified
-
- * operations are carried out in the order given (i.e. sarmath.py
- does not adhere to standard order of operations)
-
-Examples
---------
- Add 2 files::
-
- $ sarmath.py file_1 + file_2 = file_3
-
- or::
-
- $ sarmath.py file_1 file_2 -add = file_3
-
- Multiply a file by 2::
-
- $ sarmath.py file_1 x 2 = file_out
-
- or::
-
- $ sarmath.py file_1 2 -mult = file_out
-
- Divide two files, cube the quotient, and then multipy by 5::
-
- $ sarmath file_1 / file_2 3 -pow 5 -mult = file_out
-
- or::
-
- $ sarmath file_1 file_2 -div 3 -pow 5 -mult = file_out
-
- Get the max absolute value of the above example (note the lack of an output file)::
-
- $ sarmath file_1 / file_2 3 -pow 5 -mult -abs -max
-
- Magnitude of a single-precision complex-valued data file::
-
- $ sarmath file_1,complex -abs = file_out
-
-"""
-from __future__ import print_function, division
-import sys,os
-import numpy as np
-from pysar.math._sarmath_solver import Solver
-from pysar.math._sarmath_tools import Databank, Parse_command_line, Writer
-
-
-def main():
- pars = Parse_command_line(args=sys.argv[1:])
- datlist = Databank(pars=pars)
- output = Solver(pars=pars,data=datlist)
- Writer(output=output,pars=pars)
-
-if __name__=='__main__':
- if len(sys.argv) < 2:
- print(__doc__)
- sys.exit()
- main()
-
-
diff --git a/build/lib.macosx-10.10-x86_64-2.7/pysar/math/setup.py b/build/lib.macosx-10.10-x86_64-2.7/pysar/math/setup.py
deleted file mode 100644
index 5e1eee4..0000000
--- a/build/lib.macosx-10.10-x86_64-2.7/pysar/math/setup.py
+++ /dev/null
@@ -1,15 +0,0 @@
-import sys,os
-
-def configuration(parent_package='',top_path=None):
- from numpy.distutils.misc_util import Configuration
- config = Configuration('math', parent_package, top_path)
- config.add_data_dir('test_files')
- return config
-
-if __name__ == '__main__':
- from distutils.dir_util import remove_tree
- from numpy.distutils.core import setup
- if os.path.exists('./build'):
- remove_tree('./build')
- setup(**configuration(top_path='').todict())
-
diff --git a/build/lib.macosx-10.10-x86_64-2.7/pysar/plot/__config__.py b/build/lib.macosx-10.10-x86_64-2.7/pysar/plot/__config__.py
deleted file mode 100644
index 82b7493..0000000
--- a/build/lib.macosx-10.10-x86_64-2.7/pysar/plot/__config__.py
+++ /dev/null
@@ -1,21 +0,0 @@
-# This file is generated by /Users/brentminchew/Documents/Python/PySAR/setup.py
-# It contains system_info results at the time of building this package.
-__all__ = ["get_info","show"]
-
-
-def get_info(name):
- g = globals()
- return g.get(name, g.get(name + "_info", {}))
-
-def show():
- for name,info_dict in globals().items():
- if name[0] == "_" or type(info_dict) is not type({}): continue
- print(name + ":")
- if not info_dict:
- print(" NOT AVAILABLE")
- for k,v in info_dict.items():
- v = str(v)
- if k == "sources" and len(v) > 200:
- v = v[:60] + " ...\n... " + v[-60:]
- print(" %s = %s" % (k,v))
-
\ No newline at end of file
diff --git a/build/lib.macosx-10.10-x86_64-2.7/pysar/plot/__init__.py b/build/lib.macosx-10.10-x86_64-2.7/pysar/plot/__init__.py
deleted file mode 100644
index 9c649ea..0000000
--- a/build/lib.macosx-10.10-x86_64-2.7/pysar/plot/__init__.py
+++ /dev/null
@@ -1,21 +0,0 @@
-'''
-Plot (:mod:`pysar.plot`)
-========================
-
-.. currentmodule:: pysar.plot
-
-Functions
----------
-
-.. autosummary::
- :toctree: .
- :nosignatures:
-
- cm Additional colormaps from `http://soliton.vm.bytemark.co.uk/pub/cpt-city/`
-
-Scripts
--------
-
-None
-'''
-import cm
diff --git a/build/lib.macosx-10.10-x86_64-2.7/pysar/plot/cm/__config__.py b/build/lib.macosx-10.10-x86_64-2.7/pysar/plot/cm/__config__.py
deleted file mode 100644
index 82b7493..0000000
--- a/build/lib.macosx-10.10-x86_64-2.7/pysar/plot/cm/__config__.py
+++ /dev/null
@@ -1,21 +0,0 @@
-# This file is generated by /Users/brentminchew/Documents/Python/PySAR/setup.py
-# It contains system_info results at the time of building this package.
-__all__ = ["get_info","show"]
-
-
-def get_info(name):
- g = globals()
- return g.get(name, g.get(name + "_info", {}))
-
-def show():
- for name,info_dict in globals().items():
- if name[0] == "_" or type(info_dict) is not type({}): continue
- print(name + ":")
- if not info_dict:
- print(" NOT AVAILABLE")
- for k,v in info_dict.items():
- v = str(v)
- if k == "sources" and len(v) > 200:
- v = v[:60] + " ...\n... " + v[-60:]
- print(" %s = %s" % (k,v))
-
\ No newline at end of file
diff --git a/build/lib.macosx-10.10-x86_64-2.7/pysar/plot/cm/__init__.py b/build/lib.macosx-10.10-x86_64-2.7/pysar/plot/cm/__init__.py
deleted file mode 100644
index e6eeef4..0000000
--- a/build/lib.macosx-10.10-x86_64-2.7/pysar/plot/cm/__init__.py
+++ /dev/null
@@ -1,98 +0,0 @@
-"""
-cm
---
-
-Colormap tools and additional colormaps from :ref:`http://soliton.vm.bytemark.co.uk/pub/cpt-city/`
-in matplotlib format
-
-.. currentmodule:: pysar.plot.cm
-
-Functions
----------
-
-.. autosummary::
- :toctree: generated/
-
- cpt2python Convert GMT-style CPT files to matplotlib colormap
- cpt2cmap Convert GMT-style CPT files to matplotlib colormap
-
-Scripts
--------
-
-None
-
-Native functions
-----------------
-
-"""
-from __future__ import print_function, division
-
-import sys,os
-import cPickle
-import cpt_tools
-import numpy as np
-import matplotlib as mpl
-import matplotlib.cbook as cbook
-import matplotlib.colors as colors
-from cpt_tools import *
-from _cpt_defs import preload, cptfldr, cptdic, specialcpt, mpl_noinclude
-from matplotlib.cm import ma, datad, cubehelix, _generate_cmap
-from matplotlib.cm import _reverser, revcmap, _reverse_cmap_spec, ScalarMappable
-
-__all__ = ['cpt_tools','load_gmt','load_idl','load_kst',
- 'load_h5','load_gist','load_ij','load_imagej',
- 'load_ncl','load_grass','get_options','options']
-
-def load_gmt():
- import gmt
-def load_idl():
- import idl
-def load_kst():
- import kst
-def load_h5():
- import h5
-def load_gist():
- import gist
-def load_ij():
- import imagej as ij
-def load_imagej():
- import imagej
-def load_ncl():
- import ncl
-def load_grass():
- import grass
-
-###==========================================================================
-
-def get_options():
- '''
- Print available colormaps
- '''
- print(cptdic.keys())
-
-def options():
- '''
- Print available colormaps
- '''
- get_options()
-
-###-----------------------------------------------------------
-###-----------------------------------------------------------
-try:
- t_cdict = _read_pkl()
- cmap_d = _cmap_d_from_dict(t_cdict)
-except:
- mpl_cd = _get_matplotlib_dicts(mpldict=datad)
- t_cdic = _cdict_from_cpt()
- cmap_d = _cmap_d_from_dict(dict(mpl_cd,**t_cdic))
- try: # try to write the pickle file of functions to improve performance next time
- _write_pkl(dict(mpl_cd,**t_cdic))
- except:
- pass
-locals().update(cmap_d)
-
-
-
-
-
-
diff --git a/build/lib.macosx-10.10-x86_64-2.7/pysar/plot/cm/_cpt_defs.py b/build/lib.macosx-10.10-x86_64-2.7/pysar/plot/cm/_cpt_defs.py
deleted file mode 100644
index 59be7d3..0000000
--- a/build/lib.macosx-10.10-x86_64-2.7/pysar/plot/cm/_cpt_defs.py
+++ /dev/null
@@ -1,36 +0,0 @@
-import sys,os
-
-__all__ = ['preload','cptfldr','cptdic','specialcpt','mpl_noinclude_t','mpl_noinclude','mpl_special']
-
-
-
-preload = ['dem','fire','publue','dkbluedkred','stern_special']
-
-
-
-specialcpt = {'dem' : 'dem_screen.cpt'} # color palettes with special names
-
-tempf = '/'.join(__file__.split('/')[:-1])
-if len(tempf) < 1: tempf = '.'
-cptfldr = tempf + '/cpt/'
-
-try:
- cptlist = os.listdir(cptfldr)
-except:
- raise IOError('%s is not a valid cpt folder' % cptfldr)
-
-cptdic = {}
-for cpt in cptlist:
- if '.cpt' in cpt:
- cptdic[cpt.split('.cpt')[0]] = cpt
-cptdic = dict(cptdic, **specialcpt)
-
-mpl_noinclude_t = ['gist_gray','gist_heat','gist_yarg','flag','prism','gnuplot',
- 'gnuplot2','ocean','afmhot','rainbow','cubehelix']
-mpl_noinclude = []
-for ent in mpl_noinclude_t:
- mpl_noinclude.append(ent)
- mpl_noinclude.append(ent+'_r')
-
-
-mpl_special = mpl_noinclude
diff --git a/build/lib.macosx-10.10-x86_64-2.7/pysar/plot/cm/_generate_pkl.py b/build/lib.macosx-10.10-x86_64-2.7/pysar/plot/cm/_generate_pkl.py
deleted file mode 100644
index 217cf8f..0000000
--- a/build/lib.macosx-10.10-x86_64-2.7/pysar/plot/cm/_generate_pkl.py
+++ /dev/null
@@ -1,29 +0,0 @@
-"""
-Colormap tools
-"""
-from __future__ import print_function, division
-
-import sys,os
-import cPickle
-import cpt_tools
-import numpy as np
-import matplotlib as mpl
-import matplotlib.cbook as cbook
-import matplotlib.colors as colors
-from cpt_tools import *
-from _cpt_defs import preload, cptfldr, cptdic, specialcpt, mpl_noinclude
-from matplotlib.cm import ma, datad, cubehelix, _generate_cmap
-from matplotlib.cm import _reverser, revcmap, _reverse_cmap_spec, ScalarMappable
-
-###==========================================================================
-
-mpl_cd = _get_matplotlib_dicts(mpldict=datad)
-t_cdic = _cdict_from_cpt()
-cmap_d = _cmap_d_from_dict(dict(mpl_cd,**t_cdic))
-_write_pkl(dict(mpl_cd,**t_cdic))
-
-
-
-
-
-
diff --git a/build/lib.macosx-10.10-x86_64-2.7/pysar/plot/cm/cpt_tools.py b/build/lib.macosx-10.10-x86_64-2.7/pysar/plot/cm/cpt_tools.py
deleted file mode 100644
index dd3d64a..0000000
--- a/build/lib.macosx-10.10-x86_64-2.7/pysar/plot/cm/cpt_tools.py
+++ /dev/null
@@ -1,246 +0,0 @@
-"""
-Work with cpt files in Python
-
-"""
-
-import sys,os
-import cPickle
-import numpy as np
-import matplotlib as mpl
-import matplotlib.cbook as cbook
-import matplotlib.colors as colors
-from _cpt_defs import preload, cptfldr, cptdic, specialcpt, mpl_noinclude
-from matplotlib.cm import ma, datad, cubehelix, _generate_cmap
-from matplotlib.cm import _reverser, revcmap, _reverse_cmap_spec, ScalarMappable
-
-__all__ = ['cptError','_stitch_gmt_hsv','cpt2python','_get_cm_from_cpt',
- '_get_cm_from_pkl','get_cmap','cpt2cmap','_read_pkl','_write_pkl',
- '_read_json','_write_json','_cmap_d_from_cpt','_cmap_d_from_dict',
- '_cdict_from_cpt','_get_matplotlib_cmaps','_get_matplotlib_dicts']
-
-###==========================================================================
-class cptError(Exception):
- pass
-
-###==========================================================================
-def _stitch_gmt_hsv(colstring,splitter='-'):
- sp = colstring.split(splitter)
- if splitter == '-' and len(sp) > 3:
- temp = sp
- sp, i = [], 0
- while i < len(temp):
- if temp[i][-1] == 'e' or temp[i][-1] == 'E':
- sp.append(temp[i] + temp[i+1])
- i += 2
- else:
- sp.append(temp[i])
- i += 1
- return sp
-
-
-def cpt2python(cptfile):
- """
- Convert GMT-stype CPT file to python colormap. This routine is modified from a
- routine contained in the scipy cookbook.
- """
- fid = open(cptfile,'r')
- reads = fid.readlines()
- fid.close()
-
- x = np.empty(len(reads),dtype=np.float32)
- r,g,b = np.empty_like(x),np.empty_like(x),np.empty_like(x)
- colormod = 'RGB'
- i = 0
- for read in reads:
- if len(read.lstrip()) > 0:
- row = read.split()
- if read.lstrip()[0] == '#':
- if 'COLOR_MODEL' in read: colormod = row[-1]
- elif 'B' != row[0] and 'F' != row[0] and 'N' != row[0]:
- if '/' not in row[1] and '-' not in row[1]:
- x[i] = np.float32(row[0])
- r[i] = np.float32(row[1])
- g[i] = np.float32(row[2])
- b[i] = np.float32(row[3])
- xt = np.float32(row[4])
- rt = np.float32(row[5])
- gt = np.float32(row[6])
- bt = np.float32(row[7])
- elif len(row) == 4:
- if '-' in row[1]:
- spl = '-'
- colormod = 'HSV'
- else:
- spl = '/'
- x[i] = np.float32(row[0])
- rs = _stitch_gmt_hsv(row[1],splitter=spl)
- r[i] = np.float32(rs[0])
- g[i] = np.float32(rs[1])
- b[i] = np.float32(rs[2])
- xt = np.float32(row[2])
- rs = _stitch_gmt_hsv(row[3],splitter=spl)
- rt = np.float32(rs[0])
- gt = np.float32(rs[1])
- bt = np.float32(rs[2])
- else:
- raise cptError('Unsupported cpt format...revise file to form x1 r1 g1 b1 x2 r2 g2 b2')
- i += 1
- x[i], r[i], g[i], b[i] = xt, rt, gt, bt
- i += 1
- x, r, g, b = x[:i], r[:i], g[:i], b[:i]
-
- if colormod == 'HSV' or colormod == 'hsv':
- import colorsys
- for i in xrange(len(r)):
- r[i], g[i], b[i] = colorsys.hsv_to_rgb(r[i]/360.,g[i],b[i])
- elif colormod == 'RGB' or colormod == 'rgb':
- r /= 255.; g /= 255.; b /= 255.
- else:
- raise NotImplementedError('%s color system is not supported' % colormod)
-
- x -= x[0]
- x /= x[-1]
-
- red, blue, green = [None]*len(x), [None]*len(x), [None]*len(x)
- for i in xrange(len(x)):
- red[i] = (x[i],r[i],r[i])
- blue[i] = (x[i],b[i],b[i])
- green[i] = (x[i],g[i],g[i])
- cd = {'red' : red, 'green' : green, 'blue' : blue}
- return cd
-
-
-###-----------------------------------------------------------
-def _get_cm_from_cpt(filename,cmapname='colormap',lutsize=None,inverse=False):
- if not lutsize:
- import matplotlib as mpl
- lutsize = mpl.rcParams['image.lut']
- cdict = cpt2python(filename)
- if inverse: cdict = _reverse_cmap_spec(cdict)
- return colors.LinearSegmentedColormap(cmapname,cdict,lutsize)
-
-def _get_cm_from_pkl(filename,cmapname='colormap',lutsize=None,inverse=False):
- if not lutsize:
- import matplotlib as mpl
- lutsize = mpl.rcParams['image.lut']
- pkl_file = open(filename, 'rb')
- cdict = pickle.load(pkl_file)
- pkl_file.close()
- if inverse: cdict = _reverse_cmap_spec(cdict)
- return colors.LinearSegmentedColormap(cmapname,cdict,lutsize)
-
-###-----------------------------------------------------------
-def get_cmap(name,lut=None):
- if name in cmap_d:
- if lut is None:
- return cmap_d[name]
- else:
- nm, inverse = name, False
- if name[-2:] == '_r':
- nm, inverse = name[:-2], True
- return _get_cm_from_cpt(filename=cptfldr+cptdic[nm],cmapname=nm,
- lutsize=lut,inverse=inverse)
-###-----------------------------------------------------------
-def cpt2cmap(filename,cmapname='colormap',lut=None,inverse=False):
- if not lut:
- import matplotlib as mpl
- lut = mpl.rcParams['image.lut']
- cdict = cpt2python(filename)
- if inverse: cdict = _reverse_cmap_spec(cdict)
- return colors.LinearSegmentedColormap(cmapname,cdict,lut)
-
-###----------------------------------------------------------
-def _read_pkl():
- pkl_file = open(cptfldr+'cmaps.pkl', 'rb')
- cmapdict = cPickle.load(pkl_file)
- pkl_file.close()
- return cmapdict
-
-def _write_pkl(cmapdict):
- pkl_file = open(cptfldr+'cmaps.pkl', 'wb')
- cPickle.dump(cmapdict,pkl_file,-1)
- pkl_file.close()
-
-def _read_json():
- import json
- json_file = open(cptfldr+'cmaps.json', 'rb')
- cmapdict = json.load(json_file)
- json_file.close()
- return cmapdict
-
-def _write_json(cmapdict):
- import json
- json_file = open(cptfldr+'cmaps.pkl', 'wb')
- json.dump(cmapdict,json_file)
- json_file.close()
-
-###----------------------------------------------------------
-def _cmap_d_from_cpt():
- cmap_d = {}
- for k,v in cptdic.iteritems():
- cmap_d[k] = _get_cm_from_cpt(filename=cptfldr+v,cmapname=k,
- lutsize=lutsize,inverse=False)
- cmap_d[k+'_r'] = _get_cm_from_cpt(filename=cptfldr+v,cmapname=k,
- lutsize=lutsize,inverse=True)
- return cmap_d
-
-def _cmap_d_from_dict(indict,lutsize=None):
- if lutsize is None:
- import matplotlib as mpl
- lutsize = mpl.rcParams['image.lut']
- cmap_d = {}
- for k,v in indict.iteritems():
- if 'red' in v:
- cmap_d[k] = colors.LinearSegmentedColormap(k,v,lutsize)
- else:
- cmap_d[k] = colors.LinearSegmentedColormap.from_list(k,v,lutsize)
- return cmap_d
-
-
-def _cdict_from_cpt():
- import matplotlib as mpl
- lutsize = mpl.rcParams['image.lut']
- cdict = {}
- for k,v in cptdic.iteritems():
- cdict[k] = cpt2python(cptfldr+v)
- cdict[k+'_r'] = _reverse_cmap_spec(cdict[k])
- return cdict
-
-
-###----------------------------------------------------------
-def _get_matplotlib_cmaps(mpldict):
- lutsize = mpl.rcParams['image.lut']
- tempdic = {}
- for k,v in mpldict.iteritems():
- if k not in mpl_noinclude:
- tempdic[k] = _generate_cmap(k,lutsize)
- else:
- n = 100
- indices = np.linspace(0,1.,n)
- t_cmap = _generate_cmap(k,lutsize)
- t_cmapents = t_cmap(indices)
- t_cdict = {}
- for ki,key in enumerate(('red','green','blue')):
- t_cdict[key] = [ (indices[i], t_cmapents[i,ki], t_cmapents[i,ki]) for i in xrange(n) ]
- tempdic[k] = colors.LinearSegmentedColormap(k,t_cdict,lutsize)
- return tempdic
-
-def _get_matplotlib_dicts(mpldict):
- lutsize = mpl.rcParams['image.lut']
- tempdic = {}
- for k,v in mpldict.iteritems():
- if k not in mpl_noinclude:
- tempdic[k] = v
- else:
- n = 100
- indices = np.linspace(0,1.,n)
- t_cmap = _generate_cmap(k,lutsize)
- t_cmapents = t_cmap(indices)
- t_cdict = {}
- for ki,key in enumerate(('red','green','blue')):
- t_cdict[key] = [ (indices[i], t_cmapents[i,ki], t_cmapents[i,ki]) for i in xrange(n) ]
- tempdic[k] = t_cdict
- return tempdic
-
-###-----------------------------------------------------------
-
diff --git a/build/lib.macosx-10.10-x86_64-2.7/pysar/plot/cm/gist/__config__.py b/build/lib.macosx-10.10-x86_64-2.7/pysar/plot/cm/gist/__config__.py
deleted file mode 100644
index 82b7493..0000000
--- a/build/lib.macosx-10.10-x86_64-2.7/pysar/plot/cm/gist/__config__.py
+++ /dev/null
@@ -1,21 +0,0 @@
-# This file is generated by /Users/brentminchew/Documents/Python/PySAR/setup.py
-# It contains system_info results at the time of building this package.
-__all__ = ["get_info","show"]
-
-
-def get_info(name):
- g = globals()
- return g.get(name, g.get(name + "_info", {}))
-
-def show():
- for name,info_dict in globals().items():
- if name[0] == "_" or type(info_dict) is not type({}): continue
- print(name + ":")
- if not info_dict:
- print(" NOT AVAILABLE")
- for k,v in info_dict.items():
- v = str(v)
- if k == "sources" and len(v) > 200:
- v = v[:60] + " ...\n... " + v[-60:]
- print(" %s = %s" % (k,v))
-
\ No newline at end of file
diff --git a/build/lib.macosx-10.10-x86_64-2.7/pysar/plot/cm/gist/__init__.py b/build/lib.macosx-10.10-x86_64-2.7/pysar/plot/cm/gist/__init__.py
deleted file mode 100644
index 838f856..0000000
--- a/build/lib.macosx-10.10-x86_64-2.7/pysar/plot/cm/gist/__init__.py
+++ /dev/null
@@ -1,59 +0,0 @@
-import sys,os
-import cPickle
-import matplotlib.colors as colors
-from pysar.etc.excepts import cptError
-from pysar.plot.cm import cpt2python, _cmap_d_from_dict, _reverse_cmap_spec
-
-def _read_pkl():
- here='/'.join(__file__.split('/')[:-1]) + '/'
- fid = open(here+'cmaps.pkl','rb')
- cmapdict = cPickle.load(fid)
- fid.close()
- return cmapdict
-
-def _write_pkl(cdict):
- here='/'.join(__file__.split('/')[:-1]) + '/'
- fid = open(here+'cmaps.pkl','wb')
- cPickle.dump(cdict,fid,-1)
- fid.close()
-
-def _cdict_from_cpt(cpt):
- """ cpt should be a list containing the cpt files """
- cdict = {}
- for ent in cpt:
- k = ent.split('.cpt')[0]
- cdict[k] = cpt2python(ent)
- cdict[k+'_r'] = _reverse_cmap_spec(cdict[k])
- return cdict
-
-def _get_cpt():
- cpt = []
- junk = [cpt.append(x) for x in ls if x.endswith('.cpt')]
- return cpt
-
-def get_options():
- keys = cdict.keys()
- keys.sort()
- newk = []
- junk = [newk.append(x) for x in keys if not x.endswith('_r')]
- print('_r extension returns the reversed colormap')
- for k in newk:
- print('%s, %s' % (k,k+'_r'))
-
-def options():
- get_options()
-
-try:
- cdict = _read_pkl()
- cmap_d = _cmap_d_from_dict(cdict)
-except:
- print('could not read pickle file, loading cpt manually')
- ls = os.listdir('.')
- cpt = _get_cpt()
- cdict = _cdict_from_cpt(cpt)
- cmap_d = _cmap_d_from_dict(cdict)
- try:
- _write_pkl(cdict)
- except:
- pass
-locals().update(cmap_d)
diff --git a/build/lib.macosx-10.10-x86_64-2.7/pysar/plot/cm/gist/setup.py b/build/lib.macosx-10.10-x86_64-2.7/pysar/plot/cm/gist/setup.py
deleted file mode 100644
index ac8ce93..0000000
--- a/build/lib.macosx-10.10-x86_64-2.7/pysar/plot/cm/gist/setup.py
+++ /dev/null
@@ -1,51 +0,0 @@
-import sys,os
-
-def make_pkl_file(cpt,here=None):
- import cPickle
- from matplotlib.cm import _reverser, revcmap, _reverse_cmap_spec
- backone=os.getcwd() + '/' + '/'.join(__file__.split('/')[:-2]) + '/'
- sys.path.append(backone)
- import cpt_tools
-
- if here is None:
- here=os.getcwd() + '/' + '/'.join(__file__.split('/')[:-1])
- if here[-1] != '/': here += '/'
-
- cdict = {}
- for ent in cpt:
- k = ent.split('.cpt')[0]
- cdict[k] = cpt_tools.cpt2python(here+ent)
- cdict[k+'_r'] = _reverse_cmap_spec(cdict[k])
- fid = open(here+'cmaps.pkl','wb')
- cPickle.dump(cdict,fid,-1)
- fid.close()
-
-def cpt_files(here=None):
- if here is None:
- here=os.getcwd() + '/' + '/'.join(__file__.split('/')[:-1])
- ls = os.listdir(here)
- cpt = []
- junk = [cpt.append(x) for x in ls if x.endswith('.cpt')]
- return cpt
-
-def configuration(parent_package='',top_path=None):
- from numpy.distutils.misc_util import Configuration
- config = Configuration('gist', parent_package, top_path)
-
- here=os.getcwd() + '/' + '/'.join(__file__.split('/')[:-1])
- ls = cpt_files(here)
- #make_pkl_file(ls)
- if here[-1] != '/': here += '/'
- for ent in ls:
- config.add_data_files(here+ent)
- config.add_data_files(here+'cmaps.pkl')
- config.make_config_py()
- return config
-
-if __name__ == '__main__':
- from distutils.dir_util import remove_tree
- from numpy.distutils.core import setup
- if os.path.exists('./build'):
- remove_tree('./build')
- setup(**configuration(top_path='').todict())
-
diff --git a/build/lib.macosx-10.10-x86_64-2.7/pysar/plot/cm/gmt/__config__.py b/build/lib.macosx-10.10-x86_64-2.7/pysar/plot/cm/gmt/__config__.py
deleted file mode 100644
index 82b7493..0000000
--- a/build/lib.macosx-10.10-x86_64-2.7/pysar/plot/cm/gmt/__config__.py
+++ /dev/null
@@ -1,21 +0,0 @@
-# This file is generated by /Users/brentminchew/Documents/Python/PySAR/setup.py
-# It contains system_info results at the time of building this package.
-__all__ = ["get_info","show"]
-
-
-def get_info(name):
- g = globals()
- return g.get(name, g.get(name + "_info", {}))
-
-def show():
- for name,info_dict in globals().items():
- if name[0] == "_" or type(info_dict) is not type({}): continue
- print(name + ":")
- if not info_dict:
- print(" NOT AVAILABLE")
- for k,v in info_dict.items():
- v = str(v)
- if k == "sources" and len(v) > 200:
- v = v[:60] + " ...\n... " + v[-60:]
- print(" %s = %s" % (k,v))
-
\ No newline at end of file
diff --git a/build/lib.macosx-10.10-x86_64-2.7/pysar/plot/cm/gmt/__init__.py b/build/lib.macosx-10.10-x86_64-2.7/pysar/plot/cm/gmt/__init__.py
deleted file mode 100644
index 838f856..0000000
--- a/build/lib.macosx-10.10-x86_64-2.7/pysar/plot/cm/gmt/__init__.py
+++ /dev/null
@@ -1,59 +0,0 @@
-import sys,os
-import cPickle
-import matplotlib.colors as colors
-from pysar.etc.excepts import cptError
-from pysar.plot.cm import cpt2python, _cmap_d_from_dict, _reverse_cmap_spec
-
-def _read_pkl():
- here='/'.join(__file__.split('/')[:-1]) + '/'
- fid = open(here+'cmaps.pkl','rb')
- cmapdict = cPickle.load(fid)
- fid.close()
- return cmapdict
-
-def _write_pkl(cdict):
- here='/'.join(__file__.split('/')[:-1]) + '/'
- fid = open(here+'cmaps.pkl','wb')
- cPickle.dump(cdict,fid,-1)
- fid.close()
-
-def _cdict_from_cpt(cpt):
- """ cpt should be a list containing the cpt files """
- cdict = {}
- for ent in cpt:
- k = ent.split('.cpt')[0]
- cdict[k] = cpt2python(ent)
- cdict[k+'_r'] = _reverse_cmap_spec(cdict[k])
- return cdict
-
-def _get_cpt():
- cpt = []
- junk = [cpt.append(x) for x in ls if x.endswith('.cpt')]
- return cpt
-
-def get_options():
- keys = cdict.keys()
- keys.sort()
- newk = []
- junk = [newk.append(x) for x in keys if not x.endswith('_r')]
- print('_r extension returns the reversed colormap')
- for k in newk:
- print('%s, %s' % (k,k+'_r'))
-
-def options():
- get_options()
-
-try:
- cdict = _read_pkl()
- cmap_d = _cmap_d_from_dict(cdict)
-except:
- print('could not read pickle file, loading cpt manually')
- ls = os.listdir('.')
- cpt = _get_cpt()
- cdict = _cdict_from_cpt(cpt)
- cmap_d = _cmap_d_from_dict(cdict)
- try:
- _write_pkl(cdict)
- except:
- pass
-locals().update(cmap_d)
diff --git a/build/lib.macosx-10.10-x86_64-2.7/pysar/plot/cm/gmt/setup.py b/build/lib.macosx-10.10-x86_64-2.7/pysar/plot/cm/gmt/setup.py
deleted file mode 100644
index 660df7a..0000000
--- a/build/lib.macosx-10.10-x86_64-2.7/pysar/plot/cm/gmt/setup.py
+++ /dev/null
@@ -1,51 +0,0 @@
-import sys,os
-
-def make_pkl_file(cpt,here=None):
- import cPickle
- from matplotlib.cm import _reverser, revcmap, _reverse_cmap_spec
- backone=os.getcwd() + '/' + '/'.join(__file__.split('/')[:-2]) + '/'
- sys.path.append(backone)
- import cpt_tools
-
- if here is None:
- here=os.getcwd() + '/' + '/'.join(__file__.split('/')[:-1])
- if here[-1] != '/': here += '/'
-
- cdict = {}
- for ent in cpt:
- k = ent.split('.cpt')[0]
- cdict[k] = cpt_tools.cpt2python(here+ent)
- cdict[k+'_r'] = _reverse_cmap_spec(cdict[k])
- fid = open(here+'cmaps.pkl','wb')
- cPickle.dump(cdict,fid,-1)
- fid.close()
-
-def cpt_files(here=None):
- if here is None:
- here=os.getcwd() + '/' + '/'.join(__file__.split('/')[:-1])
- ls = os.listdir(here)
- cpt = []
- junk = [cpt.append(x) for x in ls if x.endswith('.cpt')]
- return cpt
-
-def configuration(parent_package='',top_path=None):
- from numpy.distutils.misc_util import Configuration
- config = Configuration('gmt', parent_package, top_path)
-
- here=os.getcwd() + '/' + '/'.join(__file__.split('/')[:-1])
- ls = cpt_files(here)
- #make_pkl_file(ls)
- if here[-1] != '/': here += '/'
- for ent in ls:
- config.add_data_files(here+ent)
- config.add_data_files(here+'cmaps.pkl')
- config.make_config_py()
- return config
-
-if __name__ == '__main__':
- from distutils.dir_util import remove_tree
- from numpy.distutils.core import setup
- if os.path.exists('./build'):
- remove_tree('./build')
- setup(**configuration(top_path='').todict())
-
diff --git a/build/lib.macosx-10.10-x86_64-2.7/pysar/plot/cm/grass/__config__.py b/build/lib.macosx-10.10-x86_64-2.7/pysar/plot/cm/grass/__config__.py
deleted file mode 100644
index 82b7493..0000000
--- a/build/lib.macosx-10.10-x86_64-2.7/pysar/plot/cm/grass/__config__.py
+++ /dev/null
@@ -1,21 +0,0 @@
-# This file is generated by /Users/brentminchew/Documents/Python/PySAR/setup.py
-# It contains system_info results at the time of building this package.
-__all__ = ["get_info","show"]
-
-
-def get_info(name):
- g = globals()
- return g.get(name, g.get(name + "_info", {}))
-
-def show():
- for name,info_dict in globals().items():
- if name[0] == "_" or type(info_dict) is not type({}): continue
- print(name + ":")
- if not info_dict:
- print(" NOT AVAILABLE")
- for k,v in info_dict.items():
- v = str(v)
- if k == "sources" and len(v) > 200:
- v = v[:60] + " ...\n... " + v[-60:]
- print(" %s = %s" % (k,v))
-
\ No newline at end of file
diff --git a/build/lib.macosx-10.10-x86_64-2.7/pysar/plot/cm/grass/__init__.py b/build/lib.macosx-10.10-x86_64-2.7/pysar/plot/cm/grass/__init__.py
deleted file mode 100644
index 838f856..0000000
--- a/build/lib.macosx-10.10-x86_64-2.7/pysar/plot/cm/grass/__init__.py
+++ /dev/null
@@ -1,59 +0,0 @@
-import sys,os
-import cPickle
-import matplotlib.colors as colors
-from pysar.etc.excepts import cptError
-from pysar.plot.cm import cpt2python, _cmap_d_from_dict, _reverse_cmap_spec
-
-def _read_pkl():
- here='/'.join(__file__.split('/')[:-1]) + '/'
- fid = open(here+'cmaps.pkl','rb')
- cmapdict = cPickle.load(fid)
- fid.close()
- return cmapdict
-
-def _write_pkl(cdict):
- here='/'.join(__file__.split('/')[:-1]) + '/'
- fid = open(here+'cmaps.pkl','wb')
- cPickle.dump(cdict,fid,-1)
- fid.close()
-
-def _cdict_from_cpt(cpt):
- """ cpt should be a list containing the cpt files """
- cdict = {}
- for ent in cpt:
- k = ent.split('.cpt')[0]
- cdict[k] = cpt2python(ent)
- cdict[k+'_r'] = _reverse_cmap_spec(cdict[k])
- return cdict
-
-def _get_cpt():
- cpt = []
- junk = [cpt.append(x) for x in ls if x.endswith('.cpt')]
- return cpt
-
-def get_options():
- keys = cdict.keys()
- keys.sort()
- newk = []
- junk = [newk.append(x) for x in keys if not x.endswith('_r')]
- print('_r extension returns the reversed colormap')
- for k in newk:
- print('%s, %s' % (k,k+'_r'))
-
-def options():
- get_options()
-
-try:
- cdict = _read_pkl()
- cmap_d = _cmap_d_from_dict(cdict)
-except:
- print('could not read pickle file, loading cpt manually')
- ls = os.listdir('.')
- cpt = _get_cpt()
- cdict = _cdict_from_cpt(cpt)
- cmap_d = _cmap_d_from_dict(cdict)
- try:
- _write_pkl(cdict)
- except:
- pass
-locals().update(cmap_d)
diff --git a/build/lib.macosx-10.10-x86_64-2.7/pysar/plot/cm/grass/setup.py b/build/lib.macosx-10.10-x86_64-2.7/pysar/plot/cm/grass/setup.py
deleted file mode 100644
index de660f3..0000000
--- a/build/lib.macosx-10.10-x86_64-2.7/pysar/plot/cm/grass/setup.py
+++ /dev/null
@@ -1,51 +0,0 @@
-import sys,os
-
-def make_pkl_file(cpt,here=None):
- import cPickle
- from matplotlib.cm import _reverser, revcmap, _reverse_cmap_spec
- backone=os.getcwd() + '/' + '/'.join(__file__.split('/')[:-2]) + '/'
- sys.path.append(backone)
- import cpt_tools
-
- if here is None:
- here=os.getcwd() + '/' + '/'.join(__file__.split('/')[:-1])
- if here[-1] != '/': here += '/'
-
- cdict = {}
- for ent in cpt:
- k = ent.split('.cpt')[0]
- cdict[k] = cpt_tools.cpt2python(here+ent)
- cdict[k+'_r'] = _reverse_cmap_spec(cdict[k])
- fid = open(here+'cmaps.pkl','wb')
- cPickle.dump(cdict,fid,-1)
- fid.close()
-
-def cpt_files(here=None):
- if here is None:
- here=os.getcwd() + '/' + '/'.join(__file__.split('/')[:-1])
- ls = os.listdir(here)
- cpt = []
- junk = [cpt.append(x) for x in ls if x.endswith('.cpt')]
- return cpt
-
-def configuration(parent_package='',top_path=None):
- from numpy.distutils.misc_util import Configuration
- config = Configuration('grass', parent_package, top_path)
-
- here=os.getcwd() + '/' + '/'.join(__file__.split('/')[:-1])
- ls = cpt_files(here)
- #make_pkl_file(ls)
- if here[-1] != '/': here += '/'
- for ent in ls:
- config.add_data_files(here+ent)
- config.add_data_files(here+'cmaps.pkl')
- config.make_config_py()
- return config
-
-if __name__ == '__main__':
- from distutils.dir_util import remove_tree
- from numpy.distutils.core import setup
- if os.path.exists('./build'):
- remove_tree('./build')
- setup(**configuration(top_path='').todict())
-
diff --git a/build/lib.macosx-10.10-x86_64-2.7/pysar/plot/cm/h5/__config__.py b/build/lib.macosx-10.10-x86_64-2.7/pysar/plot/cm/h5/__config__.py
deleted file mode 100644
index 82b7493..0000000
--- a/build/lib.macosx-10.10-x86_64-2.7/pysar/plot/cm/h5/__config__.py
+++ /dev/null
@@ -1,21 +0,0 @@
-# This file is generated by /Users/brentminchew/Documents/Python/PySAR/setup.py
-# It contains system_info results at the time of building this package.
-__all__ = ["get_info","show"]
-
-
-def get_info(name):
- g = globals()
- return g.get(name, g.get(name + "_info", {}))
-
-def show():
- for name,info_dict in globals().items():
- if name[0] == "_" or type(info_dict) is not type({}): continue
- print(name + ":")
- if not info_dict:
- print(" NOT AVAILABLE")
- for k,v in info_dict.items():
- v = str(v)
- if k == "sources" and len(v) > 200:
- v = v[:60] + " ...\n... " + v[-60:]
- print(" %s = %s" % (k,v))
-
\ No newline at end of file
diff --git a/build/lib.macosx-10.10-x86_64-2.7/pysar/plot/cm/h5/__init__.py b/build/lib.macosx-10.10-x86_64-2.7/pysar/plot/cm/h5/__init__.py
deleted file mode 100644
index 838f856..0000000
--- a/build/lib.macosx-10.10-x86_64-2.7/pysar/plot/cm/h5/__init__.py
+++ /dev/null
@@ -1,59 +0,0 @@
-import sys,os
-import cPickle
-import matplotlib.colors as colors
-from pysar.etc.excepts import cptError
-from pysar.plot.cm import cpt2python, _cmap_d_from_dict, _reverse_cmap_spec
-
-def _read_pkl():
- here='/'.join(__file__.split('/')[:-1]) + '/'
- fid = open(here+'cmaps.pkl','rb')
- cmapdict = cPickle.load(fid)
- fid.close()
- return cmapdict
-
-def _write_pkl(cdict):
- here='/'.join(__file__.split('/')[:-1]) + '/'
- fid = open(here+'cmaps.pkl','wb')
- cPickle.dump(cdict,fid,-1)
- fid.close()
-
-def _cdict_from_cpt(cpt):
- """ cpt should be a list containing the cpt files """
- cdict = {}
- for ent in cpt:
- k = ent.split('.cpt')[0]
- cdict[k] = cpt2python(ent)
- cdict[k+'_r'] = _reverse_cmap_spec(cdict[k])
- return cdict
-
-def _get_cpt():
- cpt = []
- junk = [cpt.append(x) for x in ls if x.endswith('.cpt')]
- return cpt
-
-def get_options():
- keys = cdict.keys()
- keys.sort()
- newk = []
- junk = [newk.append(x) for x in keys if not x.endswith('_r')]
- print('_r extension returns the reversed colormap')
- for k in newk:
- print('%s, %s' % (k,k+'_r'))
-
-def options():
- get_options()
-
-try:
- cdict = _read_pkl()
- cmap_d = _cmap_d_from_dict(cdict)
-except:
- print('could not read pickle file, loading cpt manually')
- ls = os.listdir('.')
- cpt = _get_cpt()
- cdict = _cdict_from_cpt(cpt)
- cmap_d = _cmap_d_from_dict(cdict)
- try:
- _write_pkl(cdict)
- except:
- pass
-locals().update(cmap_d)
diff --git a/build/lib.macosx-10.10-x86_64-2.7/pysar/plot/cm/h5/setup.py b/build/lib.macosx-10.10-x86_64-2.7/pysar/plot/cm/h5/setup.py
deleted file mode 100644
index cadbd8a..0000000
--- a/build/lib.macosx-10.10-x86_64-2.7/pysar/plot/cm/h5/setup.py
+++ /dev/null
@@ -1,51 +0,0 @@
-import sys,os
-
-def make_pkl_file(cpt,here=None):
- import cPickle
- from matplotlib.cm import _reverser, revcmap, _reverse_cmap_spec
- backone=os.getcwd() + '/' + '/'.join(__file__.split('/')[:-2]) + '/'
- sys.path.append(backone)
- import cpt_tools
-
- if here is None:
- here=os.getcwd() + '/' + '/'.join(__file__.split('/')[:-1])
- if here[-1] != '/': here += '/'
-
- cdict = {}
- for ent in cpt:
- k = ent.split('.cpt')[0]
- cdict[k] = cpt_tools.cpt2python(here+ent)
- cdict[k+'_r'] = _reverse_cmap_spec(cdict[k])
- fid = open(here+'cmaps.pkl','wb')
- cPickle.dump(cdict,fid,-1)
- fid.close()
-
-def cpt_files(here=None):
- if here is None:
- here=os.getcwd() + '/' + '/'.join(__file__.split('/')[:-1])
- ls = os.listdir(here)
- cpt = []
- junk = [cpt.append(x) for x in ls if x.endswith('.cpt')]
- return cpt
-
-def configuration(parent_package='',top_path=None):
- from numpy.distutils.misc_util import Configuration
- config = Configuration('h5', parent_package, top_path)
-
- here=os.getcwd() + '/' + '/'.join(__file__.split('/')[:-1])
- ls = cpt_files(here)
- #make_pkl_file(ls)
- if here[-1] != '/': here += '/'
- for ent in ls:
- config.add_data_files(here+ent)
- config.add_data_files(here+'cmaps.pkl')
- config.make_config_py()
- return config
-
-if __name__ == '__main__':
- from distutils.dir_util import remove_tree
- from numpy.distutils.core import setup
- if os.path.exists('./build'):
- remove_tree('./build')
- setup(**configuration(top_path='').todict())
-
diff --git a/build/lib.macosx-10.10-x86_64-2.7/pysar/plot/cm/idl/__config__.py b/build/lib.macosx-10.10-x86_64-2.7/pysar/plot/cm/idl/__config__.py
deleted file mode 100644
index 82b7493..0000000
--- a/build/lib.macosx-10.10-x86_64-2.7/pysar/plot/cm/idl/__config__.py
+++ /dev/null
@@ -1,21 +0,0 @@
-# This file is generated by /Users/brentminchew/Documents/Python/PySAR/setup.py
-# It contains system_info results at the time of building this package.
-__all__ = ["get_info","show"]
-
-
-def get_info(name):
- g = globals()
- return g.get(name, g.get(name + "_info", {}))
-
-def show():
- for name,info_dict in globals().items():
- if name[0] == "_" or type(info_dict) is not type({}): continue
- print(name + ":")
- if not info_dict:
- print(" NOT AVAILABLE")
- for k,v in info_dict.items():
- v = str(v)
- if k == "sources" and len(v) > 200:
- v = v[:60] + " ...\n... " + v[-60:]
- print(" %s = %s" % (k,v))
-
\ No newline at end of file
diff --git a/build/lib.macosx-10.10-x86_64-2.7/pysar/plot/cm/idl/__init__.py b/build/lib.macosx-10.10-x86_64-2.7/pysar/plot/cm/idl/__init__.py
deleted file mode 100644
index 838f856..0000000
--- a/build/lib.macosx-10.10-x86_64-2.7/pysar/plot/cm/idl/__init__.py
+++ /dev/null
@@ -1,59 +0,0 @@
-import sys,os
-import cPickle
-import matplotlib.colors as colors
-from pysar.etc.excepts import cptError
-from pysar.plot.cm import cpt2python, _cmap_d_from_dict, _reverse_cmap_spec
-
-def _read_pkl():
- here='/'.join(__file__.split('/')[:-1]) + '/'
- fid = open(here+'cmaps.pkl','rb')
- cmapdict = cPickle.load(fid)
- fid.close()
- return cmapdict
-
-def _write_pkl(cdict):
- here='/'.join(__file__.split('/')[:-1]) + '/'
- fid = open(here+'cmaps.pkl','wb')
- cPickle.dump(cdict,fid,-1)
- fid.close()
-
-def _cdict_from_cpt(cpt):
- """ cpt should be a list containing the cpt files """
- cdict = {}
- for ent in cpt:
- k = ent.split('.cpt')[0]
- cdict[k] = cpt2python(ent)
- cdict[k+'_r'] = _reverse_cmap_spec(cdict[k])
- return cdict
-
-def _get_cpt():
- cpt = []
- junk = [cpt.append(x) for x in ls if x.endswith('.cpt')]
- return cpt
-
-def get_options():
- keys = cdict.keys()
- keys.sort()
- newk = []
- junk = [newk.append(x) for x in keys if not x.endswith('_r')]
- print('_r extension returns the reversed colormap')
- for k in newk:
- print('%s, %s' % (k,k+'_r'))
-
-def options():
- get_options()
-
-try:
- cdict = _read_pkl()
- cmap_d = _cmap_d_from_dict(cdict)
-except:
- print('could not read pickle file, loading cpt manually')
- ls = os.listdir('.')
- cpt = _get_cpt()
- cdict = _cdict_from_cpt(cpt)
- cmap_d = _cmap_d_from_dict(cdict)
- try:
- _write_pkl(cdict)
- except:
- pass
-locals().update(cmap_d)
diff --git a/build/lib.macosx-10.10-x86_64-2.7/pysar/plot/cm/idl/setup.py b/build/lib.macosx-10.10-x86_64-2.7/pysar/plot/cm/idl/setup.py
deleted file mode 100644
index 38ac6b4..0000000
--- a/build/lib.macosx-10.10-x86_64-2.7/pysar/plot/cm/idl/setup.py
+++ /dev/null
@@ -1,51 +0,0 @@
-import sys,os
-
-def make_pkl_file(cpt,here=None):
- import cPickle
- from matplotlib.cm import _reverser, revcmap, _reverse_cmap_spec
- backone=os.getcwd() + '/' + '/'.join(__file__.split('/')[:-2]) + '/'
- sys.path.append(backone)
- import cpt_tools
-
- if here is None:
- here=os.getcwd() + '/' + '/'.join(__file__.split('/')[:-1])
- if here[-1] != '/': here += '/'
-
- cdict = {}
- for ent in cpt:
- k = ent.split('.cpt')[0]
- cdict[k] = cpt_tools.cpt2python(here+ent)
- cdict[k+'_r'] = _reverse_cmap_spec(cdict[k])
- fid = open(here+'cmaps.pkl','wb')
- cPickle.dump(cdict,fid,-1)
- fid.close()
-
-def cpt_files(here=None):
- if here is None:
- here=os.getcwd() + '/' + '/'.join(__file__.split('/')[:-1])
- ls = os.listdir(here)
- cpt = []
- junk = [cpt.append(x) for x in ls if x.endswith('.cpt')]
- return cpt
-
-def configuration(parent_package='',top_path=None):
- from numpy.distutils.misc_util import Configuration
- config = Configuration('idl', parent_package, top_path)
-
- here=os.getcwd() + '/' + '/'.join(__file__.split('/')[:-1])
- ls = cpt_files(here)
- #make_pkl_file(ls)
- if here[-1] != '/': here += '/'
- for ent in ls:
- config.add_data_files(here+ent)
- config.add_data_files(here+'cmaps.pkl')
- config.make_config_py()
- return config
-
-if __name__ == '__main__':
- from distutils.dir_util import remove_tree
- from numpy.distutils.core import setup
- if os.path.exists('./build'):
- remove_tree('./build')
- setup(**configuration(top_path='').todict())
-
diff --git a/build/lib.macosx-10.10-x86_64-2.7/pysar/plot/cm/imagej/__config__.py b/build/lib.macosx-10.10-x86_64-2.7/pysar/plot/cm/imagej/__config__.py
deleted file mode 100644
index 82b7493..0000000
--- a/build/lib.macosx-10.10-x86_64-2.7/pysar/plot/cm/imagej/__config__.py
+++ /dev/null
@@ -1,21 +0,0 @@
-# This file is generated by /Users/brentminchew/Documents/Python/PySAR/setup.py
-# It contains system_info results at the time of building this package.
-__all__ = ["get_info","show"]
-
-
-def get_info(name):
- g = globals()
- return g.get(name, g.get(name + "_info", {}))
-
-def show():
- for name,info_dict in globals().items():
- if name[0] == "_" or type(info_dict) is not type({}): continue
- print(name + ":")
- if not info_dict:
- print(" NOT AVAILABLE")
- for k,v in info_dict.items():
- v = str(v)
- if k == "sources" and len(v) > 200:
- v = v[:60] + " ...\n... " + v[-60:]
- print(" %s = %s" % (k,v))
-
\ No newline at end of file
diff --git a/build/lib.macosx-10.10-x86_64-2.7/pysar/plot/cm/imagej/__init__.py b/build/lib.macosx-10.10-x86_64-2.7/pysar/plot/cm/imagej/__init__.py
deleted file mode 100644
index 838f856..0000000
--- a/build/lib.macosx-10.10-x86_64-2.7/pysar/plot/cm/imagej/__init__.py
+++ /dev/null
@@ -1,59 +0,0 @@
-import sys,os
-import cPickle
-import matplotlib.colors as colors
-from pysar.etc.excepts import cptError
-from pysar.plot.cm import cpt2python, _cmap_d_from_dict, _reverse_cmap_spec
-
-def _read_pkl():
- here='/'.join(__file__.split('/')[:-1]) + '/'
- fid = open(here+'cmaps.pkl','rb')
- cmapdict = cPickle.load(fid)
- fid.close()
- return cmapdict
-
-def _write_pkl(cdict):
- here='/'.join(__file__.split('/')[:-1]) + '/'
- fid = open(here+'cmaps.pkl','wb')
- cPickle.dump(cdict,fid,-1)
- fid.close()
-
-def _cdict_from_cpt(cpt):
- """ cpt should be a list containing the cpt files """
- cdict = {}
- for ent in cpt:
- k = ent.split('.cpt')[0]
- cdict[k] = cpt2python(ent)
- cdict[k+'_r'] = _reverse_cmap_spec(cdict[k])
- return cdict
-
-def _get_cpt():
- cpt = []
- junk = [cpt.append(x) for x in ls if x.endswith('.cpt')]
- return cpt
-
-def get_options():
- keys = cdict.keys()
- keys.sort()
- newk = []
- junk = [newk.append(x) for x in keys if not x.endswith('_r')]
- print('_r extension returns the reversed colormap')
- for k in newk:
- print('%s, %s' % (k,k+'_r'))
-
-def options():
- get_options()
-
-try:
- cdict = _read_pkl()
- cmap_d = _cmap_d_from_dict(cdict)
-except:
- print('could not read pickle file, loading cpt manually')
- ls = os.listdir('.')
- cpt = _get_cpt()
- cdict = _cdict_from_cpt(cpt)
- cmap_d = _cmap_d_from_dict(cdict)
- try:
- _write_pkl(cdict)
- except:
- pass
-locals().update(cmap_d)
diff --git a/build/lib.macosx-10.10-x86_64-2.7/pysar/plot/cm/imagej/setup.py b/build/lib.macosx-10.10-x86_64-2.7/pysar/plot/cm/imagej/setup.py
deleted file mode 100644
index 6e3764b..0000000
--- a/build/lib.macosx-10.10-x86_64-2.7/pysar/plot/cm/imagej/setup.py
+++ /dev/null
@@ -1,51 +0,0 @@
-import sys,os
-
-def make_pkl_file(cpt,here=None):
- import cPickle
- from matplotlib.cm import _reverser, revcmap, _reverse_cmap_spec
- backone=os.getcwd() + '/' + '/'.join(__file__.split('/')[:-2]) + '/'
- sys.path.append(backone)
- import cpt_tools
-
- if here is None:
- here=os.getcwd() + '/' + '/'.join(__file__.split('/')[:-1])
- if here[-1] != '/': here += '/'
-
- cdict = {}
- for ent in cpt:
- k = ent.split('.cpt')[0]
- cdict[k] = cpt_tools.cpt2python(here+ent)
- cdict[k+'_r'] = _reverse_cmap_spec(cdict[k])
- fid = open(here+'cmaps.pkl','wb')
- cPickle.dump(cdict,fid,-1)
- fid.close()
-
-def cpt_files(here=None):
- if here is None:
- here=os.getcwd() + '/' + '/'.join(__file__.split('/')[:-1])
- ls = os.listdir(here)
- cpt = []
- junk = [cpt.append(x) for x in ls if x.endswith('.cpt')]
- return cpt
-
-def configuration(parent_package='',top_path=None):
- from numpy.distutils.misc_util import Configuration
- config = Configuration('imagej', parent_package, top_path)
-
- here=os.getcwd() + '/' + '/'.join(__file__.split('/')[:-1])
- ls = cpt_files(here)
- #make_pkl_file(ls)
- if here[-1] != '/': here += '/'
- for ent in ls:
- config.add_data_files(here+ent)
- config.add_data_files(here+'cmaps.pkl')
- config.make_config_py()
- return config
-
-if __name__ == '__main__':
- from distutils.dir_util import remove_tree
- from numpy.distutils.core import setup
- if os.path.exists('./build'):
- remove_tree('./build')
- setup(**configuration(top_path='').todict())
-
diff --git a/build/lib.macosx-10.10-x86_64-2.7/pysar/plot/cm/kst/__config__.py b/build/lib.macosx-10.10-x86_64-2.7/pysar/plot/cm/kst/__config__.py
deleted file mode 100644
index 82b7493..0000000
--- a/build/lib.macosx-10.10-x86_64-2.7/pysar/plot/cm/kst/__config__.py
+++ /dev/null
@@ -1,21 +0,0 @@
-# This file is generated by /Users/brentminchew/Documents/Python/PySAR/setup.py
-# It contains system_info results at the time of building this package.
-__all__ = ["get_info","show"]
-
-
-def get_info(name):
- g = globals()
- return g.get(name, g.get(name + "_info", {}))
-
-def show():
- for name,info_dict in globals().items():
- if name[0] == "_" or type(info_dict) is not type({}): continue
- print(name + ":")
- if not info_dict:
- print(" NOT AVAILABLE")
- for k,v in info_dict.items():
- v = str(v)
- if k == "sources" and len(v) > 200:
- v = v[:60] + " ...\n... " + v[-60:]
- print(" %s = %s" % (k,v))
-
\ No newline at end of file
diff --git a/build/lib.macosx-10.10-x86_64-2.7/pysar/plot/cm/kst/__init__.py b/build/lib.macosx-10.10-x86_64-2.7/pysar/plot/cm/kst/__init__.py
deleted file mode 100644
index 838f856..0000000
--- a/build/lib.macosx-10.10-x86_64-2.7/pysar/plot/cm/kst/__init__.py
+++ /dev/null
@@ -1,59 +0,0 @@
-import sys,os
-import cPickle
-import matplotlib.colors as colors
-from pysar.etc.excepts import cptError
-from pysar.plot.cm import cpt2python, _cmap_d_from_dict, _reverse_cmap_spec
-
-def _read_pkl():
- here='/'.join(__file__.split('/')[:-1]) + '/'
- fid = open(here+'cmaps.pkl','rb')
- cmapdict = cPickle.load(fid)
- fid.close()
- return cmapdict
-
-def _write_pkl(cdict):
- here='/'.join(__file__.split('/')[:-1]) + '/'
- fid = open(here+'cmaps.pkl','wb')
- cPickle.dump(cdict,fid,-1)
- fid.close()
-
-def _cdict_from_cpt(cpt):
- """ cpt should be a list containing the cpt files """
- cdict = {}
- for ent in cpt:
- k = ent.split('.cpt')[0]
- cdict[k] = cpt2python(ent)
- cdict[k+'_r'] = _reverse_cmap_spec(cdict[k])
- return cdict
-
-def _get_cpt():
- cpt = []
- junk = [cpt.append(x) for x in ls if x.endswith('.cpt')]
- return cpt
-
-def get_options():
- keys = cdict.keys()
- keys.sort()
- newk = []
- junk = [newk.append(x) for x in keys if not x.endswith('_r')]
- print('_r extension returns the reversed colormap')
- for k in newk:
- print('%s, %s' % (k,k+'_r'))
-
-def options():
- get_options()
-
-try:
- cdict = _read_pkl()
- cmap_d = _cmap_d_from_dict(cdict)
-except:
- print('could not read pickle file, loading cpt manually')
- ls = os.listdir('.')
- cpt = _get_cpt()
- cdict = _cdict_from_cpt(cpt)
- cmap_d = _cmap_d_from_dict(cdict)
- try:
- _write_pkl(cdict)
- except:
- pass
-locals().update(cmap_d)
diff --git a/build/lib.macosx-10.10-x86_64-2.7/pysar/plot/cm/kst/setup.py b/build/lib.macosx-10.10-x86_64-2.7/pysar/plot/cm/kst/setup.py
deleted file mode 100644
index 9038a81..0000000
--- a/build/lib.macosx-10.10-x86_64-2.7/pysar/plot/cm/kst/setup.py
+++ /dev/null
@@ -1,51 +0,0 @@
-import sys,os
-
-def make_pkl_file(cpt,here=None):
- import cPickle
- from matplotlib.cm import _reverser, revcmap, _reverse_cmap_spec
- backone=os.getcwd() + '/' + '/'.join(__file__.split('/')[:-2]) + '/'
- sys.path.append(backone)
- import cpt_tools
-
- if here is None:
- here=os.getcwd() + '/' + '/'.join(__file__.split('/')[:-1])
- if here[-1] != '/': here += '/'
-
- cdict = {}
- for ent in cpt:
- k = ent.split('.cpt')[0]
- cdict[k] = cpt_tools.cpt2python(here+ent)
- cdict[k+'_r'] = _reverse_cmap_spec(cdict[k])
- fid = open(here+'cmaps.pkl','wb')
- cPickle.dump(cdict,fid,-1)
- fid.close()
-
-def cpt_files(here=None):
- if here is None:
- here=os.getcwd() + '/' + '/'.join(__file__.split('/')[:-1])
- ls = os.listdir(here)
- cpt = []
- junk = [cpt.append(x) for x in ls if x.endswith('.cpt')]
- return cpt
-
-def configuration(parent_package='',top_path=None):
- from numpy.distutils.misc_util import Configuration
- config = Configuration('kst', parent_package, top_path)
-
- here=os.getcwd() + '/' + '/'.join(__file__.split('/')[:-1])
- ls = cpt_files(here)
- #make_pkl_file(ls)
- if here[-1] != '/': here += '/'
- for ent in ls:
- config.add_data_files(here+ent)
- config.add_data_files(here+'cmaps.pkl')
- config.make_config_py()
- return config
-
-if __name__ == '__main__':
- from distutils.dir_util import remove_tree
- from numpy.distutils.core import setup
- if os.path.exists('./build'):
- remove_tree('./build')
- setup(**configuration(top_path='').todict())
-
diff --git a/build/lib.macosx-10.10-x86_64-2.7/pysar/plot/cm/ncl/__config__.py b/build/lib.macosx-10.10-x86_64-2.7/pysar/plot/cm/ncl/__config__.py
deleted file mode 100644
index 82b7493..0000000
--- a/build/lib.macosx-10.10-x86_64-2.7/pysar/plot/cm/ncl/__config__.py
+++ /dev/null
@@ -1,21 +0,0 @@
-# This file is generated by /Users/brentminchew/Documents/Python/PySAR/setup.py
-# It contains system_info results at the time of building this package.
-__all__ = ["get_info","show"]
-
-
-def get_info(name):
- g = globals()
- return g.get(name, g.get(name + "_info", {}))
-
-def show():
- for name,info_dict in globals().items():
- if name[0] == "_" or type(info_dict) is not type({}): continue
- print(name + ":")
- if not info_dict:
- print(" NOT AVAILABLE")
- for k,v in info_dict.items():
- v = str(v)
- if k == "sources" and len(v) > 200:
- v = v[:60] + " ...\n... " + v[-60:]
- print(" %s = %s" % (k,v))
-
\ No newline at end of file
diff --git a/build/lib.macosx-10.10-x86_64-2.7/pysar/plot/cm/ncl/__init__.py b/build/lib.macosx-10.10-x86_64-2.7/pysar/plot/cm/ncl/__init__.py
deleted file mode 100644
index 838f856..0000000
--- a/build/lib.macosx-10.10-x86_64-2.7/pysar/plot/cm/ncl/__init__.py
+++ /dev/null
@@ -1,59 +0,0 @@
-import sys,os
-import cPickle
-import matplotlib.colors as colors
-from pysar.etc.excepts import cptError
-from pysar.plot.cm import cpt2python, _cmap_d_from_dict, _reverse_cmap_spec
-
-def _read_pkl():
- here='/'.join(__file__.split('/')[:-1]) + '/'
- fid = open(here+'cmaps.pkl','rb')
- cmapdict = cPickle.load(fid)
- fid.close()
- return cmapdict
-
-def _write_pkl(cdict):
- here='/'.join(__file__.split('/')[:-1]) + '/'
- fid = open(here+'cmaps.pkl','wb')
- cPickle.dump(cdict,fid,-1)
- fid.close()
-
-def _cdict_from_cpt(cpt):
- """ cpt should be a list containing the cpt files """
- cdict = {}
- for ent in cpt:
- k = ent.split('.cpt')[0]
- cdict[k] = cpt2python(ent)
- cdict[k+'_r'] = _reverse_cmap_spec(cdict[k])
- return cdict
-
-def _get_cpt():
- cpt = []
- junk = [cpt.append(x) for x in ls if x.endswith('.cpt')]
- return cpt
-
-def get_options():
- keys = cdict.keys()
- keys.sort()
- newk = []
- junk = [newk.append(x) for x in keys if not x.endswith('_r')]
- print('_r extension returns the reversed colormap')
- for k in newk:
- print('%s, %s' % (k,k+'_r'))
-
-def options():
- get_options()
-
-try:
- cdict = _read_pkl()
- cmap_d = _cmap_d_from_dict(cdict)
-except:
- print('could not read pickle file, loading cpt manually')
- ls = os.listdir('.')
- cpt = _get_cpt()
- cdict = _cdict_from_cpt(cpt)
- cmap_d = _cmap_d_from_dict(cdict)
- try:
- _write_pkl(cdict)
- except:
- pass
-locals().update(cmap_d)
diff --git a/build/lib.macosx-10.10-x86_64-2.7/pysar/plot/cm/ncl/setup.py b/build/lib.macosx-10.10-x86_64-2.7/pysar/plot/cm/ncl/setup.py
deleted file mode 100644
index b72aed9..0000000
--- a/build/lib.macosx-10.10-x86_64-2.7/pysar/plot/cm/ncl/setup.py
+++ /dev/null
@@ -1,51 +0,0 @@
-import sys,os
-
-def make_pkl_file(cpt,here=None):
- import cPickle
- from matplotlib.cm import _reverser, revcmap, _reverse_cmap_spec
- backone=os.getcwd() + '/' + '/'.join(__file__.split('/')[:-2]) + '/'
- sys.path.append(backone)
- import cpt_tools
-
- if here is None:
- here=os.getcwd() + '/' + '/'.join(__file__.split('/')[:-1])
- if here[-1] != '/': here += '/'
-
- cdict = {}
- for ent in cpt:
- k = ent.split('.cpt')[0]
- cdict[k] = cpt_tools.cpt2python(here+ent)
- cdict[k+'_r'] = _reverse_cmap_spec(cdict[k])
- fid = open(here+'cmaps.pkl','wb')
- cPickle.dump(cdict,fid,-1)
- fid.close()
-
-def cpt_files(here=None):
- if here is None:
- here=os.getcwd() + '/' + '/'.join(__file__.split('/')[:-1])
- ls = os.listdir(here)
- cpt = []
- junk = [cpt.append(x) for x in ls if x.endswith('.cpt')]
- return cpt
-
-def configuration(parent_package='',top_path=None):
- from numpy.distutils.misc_util import Configuration
- config = Configuration('ncl', parent_package, top_path)
-
- here=os.getcwd() + '/' + '/'.join(__file__.split('/')[:-1])
- ls = cpt_files(here)
- #make_pkl_file(ls)
- if here[-1] != '/': here += '/'
- for ent in ls:
- config.add_data_files(here+ent)
- config.add_data_files(here+'cmaps.pkl')
- config.make_config_py()
- return config
-
-if __name__ == '__main__':
- from distutils.dir_util import remove_tree
- from numpy.distutils.core import setup
- if os.path.exists('./build'):
- remove_tree('./build')
- setup(**configuration(top_path='').todict())
-
diff --git a/build/lib.macosx-10.10-x86_64-2.7/pysar/plot/cm/setup.py b/build/lib.macosx-10.10-x86_64-2.7/pysar/plot/cm/setup.py
deleted file mode 100644
index 420dfbf..0000000
--- a/build/lib.macosx-10.10-x86_64-2.7/pysar/plot/cm/setup.py
+++ /dev/null
@@ -1,37 +0,0 @@
-import sys,os
-
-def create_cm_pkl():
- here=os.getcwd() + '/' + '/'.join(__file__.split('/')[:-1])
- pkl = here+'/cpt/cmaps.pkl'
- if os.path.exists(pkl): os.remove(pkl)
- import _generate_pkl
-
-def id_cmaps():
- here=os.getcwd() + '/' + '/'.join(__file__.split('/')[:-1])
- ls = os.listdir(here)
- if here[-1] != '/': here += '/'
- out = []
- for ent in ls:
- if '.' not in ent and ent != 'cpt':
- if os.path.exists(here+ent+'/__init__.py'):
- if os.path.exists(here+ent+'/setup.py'):
- out.append(ent)
- return out
-
-def configuration(parent_package='',top_path=None):
- from numpy.distutils.misc_util import Configuration
- config = Configuration('cm', parent_package, top_path)
- config.add_data_dir('cpt')
- ls = id_cmaps()
- for ent in ls:
- config.add_subpackage(ent)
- config.make_config_py()
- return config
-
-if __name__ == '__main__':
- from distutils.dir_util import remove_tree
- from numpy.distutils.core import setup
- if os.path.exists('./build'):
- remove_tree('./build')
- setup(**configuration(top_path='').todict())
-
diff --git a/build/lib.macosx-10.10-x86_64-2.7/pysar/plot/setup.py b/build/lib.macosx-10.10-x86_64-2.7/pysar/plot/setup.py
deleted file mode 100644
index d7bdab4..0000000
--- a/build/lib.macosx-10.10-x86_64-2.7/pysar/plot/setup.py
+++ /dev/null
@@ -1,17 +0,0 @@
-import sys,os
-
-
-def configuration(parent_package='',top_path=None):
- from numpy.distutils.misc_util import Configuration
- config = Configuration('plot', parent_package, top_path)
- config.add_subpackage('cm')
- config.make_config_py()
- return config
-
-if __name__ == '__main__':
- from distutils.dir_util import remove_tree
- from numpy.distutils.core import setup
- if os.path.exists('./build'):
- remove_tree('./build')
- setup(**configuration(top_path='').todict())
-
diff --git a/build/lib.macosx-10.10-x86_64-2.7/pysar/polsar/__init__.py b/build/lib.macosx-10.10-x86_64-2.7/pysar/polsar/__init__.py
deleted file mode 100644
index cff3d38..0000000
--- a/build/lib.macosx-10.10-x86_64-2.7/pysar/polsar/__init__.py
+++ /dev/null
@@ -1,22 +0,0 @@
-'''
-PolSAR (:mod:`pysar.polsar`)
-============================
-
-Polarimetric SAR decomposition routines
-
-.. currentmodule:: pysar.polsar
-
-Functions
----------
-
-None
-
-Scrips
-------
-
-================ ===================================================================
-`sardecomp_fd` Freeman-Durden 3-component decomposition
-`sardecomp_haa` H/A/alpha decomposition
-================ ===================================================================
-'''
-import sys,os
diff --git a/build/lib.macosx-10.10-x86_64-2.7/pysar/polsar/_decomp_modc.so b/build/lib.macosx-10.10-x86_64-2.7/pysar/polsar/_decomp_modc.so
deleted file mode 100755
index e3ab07d..0000000
Binary files a/build/lib.macosx-10.10-x86_64-2.7/pysar/polsar/_decomp_modc.so and /dev/null differ
diff --git a/build/lib.macosx-10.10-x86_64-2.7/pysar/polsar/decomp.py b/build/lib.macosx-10.10-x86_64-2.7/pysar/polsar/decomp.py
deleted file mode 100644
index ced9d5a..0000000
--- a/build/lib.macosx-10.10-x86_64-2.7/pysar/polsar/decomp.py
+++ /dev/null
@@ -1,192 +0,0 @@
-"""
-PySAR
-
-Polarimetric SAR decomposition
-
-Contents
---------
-decomp_fd(hhhh,vvvv,hvhv,hhvv,numthrd=None) : Freeman-Durden 3-component decomposition
-
-"""
-from __future__ import print_function, division
-import sys,os
-import numpy as np
-###===========================================================================================
-
-def decomp_fd(hhhh,vvvv,hvhv,hhvv,null=None,numthrd=None,maxthrd=8):
- """
- Freeman-Durden 3-component decomposition
-
- Parameters
- ----------
- hhhh : ndarray
- horizontally polarized power
- vvvv : ndarray
- vertically polarized power
- hvhv : ndarray
- cross-polarized power
- hhvv : ndarray
- co-polarized cross product (complex-valued)
- null : float or None
- null value to exclude from decomposition
- numthrd : int or None
- number of pthreads; None sets numthrd based on the data array size [None]
- maxthrd : int or None
- maximum allowable numthrd [8]
-
- Returns
- -------
- ps : ndarray
- surface-scattered power
- pd : ndarray
- double-bounce power
- pv : ndarray
- volume-scattered power
-
- Notes
- -----
- * arrays are returned with the same type as hhhh data
-
- Reference
- ---------
- 1. Freeman, A. and Durden, S., "A three-component scattering model for polarimetric SAR data", *IEEE Trans. Geosci. Remote Sensing*, vol. 36, no. 3, pp. 963-973, May 1998.
-
- """
- from pysar.polsar._decomp_modc import free_durden
-
- if not numthrd:
- numthrd = np.max([len(hhhh)//1e5, 1])
- if numthrd > maxthrd: numthrd = maxthrd
- elif numthrd < 1:
- raise ValueError('numthrd must be >= 1')
-
- if null:
- nullmask = np.abs(hhhh-null) < 1.e-7
- nullmask += np.abs(vvvv-null) < 1.e-7
- nullmask += np.abs(hvhv-null) < 1.e-7
- nullmask += np.abs(hhvv-null) < 1.e-7
- hhvv[nullmask] = 0.
-
- hhhhtype = None
- if hhhh.dtype != np.float32:
- hhhhtype = hhhh.dtype
- hhhh = hhhh.astype(np.float32)
- vvvv = vvvv.astype(np.float32)
- hvhv = hvhv.astype(np.float32)
- hhvv = hhvv.astype(np.complex64)
-
- if not all({2-x for x in [hhhh.ndim, vvvv.ndim, hvhv.ndim, hhvv.ndim]}):
- hhhh, vvvv = hhhh.flatten(), vvvv.flatten()
- hvhv, hhvv = hvhv.flatten(), hhvv.flatten()
-
- P = free_durden(hhhh, vvvv, hvhv, hhvv, numthrd)
- if hhhhtype: P = P.astype(hhhhtype)
- P = P.reshape(3,-1)
-
- if null: P[0,nullmask], P[1,nullmask], P[2,nullmask] = null, null, null
-
- return P[0,:], P[1,:], P[2,:]
-
-###---------------------------------------------------------------------------------
-
-def decomp_haa(hhhh,vvvv,hvhv,hhhv,hhvv,hvvv,matform='C',null=None,numthrd=None,maxthrd=8):
- """
- Cloude-Pottier H/A/alpha polarimetric decomposition
-
- Parameters
- ----------
- hhhh : ndarray
- horizontal co-polarized power (or 0.5|HH + VV|^2 if matform = 'T')
- vvvv : ndarray
- vertical co-polarized power (or 0.5|HH - VV|^2 if matform = 'T')
- hvhv : ndarray
- cross-polarized power (2|HV|^2 for matform = 'T')
- hhhv : ndarray
- HH.HV* cross-product (or 0.5(HH+VV)(HH-VV)* for matform = 'T')
- hhvv : ndarray
- HH.VV* cross-product (or HV(HH+VV)* for matform = 'T')
- hvvv : ndarray
- HV.VV* cross-product (or HV(HH-VV)* for matform = 'T')
- matform : str {'C' or 'T'}
- form of input matrix entries: 'C' for covariance matrix and
- 'T' for coherency matrix ['C'] (see ref. 1)
- null : float or None
- null value to exclude from decomposition
- numthrd : int or None
- number of pthreads; None sets numthrd based on the data array size [None]
- maxthrd : int or None
- maximum allowable numthrd [8]
-
- Returns
- -------
- H : ndarray
- entropy (H = -(p1*log_3(p1) + p2*log_3(p2) + p3*log_3(p3))
- where pi = lam_i/(hhhh+vvvv+hvhv)) and lam is an eigenvalue
- A : ndarray
- anisotropy (A = (lam_2-lam_3)/(lam_2+lam_3) --> lam_1 >= lam_2 >= lam_3
- alpha : ndarray
- alpha angle in degrees (see ref. 1)
-
- Notes
- -----
- * arrays are returned with the same type as hhhh data
- * if covariance matrix form is used, do not multiply entries by any constants
-
- Reference
- ---------
- 1. Cloude, S. and Pottier, E., "An entropy based classification scheme for land applications of polarimetric SAR", *IEEE Trans. Geosci. Remote Sensing*, vol. 35, no. 1, pp. 68-78, Jan. 1997.
-
- """
- from pysar.polsar._decomp_modc import cloude_pot
-
- if matform == 'C' or matform == 'c':
- mtf = 1
- elif matform == 'T' or matform == 't':
- mtf = 0
- else:
- raise ValueError("matform must be 'C' or 'T'")
-
- if not numthrd:
- numthrd = np.max([len(hhhh)//1e5, 1])
- if numthrd > maxthrd: numthrd = maxthrd
- elif numthrd < 1:
- raise ValueError('numthrd must be >= 1')
-
- if null:
- nullmask = np.abs(hhhh-null) < 1.e-7
- nullmask += np.abs(vvvv-null) < 1.e-7
- nullmask += np.abs(hvhv-null) < 1.e-7
- nullmask += np.abs(hhhv-null) < 1.e-7
- nullmask += np.abs(hhvv-null) < 1.e-7
- nullmask += np.abs(hvvv-null) < 1.e-7
- hhhh[nullmask], vvvv[nullmask] = 0., 0.
- hvhv[nullmask] = 0.
-
- hhhhtype = None
- if hhhh.dtype != np.float32:
- hhhhtype = hhhh.dtype
- hhhh = hhhh.astype(np.float32)
- vvvv = vvvv.astype(np.float32)
- hvhv = hvhv.astype(np.float32)
- hhhv = hhhv.astype(np.complex64)
- hhvv = hhvv.astype(np.complex64)
- hvvv = hvvv.astype(np.complex64)
-
- if not all({2-x for x in [hhhh.ndim, vvvv.ndim, hvhv.ndim, hhhv.ndim, hhvv.ndim, hvvv.ndim]}):
- hhhh, vvvv = hhhh.flatten(), vvvv.flatten()
- hvhv, hhvv = hvhv.flatten(), hhvv.flatten()
- hhhv, hvvv = hhhv.flatten(), hvvv.flatten()
-
- P = cloude_pot(hhhh, vvvv, hvhv, hhhv, hhvv, hvvv, mtf, numthrd)
- if hhhhtype: P = P.astype(hhhhtype)
- P = P.reshape(3,-1)
-
- if null: P[0,nullmask], P[1,nullmask], P[2,nullmask] = null, null, null
-
- return P[0,:], P[1,:], P[2,:]
-
-
-def decomp_cp(hhhh,vvvv,hvhv,hhhv,hhvv,hvvv,matform='C',null=None,numthrd=None,maxthrd=8):
- __doc__ = decomp_haa.__doc__
- return decomp_haa(hhhh=hhhh,vvvv=vvvv,hvhv=hvhv,hhhv=hhhv,hhvv=hhvv,hvvv=hvvv,
- matform=matform,null=null,numthrd=numthrd,maxthrd=maxthrd)
diff --git a/build/lib.macosx-10.10-x86_64-2.7/pysar/polsar/sardecomp_fd.py b/build/lib.macosx-10.10-x86_64-2.7/pysar/polsar/sardecomp_fd.py
deleted file mode 100644
index f58bc86..0000000
--- a/build/lib.macosx-10.10-x86_64-2.7/pysar/polsar/sardecomp_fd.py
+++ /dev/null
@@ -1,186 +0,0 @@
-#!/usr/bin/env python
-
-"""
-sardecomp_fd.py : Freeman-Durden 3-component decomposition (Freeman and Durden, 1998)
-
-usage::
-
- $ sardecomp_fd.py filename[s] [options]
-
-Parameters
-----------
-filename[s] : input filename or filenames (see notes for more info)
-
-Options
--------
--c columns : int --
- image width (only needed if -f is given)
--f window : int or comma-separated list of ints (no brackets) --
- filter window size; square if only one value is given
--o prefix : str --
- prefix for output files [same as input prefix]
-
-
-Notes
------
-
-* Only one filename is needed if all files follow a convention such that::
-
- < S_HH S_HH* > --> hhhh *or* HHHH
- < S_HH S_VV* > --> hhvv *or* HHVV
-
-and so on for the diagonal and co-polarized off-diagonal channels of the
-coherencey matrix C (aka C_3) (see next note for a list of required channels)
-
-* If all filenames are given, they should be in order hhhh, vvvv, hvhv, hhvv
-
-* Cross-polarized power (hvhv) should *not* be multiplied by 2
-
-* Input files are assumed to be headerless, single-precision (float) binary
-
-* Image width is only needed if -f is called
-
-* It is common for Freeman-Decomposition to give non-physical negative powers [ref. 2].
-This is not a bug in the code. The user should also carefully consider the assumptions
-inherent in this decomposition scheme [ref. 1 and 2] and whether those assumptions are
-valid for the current problem.
-
-References
-----------
-
-[1] Freeman, A. and Durden, S., "A three-component scattering model for polarimetric SAR data", *IEEE Trans. Geosci. Remote Sensing*, vol. 36, no. 3, pp. 963-973, May 1998.
-
-[2] van Zyl, J. and Yunjin, K., *Synthetic Aperture Radar Polarimetry*, Wiley, Hoboken, NJ, 288 pages, 2011.
-
-"""
-from __future__ import print_function, division
-import sys,os
-import getopt
-import numpy as np
-from pysar.etc.excepts import InputError
-from pysar.polsar.decomp import decomp_fd
-from pysar.signal.boxfilter import boxcar2d
-
-###===========================================================================================
-
-def main(args):
- deco = FDdecomp(args)
- deco.read_data()
- deco.setup_data()
- deco.decomp()
- deco.write_data()
- print('Done with sardecomp_fd.py\n')
-
-###===========================================================================================
-class FDdecomp():
- def __init__(self,cargs):
- opts,args = getopt.gnu_getopt(cargs, 'c:f:o:')
- # set defaults
- self.outpref = None
- self.cols, self.filter_window = None, None
- fchoices = ['hhhh','vvvv','hvhv','hhvv']
- self.fnames, self.data = {}, {}
- # check filenames
- if len(args) != 1 and len(args) != 4:
- istr = 'Provide either 1 example filename or all 4 filenames. '
- istr += 'Number given = %d' % len(args)
- raise InputError(istr)
- # gather options
- for o,a in opts:
- if o == '-c':
- try: self.cols = np.int32(a)
- except: raise TypeError('argument for cols (-c) option must be convertable to int')
- elif o == '-f':
- flt = a.split(',')
- try: self.filter_window = [np.int32(x) for x in flt]
- except: raise TypeError('filter window dimensions must be convertable to int')
- elif o == '-o':
- self.outpref = a
- if self.filter_window and not self.cols:
- raise InputError('option -c must be given with -f')
-
- # get filenames
- if len(args) == 1:
- filesplit = None
- for x in fchoices:
- if x in args[0]:
- filesplit, upper = args[0].split(x), False
- break
- elif x.upper() in args[0]:
- filesplit, upper = args[0].split(x.upper()), True
- break
- if filesplit:
- for x in fchoices:
- if upper:
- self.fnames[x] = filesplit[0] + x.upper() + filesplit[1]
- else:
- self.fnames[x] = filesplit[0] + x + filesplit[1]
- else:
- istr = '%s does not match expected formatting...check input or' % args[0]
- istr += ' enter all filenames manually'
- raise InputError(istr)
- else:
- for i,x in enumerate(fchoices):
- self.fnames[x] = args[i]
-
- if not self.outpref:
- if 'HHHH' in self.fnames['hhhh']:
- self.outpref = '_'.join(self.fnames['hhhh'].split('HHHH'))
- else:
- self.outpref = '_'.join(self.fnames['hhhh'].split('hhhh'))
-
- if self.outpref[-1] != '.': self.outpref += '.'
-
- ###---------------------------------------------------------------------------------
- def read_data(self):
- rstr = 'Reading...'
- for k,v in self.fnames.iteritems():
- print("%s %s" % (rstr, v))
- try:
- fid = open(v,'r')
- if k == 'hhvv':
- self.data[k] = np.fromfile(fid,dtype=np.complex64)
- else:
- self.data[k] = np.fromfile(fid,dtype=np.float32)
- fid.close()
- except:
- raise IOError('cannot open file %s' % v)
- print('%s %s' % (rstr, 'Complete'))
-
- ###---------------------------------------------------------------------------------
- def setup_data(self):
- if self.filter_window:
- self._filter()
-
- ###---------------------------------------------------------------------------------
- def _filter(self):
- print('Filtering...')
- for key in self.data.keys():
- self.data[key] = self.data[key].reshape(-1,self.cols)
- self.data[key] = boxcar2d(data=self.data[key], window=self.filter_window)
- self.data[key] = self.data[key].flatten()
-
- ###---------------------------------------------------------------------------------
- def decomp(self):
- print('Decomposing')
- self.data['ps'], self.data['pd'], self.data['pv'] = decomp_fd(hhhh=self.data['hhhh'],
- vvvv=self.data['vvvv'], hvhv=self.data['hvhv'], hhvv=self.data['hhvv'])
-
- ###---------------------------------------------------------------------------------
- def write_data(self):
- wstr = 'Writing...'
- outputs = ['ps','pd','pv']
- for i in outputs:
- print("%s %s" % (wstr, i))
- fid = open(self.outpref + i,'w')
- self.data[i].tofile(fid)
- fid.close()
- print('%s %s' % (wstr, 'Complete'))
-
-###===========================================================================================
-if __name__ == '__main__':
- args = sys.argv[1:]
- if len(args) < 1:
- print(__doc__)
- sys.exit()
- main(args)
diff --git a/build/lib.macosx-10.10-x86_64-2.7/pysar/polsar/sardecomp_haa.py b/build/lib.macosx-10.10-x86_64-2.7/pysar/polsar/sardecomp_haa.py
deleted file mode 100644
index fe30460..0000000
--- a/build/lib.macosx-10.10-x86_64-2.7/pysar/polsar/sardecomp_haa.py
+++ /dev/null
@@ -1,201 +0,0 @@
-#!/usr/bin/env python
-
-"""
-sardecomp_haa.py : Cloude-Pottier H/A/alpha decomposition (Cloude and Pottier, 1997)
-
-usage::
-
- $ sardecomp_haa.py filename[s] [options]
-
-Parameters
-----------
-filename[s] : input filename or filenames (see notes for more info)
-
-Options
--------
--c width : int --
- image width (only needed if -f is given)
--f window : int or comma-separated list of ints (no brackets) --
- filter window size; square if only one value is given
--m format : str {C or T} --
- format of input data; C -> covariance, T -> coherency
- (if C is given, data should not be multiplied by any constants)
--o prefix : str --
- prefix for output files [same as input prefix]
-
-Notes
------
-
-* Only one filename is needed if all files follow a convention such that::
-
- < S_HH S_HH* > --> hhhh *or* HHHH
- < S_HH S_VV* > --> hhvv *or* HHVV
-
-and so on for the six unique elements (upper tri) of the coherencey matrix C (aka C_3)
-(see next note for a list of required channels)
-
-* If all filenames are given, they should be in order hhhh, vvvv, hvhv, hhhv, hhvv, hvvv
-
-* If coherency matrix (T) form is chosen, all six unique elements (upper tri) must be given
-as separate files in order: t11, t22, t33, t12, t13, t23 (where t12 is first row, second
-column entry of T)
-
-* Input files are assumed to be headerless, single-precision (float) binary
-
-* Image width is only needed if -f is called
-
-References
-----------
-
-[1] Cloude, S. and Pottier, E., "An entropy based classification scheme for land applications of polarimetric SAR", *IEEE Trans. Geosci. Remote Sensing*, vol. 35, no. 1, pp. 68-78, Jan. 1997.
-
-[2] van Zyl, J. and Yunjin, K., *Synthetic Aperture Radar Polarimetry*, Wiley, Hoboken, NJ, 288 pages, 2011.
-
-"""
-from __future__ import print_function, division
-import sys,os
-import getopt
-import numpy as np
-from pysar.etc.excepts import InputError
-from pysar.polsar.decomp import decomp_haa
-from pysar.signal.boxfilter import boxcar2d
-
-###===========================================================================================
-
-def main(args):
- deco = FDdecomp(args)
- deco.read_data()
- deco.setup_data()
- deco.decomp()
- deco.write_data()
- print('Done with sardecomp_haa.py\n')
-
-###===========================================================================================
-class FDdecomp():
- def __init__(self,cargs):
- opts,args = getopt.gnu_getopt(cargs, 'c:f:o:m:')
-
- # set defaults
- self.outpref = None
- self.cols, self.filter_window = None, None
- fchoices = ['hhhh','vvvv','hvhv','hhhv','hhvv','hvvv']
- self.fnames, self.data = {}, {}
- self.matform = 'C'
- matformopts = ['C','c','T','t']
-
- # check filenames
- if len(args) != 1 and len(args) != 6:
- istr = 'Provide either 1 example filename or all 6 filenames. '
- istr += 'Number given = %d' % len(args)
- raise InputError(istr)
-
- # gather options
- for o,a in opts:
- if o == '-c':
- try: self.cols = np.int32(a)
- except: raise TypeError('argument for cols (-c) option must be convertable to int')
- elif o == '-f':
- flt = a.split(',')
- try: self.filter_window = [np.int32(x) for x in flt]
- except: raise TypeError('filter window dimensions must be convertable to int')
- elif o == '-o':
- self.outpref = a
- elif o == '-m':
- self.matform = a
- if self.matform not in matformopts:
- raise InputError('matform must be either C or T; %s given'%a)
- elif self.matform == 'c' or self.matform == 't':
- self.matform = self.matform.upper()
-
- if self.filter_window and not self.cols:
- raise InputError('option -c must be given with -f')
-
- if self.matform == 'T' and len(args) != 6:
- raise InputError('6 filenames must be given to use T matrix format; %s given' % str(len(args)))
-
- # get filenames
- if len(args) == 1:
- filesplit = None
- for x in fchoices:
- if x in args[0]:
- filesplit, upper = args[0].split(x), False
- break
- elif x.upper() in args[0]:
- filesplit, upper = args[0].split(x.upper()), True
- break
- if filesplit:
- for x in fchoices:
- if upper:
- self.fnames[x] = filesplit[0] + x.upper() + filesplit[1]
- else:
- self.fnames[x] = filesplit[0] + x + filesplit[1]
- else:
- istr = '%s does not match expected formatting...check input or' % args[0]
- istr += ' enter all filenames manually'
- raise InputError(istr)
- else:
- for i,x in enumerate(fchoices):
- self.fnames[x] = args[i]
-
- if not self.outpref:
- if 'HHHH' in self.fnames['hhhh']:
- self.outpref = '_'.join(self.fnames['hhhh'].split('HHHH'))
- else:
- self.outpref = '_'.join(self.fnames['hhhh'].split('hhhh'))
-
- if self.outpref[-1] != '.': self.outpref += '.'
-
- ###---------------------------------------------------------------------------------
- def read_data(self):
- rstr = 'Reading...'
- for k,v in self.fnames.iteritems():
- print("%s %s" % (rstr, v))
- try:
- fid = open(v,'r')
- if k == 'hhvv' or k == 'hvvv' or k == 'hhhv':
- self.data[k] = np.fromfile(fid,dtype=np.complex64)
- else:
- self.data[k] = np.fromfile(fid,dtype=np.float32)
- fid.close()
- except:
- raise IOError('cannot open file %s' % v)
- print('%s %s' % (rstr, 'Complete'))
-
- ###---------------------------------------------------------------------------------
- def setup_data(self):
- if self.filter_window:
- self._filter()
-
- ###---------------------------------------------------------------------------------
- def _filter(self):
- print('Filtering...')
- for key in self.data.keys():
- self.data[key] = self.data[key].reshape(-1,self.cols)
- self.data[key] = boxcar2d(data=self.data[key], window=self.filter_window)
- self.data[key] = self.data[key].flatten()
-
- ###---------------------------------------------------------------------------------
- def decomp(self):
- print('Decomposing')
- self.data['ent'], self.data['ani'], self.data['alp'] = decomp_haa(hhhh=self.data['hhhh'],
- vvvv=self.data['vvvv'], hvhv=self.data['hvhv'], hhhv=self.data['hhhv'],
- hhvv=self.data['hhvv'], hvvv=self.data['hvvv'], matform=self.matform)
-
- ###---------------------------------------------------------------------------------
- def write_data(self):
- wstr = 'Writing...'
- outputs = ['ent','ani','alp']
- for i in outputs:
- print("%s %s" % (wstr, i))
- fid = open(self.outpref + i,'w')
- self.data[i].tofile(fid)
- fid.close()
- print('%s %s' % (wstr, 'Complete'))
-
-###===========================================================================================
-if __name__ == '__main__':
- args = sys.argv[1:]
- if len(args) < 1:
- print(__doc__)
- sys.exit()
- main(args)
diff --git a/build/lib.macosx-10.10-x86_64-2.7/pysar/polsar/setup.py b/build/lib.macosx-10.10-x86_64-2.7/pysar/polsar/setup.py
deleted file mode 100644
index ca006c5..0000000
--- a/build/lib.macosx-10.10-x86_64-2.7/pysar/polsar/setup.py
+++ /dev/null
@@ -1,31 +0,0 @@
-from os.path import join
-import numpy as np
-import sys,os
-
-def configuration(parent_package='',top_path=None):
- from numpy.distutils.misc_util import Configuration
- config = Configuration('polsar', parent_package, top_path)
-
- npdir = np.get_include() + '/numpy'
- CFLAGS = ['-lm','-O2','-lpthread']
-
- config.add_library('pdpack',
- sources=['src/pdpack.cpp'],
- headers=['src/decomp.h'],
- extra_compile_args=CFLAGS)
- config.add_extension('_decomp_modc',
- sources=['src/decomp_modc.cpp'],
- depends=['src/decomp.h'],
- libraries=['pdpack'],
- library_dirs=[],
- include_dirs=[npdir,'src'],
- extra_compile_args=CFLAGS)
- return config
-
-if __name__ == '__main__':
- from distutils.dir_util import remove_tree
- from numpy.distutils.core import setup
- if os.path.exists('./build'):
- remove_tree('./build')
- setup(**configuration(top_path='').todict())
-
diff --git a/build/lib.macosx-10.10-x86_64-2.7/pysar/setup.py b/build/lib.macosx-10.10-x86_64-2.7/pysar/setup.py
deleted file mode 100644
index 10a64d9..0000000
--- a/build/lib.macosx-10.10-x86_64-2.7/pysar/setup.py
+++ /dev/null
@@ -1,18 +0,0 @@
-
-def configuration(parent_package='',top_path=None):
- from numpy.distutils.misc_util import Configuration
- config = Configuration('pysar',parent_package,top_path)
- config.add_subpackage('image')
- config.add_subpackage('insar')
- config.add_subpackage('math')
- config.add_subpackage('polsar')
- config.add_subpackage('signal')
- config.add_subpackage('utils')
- config.add_subpackage('plot')
- config.add_subpackage('etc')
- config.make_config_py()
- return config
-
-if __name__ == '__main__':
- from numpy.distutils.core import setup
- setup(**configuration(top_path='').todict())
diff --git a/build/lib.macosx-10.10-x86_64-2.7/pysar/signal/__init__.py b/build/lib.macosx-10.10-x86_64-2.7/pysar/signal/__init__.py
deleted file mode 100644
index 0a18882..0000000
--- a/build/lib.macosx-10.10-x86_64-2.7/pysar/signal/__init__.py
+++ /dev/null
@@ -1,68 +0,0 @@
-"""
-Signal (:mod:`pysar.signal`)
-============================
-
-1D and 2D signal processing routines
-
-.. currentmodule:: pysar.signal
-
-Functions
----------
-
-Boxcar filters (:mod:`pysar.signal.boxfilter`)
-^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-
-.. autosummary::
- :toctree: generated/
-
- boxcar1d 1D filter
- boxcar2d 2D filter
-
-Median filters (:mod:`pysar.signal.medfilter`)
-^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-
-.. autosummary::
- :toctree: generated/
-
- medfilt2d 2D median filter
-
-Butterworth filters (:mod:`pysar.signal.butters`)
-^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-
-.. autosummary::
- :toctree: generated/
-
- butter General Butterworth filter
- bandpass Bandpass Butterworth filter
- lowpass Lowpass Butterworth filter
- highpass Highpass Butterworth filter
-
-Specialty filters (:mod:`pysar.signal.special`)
-^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-
-.. autosummary::
- :toctree: generated/
-
- taper 1D cosine taper
- conefilter2d 2D cone-shaped filter
-
-Scripts
--------
-
-None
-"""
-
-import sys,os
-import numpy as np
-
-import boxfilter
-import medfilter
-import butters
-import special
-
-__all__ = ['boxfilter','medfilter','butters','special']
-
-from boxfilter import *
-from medfilter import *
-from butters import *
-from special import *
diff --git a/build/lib.macosx-10.10-x86_64-2.7/pysar/signal/_butter_bandpass.so b/build/lib.macosx-10.10-x86_64-2.7/pysar/signal/_butter_bandpass.so
deleted file mode 100755
index 1edcc2f..0000000
Binary files a/build/lib.macosx-10.10-x86_64-2.7/pysar/signal/_butter_bandpass.so and /dev/null differ
diff --git a/build/lib.macosx-10.10-x86_64-2.7/pysar/signal/_conefilt_modc.so b/build/lib.macosx-10.10-x86_64-2.7/pysar/signal/_conefilt_modc.so
deleted file mode 100755
index c240205..0000000
Binary files a/build/lib.macosx-10.10-x86_64-2.7/pysar/signal/_conefilt_modc.so and /dev/null differ
diff --git a/build/lib.macosx-10.10-x86_64-2.7/pysar/signal/_filter_modc.so b/build/lib.macosx-10.10-x86_64-2.7/pysar/signal/_filter_modc.so
deleted file mode 100755
index 2ac2717..0000000
Binary files a/build/lib.macosx-10.10-x86_64-2.7/pysar/signal/_filter_modc.so and /dev/null differ
diff --git a/build/lib.macosx-10.10-x86_64-2.7/pysar/signal/_medfilt_modc.so b/build/lib.macosx-10.10-x86_64-2.7/pysar/signal/_medfilt_modc.so
deleted file mode 100755
index d23bccb..0000000
Binary files a/build/lib.macosx-10.10-x86_64-2.7/pysar/signal/_medfilt_modc.so and /dev/null differ
diff --git a/build/lib.macosx-10.10-x86_64-2.7/pysar/signal/_xapiir.py b/build/lib.macosx-10.10-x86_64-2.7/pysar/signal/_xapiir.py
deleted file mode 100644
index 3133f41..0000000
--- a/build/lib.macosx-10.10-x86_64-2.7/pysar/signal/_xapiir.py
+++ /dev/null
@@ -1,82 +0,0 @@
-"""
-Routine to call xapirr
-
-Contents
---------
-callxapiir(data,nsamps,aproto,trbndw,a,iord,type,flo,fhi,ts,passes)
-
-"""
-from __future__ import print_function, division
-import numpy as np
-import _xapiir_sub
-
-__all__ = ['callxapiir']
-
-def callxapiir(data,nsamps,aproto,trbndw,a,iord,type,flo,fhi,ts,passes):
- """
- Call Fortran subroutine xapiir
-
- callxapiir(data,nsamps,aproto,trbndw,a,iord,type,flo,fhi,ts,passes)
-
- XAPIIR -- SUBROUTINE: IIR FILTER DESIGN AND IMPLEMENTATION
-
- AUTHOR: Dave Harris
-
- LAST MODIFIED: September 12, 1990
-
- ARGUMENTS:
- ----------
-
- DATA REAL NUMPY ARRAY CONTAINING SEQUENCE TO BE FILTERED
- ORIGINAL DATA DESTROYED, REPLACED BY FILTERED DATA
-
- NSAMPS NUMBER OF SAMPLES IN DATA
-
-
- APROTO CHARACTER*2 VARIABLE, CONTAINS TYPE OF ANALOG
- PROTOTYPE FILTER
- '(BU)TTER ' -- BUTTERWORTH FILTER
- '(BE)SSEL ' -- BESSEL FILTER
- 'C1 ' -- CHEBYSHEV TYPE I
- 'C2 ' -- CHEBYSHEV TYPE II
-
- TRBNDW TRANSITION BANDWIDTH AS FRACTION OF LOWPASS
- PROTOTYPE FILTER CUTOFF FREQUENCY. USED
- ONLY BY CHEBYSHEV FILTERS.
-
- A ATTENUATION FACTOR. EQUALS AMPLITUDE
- REACHED AT STOPBAND EDGE. USED ONLY BY
- CHEBYSHEV FILTERS.
-
- IORD ORDER (#POLES) OF ANALOG PROTOTYPE
- NOT TO EXCEED 10 IN THIS CONFIGURATION. 4 - 5
- SHOULD BE AMPLE.
-
- TYPE CHARACTER*2 VARIABLE CONTAINING FILTER TYPE
- 'LP' -- LOW PASS
- 'HP' -- HIGH PASS
- 'BP' -- BAND PASS
- 'BR' -- BAND REJECT
-
- FLO LOW FREQUENCY CUTOFF OF FILTER (HERTZ)
- IGNORED IF TYPE = 'LP'
-
- FHI HIGH FREQUENCY CUTOFF OF FILTER (HERTZ)
- IGNORED IF TYPE = 'HP'
-
- TS SAMPLING INTERVAL (SECONDS)
-
- PASSES INTEGER VARIABLE CONTAINING THE NUMBER OF PASSES
- 1 -- FORWARD FILTERING ONLY
- 2 -- FORWARD AND REVERSE (I.E. ZERO PHASE) FILTERING
-
- MAX_NT MAX DATA ARRAY SIZE
-
- """
-
- max_nt = nsamps
- origtype = data.dtype
- data = data.astype(np.float32)
- _xapiir_sub.xapiir(data,nsamps,aproto,trbndw,a,iord,type,flo,fhi,ts,passes,max_nt)
- data = data.astype(origtype)
- return data
diff --git a/build/lib.macosx-10.10-x86_64-2.7/pysar/signal/_xapiir_sub.so b/build/lib.macosx-10.10-x86_64-2.7/pysar/signal/_xapiir_sub.so
deleted file mode 100755
index e67c720..0000000
Binary files a/build/lib.macosx-10.10-x86_64-2.7/pysar/signal/_xapiir_sub.so and /dev/null differ
diff --git a/build/lib.macosx-10.10-x86_64-2.7/pysar/signal/boxfilter.py b/build/lib.macosx-10.10-x86_64-2.7/pysar/signal/boxfilter.py
deleted file mode 100644
index 56abe56..0000000
--- a/build/lib.macosx-10.10-x86_64-2.7/pysar/signal/boxfilter.py
+++ /dev/null
@@ -1,176 +0,0 @@
-"""
-Boxcar filter
-
-Functions
----------
-boxcar1d(data,window,null=None,nullset=None)
-boxcar2d(data,window,null=None,nullset=None,thread='auto',numthrd=8,tdthrsh=1e5)
-
-"""
-from __future__ import print_function, division
-import numpy as np
-import _filter_modc
-
-__all__ = ['boxcar1d','boxcar2d']
-
-def boxcar1d(data,window,null=None,nullset=None):
- """
- boxcar1d(data,window,null=None,nullset=None)
-
- 1d boxcar filter
-
- Parameters
- ----------
- data : array
- 1D array of data to be filtered
- window : int
- Filter window size in discrete points
- null : float or complex
- Null value in image. This creates an internal boolean array and
- replaces null values after filtering.
- nullset : float or complex
- Set given null value to zero before filtering and restore to original
- when filtering is complete. Only valid if null is provided.
-
- Output:
- -------
- D : array
- 1D array of filtered data
-
- """
-
- try:
- b = np.shape(data)[1]
- except:
- if len(data) < 2:
- ValueError('data is a scalar')
-
- if null != None:
- nuls = np.abs(data - null) < 3.e-7
- if nullset != None:
- data[nuls] = nullset
-
- if data.dtype == np.float32:
- data = _filter_modc.boxfilter1d(data.copy(),window)
- elif data.dtype == np.float64:
- data = _filter_modc.d_boxfilter1d(data.copy(),window)
- elif data.dtype == np.complex64:
- data.real = _filter_modc.boxfilter1d(data.real.copy(),window)
- data.imag = _filter_modc.boxfilter1d(data.imag.copy(),window)
- elif data.dtype == np.complex128:
- data.real = _filter_modc.d_boxfilter1d(data.real.copy(),window)
- data.imag = _filter_modc.d_boxfilter1d(data.imag.copy(),window)
- else:
- print('Unsupported data type, defaulting to float32')
- print('Consider swithing to float32/float64 or complex64/complex128 before calling the filter\n')
- dtyp = data.dtype
- data = data.astype(np.float32)
- data = _filter_modc.boxfilter1d(data.copy(),window)
- data = data.astype(dtyp)
-
- if null != None:
- data[nuls] = null
-
- return data
-
-###=============================================================================
-def boxcar2d(data,window,null=None,nullset=None,thread='auto',numthrd=8,tdthrsh=1e5):
- """
- boxcar2d(data,window,null=None,nullset=None,thread='auto',numthrd=8,tdthrsh=1e5)
-
- 2d boxcar filter
-
- Parameters
- ----------
- data : array
- 2D array of data to be filtered
- window : int or list
- Filter window size in discrete points
- scalar values use a square window
- lists should be in order [across, down]
- null : float or complex
- Null value in image. This creates an internal boolean array and
- replaces null values after filtering.
- nullset : float or complex
- Set given null value to nullset before filtering and restore to original
- when filtering is complete. Only valid if null is provided.
- thread : string
- Multi-threading options: ['yes','no','auto']. 'auto' decides based on
- the size of data array
- numthrd : int
- Number of threads. Only valid if thread != 'no'
- tdthrsh : int
- Threshold for 'auto' threading. Filter is threaded if
- number of elements in data > tdthrsh
-
- Output:
- -------
- D : array
- 2D array of filtered data
-
- """
-
- try:
- b = len(window)
- if b == 1:
- d0, d1 = np.int32(window[0]), np.int32(window[0])
- elif b == 2:
- d0, d1 = np.int32(window[0]), np.int32(window[1])
- else:
- raise ValueError('Window must be a list [across,down], [across], or a scalar')
- except:
- d0, d1 = np.int32(window), np.int32(window)
-
- if null != None:
- nuls = np.abs(data - null) < 3.e-7
- if nullset != None:
- data[nuls] = nullset
-
- shp = np.shape(data)
- data = data.flatten()
- dtyp = data.dtype
-
- threadit = False
- if thread == 'yes':
- threadit = True
- elif thread == 'auto' and len(data) > tdthrsh:
- threadit = True
-
- if data.dtype == np.float32 and threadit:
- data = _filter_modc.tr_boxfilter2d(data.copy(),shp[1],d0,d1,numthrd)
- elif data.dtype == np.float32:
- data = _filter_modc.boxfilter2d(data.copy(),shp[1],d0,d1)
- elif data.dtype == np.float64 and threadit:
- data = _filter_modc.dtr_boxfilter2d(data.copy(),shp[1],d0,d1,numthrd)
- elif data.dtype == np.float64:
- data = _filter_modc.d_boxfilter2d(data.copy(),shp[1],d0,d1)
- elif data.dtype == np.complex64 and threadit:
- data.real = _filter_modc.tr_boxfilter2d(data.real.copy(),shp[1],d0,d1,numthrd)
- data.imag = _filter_modc.tr_boxfilter2d(data.imag.copy(),shp[1],d0,d1,numthrd)
- elif data.dtype == np.complex64:
- data.real = _filter_modc.boxfilter2d(data.real.copy(),shp[1],d0,d1)
- data.imag = _filter_modc.boxfilter2d(data.imag.copy(),shp[1],d0,d1)
- elif data.dtype == np.complex128 and threadit:
- data.real = _filter_modc.dtr_boxfilter2d(data.real.copy(),shp[1],d0,d1,numthrd)
- data.imag = _filter_modc.dtr_boxfilter2d(data.imag.copy(),shp[1],d0,d1,numthrd)
- elif data.dtype == np.complex128:
- data.real = _filter_modc.d_boxfilter2d(data.real.copy(),shp[1],d0,d1)
- data.imag = _filter_modc.d_boxfilter2d(data.imag.copy(),shp[1],d0,d1)
- else:
- print('Unsupported data type, defaulting to float32')
- print('Consider switching to float32/float64 or complex64/complex128 before calling the filter\n')
- dtyp = data.dtype
- data = data.astype(np.float32)
- if threadit:
- data = _filter_modc.tr_boxfilter2d(data.copy(),shp[1],d0,d1,numthrd)
- else:
- data = _filter_modc.boxfilter2d(data.copy(),shp[1],d0,d1)
- data = data.astype(dtyp)
-
- data = data.reshape(shp)
- if null != None:
- data[nuls] = null
-
- return data
-
-###=============================================================================
diff --git a/build/lib.macosx-10.10-x86_64-2.7/pysar/signal/butters.py b/build/lib.macosx-10.10-x86_64-2.7/pysar/signal/butters.py
deleted file mode 100644
index fcbbc6c..0000000
--- a/build/lib.macosx-10.10-x86_64-2.7/pysar/signal/butters.py
+++ /dev/null
@@ -1,247 +0,0 @@
-"""
-Butterworth filtering routines
-
-Contents
---------
-butter(data,low,high,dt=None,df=None,order=4,zero_phase=False) : General Butterworth filter
-bandpass(data,low,high,dt=None,df=None,order=4,zero_phase=False) : Bandpass
-bandreject(data,low,high,dt=None,df=None,order=4,zero_phase=False) : Bandreject
-lowpass(data,high,dt=None,df=None,order=4,zero_phase=False) : Lowpass
-highpass(data,high,dt=None,df=None,order=4,zero_phase=False) : Highpass
-
-taper(data,percent) : Basic cosine taper
-
-"""
-from __future__ import print_function, division
-import numpy as np
-from _xapiir import callxapiir
-from special import taper
-
-__all__ = ['taper', 'butter','bandpass','bandreject','lowpass','highpass']
-
-###===================================================================================
-def butter(data,low=None,high=None,dt=None,df=None,order=4,zero_phase=False,reject=False):
- """
- Butterworth filter
-
- butter(data,low=None,high=None,dt=None,df=None,order=4,zero_phase=False,reject=False)
-
- Parameters
- ----------
- data : array
- input data vector (real-valued)
- low : float
- min frequency in passband [Hz] (default = None --> lowpass filter)
- high : float
- max frequency in passband [Hz] (default = None --> highpass filter)
- dt : float
- sampling interval [sec]
- df : float
- sampling frequency [Hz]
- order : int
- filter order (default = 4; max = 10)
- zero_phase: bool
- True to run the filter fwd and rev for 0 phase shift (default = False)
- reject : bool
- True initializes a band reject instead of bandpass filter (default = False)
-
- Output
- ------
- F : array {same size and type as data}
- filtered data
-
- Notes
- -----
- * dt or df must be defined (dt has priority)
- * low and/or high must be defined
- - if only low is defined, highpass filter is applied
- - if only high is defined, lowpass filter is applied
- - if low and high are defined, bandpass filter is applied unless reject==True
- * if reject == True, both high and low must be defined
-
- """
-
- tp = 'BP'
- passes = 1
- nsamps = len(data)
-
- if not dt and not df: raise ValueError("dt or df must be defined")
- if not low and not high: raise ValueError("low and/or high must be defined")
- if not nsamps > 1: raise ValueError("data is a scalar")
-
- if dt is None: dt = 1./df
- if zero_phase: passes = 2
- if reject:
- if not low or not high:
- raise ValueError('low and high must be defined for bandreject')
- tp = 'BR'
-
- if low and not high:
- tp, high = 'HP', 1.
- elif not low and high:
- tp, low = 'LP', 1.
-
- data = callxapiir(data,nsamps,'BU',0.,0.,order,tp,low,high,dt,passes)
- return data
-
-###===================================================================================
-def bandpass(data,low,high,dt=None,df=None,order=4,zero_phase=False):
- """
- Butterworth bandpass filter
-
- bandpass(data,low,high,dt=None,df=None,order=4,zero_phase=False)
-
- Parameters
- ----------
- data : array
- input data vector (real-valued)
- low : float
- min frequency in passband [Hz] (default = None --> lowpass filter)
- high : float
- max frequency in passband [Hz] (default = None --> highpass filter)
- dt : float
- sampling interval [sec]
- df : float
- sampling frequency [Hz]
- order : int
- filter order (default = 4; max = 10)
- zero_phase: bool
- True to run the filter fwd and rev for 0 phase shift (default = False)
-
- Output
- ------
- F : array {same size and type as data}
- filtered data
-
- Notes
- -----
- * dt or df must be defined (dt has priority)
-
- """
-
- if not low or not high: raise ValueError('low and high must be defined for bandpass')
- return butter(data=data,low=low,high=high,dt=dt,df=df,order=order,zero_phase=zero_phase)
-
-###===================================================================================
-def lowpass(data,high,dt=None,df=None,order=4,zero_phase=False):
- """
- Butterworth lowpass filter
-
- butter.lowpass(data,high,dt=None,df=None,order=4,zero_phase=False)
-
- Parameters
- ----------
- data : array
- input data vector (real-valued)
- high : float
- max frequency in passband [Hz]
- dt : float
- sampling interval [sec]
- df : float
- sampling frequency [Hz]
- order : int
- filter order (default = 4; max = 10)
- zero_phase: bool
- True to run the filter fwd and rev for 0 phase shift (default = False)
-
- Output
- ------
- F : array {same size and type as data}
- filtered data
-
- Notes
- -----
- * dt or df must be defined (dt has priority)
-
- """
- if not high: raise ValueError('high must be defined for lowpass filter')
- return butter(data=data,high=high,dt=dt,df=df,order=order,zero_phase=zero_phase)
-
-###===================================================================================
-def highpass(data,low,dt=None,df=None,order=4,zero_phase=False):
- """
- Butterworth highpass filter
-
- highpass(data,low,dt=None,df=None,order=4,zero_phase=False)
-
- Parameters
- ----------
- data : array
- input data vector (real-valued)
- low : float
- min frequency in passband [Hz]
- dt : float
- sampling interval [sec]
- df : float
- sampling frequency [Hz]
- order : int
- filter order (default = 4; max = 10)
- zero_phase: bool
- True to run the filter fwd and rev for 0 phase shift (default = False)
-
- Output
- ------
- F : array {same size and type as data}
- filtered data
-
- Notes
- -----
- * dt or df must be defined (dt has priority)
-
- """
-
- if not low: raise ValueError('low must be defined for highpass filter')
- return butter(data=data,low=low,dt=dt,df=df,order=order,zero_phase=zero_phase)
-
-###===================================================================================
-def bandreject(data,low,high,dt=None,df=None,order=4,zero_phase=False):
- """
- Butterworth bandreject filter
-
- bandreject(data,low,high,dt=None,df=None,order=4,zero_phase=False)
-
- Parameters
- ----------
- data : array
- input data vector (real-valued)
- low : float
- min frequency in passband [Hz] (default = None --> lowpass filter)
- high : float
- max frequency in passband [Hz] (default = None --> highpass filter)
- dt : float
- sampling interval [sec]
- df : float
- sampling frequency [Hz]
- order : int
- filter order (default = 4; max = 10)
- zero_phase: bool
- True to run the filter fwd and rev for 0 phase shift (default = False)
-
- Output
- ------
- F : array {same size and type as data}
- filtered data
-
- Notes
- -----
- * dt or df must be defined (dt has priority)
- * low and/or high must be defined
- - if only low is defined, highpass filter is applied
- - if only high is defined, lowpass filter is applied
- - if low and high are defined, bandpass filter is applied unless reject==True
- * if reject == True, both high and low must be defined
-
- """
-
- if not low and not high:
- raise ValueError('low and high must be defined for bandreject')
- data = butter(data=data,low=low,high=high,dt=dt,df=df,order=order,
- zero_phase=zero_phase,reject=True)
- return data
-
-
-
-
-
-
-
diff --git a/build/lib.macosx-10.10-x86_64-2.7/pysar/signal/conefilter.py b/build/lib.macosx-10.10-x86_64-2.7/pysar/signal/conefilter.py
deleted file mode 100644
index 6a49d2d..0000000
--- a/build/lib.macosx-10.10-x86_64-2.7/pysar/signal/conefilter.py
+++ /dev/null
@@ -1,105 +0,0 @@
-"""
-Cone filter
-
-Functions
----------
-
-conefilter2d(data,window,null=None)
-"""
-from __future__ import print_function, division
-import numpy as np
-from pysar.signal import _conefilt_modc
-
-__all__ = ['conefilter2d']
-
-def conefilter2d(data,window,dx=1.,dy=1.,null=None,numthrd=8):
- '''
- conefilter2d(data,window,dx=1.,dy=1.,null=None)
-
- 2d cone filter
-
- Parameters
- ----------
- data : 2d array
- array to be filtered
- window : float or 2d array
- window size for filter in same units as dx. 2d array must be same size as data.
-
- Options
- -------
- dx : float
- spacing along x-axis
- dy : float
- same as dx but for y-axis
- null : float
- null value to exclude from filter [None]
- numthrd : int
- number of pthreads [8]
-
- Return
- ------
- data : 2d array
- filtered data; same size and shape as input
- '''
- if len(np.shape(data)) != 2:
- raise ValueError('input data must be 2d array')
- try:
- if len(np.shape(window)) == 2 and np.shape(window) != np.shape(data):
- raise ValueError('2d array window must be same size as data array')
- else:
- winarr = window
- except:
- winarr = np.empty_like(data)
- winarr.fill(window)
-
- nanmask = np.isnan(data)
- anynan = np.any(nanmask)
- if not anynan:
- del nanmask
-
- infmask = np.isinf(data)
- anyinf = np.any(infmask)
- if not anyinf:
- del infmask
-
- if null is not None:
- if anynan:
- data[nanmask] = null
- if anyinf:
- data[infmask] = null
- nullmask = np.abs(data - null) < 1.e-7
- anynull = np.any(nullmask)
- if not anynull:
- del nullmask
- else:
- anynull = False
- null = -1.e9
- if anynan:
- data[nanmask] = null
- if anyinf:
- data[infmask] = null
-
- drows, dcols = np.shape(data)
- winarr = winarr.flatten()
- data = data.flatten()
- dtyp = data.dtype
-
- if data.dtype == np.float32:
- dx,dy,null = np.float32(dx), np.float32(dy), np.float32(null)
- if winarr.dtype != dtyp:
- winarr = winarr.astype(dtyp)
- data = _conefilt_modc.fconefilt2d(data.copy(),winarr,dcols,dx,dy,null,numthrd)
- else:
- raise NotImplementedError('only single precision is currently implemented')
-
- data = data.reshape(drows,dcols)
- if anynull:
- data[nullmask] = null
- if anynan:
- data[nanmask] = np.nan
- if anyinf:
- data[infmask] = np.inf
-
- return data
-
-
diff --git a/build/lib.macosx-10.10-x86_64-2.7/pysar/signal/medfilter.py b/build/lib.macosx-10.10-x86_64-2.7/pysar/signal/medfilter.py
deleted file mode 100644
index 5f86a61..0000000
--- a/build/lib.macosx-10.10-x86_64-2.7/pysar/signal/medfilter.py
+++ /dev/null
@@ -1,93 +0,0 @@
-"""
-Median filters
-
-Functions
----------
-
-medfilter2d(data,window,null=None)
-"""
-from __future__ import print_function, division
-import numpy as np
-from pysar.signal import _medfilt_modc
-
-__all__ = ['medfilter2d','medfilt2d']
-
-def medfilt2d(data,window,null=None,numthrd=8):
- '''
- medfilt2d(data,window,null=None,numthrd=8)
-
- 2d median filter
-
- Parameters
- ----------
- data : 2d array
- array to be filtered
- window : int or 2-element array-like (x,y)
- window size for filter. If int, window is square.
- null : float
- null value to exclude from filter [None]
- numthrd : int
- number of pthreads [8]
-
- Return
- ------
- data : 2d array
- filtered data; same size and shape as input
- '''
- return medfilter2d(data=data,window=window,null=null,numthrd=numthrd)
-
-def medfilter2d(data,window,null=None,numthrd=8):
- '''
- medfilter2d(data,window,null=None,numthrd=8)
-
- 2d median filter
-
- Parameters
- ----------
- data : 2d array
- array to be filtered
- window : int or 2-element array-like (x,y)
- window size for filter. If int, window is square.
- null : float
- null value to exclude from filter [None]
- numthrd : int
- number of pthreads [8]
-
- Return
- ------
- data : 2d array
- filtered data; same size and shape as input
- '''
- if len(np.shape(data)) != 2:
- raise ValueError('input data must be 2d array')
- try:
- if len(np.shape(window)) == 2:
- winx = int(window[0])
- winy = int(window[1])
- elif len(np.shape(window)) == 1:
- winx = int(window[0])
- winy = winx
- else:
- raise ValueError('unsupported window size %d' % (len(window)))
- except TypeError:
- winx = int(window)
- winy = winx
-
- if null is None:
- nullv = -np.finfo(type(data[0][0])).max
- else:
- nullv = type(data[0][0])(null)
-
- drows, dcols = np.shape(data)
- data = data.flatten()
-
- if data.dtype == np.float32:
- data = _medfilt_modc.f_medfilt2d(data.copy(),dcols,winx,winy,nullv,numthrd)
- elif data.dtype == np.float64:
- data = _medfilt_modc.d_medfilt2d(data.copy(),dcols,winx,winy,nullv,numthrd)
- else:
- raise TypeError('%s is not a supported data type' % (str(data.dtype)))
-
- return data.reshape(drows,dcols)
-
-
diff --git a/build/lib.macosx-10.10-x86_64-2.7/pysar/signal/setup.py b/build/lib.macosx-10.10-x86_64-2.7/pysar/signal/setup.py
deleted file mode 100644
index dada2df..0000000
--- a/build/lib.macosx-10.10-x86_64-2.7/pysar/signal/setup.py
+++ /dev/null
@@ -1,97 +0,0 @@
-import sys,os
-import numpy as np
-
-# cythoncodes = list of tuples with format (source_without_ext, include_dirs_list)
-cythoncodes = [('filtermod',[])]
-CFLAGS = ['-lm','-O2','-lpthread','-fPIC']
-cythcompiler = 'gcc'
-
-def cythonize():
- try:
- from Cython.Compiler.Main import CompilationOptions, default_options, \
- compile, PyrexError
- from Cython.Compiler import Options
- import subprocess
-
- for code in cythoncodes:
- source = code[0] + '.pyx'
- options = CompilationOptions(default_options)
- options.output_file = code[0] + '.c'
- options.include_path = code[1]
- Options.generate_cleanup_code = 3
- any_failures = False
- try:
- result = compile(source, options)
- if result.num_errors > 0:
- any_failures = True
- if not any_failures:
- callist = [cythcompiler,'-shared','-fwrapv','-Wall','-fno-strict-aliasing']
- for x in CFLAGS:
- callist.append(x)
- for x in code[1]:
- callist.append('-L' + x)
- callist.append('-o')
- callist.append('_' + code[0] + '.so')
- callist.append(code[0] + '.c')
- subprocess.call(callist)
- except (EnvironmentError, PyrexError):
- e = sys.exc_info()[1]
- sys.stderr.write(str(e) + '\n')
- any_failures = True
- if any_failures:
- try: os.remove(code[0] + '.c')
- except OSError: pass
- except:
- raise ValueError
-
-def configuration(parent_package='',top_path=None):
- from numpy.distutils.misc_util import Configuration
- config = Configuration('signal', parent_package, top_path)
-
- CFLAGS = ['-lm','-O2','-lpthread','-fPIC']
- npdir = np.get_include() + '/numpy'
- config.add_extension('_filter_modc',sources=['filter_modules/filter_modc.cpp'],
- libraries=[],
- library_dirs=[],
- include_dirs=[npdir],
- extra_compile_args=CFLAGS)
- config.add_library('conefiltpack',
- sources=['filter_modules/conefilt.cpp'],
- headers=['filter_modules/conefilt.h'],
- extra_compile_args=CFLAGS)
- config.add_extension('_conefilt_modc',sources=['filter_modules/conefilt_modc.cpp'],
- depends=['filter_modules/conefilt.h'],
- libraries=['conefiltpack'],
- library_dirs=[],
- include_dirs=[npdir,'filter_modules'],
- extra_compile_args=CFLAGS)
- config.add_library('medfiltpack',
- sources=['filter_modules/medfilt.cpp'],
- headers=['filter_modules/medfilt.h'],
- extra_compile_args=CFLAGS)
- config.add_extension('_medfilt_modc',sources=['filter_modules/medfilt_modc.cpp'],
- depends=['filter_modules/medfilt.h'],
- libraries=['medfiltpack'],
- library_dirs=[],
- include_dirs=[npdir,'filter_modules'],
- extra_compile_args=CFLAGS)
- config.add_extension('_xapiir_sub',sources=['filter_modules/xapiir_sub.f'],
- libraries=[],
- library_dirs=[],
- include_dirs=[],
- extra_compile_args=['-O3'])
- config.add_extension('_butter_bandpass',sources=['filter_modules/butter_bandpass.f'],
- libraries=[],
- library_dirs=[],
- include_dirs=[],
- extra_compile_args=['-O3'])
- return config
-
-if __name__ == '__main__':
- from distutils.dir_util import remove_tree
- from numpy.distutils.core import setup
- if os.path.exists('./build'):
- remove_tree('./build')
- cythonize()
- setup(**configuration(top_path='').todict())
-
diff --git a/build/lib.macosx-10.10-x86_64-2.7/pysar/signal/special.py b/build/lib.macosx-10.10-x86_64-2.7/pysar/signal/special.py
deleted file mode 100644
index 6b6f5e7..0000000
--- a/build/lib.macosx-10.10-x86_64-2.7/pysar/signal/special.py
+++ /dev/null
@@ -1,52 +0,0 @@
-"""
-Specialty filtering routines
-
-Contents
---------
-
-taper(data,percent) : Basic cosine taper
-conefilter2d(data,window,null=None) : Cone-shaped filter
-
-"""
-from __future__ import print_function, division
-import numpy as np
-import conefilter
-from conefilter import *
-
-__all__ = ['taper','conefilter'] + conefilter.__all__
-
-###===================================================================================
-def taper(data,percent=3):
- """
- Cosine taper
-
- taper(data,percent)
-
- Parameters
- ----------
- data : array
- Input data
- percent : float
- Percent of len(data) to taper (%)
-
- Outputs
- --------
- F : array
- Tapered data
-
- """
-
- if not len(data) > 1: raise ValueError('data is a scalar')
- if not percent >= 0: raise ValueError('percent must be >= 0')
-
- n = np.int32(len(data)*percent/100.)
- if n == 0: return data
-
- theta = np.linspace(np.pi,2.*np.pi,n)
- taper = 0.5*(np.cos(theta)+1)
- data[:n] *= taper
- data[-n:] *= taper[::-1]
- return data
-
-
-
diff --git a/build/lib.macosx-10.10-x86_64-2.7/pysar/utils/__init__.py b/build/lib.macosx-10.10-x86_64-2.7/pysar/utils/__init__.py
deleted file mode 100644
index 3e8b739..0000000
--- a/build/lib.macosx-10.10-x86_64-2.7/pysar/utils/__init__.py
+++ /dev/null
@@ -1,56 +0,0 @@
-'''
-Utils (:mod:`pysar.utils`)
-==========================
-
-.. currentmodule:: pysar.utils
-
-Functions
----------
-
-SAR-specific tools (:mod:`pysar.utils.sartools`)
-^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-
-.. autosummary::
- :toctree: generated/
-
- inc2range Computes range bin for a given incidence angle
- range2inc Computes incidence angle for a given range bin
- alpha_hh HH Bragg scattering coefficient for an untilted plane
- alpha_vv VV Bragg scattering coefficient for an untilted plane
-
-General tools (:mod:`pysar.utils.gen_tools`)
-^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-
-.. autosummary::
- :toctree: generated/
-
- d2r Degrees to radians
- r2d Radians to degrees
- acosd Return arccos in degrees
- asind Return arcsin in degrees
- cosd cos([degrees])
- sind sin([degrees])
- iscomplex Test for complex values
- anycomplex Tests for any complex values in an array
- allcomplex Tests for all complex values in an array
- typecomplex Tests for any valid type of complex value
-
-Geographic tools (:mod:`pysar.utils.geo_tools`)
-^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-
-.. autosummary::
- :toctree: generated/
-
- radius_lat Planet radius at latitude
-
-Scripts
--------
-
-None
-'''
-import sys,os
-import numpy as np
-from gen_tools import *
-from geo_tools import *
-from sartools import *
-
diff --git a/build/lib.macosx-10.10-x86_64-2.7/pysar/utils/gen_tools.py b/build/lib.macosx-10.10-x86_64-2.7/pysar/utils/gen_tools.py
deleted file mode 100644
index 9ecfd84..0000000
--- a/build/lib.macosx-10.10-x86_64-2.7/pysar/utils/gen_tools.py
+++ /dev/null
@@ -1,97 +0,0 @@
-'''
-General tools
-'''
-from __future__ import print_function, division
-import sys,os
-import numpy as np
-import numpy.core.numeric as _nx
-from math import pi
-
-__all__ = ['d2r','r2d','acosd','arccosd','asind','arcsind','cosd','sind',
- 'iscomplex','anycomplex','allcomplex','typecomplex']
-###---------------------------------------------------------------------------------------------
-def is_power2(n):
- '''
- Test if n is a power of 2
- '''
- try:
- check = isinstance(n,(int,long))
- except NameError:
- check = isinstance(n,int)
- if not check:
- return False
- else:
- return n != 0 and n & n-1 == 0
-
-###---------------------------------------------------------------------------------------------
-def d2r(n):
- """
- degrees to radians
- """
- return n*pi/180.
-###---------------------------------------------------------------------------------------------
-def r2d(n):
- """
- radians to degrees
- """
- return n*180./pi
-###---------------------------------------------------------------------------------------------
-def acosd(n):
- """
- t [degrees] = arccos(n)
- """
- return r2d(np.arccos(n))
-def arccosd(n):
- """
- t [degrees] = arccos(n)
- """
- return acosd(n)
-###---------------------------------------------------------------------------------------------
-def asind(n):
- """
- t [degrees] = arcsin(n)
- """
- return r2d(np.arcsin(n))
-def arcsind(n):
- """
- t [degrees] = arcsin(n)
- """
- return asind(n)
-###---------------------------------------------------------------------------------------------
-def cosd(n):
- """
- t = cos(n [degrees])
- """
- return np.cos(d2r(n))
-###---------------------------------------------------------------------------------------------
-def sind(n):
- """
- t = sin(n [degrees])
- """
- return np.sin(d2r(n))
-
-###---------------------------------------------------------------------------------------------
-def iscomplex(n):
- """Tests for complexity...returns np.iscomplex(n)
- """
- return np.iscomplex(n)
-
-###---------------------------------------------------------------------------------------------
-
-def anycomplex(n):
- """ Tests for any complexity
- """
- return np.any(np.iscomplex(n))
-
-###---------------------------------------------------------------------------------------------
-def allcomplex(n):
- """ Tests for all complexity
- """
- return np.all(np.iscomplex(n))
-
-###---------------------------------------------------------------------------------------------
-def typecomplex(n):
- """ tests for any type complex
- """
- nx = _nx.asanyarray(n)
- return issubclass(nx.dtype.type, _nx.complexfloating)
diff --git a/build/lib.macosx-10.10-x86_64-2.7/pysar/utils/geo_tools.py b/build/lib.macosx-10.10-x86_64-2.7/pysar/utils/geo_tools.py
deleted file mode 100644
index 7850252..0000000
--- a/build/lib.macosx-10.10-x86_64-2.7/pysar/utils/geo_tools.py
+++ /dev/null
@@ -1,25 +0,0 @@
-'''
-Geo tools
-'''
-from __future__ import print_function, division
-import sys,os
-import numpy as np
-
-__all__ = ['radius_lat']
-
-def radius_lat(latitude,a=6378.137,b=6356.7523):
- '''
- Calculate the radius of a planet at a given latitude
-
- Parameters
- ----------
- latitude : float or array-like
- Geodetic latitude in degrees
- a,b : float
- semi-major and semi-minor axis [Earth values]
- '''
- d2r = np.pi/180.
- cosl = np.cos(latitude*d2r)
- sinl = np.sin(latitude*d2r)
- rad = np.sqrt(((a**2*cosl)**2 + (b**2*sinl)**2)/((a*cosl)**2 + (b*sinl)**2))
- return rad
diff --git a/build/lib.macosx-10.10-x86_64-2.7/pysar/utils/sartools.py b/build/lib.macosx-10.10-x86_64-2.7/pysar/utils/sartools.py
deleted file mode 100644
index af0a07b..0000000
--- a/build/lib.macosx-10.10-x86_64-2.7/pysar/utils/sartools.py
+++ /dev/null
@@ -1,163 +0,0 @@
-'''
-SAR-specific tools
-'''
-from __future__ import print_function, division
-import numpy as np
-from gen_tools import *
-
-__all__ = ['inc2range','range2inc','alpha_hh','alpha_vv']
-###---------------------------------------------------------------------------------------------
-def inc2range(inc,h=12495.,rho_0=13450.4278,Re=6371000.,xlook=3.,xspace=1.665514,units='deg'):
- """
- inc2range(inc, h=12495., rho_0=13450.4278, Re=6371000., xlook=3., xspace=1.665514, units='deg')
-
- Computes range bin for a given incidence angle
-
- Parameters
- ----------
- inc : float
- incidence angle in units
- h : float
- platform altitude in meters [12495.0]
- rho_0 : float
- distance to first range bin in meters [13450.4278]
- Re : float
- Earth radius in meters [6.371e6]
- xlook : int
- number of range looks [3]
- xspace : float
- single-look range pixel spacing in meters [1.665514]
- units : str
- incidence angle units: {'deg' or 'rad'} ['deg']
-
- """
- if not h > 0: raise ValueError('platform altitude must be > 0')
- if not rho_0 > 0: raise ValueError('rho_0 must be > 0')
- if not Re > 0: raise ValueError("Earth's radius must be > 0")
- if not xlook > 0: raise ValueError("xlook must be > 0")
- if not xspace > 0: raise ValueError("xspace must be > 0")
-
- if 'deg' in units:
- inc = d2r(inc)
- phi = inc + np.pi
- rho = Re*np.cos(phi) + np.sqrt( (np.cos(phi)**2 - 1)*Re**2 + (h+Re)**2 )
- return np.int64(np.round((rho-rho_0)/(xlook*xspace)))
-
-###---------------------------------------------------------------------------------------------
-def range2inc(r,h=12495.,rho_0=13450.4278,Re=6371000.,xlook=3.,xspace=1.665514,units='deg'):
- """
- range2inc(r,h=12495.,rho_0=13450.4278,Re=6371000.,xlook=3.,xspace=1.665514,units='deg')
-
- Computes incidence angle for a given range bin
-
- Parameters
- ----------
- r : int
- range bin
- h : float
- platform altitude in meters [12495.0]
- rho_0 : float
- distance to first range bin in meters [13450.4278]
- Re : float
- Earth radius in meters [6.371e6]
- xlook : int
- number of range looks [3]
- xspace : float
- single-look range pixel spacing in meters [1.665514]
- units : str
- incidence angle units: {'deg' or 'rad'} ['deg']
-
- Output
- ------
- inc : float
- incidence angle [units]
- """
- if not r > 0: raise ValueError('r must be > 0')
- if not h > 0: raise ValueError('platform altitude must be > 0')
- if not rho_0 > 0: raise ValueError('rho_0 must be > 0')
- if not Re > 0: raise ValueError("Earth's radius must be > 0")
- if not xlook > 0: raise ValueError("xlook must be > 0")
- if not xspace > 0: raise ValueError("xspace must be > 0")
-
- rho = rho_0 + r * xlook * xspace
- inc = np.pi - np.arccos((-(h + Re)**2 + rho**2 + Re**2)/(2*rho*Re))
- if 'deg' in units:
- inc = r2d(inc)
- return inc
-
-###---------------------------------------------------------------------------------------------
-def alpha_hh(eps,theta,units='deg'):
- """
- alpha_hh(eps, theta, units='deg')
-
- HH Bragg scattering coefficient for an untilted plane
-
- alpha_hh = (cos(theta) - sqr)/(cos(theta) + sqr)
-
- where sqr = sqrt(eps - sin^2(theta)).
-
- Parameters
- ----------
- eps : complex, float, or ndarray
- relative permittivity (dielectric constant)
- theta : complex, float, or ndarray
- incidence angle in units
- units : str
- incidence angle units: {'deg' or 'rad'} ['deg']
-
- Output
- ------
- alpha : complex, float, or ndarray (depending on eps and theta)
- Bragg coefficient
-
- Notes
- -----
- * If both eps and theta are arrays, they must have the same shape. Output will be element-wise.
-
- """
- if 'rad' in units:
- theta *= 180/np.pi
- ci = cosd(theta)
- sis = (sind(theta))**2
- sqr = np.sqrt(eps - sis)
- return (ci - sqr)/(ci + sqr)
-
-###---------------------------------------------------------------------------------------------
-def alpha_vv(eps,theta,units='deg'):
- """
- alpha_vv(eps,theta,units='deg')
-
- VV Bragg scattering coefficient for an untilted plane
-
- alpha_vv = (eps - 1.)*(sis - eps*(1+sis))/(eps*ci + sqr)**2
-
- where sqr = sqrt(eps - sin^2(theta)), ci = cosd(theta), sis = sind^2(theta).
-
- Parameters
- ----------
- eps : complex, float, or ndarray
- relative permittivity (dielectric constant)
- theta : complex, float, or ndarray
- incidence angle in units
- units : str
- incidence angle units: {'deg' or 'rad'} ['deg']
-
- Output
- ------
- alpha : complex, float, or ndarray (depending on eps and theta)
- Bragg coefficient
-
- Notes
- -----
- * If both eps and theta are arrays, they must have the same shape. Output will be element-wise.
-
- """
- if 'rad' in units:
- theta *= 180/np.pi
- ci = cosd(theta)
- sis = (sind(theta))**2
- sqr = np.sqrt(eps - sis)
- return (eps - 1.)*(sis - eps*(1+sis))/(eps*ci + sqr)**2
-
-
-###---------------------------------------------------------------------------------------------
diff --git a/build/lib.macosx-10.10-x86_64-2.7/pysar/utils/setup.py b/build/lib.macosx-10.10-x86_64-2.7/pysar/utils/setup.py
deleted file mode 100644
index a423094..0000000
--- a/build/lib.macosx-10.10-x86_64-2.7/pysar/utils/setup.py
+++ /dev/null
@@ -1,14 +0,0 @@
-import sys,os
-
-def configuration(parent_package='',top_path=None):
- from numpy.distutils.misc_util import Configuration
- config = Configuration('utils', parent_package, top_path)
- return config
-
-if __name__ == '__main__':
- from distutils.dir_util import remove_tree
- from numpy.distutils.core import setup
- if os.path.exists('./build'):
- remove_tree('./build')
- setup(**configuration(top_path='').todict())
-
diff --git a/build/lib.macosx-10.10-x86_64-2.7/pysar/version.py b/build/lib.macosx-10.10-x86_64-2.7/pysar/version.py
deleted file mode 100644
index b98d003..0000000
--- a/build/lib.macosx-10.10-x86_64-2.7/pysar/version.py
+++ /dev/null
@@ -1,33 +0,0 @@
-"""
- ~~~ PySAR ~~~
- Python-based toolbox for post-processing
- synthetic aperture radar (SAR) data
-
-PySAR is a general-purpose set of tools for common post-processing
-tasks involving the use of SAR data. Interferometric SAR (InSAR)
-and Polarimetric SAR (PolSAR) tools are included along with tools that
-are useful for processing 1D data sets, such as GPS and seismic data.
-
-Copyright (C) 2013 Brent M. Minchew
---------------------------------------------------------------------
-GNU Licensed
-
- This program is free software: you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation, either version 3 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- 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, see .
-
---------------------------------------------------------------------
- ** This file was generated by the root setup.py
-"""
-
-version = '0.1.0'
-
\ No newline at end of file
diff --git a/build/scripts.macosx-10.10-x86_64-2.7/sarcorrelation.py b/build/scripts.macosx-10.10-x86_64-2.7/sarcorrelation.py
deleted file mode 100755
index 97fb998..0000000
--- a/build/scripts.macosx-10.10-x86_64-2.7/sarcorrelation.py
+++ /dev/null
@@ -1,160 +0,0 @@
-#!/opt/local/Library/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/Python
-"""
-sarcorrelation.py : Calculates interferometric correlation
-
-usage::
-
- $ sarcorrelation.py int_file amp_input [options]
-
-Parameters
-----------
-int_file : complex interferogram file
-amp_input : amplitude file(s); one of:
- -a bip_amp (bit-interleaved amplitude file)
- -s amp1_file amp2_file
- -p power1_file power2_file
-
-Options
--------
--o output_file : name of ouput file [sarcor.out]
--c str_option : output real amplitude (str_option = 'a'), real phase (str_option = 'p'),
- in radians or complex (str_option = 'c') correlation ['a']
--n value : data null value (float only) [0]
-
-Notes
------
-* input data is assumed to be single precision
-
-"""
-from __future__ import print_function, division
-import sys,os
-import numpy as np
-from pysar.etc.excepts import InputError
-np.seterr(divide='ignore')
-
-###==--==--==--==--==--==--==--==--==--==--==--==--==--==--==--==--==--==###
-def main(args):
- cor = Correlation(args)
- cor.read_data()
- cor.calculate()
- cor.write_data()
-
-###==--==--==--==--==--==--==--==--==--==--==--==--==--==--==--==--==--==###
-class Correlation():
- def __init__(self,args):
- self.intfile = args[0]
- self.null = 0.
-
- self.ampow = 'a'
- self.ampfile = None
- self.amp1file, self.amp2file = None, None
-
- self.outfile = 'sarcor.out'
- self.outap = 'a'
-
- for i,a in enumerate(args[1:]):
- if a == '-a':
- self.ampfile = args[2+i] # 2 because I skip the first argument in args
- elif a == '-s':
- self.amp1file = args[2+i]
- self.amp2file = args[3+i]
- elif a == '-p':
- self.amp1file = args[2+i]
- self.amp2file = args[3+i]
- self.ampow = 'p'
-
- elif a == '-o':
- self.outfile = args[2+i]
- elif a == '-c':
- self.outap = args[2+i]
- elif a == '-n':
- try:
- self.null = np.float32(args[2+i])
- except:
- raise InputError('null value must be float; %s given' % args[2+i])
- self._check_args()
-
- ###--------------------------------------###
- def _check_args(self):
- if self.ampfile is None:
- if self.amp1file is None or self.amp2file is None:
- errstr = 'a single bil amplitude file or two real-valued amplitude or power files '
- errstr += 'must be provided'
- raise InputError(errstr)
-
- if self.outap != 'a' and self.outap != 'p' and self.outap != 'c':
- errstr = "unrecognized option %s for output type; " % self.outap
- errstr += "must be 'a' for amplitude, 'p' for phase, or 'c' for complex"
- raise InputError(errstr)
-
- ###--------------------------------------###
- def read_data(self):
- print('reading')
- fid = open(self.intfile,'r')
- self.igram = np.fromfile(fid,dtype=np.complex64)
- fid.close()
-
- if self.ampfile is None:
- fid = open(self.amp1file,'r')
- self.amp1 = np.fromfile(fid,dtype=np.float32)
- fid.close()
-
- fid = open(self.amp2file,'r')
- self.amp2 = np.fromfile(fid,dtype=np.float32)
- fid.close()
- else:
- fid = open(self.ampfile,'r')
- amp = np.fromfile(fid,dtype=np.float32)
- fid.close()
- self.amp1, self.amp2 = amp[::2], amp[1::2]
-
- ###--------------------------------------###
- def calculate(self):
- print('calculating correlation')
- redonull, redozero = False, False
-
- teps = 2.*np.finfo(np.float32).eps
- nullmask = np.abs(self.igram - self.null) < teps
- nullmask += np.abs(self.amp1 - self.null) < teps
- nullmask += np.abs(self.amp2 - self.null) < teps
-
- zeromask = self.amp1 < teps
- zeromask += self.amp2 < teps
-
- if len(nullmask[nullmask]) > 1:
- redonull = True
- self.amp1[nullmask], self.amp2[nullmask] = 1., 1.
-
- if len(zeromask[zeromask]) > 1:
- redozero = True
- self.amp1[zeromask], self.amp2[zeromask] = 1., 1.
-
- if self.ampow == 'a':
- self.cor = self.igram/(self.amp1*self.amp2)
- else:
- self.cor = self.igram/(np.sqrt(self.amp1*self.amp2))
-
- if self.outap == 'a':
- self.cor = np.abs(self.cor)
- elif self.outap == 'p':
- self.cor = np.arctan2(self.cor.imag,self.cor.real)
-
- if redonull:
- self.cor[nullmask] = self.null
- if redozero:
- self.cor[zeromask] = self.null
-
- ###--------------------------------------###
- def write_data(self):
- print('writing')
- fid = open(self.outfile,'w')
- self.cor.tofile(fid)
- fid.close()
-
-###==--==--==--==--==--==--==--==--==--==--==--==--==--==--==--==--==--==###
-if __name__ == '__main__':
- args = sys.argv[1:]
- if len(args) < 3:
- print(__doc__)
- sys.exit()
- main(args)
diff --git a/build/scripts.macosx-10.10-x86_64-2.7/sardecomp_fd.py b/build/scripts.macosx-10.10-x86_64-2.7/sardecomp_fd.py
deleted file mode 100755
index 227c880..0000000
--- a/build/scripts.macosx-10.10-x86_64-2.7/sardecomp_fd.py
+++ /dev/null
@@ -1,186 +0,0 @@
-#!/opt/local/Library/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/Python
-
-"""
-sardecomp_fd.py : Freeman-Durden 3-component decomposition (Freeman and Durden, 1998)
-
-usage::
-
- $ sardecomp_fd.py filename[s] [options]
-
-Parameters
-----------
-filename[s] : input filename or filenames (see notes for more info)
-
-Options
--------
--c columns : int --
- image width (only needed if -f is given)
--f window : int or comma-separated list of ints (no brackets) --
- filter window size; square if only one value is given
--o prefix : str --
- prefix for output files [same as input prefix]
-
-
-Notes
------
-
-* Only one filename is needed if all files follow a convention such that::
-
- < S_HH S_HH* > --> hhhh *or* HHHH
- < S_HH S_VV* > --> hhvv *or* HHVV
-
-and so on for the diagonal and co-polarized off-diagonal channels of the
-coherencey matrix C (aka C_3) (see next note for a list of required channels)
-
-* If all filenames are given, they should be in order hhhh, vvvv, hvhv, hhvv
-
-* Cross-polarized power (hvhv) should *not* be multiplied by 2
-
-* Input files are assumed to be headerless, single-precision (float) binary
-
-* Image width is only needed if -f is called
-
-* It is common for Freeman-Decomposition to give non-physical negative powers [ref. 2].
-This is not a bug in the code. The user should also carefully consider the assumptions
-inherent in this decomposition scheme [ref. 1 and 2] and whether those assumptions are
-valid for the current problem.
-
-References
-----------
-
-[1] Freeman, A. and Durden, S., "A three-component scattering model for polarimetric SAR data", *IEEE Trans. Geosci. Remote Sensing*, vol. 36, no. 3, pp. 963-973, May 1998.
-
-[2] van Zyl, J. and Yunjin, K., *Synthetic Aperture Radar Polarimetry*, Wiley, Hoboken, NJ, 288 pages, 2011.
-
-"""
-from __future__ import print_function, division
-import sys,os
-import getopt
-import numpy as np
-from pysar.etc.excepts import InputError
-from pysar.polsar.decomp import decomp_fd
-from pysar.signal.boxfilter import boxcar2d
-
-###===========================================================================================
-
-def main(args):
- deco = FDdecomp(args)
- deco.read_data()
- deco.setup_data()
- deco.decomp()
- deco.write_data()
- print('Done with sardecomp_fd.py\n')
-
-###===========================================================================================
-class FDdecomp():
- def __init__(self,cargs):
- opts,args = getopt.gnu_getopt(cargs, 'c:f:o:')
- # set defaults
- self.outpref = None
- self.cols, self.filter_window = None, None
- fchoices = ['hhhh','vvvv','hvhv','hhvv']
- self.fnames, self.data = {}, {}
- # check filenames
- if len(args) != 1 and len(args) != 4:
- istr = 'Provide either 1 example filename or all 4 filenames. '
- istr += 'Number given = %d' % len(args)
- raise InputError(istr)
- # gather options
- for o,a in opts:
- if o == '-c':
- try: self.cols = np.int32(a)
- except: raise TypeError('argument for cols (-c) option must be convertable to int')
- elif o == '-f':
- flt = a.split(',')
- try: self.filter_window = [np.int32(x) for x in flt]
- except: raise TypeError('filter window dimensions must be convertable to int')
- elif o == '-o':
- self.outpref = a
- if self.filter_window and not self.cols:
- raise InputError('option -c must be given with -f')
-
- # get filenames
- if len(args) == 1:
- filesplit = None
- for x in fchoices:
- if x in args[0]:
- filesplit, upper = args[0].split(x), False
- break
- elif x.upper() in args[0]:
- filesplit, upper = args[0].split(x.upper()), True
- break
- if filesplit:
- for x in fchoices:
- if upper:
- self.fnames[x] = filesplit[0] + x.upper() + filesplit[1]
- else:
- self.fnames[x] = filesplit[0] + x + filesplit[1]
- else:
- istr = '%s does not match expected formatting...check input or' % args[0]
- istr += ' enter all filenames manually'
- raise InputError(istr)
- else:
- for i,x in enumerate(fchoices):
- self.fnames[x] = args[i]
-
- if not self.outpref:
- if 'HHHH' in self.fnames['hhhh']:
- self.outpref = '_'.join(self.fnames['hhhh'].split('HHHH'))
- else:
- self.outpref = '_'.join(self.fnames['hhhh'].split('hhhh'))
-
- if self.outpref[-1] != '.': self.outpref += '.'
-
- ###---------------------------------------------------------------------------------
- def read_data(self):
- rstr = 'Reading...'
- for k,v in self.fnames.iteritems():
- print("%s %s" % (rstr, v))
- try:
- fid = open(v,'r')
- if k == 'hhvv':
- self.data[k] = np.fromfile(fid,dtype=np.complex64)
- else:
- self.data[k] = np.fromfile(fid,dtype=np.float32)
- fid.close()
- except:
- raise IOError('cannot open file %s' % v)
- print('%s %s' % (rstr, 'Complete'))
-
- ###---------------------------------------------------------------------------------
- def setup_data(self):
- if self.filter_window:
- self._filter()
-
- ###---------------------------------------------------------------------------------
- def _filter(self):
- print('Filtering...')
- for key in self.data.keys():
- self.data[key] = self.data[key].reshape(-1,self.cols)
- self.data[key] = boxcar2d(data=self.data[key], window=self.filter_window)
- self.data[key] = self.data[key].flatten()
-
- ###---------------------------------------------------------------------------------
- def decomp(self):
- print('Decomposing')
- self.data['ps'], self.data['pd'], self.data['pv'] = decomp_fd(hhhh=self.data['hhhh'],
- vvvv=self.data['vvvv'], hvhv=self.data['hvhv'], hhvv=self.data['hhvv'])
-
- ###---------------------------------------------------------------------------------
- def write_data(self):
- wstr = 'Writing...'
- outputs = ['ps','pd','pv']
- for i in outputs:
- print("%s %s" % (wstr, i))
- fid = open(self.outpref + i,'w')
- self.data[i].tofile(fid)
- fid.close()
- print('%s %s' % (wstr, 'Complete'))
-
-###===========================================================================================
-if __name__ == '__main__':
- args = sys.argv[1:]
- if len(args) < 1:
- print(__doc__)
- sys.exit()
- main(args)
diff --git a/build/scripts.macosx-10.10-x86_64-2.7/sardecomp_haa.py b/build/scripts.macosx-10.10-x86_64-2.7/sardecomp_haa.py
deleted file mode 100755
index effb262..0000000
--- a/build/scripts.macosx-10.10-x86_64-2.7/sardecomp_haa.py
+++ /dev/null
@@ -1,201 +0,0 @@
-#!/opt/local/Library/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/Python
-
-"""
-sardecomp_haa.py : Cloude-Pottier H/A/alpha decomposition (Cloude and Pottier, 1997)
-
-usage::
-
- $ sardecomp_haa.py filename[s] [options]
-
-Parameters
-----------
-filename[s] : input filename or filenames (see notes for more info)
-
-Options
--------
--c width : int --
- image width (only needed if -f is given)
--f window : int or comma-separated list of ints (no brackets) --
- filter window size; square if only one value is given
--m format : str {C or T} --
- format of input data; C -> covariance, T -> coherency
- (if C is given, data should not be multiplied by any constants)
--o prefix : str --
- prefix for output files [same as input prefix]
-
-Notes
------
-
-* Only one filename is needed if all files follow a convention such that::
-
- < S_HH S_HH* > --> hhhh *or* HHHH
- < S_HH S_VV* > --> hhvv *or* HHVV
-
-and so on for the six unique elements (upper tri) of the coherencey matrix C (aka C_3)
-(see next note for a list of required channels)
-
-* If all filenames are given, they should be in order hhhh, vvvv, hvhv, hhhv, hhvv, hvvv
-
-* If coherency matrix (T) form is chosen, all six unique elements (upper tri) must be given
-as separate files in order: t11, t22, t33, t12, t13, t23 (where t12 is first row, second
-column entry of T)
-
-* Input files are assumed to be headerless, single-precision (float) binary
-
-* Image width is only needed if -f is called
-
-References
-----------
-
-[1] Cloude, S. and Pottier, E., "An entropy based classification scheme for land applications of polarimetric SAR", *IEEE Trans. Geosci. Remote Sensing*, vol. 35, no. 1, pp. 68-78, Jan. 1997.
-
-[2] van Zyl, J. and Yunjin, K., *Synthetic Aperture Radar Polarimetry*, Wiley, Hoboken, NJ, 288 pages, 2011.
-
-"""
-from __future__ import print_function, division
-import sys,os
-import getopt
-import numpy as np
-from pysar.etc.excepts import InputError
-from pysar.polsar.decomp import decomp_haa
-from pysar.signal.boxfilter import boxcar2d
-
-###===========================================================================================
-
-def main(args):
- deco = FDdecomp(args)
- deco.read_data()
- deco.setup_data()
- deco.decomp()
- deco.write_data()
- print('Done with sardecomp_haa.py\n')
-
-###===========================================================================================
-class FDdecomp():
- def __init__(self,cargs):
- opts,args = getopt.gnu_getopt(cargs, 'c:f:o:m:')
-
- # set defaults
- self.outpref = None
- self.cols, self.filter_window = None, None
- fchoices = ['hhhh','vvvv','hvhv','hhhv','hhvv','hvvv']
- self.fnames, self.data = {}, {}
- self.matform = 'C'
- matformopts = ['C','c','T','t']
-
- # check filenames
- if len(args) != 1 and len(args) != 6:
- istr = 'Provide either 1 example filename or all 6 filenames. '
- istr += 'Number given = %d' % len(args)
- raise InputError(istr)
-
- # gather options
- for o,a in opts:
- if o == '-c':
- try: self.cols = np.int32(a)
- except: raise TypeError('argument for cols (-c) option must be convertable to int')
- elif o == '-f':
- flt = a.split(',')
- try: self.filter_window = [np.int32(x) for x in flt]
- except: raise TypeError('filter window dimensions must be convertable to int')
- elif o == '-o':
- self.outpref = a
- elif o == '-m':
- self.matform = a
- if self.matform not in matformopts:
- raise InputError('matform must be either C or T; %s given'%a)
- elif self.matform == 'c' or self.matform == 't':
- self.matform = self.matform.upper()
-
- if self.filter_window and not self.cols:
- raise InputError('option -c must be given with -f')
-
- if self.matform == 'T' and len(args) != 6:
- raise InputError('6 filenames must be given to use T matrix format; %s given' % str(len(args)))
-
- # get filenames
- if len(args) == 1:
- filesplit = None
- for x in fchoices:
- if x in args[0]:
- filesplit, upper = args[0].split(x), False
- break
- elif x.upper() in args[0]:
- filesplit, upper = args[0].split(x.upper()), True
- break
- if filesplit:
- for x in fchoices:
- if upper:
- self.fnames[x] = filesplit[0] + x.upper() + filesplit[1]
- else:
- self.fnames[x] = filesplit[0] + x + filesplit[1]
- else:
- istr = '%s does not match expected formatting...check input or' % args[0]
- istr += ' enter all filenames manually'
- raise InputError(istr)
- else:
- for i,x in enumerate(fchoices):
- self.fnames[x] = args[i]
-
- if not self.outpref:
- if 'HHHH' in self.fnames['hhhh']:
- self.outpref = '_'.join(self.fnames['hhhh'].split('HHHH'))
- else:
- self.outpref = '_'.join(self.fnames['hhhh'].split('hhhh'))
-
- if self.outpref[-1] != '.': self.outpref += '.'
-
- ###---------------------------------------------------------------------------------
- def read_data(self):
- rstr = 'Reading...'
- for k,v in self.fnames.iteritems():
- print("%s %s" % (rstr, v))
- try:
- fid = open(v,'r')
- if k == 'hhvv' or k == 'hvvv' or k == 'hhhv':
- self.data[k] = np.fromfile(fid,dtype=np.complex64)
- else:
- self.data[k] = np.fromfile(fid,dtype=np.float32)
- fid.close()
- except:
- raise IOError('cannot open file %s' % v)
- print('%s %s' % (rstr, 'Complete'))
-
- ###---------------------------------------------------------------------------------
- def setup_data(self):
- if self.filter_window:
- self._filter()
-
- ###---------------------------------------------------------------------------------
- def _filter(self):
- print('Filtering...')
- for key in self.data.keys():
- self.data[key] = self.data[key].reshape(-1,self.cols)
- self.data[key] = boxcar2d(data=self.data[key], window=self.filter_window)
- self.data[key] = self.data[key].flatten()
-
- ###---------------------------------------------------------------------------------
- def decomp(self):
- print('Decomposing')
- self.data['ent'], self.data['ani'], self.data['alp'] = decomp_haa(hhhh=self.data['hhhh'],
- vvvv=self.data['vvvv'], hvhv=self.data['hvhv'], hhhv=self.data['hhhv'],
- hhvv=self.data['hhvv'], hvvv=self.data['hvvv'], matform=self.matform)
-
- ###---------------------------------------------------------------------------------
- def write_data(self):
- wstr = 'Writing...'
- outputs = ['ent','ani','alp']
- for i in outputs:
- print("%s %s" % (wstr, i))
- fid = open(self.outpref + i,'w')
- self.data[i].tofile(fid)
- fid.close()
- print('%s %s' % (wstr, 'Complete'))
-
-###===========================================================================================
-if __name__ == '__main__':
- args = sys.argv[1:]
- if len(args) < 1:
- print(__doc__)
- sys.exit()
- main(args)
diff --git a/build/scripts.macosx-10.10-x86_64-2.7/sarfilter.py b/build/scripts.macosx-10.10-x86_64-2.7/sarfilter.py
deleted file mode 100755
index aa317fc..0000000
--- a/build/scripts.macosx-10.10-x86_64-2.7/sarfilter.py
+++ /dev/null
@@ -1,129 +0,0 @@
-#!/opt/local/Library/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/Python
-
-"""
-sarfilter.py: Boxcar filter for 2D images
-
-Usage::
-
- sarfilter.py infile samples [outfile] [options]
-
-Options
--------
--a value : int
- number of looks across the image
--d value : int
- number of looks down the image
--n value : float
- null value (will be reset on output)
--z value : float
- set null to value prior to filtering
--t value : str
- data type (see notes for options)
--i :
- ouput NaN in place of null value
-
-Notes
------
-* -a and/or -d must be defined
-* if one of -a or -d are defined, the filter window will be square
-* if outfile is not given, infile will be overwritten
-* -n value must be given for -i option to work
-* data types options ['f','float','d','double','c','complex','cf','complexfloat',
- 'cd','complexdouble']. Default = float
-
-"""
-from __future__ import print_function, division
-import sys,os
-import getopt
-import numpy as np
-from pysar.signal import boxfilter
-from pysar.etc.excepts import InputError
-
-def main():
- pars = Params()
-
- with open(pars.infile,'r') as fid:
- data = np.fromfile(fid,dtype=pars.dtype).reshape(-1,pars.cols)
-
- out = boxfilter.boxcar2d(data=data,window=pars.win,null=pars.null,
- nullset=pars.nullset,thread='auto',numthrd=8,tdthrsh=1e5)
-
- if pars.outnan:
- nullmask = np.abs(out - pars.null) < 1.e-7
- out[nullmask] = np.nan
-
- with open(pars.outfile,'w') as fid:
- out.flatten().tofile(fid)
-
-class Params():
- def __init__(self):
- opts, args = getopt.gnu_getopt(sys.argv[1:], 'a:d:n:z:t:is')
-
- self.infile = args[0]
- self.cols = np.int32(args[1])
- try:
- self.outfile = args[2]
- except:
- self.outfile = self.infile
-
- self.lx,self.ld,self.null = None, None, None
- self.verbose,self.outnan = 1, False
- self.nullset = None
- dtype = 'float'
- for o,a in opts:
- if o == '-a':
- self.lx = np.int32(a)
- elif o == '-d':
- self.ld = np.int32(a)
- elif o == '-n':
- self.null = np.float64(a)
- elif o == '-z':
- self.nullset = np.float64(a)
- elif o == '-i':
- self.outnan = True
- elif o == '-s':
- self.verbose = 0
- elif o == '-t':
- dtype = a.strip()
-
- if self.outnan and self.null == None:
- raise InputError('Null value must be defined to output NaN in its place')
-
- if self.lx and self.ld:
- self.win = [self.lx,self.ld]
- elif self.lx == None and self.ld:
- self.win = self.ld
- elif self.ld == None and self.lx:
- self.win = self.lx
- else:
- raise InputError('At least one window dimension must be defined')
-
- types = ['f','float','r4','d','double','r8','c','complex','c8','cf','complexfloat',
- 'cd','complexdouble','c16']
- atype = [np.float32, np.float32, np.float32, np.float64, np.float64, np.float64,
- np.complex64, np.complex64, np.complex64,
- np.complex64, np.complex64, np.complex128,
- np.complex128, np.complex128]
- try:
- self.dtype = atype[ types.index( dtype ) ]
- except:
- print('unsupported data type: ' + dtype)
- print(' supported data types are: ' + ', '.join(types))
- sys.exit()
-
-
-if __name__ == '__main__':
- args = sys.argv[1:]
- if len(args) < 3:
- print(__doc__)
- sys.exit()
- main()
-
-
-
-
-
-
-
-
-
diff --git a/build/scripts.macosx-10.10-x86_64-2.7/sarlooks.py b/build/scripts.macosx-10.10-x86_64-2.7/sarlooks.py
deleted file mode 100755
index 5e02485..0000000
--- a/build/scripts.macosx-10.10-x86_64-2.7/sarlooks.py
+++ /dev/null
@@ -1,114 +0,0 @@
-#!/opt/local/Library/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/Python
-
-"""
-sarlooks.py: Basic multilooking for 2D images
-
-Usage::
-
- sarlooks.py infile samples outfile [options]
-
-Options
--------
--a value : number of looks across the image
--d value : number of looks down the image
--n value : null value to exclude from the filter
--t value : data type (see notes for options)
--i : ouput NaN in place of null value
--s : run in silent mode (verbosity = 0)
-
-Notes
------
-* -a and/or -d must be defined
-* if one of -a or -d are defined, the filter window will be square
-* -n value must be given for -i option to work
-* data types options: ['f','float','d','double','c','complex','cf','complexfloat',
- 'cd','complexdouble']. Default = float
-
-"""
-from __future__ import print_function, division
-import sys,os
-import getopt
-import numpy as np
-from pysar.image import looks
-
-def main():
- pars = Params()
-
- fid = open(pars.infile,'r')
- data = np.fromfile(fid,dtype=pars.dtype).reshape(-1,pars.cols)
- fid.close()
-
- out = looks.look(data=data,win=pars.win,null=pars.null,verbose=pars.verbose)
-
- if pars.outnan:
- nullmask = np.abs(out - pars.null) < 1.e-7
- out[nullmask] = np.nan
-
- fid = open(pars.outfile,'w')
- out.flatten().tofile(fid)
- fid.close()
-
-class Params():
- def __init__(self):
- opts, args = getopt.gnu_getopt(sys.argv[1:], 'a:d:n:t:is')
-
- self.infile = args[0]
- self.cols = np.int32(args[1])
- self.outfile = args[2]
- self.lx,self.ld,self.null = None, None, None
- self.verbose,self.outnan = 1, False
- dtype = 'float'
- for o,a in opts:
- if o == '-a':
- self.lx = np.int32(a)
- elif o == '-d':
- self.ld = np.int32(a)
- elif o == '-n':
- self.null = np.float32(a)
- elif o == '-i':
- self.outnan = True
- elif o == '-s':
- self.verbose = 0
- elif o == '-t':
- dtype = a.strip()
-
- if self.outnan and self.null == None:
- raise ValueError('Null value must be defined to output NaN in its place')
-
- if self.lx and self.ld:
- self.win = [self.lx,self.ld]
- elif self.lx == None and self.ld:
- self.win = self.ld
- elif self.ld == None and self.lx:
- self.win = self.lx
- else:
- raise ValueError('At least one window dimension must be defined')
-
- types = ['f','float','r4','d','double','r8','c','complex','c8','cf','complexfloat',
- 'cd','complexdouble','c16']
- atype = [np.float32, np.float32, np.float32, np.float64, np.float64, np.float64,
- np.complex64, np.complex64, np.complex64,
- np.complex64, np.complex64, np.complex128,
- np.complex128, np.complex128]
- try:
- self.dtype = atype[ types.index( dtype ) ]
- except:
- errstr = 'unsupported data type: ' + dtype
- errstr += '\n supported data types are: ' + ', '.join(types)
- raise ValueError(errstr)
-
-if __name__ == '__main__':
- args = sys.argv[1:]
- if len(args) < 3:
- print(__doc__)
- sys.exit()
- main()
-
-
-
-
-
-
-
-
-
diff --git a/build/scripts.macosx-10.10-x86_64-2.7/sarmath.py b/build/scripts.macosx-10.10-x86_64-2.7/sarmath.py
deleted file mode 100755
index 6e1e84d..0000000
--- a/build/scripts.macosx-10.10-x86_64-2.7/sarmath.py
+++ /dev/null
@@ -1,164 +0,0 @@
-#!/opt/local/Library/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/Python
-
-"""
-Basic mathematical operations for SAR data in pseudo reverse Polish notation
-
-Usage forms (entry_i can be a file or number; output file is required only for array outputs)::
-
- $ sarmath.py entry_1 [entry_2] [entry_3] -function_1 [entry_i] [-function_2 ... -function_n] [= output_file]
-
- $ sarmath.py entry_1 operator entry_2 [-function_1 ... -function_n] [= output_file]
-
-Operators
----------
- ========== ====================================================================
- +, -, / add, subract, divide
- x, ., '*' multiplication ('*' must be given as a string on Linux systems)
- ^ raise entry_1 to power entry_2
- % mod entry_1 by entry_2
- ========== ====================================================================
-
-Functions
----------
- symbols: f = file; r = float (double); i = int; c = complex
- adapt means the output corresponds to the input type
- a --> entry_1, b --> entry_2, and so on
-
- ========== ========================= ================ ==========
- Name Description Input Output
- ========== ========================= ================ ==========
- Arithmetic
- add addition 2 x fric adapt
- sub subtraction 2 x fric adapt
- mult multiplication 2 x fric adapt
- div division 2 x fric adapt
- ..
- Common
- hypot sqrt(a**2 + b**2 [+c**2]) 2[3] x fric adapt
- pow a**b 2 x fric adapt
- root a**(1/b) 2 x fric adapt
- sqrt sqrt(a) 1 x fric adapt
- abs abs(a) 1 x fric adapt
- mod a % b (a.k.a. mod(a,b)) 2 x fric adapt
- amp abs(a) 1 x fric adapt
- power abs(a)**2 1 x fric adapt
- phase arctan2(a,b) [-pi,pi] 2 x fric adapt
- addphz a*exp(+i*b) 2 x fric adapt
- subphz a*exp(-i*b) 2 x fric adapt
- ..
- Statistic
- max max(a) 1 x fric float
- min min(a) 1 x fric float
- mean mean(a) 1 x fric float
- med median(a) 1 x fric float
- std std(a) (std. dev.) 1 x fric float
- var var(a) (variance) 1 x fric float
- xmult a * conj(b) 2 x fric adapt
- xcor xmult/(abs(a)abs(b)) 2 x fric adapt
- xcor_amp |xcor| 2 x fric adapt
- xcor_phase arg(xcor) 2 x fric adapt
- ..
- Logarithm
- log log(a) (natural log) 1 x fric adapt
- log10 log10(a) (base 10 log) 1 x fric adapt
- log_b log(a)/log(b) (base = b) 2 x fric adapt
- exp exp(a) 1 x fric adapt
- 10pow 10**a 1 x fric adapt
- dB 10*log10(a) 1 x fric adapt
- dBi 10**(a/10) 1 x fric adapt
- ..
- Comparison
- gt mask( a > b ) 1 x f, 1 x ric adapt
- ge mask( a >= b ) 1 x f, 1 x ric adapt
- lt mask( a < b ) 1 x f, 1 x ric adapt
- le mask( a <= b ) 1 x f, 1 x ric adapt
- eq mask( a == b ) 1 x f, 1 x ric adapt
- ne mask( a != b ) 1 x f, 1 x ric adapt
- isnan mask( isnan(a) ) 1 x f, 1 x ric adapt
- notnan mask( -isnan(a) ) 1 x f, 1 x ric adapt
- ..
- Conversion
- null2nan a[a==b] = nan 1x f, 1x ric adapt
- nan2null a[isnan(a)] = b 1x f, 1x ric adapt
- inf2null a[isinf(a)] = b 1x f, 1x ric adapt
- num2null a[a==b] = c 1x f, 2x ric adapt
- null2null a[a==b] = c 1x f, 2x ric adapt
- ..
- Enumerate
- num_null sum( a == b ) 1x f, 1x ric int
- num_nan sum( a == nan ) 1 x fric int
- num_inf sum( a == |inf|) 1 x fric int
- num_neginf sum( a == -inf ) 1 x fric int
- num_posinf sum( a == inf ) 1 x fric int
- ========== ========================= ================ ==========
-
-Notes
------
- * all files must be headerless binary
-
- * default file type is single-precision floating point (32-bit);
- append type to filename for other types
-
- * append type or columns to any file as a comma separated list
- with no whitespace (ex. file1,type,cols)
-
- * all operations are element-wise unless otherwise specified
-
- * operations are carried out in the order given (i.e. sarmath.py
- does not adhere to standard order of operations)
-
-Examples
---------
- Add 2 files::
-
- $ sarmath.py file_1 + file_2 = file_3
-
- or::
-
- $ sarmath.py file_1 file_2 -add = file_3
-
- Multiply a file by 2::
-
- $ sarmath.py file_1 x 2 = file_out
-
- or::
-
- $ sarmath.py file_1 2 -mult = file_out
-
- Divide two files, cube the quotient, and then multipy by 5::
-
- $ sarmath file_1 / file_2 3 -pow 5 -mult = file_out
-
- or::
-
- $ sarmath file_1 file_2 -div 3 -pow 5 -mult = file_out
-
- Get the max absolute value of the above example (note the lack of an output file)::
-
- $ sarmath file_1 / file_2 3 -pow 5 -mult -abs -max
-
- Magnitude of a single-precision complex-valued data file::
-
- $ sarmath file_1,complex -abs = file_out
-
-"""
-from __future__ import print_function, division
-import sys,os
-import numpy as np
-from pysar.math._sarmath_solver import Solver
-from pysar.math._sarmath_tools import Databank, Parse_command_line, Writer
-
-
-def main():
- pars = Parse_command_line(args=sys.argv[1:])
- datlist = Databank(pars=pars)
- output = Solver(pars=pars,data=datlist)
- Writer(output=output,pars=pars)
-
-if __name__=='__main__':
- if len(sys.argv) < 2:
- print(__doc__)
- sys.exit()
- main()
-
-
diff --git a/build/scripts.macosx-10.10-x86_64-2.7/sarphase_detrend.py b/build/scripts.macosx-10.10-x86_64-2.7/sarphase_detrend.py
deleted file mode 100755
index 626b39b..0000000
--- a/build/scripts.macosx-10.10-x86_64-2.7/sarphase_detrend.py
+++ /dev/null
@@ -1,213 +0,0 @@
-#!/opt/local/Library/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/Python
-"""
-sarphase_detrend.py : Fits a surface to an (masked) image and then removes the surface
- from the entire image
-
-usage::
-
- $ sarphase_detrend.py image_file cols [options]
-
-Parameters
-----------
-image_file : image file
-cols : number of columns (or samples) in the image
-
-Options
--------
--o order : polynomial order for the fitted surface [1]
--c cor_file : correlation filename; optionally append minimum correlation threshold [0.3]
--m mask_file : mask filename; optionally append value to exclude [1]
--f out_file : output filename [image_file + .flat]
--s bool : output best-fit surface [False]
--n value : data null value [0]
--w bool : weight data by correlation values prior to fitting (see notes) [True]
--p norm : L^p norm {1 or 2} [2]
--x factor : column decimation factor [30]
--y factor : row decimation factor [column decimation factor]
-
-Notes
------
-* values should be appended with a comma with no spaces on either side
-* weighting is only applied if correlation file is given
-* correlation threshold is not considered if weighting is applied (i.e. unless '-w False' is given)
-"""
-from __future__ import print_function, division
-import sys,os
-import getopt
-import numpy as np
-import pysar.insar._phase_detrend_sup as sup
-
-###==--==--==--==--==--==--==--==--==--==--==--==--==--==--==--==--==--==###
-def main(args):
- print('\nRunning phase_detrend.py\n')
- detrend = DeTrend(args)
- detrend.read_data()
- detrend.setup_data()
- detrend.remove_surf()
- detrend.write_data()
-
-###==--==--==--==--==--==--==--==--==--==--==--==--==--==--==--==--==--==###
-class DeTrend():
- def __init__(self,args):
- opts, args = getopt.gnu_getopt(args, 'f:o:p:c:m:n:x:y:w:s:')
-
- self.unwf = args[0]
- self.cols = np.int32(args[1])
- self.corf = None
- self.maskf = None
-
- # set defaults
- self.order = 1
- self.cthresh = 0.3
- self.maskval = 1
- self.rowdec = 30
- self.coldec = -1
- self.outf = self.unwf + '.flat'
- self.null = 0
- self.pnorm = 2
- self.wbool = True
- self.sbool = False
- self.Nlook = 1
-
- self.corarr = None
- # assign option values
- for o,a in opts:
- if o == '-f':
- self.outf = a
- elif o == '-c':
- cc = a.split(',')
- self.corf = cc[0]
- if len(cc) > 1:
- self.cthresh = np.float32(cc[1])
- elif o == '-m':
- cc = a.split(',')
- self.maskf = cc[0]
- if len(cc) > 1:
- self.maskval = np.int32(cc[1])
- elif o == '-y':
- self.rowdec = np.int32(a)
- elif o == '-x':
- self.coldec = np.int32(a)
- elif o == '-o':
- self.order = np.int32(a)
- elif o == '-p':
- self.pnorm = np.int32(a)
- elif o == '-n':
- self.null = np.float64(a)
- elif o == '-w':
- if 'F' in a or 'f' in a:
- self.wbool = False
- elif o == '-s':
- if 't' in a.lower():
- self.sbool = True
-
- if self.coldec < 0:
- self.coldec = self.rowdec
- if self.rowdec < 1 or self.coldec < 1:
- self.rowdec, self.coldec = 1, 1
- if self.order > 4:
- print('Requested order > max order; Setting to max order = 4')
- self.order = 4
-
- ###--------------------------------------###
- def read_data(self):
- print('reading data files')
- eps = np.finfo(np.float32).eps
- ceps = 1. - eps
- # read in correlation data and mask values less than threshold
- if self.corf is not None:
- fid = open(self.corf,'r')
- data = np.fromfile(fid, dtype=np.float32).reshape(-1,self.cols)
- fid.close()
-
- if self.wbool: # if weighting = True, set cor threshold so that all correlation values are included
- self.cthresh = 0.
- self.corarr = data.copy()
- self.corarr[self.corarr < eps] = eps
- self.corarr[self.corarr > ceps] = ceps
- self.mask = data > self.cthresh
- else:
- self.wbool = False
-
- # read in mask file and combine with correlation mask created above
- if self.maskf is not None:
- fid = open(self.maskf,'r')
- data = np.fromfile(fid, dtype=np.float32).reshape(-1,self.cols)
- fid.close()
-
- if self.corf is not None:
- self.mask *= data != self.maskval
- else:
- self.mask = data != self.maskval
-
- # read in data (this wipes out the correlation data in order to save memory)
- fid = open(self.unwf,'r')
- self.unw = np.fromfile(fid, dtype=np.float32).reshape(-1,self.cols)
- fid.close()
-
- if self.maskf is not None:
- self.mask *= np.abs(self.unw - self.null) > eps
- elif self.corf is not None:
- self.mask *= np.abs(self.unw - self.null) > eps
- else:
- self.mask = np.abs(self.unw - self.null) > eps
-
- self.lines = np.shape(self.unw)[0]
- print('done reading')
-
- ###--------------------------------------###
- def setup_data(self):
- print('decimating')
- xstart,ystart = self.coldec-1, self.rowdec-1
- x = np.arange(xstart, self.cols, self.coldec)
- y = np.arange(ystart, self.lines, self.rowdec)
- x,y = np.meshgrid(x,y)
- x = x.flatten()
- y = y.flatten()
-
- self.d = self.unw[y,x].copy()
- self.d, self.x, self.y = self.d[self.mask[y,x]], x[self.mask[y,x]], y[self.mask[y,x]]
-
- if self.wbool:
- self.corarr = self.corarr[y,x]
- self.corarr = self.corarr[self.mask[y,x]]
-
- ###--------------------------------------###
- def remove_surf(self):
- print('calculating coefficients: ')
- print(' order = %d' % self.order)
- print(' using %d points' % len(self.d))
- c = sup.polyfit2d(x=self.x,y=self.y,d=self.d,n=self.order,p=self.pnorm,
- w=self.wbool,cor=self.corarr,N=self.Nlook)
- del self.d, self.x, self.y
-
- if self.sbool:
- dc = self.unw.copy()
- print('removing the best-fit surface')
- self.unw = sup.subtract_surf(d=self.unw,c=c,null=self.null)
- if self.sbool:
- self.surf = dc - self.unw
- self.surf[self.unw==self.null] = self.null
-
- ###--------------------------------------###
- def write_data(self):
- print('writing')
- fid = open(self.outf,'w')
- self.unw.flatten().tofile(fid)
- fid.close()
-
- if self.sbool:
- fid = open(self.outf+'.surf','w')
- self.surf.flatten().tofile(fid)
- fid.close()
-
-###==--==--==--==--==--==--==--==--==--==--==--==--==--==--==--==--==--==###
-if __name__ == '__main__':
- args = sys.argv[1:]
- if len(args) < 2:
- print(__doc__)
- sys.exit()
- main(args)
-
-
-
diff --git a/build/src.macosx-10.10-x86_64-2.7/fortranobject.c b/build/src.macosx-10.10-x86_64-2.7/fortranobject.c
deleted file mode 100644
index 9c96c1f..0000000
--- a/build/src.macosx-10.10-x86_64-2.7/fortranobject.c
+++ /dev/null
@@ -1,972 +0,0 @@
-#define FORTRANOBJECT_C
-#include "fortranobject.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/*
- This file implements: FortranObject, array_from_pyobj, copy_ND_array
-
- Author: Pearu Peterson
- $Revision: 1.52 $
- $Date: 2005/07/11 07:44:20 $
-*/
-
-int
-F2PyDict_SetItemString(PyObject *dict, char *name, PyObject *obj)
-{
- if (obj==NULL) {
- fprintf(stderr, "Error loading %s\n", name);
- if (PyErr_Occurred()) {
- PyErr_Print();
- PyErr_Clear();
- }
- return -1;
- }
- return PyDict_SetItemString(dict, name, obj);
-}
-
-/************************* FortranObject *******************************/
-
-typedef PyObject *(*fortranfunc)(PyObject *,PyObject *,PyObject *,void *);
-
-PyObject *
-PyFortranObject_New(FortranDataDef* defs, f2py_void_func init) {
- int i;
- PyFortranObject *fp = NULL;
- PyObject *v = NULL;
- if (init!=NULL) /* Initialize F90 module objects */
- (*(init))();
- if ((fp = PyObject_New(PyFortranObject, &PyFortran_Type))==NULL) return NULL;
- if ((fp->dict = PyDict_New())==NULL) return NULL;
- fp->len = 0;
- while (defs[fp->len].name != NULL) fp->len++;
- if (fp->len == 0) goto fail;
- fp->defs = defs;
- for (i=0;ilen;i++)
- if (fp->defs[i].rank == -1) { /* Is Fortran routine */
- v = PyFortranObject_NewAsAttr(&(fp->defs[i]));
- if (v==NULL) return NULL;
- PyDict_SetItemString(fp->dict,fp->defs[i].name,v);
- } else
- if ((fp->defs[i].data)!=NULL) { /* Is Fortran variable or array (not allocatable) */
- if (fp->defs[i].type == NPY_STRING) {
- int n = fp->defs[i].rank-1;
- v = PyArray_New(&PyArray_Type, n, fp->defs[i].dims.d,
- NPY_STRING, NULL, fp->defs[i].data, fp->defs[i].dims.d[n],
- NPY_FARRAY, NULL);
- }
- else {
- v = PyArray_New(&PyArray_Type, fp->defs[i].rank, fp->defs[i].dims.d,
- fp->defs[i].type, NULL, fp->defs[i].data, 0, NPY_FARRAY,
- NULL);
- }
- if (v==NULL) return NULL;
- PyDict_SetItemString(fp->dict,fp->defs[i].name,v);
- }
- Py_XDECREF(v);
- return (PyObject *)fp;
- fail:
- Py_XDECREF(v);
- return NULL;
-}
-
-PyObject *
-PyFortranObject_NewAsAttr(FortranDataDef* defs) { /* used for calling F90 module routines */
- PyFortranObject *fp = NULL;
- fp = PyObject_New(PyFortranObject, &PyFortran_Type);
- if (fp == NULL) return NULL;
- if ((fp->dict = PyDict_New())==NULL) return NULL;
- fp->len = 1;
- fp->defs = defs;
- return (PyObject *)fp;
-}
-
-/* Fortran methods */
-
-static void
-fortran_dealloc(PyFortranObject *fp) {
- Py_XDECREF(fp->dict);
- PyMem_Del(fp);
-}
-
-
-#if PY_VERSION_HEX >= 0x03000000
-#else
-static PyMethodDef fortran_methods[] = {
- {NULL, NULL} /* sentinel */
-};
-#endif
-
-
-static PyObject *
-fortran_doc (FortranDataDef def) {
- char *p;
- /*
- p is used as a buffer to hold generated documentation strings.
- A common operation in generating the documentation strings, is
- appending a string to the buffer p. Earlier, the following
- idiom was:
-
- sprintf(p, "%s", p);
-
- but this does not work when _FORTIFY_SOURCE=2 is enabled: instead
- of appending the string, the string is inserted.
-
- As a fix, the following idiom should be used for appending
- strings to a buffer p:
-
- sprintf(p + strlen(p), "");
- */
- PyObject *s = NULL;
- int i;
- unsigned size=100;
- if (def.doc!=NULL)
- size += strlen(def.doc);
- p = (char*)malloc (size);
- p[0] = '\0'; /* make sure that the buffer has zero length */
- if (def.rank==-1) {
- if (def.doc==NULL) {
- if (sprintf(p,"%s - ",def.name)==0) goto fail;
- if (sprintf(p+strlen(p),"no docs available")==0)
- goto fail;
- } else {
- if (sprintf(p+strlen(p),"%s",def.doc)==0)
- goto fail;
- }
- } else {
- PyArray_Descr *d = PyArray_DescrFromType(def.type);
- if (sprintf(p+strlen(p),"'%c'-",d->type)==0) {
- Py_DECREF(d);
- goto fail;
- }
- Py_DECREF(d);
- if (def.data==NULL) {
- if (sprintf(p+strlen(p),"array(%" NPY_INTP_FMT,def.dims.d[0])==0)
- goto fail;
- for(i=1;i0) {
- if (sprintf(p+strlen(p),"array(%"NPY_INTP_FMT,def.dims.d[0])==0)
- goto fail;
- for(i=1;isize) {
- fprintf(stderr,"fortranobject.c:fortran_doc:len(p)=%zd>%d(size):"\
- " too long doc string required, increase size\n",\
- strlen(p),size);
- goto fail;
- }
-#if PY_VERSION_HEX >= 0x03000000
- s = PyUnicode_FromString(p);
-#else
- s = PyString_FromString(p);
-#endif
- fail:
- free(p);
- return s;
-}
-
-static FortranDataDef *save_def; /* save pointer of an allocatable array */
-static void set_data(char *d,npy_intp *f) { /* callback from Fortran */
- if (*f) /* In fortran f=allocated(d) */
- save_def->data = d;
- else
- save_def->data = NULL;
- /* printf("set_data: d=%p,f=%d\n",d,*f); */
-}
-
-static PyObject *
-fortran_getattr(PyFortranObject *fp, char *name) {
- int i,j,k,flag;
- if (fp->dict != NULL) {
- PyObject *v = PyDict_GetItemString(fp->dict, name);
- if (v != NULL) {
- Py_INCREF(v);
- return v;
- }
- }
- for (i=0,j=1;ilen && (j=strcmp(name,fp->defs[i].name));i++);
- if (j==0)
- if (fp->defs[i].rank!=-1) { /* F90 allocatable array */
- if (fp->defs[i].func==NULL) return NULL;
- for(k=0;kdefs[i].rank;++k)
- fp->defs[i].dims.d[k]=-1;
- save_def = &fp->defs[i];
- (*(fp->defs[i].func))(&fp->defs[i].rank,fp->defs[i].dims.d,set_data,&flag);
- if (flag==2)
- k = fp->defs[i].rank + 1;
- else
- k = fp->defs[i].rank;
- if (fp->defs[i].data !=NULL) { /* array is allocated */
- PyObject *v = PyArray_New(&PyArray_Type, k, fp->defs[i].dims.d,
- fp->defs[i].type, NULL, fp->defs[i].data, 0, NPY_FARRAY,
- NULL);
- if (v==NULL) return NULL;
- /* Py_INCREF(v); */
- return v;
- } else { /* array is not allocated */
- Py_INCREF(Py_None);
- return Py_None;
- }
- }
- if (strcmp(name,"__dict__")==0) {
- Py_INCREF(fp->dict);
- return fp->dict;
- }
- if (strcmp(name,"__doc__")==0) {
-#if PY_VERSION_HEX >= 0x03000000
- PyObject *s = PyUnicode_FromString(""), *s2, *s3;
- for (i=0;ilen;i++) {
- s2 = fortran_doc(fp->defs[i]);
- s3 = PyUnicode_Concat(s, s2);
- Py_DECREF(s2);
- Py_DECREF(s);
- s = s3;
- }
-#else
- PyObject *s = PyString_FromString("");
- for (i=0;ilen;i++)
- PyString_ConcatAndDel(&s,fortran_doc(fp->defs[i]));
-#endif
- if (PyDict_SetItemString(fp->dict, name, s))
- return NULL;
- return s;
- }
- if ((strcmp(name,"_cpointer")==0) && (fp->len==1)) {
- PyObject *cobj = F2PyCapsule_FromVoidPtr((void *)(fp->defs[0].data),NULL);
- if (PyDict_SetItemString(fp->dict, name, cobj))
- return NULL;
- return cobj;
- }
-#if PY_VERSION_HEX >= 0x03000000
- if (1) {
- PyObject *str, *ret;
- str = PyUnicode_FromString(name);
- ret = PyObject_GenericGetAttr((PyObject *)fp, str);
- Py_DECREF(str);
- return ret;
- }
-#else
- return Py_FindMethod(fortran_methods, (PyObject *)fp, name);
-#endif
-}
-
-static int
-fortran_setattr(PyFortranObject *fp, char *name, PyObject *v) {
- int i,j,flag;
- PyArrayObject *arr = NULL;
- for (i=0,j=1;ilen && (j=strcmp(name,fp->defs[i].name));i++);
- if (j==0) {
- if (fp->defs[i].rank==-1) {
- PyErr_SetString(PyExc_AttributeError,"over-writing fortran routine");
- return -1;
- }
- if (fp->defs[i].func!=NULL) { /* is allocatable array */
- npy_intp dims[F2PY_MAX_DIMS];
- int k;
- save_def = &fp->defs[i];
- if (v!=Py_None) { /* set new value (reallocate if needed --
- see f2py generated code for more
- details ) */
- for(k=0;kdefs[i].rank;k++) dims[k]=-1;
- if ((arr = array_from_pyobj(fp->defs[i].type,dims,fp->defs[i].rank,F2PY_INTENT_IN,v))==NULL)
- return -1;
- (*(fp->defs[i].func))(&fp->defs[i].rank,arr->dimensions,set_data,&flag);
- } else { /* deallocate */
- for(k=0;kdefs[i].rank;k++) dims[k]=0;
- (*(fp->defs[i].func))(&fp->defs[i].rank,dims,set_data,&flag);
- for(k=0;kdefs[i].rank;k++) dims[k]=-1;
- }
- memcpy(fp->defs[i].dims.d,dims,fp->defs[i].rank*sizeof(npy_intp));
- } else { /* not allocatable array */
- if ((arr = array_from_pyobj(fp->defs[i].type,fp->defs[i].dims.d,fp->defs[i].rank,F2PY_INTENT_IN,v))==NULL)
- return -1;
- }
- if (fp->defs[i].data!=NULL) { /* copy Python object to Fortran array */
- npy_intp s = PyArray_MultiplyList(fp->defs[i].dims.d,arr->nd);
- if (s==-1)
- s = PyArray_MultiplyList(arr->dimensions,arr->nd);
- if (s<0 ||
- (memcpy(fp->defs[i].data,arr->data,s*PyArray_ITEMSIZE(arr)))==NULL) {
- if ((PyObject*)arr!=v) {
- Py_DECREF(arr);
- }
- return -1;
- }
- if ((PyObject*)arr!=v) {
- Py_DECREF(arr);
- }
- } else return (fp->defs[i].func==NULL?-1:0);
- return 0; /* succesful */
- }
- if (fp->dict == NULL) {
- fp->dict = PyDict_New();
- if (fp->dict == NULL)
- return -1;
- }
- if (v == NULL) {
- int rv = PyDict_DelItemString(fp->dict, name);
- if (rv < 0)
- PyErr_SetString(PyExc_AttributeError,"delete non-existing fortran attribute");
- return rv;
- }
- else
- return PyDict_SetItemString(fp->dict, name, v);
-}
-
-static PyObject*
-fortran_call(PyFortranObject *fp, PyObject *arg, PyObject *kw) {
- int i = 0;
- /* printf("fortran call
- name=%s,func=%p,data=%p,%p\n",fp->defs[i].name,
- fp->defs[i].func,fp->defs[i].data,&fp->defs[i].data); */
- if (fp->defs[i].rank==-1) {/* is Fortran routine */
- if (fp->defs[i].func==NULL) {
- PyErr_Format(PyExc_RuntimeError, "no function to call");
- return NULL;
- }
- else if (fp->defs[i].data==NULL)
- /* dummy routine */
- return (*((fortranfunc)(fp->defs[i].func)))((PyObject *)fp,arg,kw,NULL);
- else
- return (*((fortranfunc)(fp->defs[i].func)))((PyObject *)fp,arg,kw,
- (void *)fp->defs[i].data);
- }
- PyErr_Format(PyExc_TypeError, "this fortran object is not callable");
- return NULL;
-}
-
-static PyObject *
-fortran_repr(PyFortranObject *fp)
-{
- PyObject *name = NULL, *repr = NULL;
- name = PyObject_GetAttrString((PyObject *)fp, "__name__");
- PyErr_Clear();
-#if PY_VERSION_HEX >= 0x03000000
- if (name != NULL && PyUnicode_Check(name)) {
- repr = PyUnicode_FromFormat("", name);
- }
- else {
- repr = PyUnicode_FromString("");
- }
-#else
- if (name != NULL && PyString_Check(name)) {
- repr = PyString_FromFormat("", PyString_AsString(name));
- }
- else {
- repr = PyString_FromString("");
- }
-#endif
- Py_XDECREF(name);
- return repr;
-}
-
-
-PyTypeObject PyFortran_Type = {
-#if PY_VERSION_HEX >= 0x03000000
- PyVarObject_HEAD_INIT(NULL, 0)
-#else
- PyObject_HEAD_INIT(0)
- 0, /*ob_size*/
-#endif
- "fortran", /*tp_name*/
- sizeof(PyFortranObject), /*tp_basicsize*/
- 0, /*tp_itemsize*/
- /* methods */
- (destructor)fortran_dealloc, /*tp_dealloc*/
- 0, /*tp_print*/
- (getattrfunc)fortran_getattr, /*tp_getattr*/
- (setattrfunc)fortran_setattr, /*tp_setattr*/
- 0, /*tp_compare/tp_reserved*/
- (reprfunc)fortran_repr, /*tp_repr*/
- 0, /*tp_as_number*/
- 0, /*tp_as_sequence*/
- 0, /*tp_as_mapping*/
- 0, /*tp_hash*/
- (ternaryfunc)fortran_call, /*tp_call*/
-};
-
-/************************* f2py_report_atexit *******************************/
-
-#ifdef F2PY_REPORT_ATEXIT
-static int passed_time = 0;
-static int passed_counter = 0;
-static int passed_call_time = 0;
-static struct timeb start_time;
-static struct timeb stop_time;
-static struct timeb start_call_time;
-static struct timeb stop_call_time;
-static int cb_passed_time = 0;
-static int cb_passed_counter = 0;
-static int cb_passed_call_time = 0;
-static struct timeb cb_start_time;
-static struct timeb cb_stop_time;
-static struct timeb cb_start_call_time;
-static struct timeb cb_stop_call_time;
-
-extern void f2py_start_clock(void) { ftime(&start_time); }
-extern
-void f2py_start_call_clock(void) {
- f2py_stop_clock();
- ftime(&start_call_time);
-}
-extern
-void f2py_stop_clock(void) {
- ftime(&stop_time);
- passed_time += 1000*(stop_time.time - start_time.time);
- passed_time += stop_time.millitm - start_time.millitm;
-}
-extern
-void f2py_stop_call_clock(void) {
- ftime(&stop_call_time);
- passed_call_time += 1000*(stop_call_time.time - start_call_time.time);
- passed_call_time += stop_call_time.millitm - start_call_time.millitm;
- passed_counter += 1;
- f2py_start_clock();
-}
-
-extern void f2py_cb_start_clock(void) { ftime(&cb_start_time); }
-extern
-void f2py_cb_start_call_clock(void) {
- f2py_cb_stop_clock();
- ftime(&cb_start_call_time);
-}
-extern
-void f2py_cb_stop_clock(void) {
- ftime(&cb_stop_time);
- cb_passed_time += 1000*(cb_stop_time.time - cb_start_time.time);
- cb_passed_time += cb_stop_time.millitm - cb_start_time.millitm;
-}
-extern
-void f2py_cb_stop_call_clock(void) {
- ftime(&cb_stop_call_time);
- cb_passed_call_time += 1000*(cb_stop_call_time.time - cb_start_call_time.time);
- cb_passed_call_time += cb_stop_call_time.millitm - cb_start_call_time.millitm;
- cb_passed_counter += 1;
- f2py_cb_start_clock();
-}
-
-static int f2py_report_on_exit_been_here = 0;
-extern
-void f2py_report_on_exit(int exit_flag,void *name) {
- if (f2py_report_on_exit_been_here) {
- fprintf(stderr," %s\n",(char*)name);
- return;
- }
- f2py_report_on_exit_been_here = 1;
- fprintf(stderr," /-----------------------\\\n");
- fprintf(stderr," < F2PY performance report >\n");
- fprintf(stderr," \\-----------------------/\n");
- fprintf(stderr,"Overall time spent in ...\n");
- fprintf(stderr,"(a) wrapped (Fortran/C) functions : %8d msec\n",
- passed_call_time);
- fprintf(stderr,"(b) f2py interface, %6d calls : %8d msec\n",
- passed_counter,passed_time);
- fprintf(stderr,"(c) call-back (Python) functions : %8d msec\n",
- cb_passed_call_time);
- fprintf(stderr,"(d) f2py call-back interface, %6d calls : %8d msec\n",
- cb_passed_counter,cb_passed_time);
-
- fprintf(stderr,"(e) wrapped (Fortran/C) functions (acctual) : %8d msec\n\n",
- passed_call_time-cb_passed_call_time-cb_passed_time);
- fprintf(stderr,"Use -DF2PY_REPORT_ATEXIT_DISABLE to disable this message.\n");
- fprintf(stderr,"Exit status: %d\n",exit_flag);
- fprintf(stderr,"Modules : %s\n",(char*)name);
-}
-#endif
-
-/********************** report on array copy ****************************/
-
-#ifdef F2PY_REPORT_ON_ARRAY_COPY
-static void f2py_report_on_array_copy(PyArrayObject* arr) {
- const long arr_size = PyArray_Size((PyObject *)arr);
- if (arr_size>F2PY_REPORT_ON_ARRAY_COPY) {
- fprintf(stderr,"copied an array: size=%ld, elsize=%d\n",
- arr_size, PyArray_ITEMSIZE(arr));
- }
-}
-static void f2py_report_on_array_copy_fromany(void) {
- fprintf(stderr,"created an array from object\n");
-}
-
-#define F2PY_REPORT_ON_ARRAY_COPY_FROMARR f2py_report_on_array_copy((PyArrayObject *)arr)
-#define F2PY_REPORT_ON_ARRAY_COPY_FROMANY f2py_report_on_array_copy_fromany()
-#else
-#define F2PY_REPORT_ON_ARRAY_COPY_FROMARR
-#define F2PY_REPORT_ON_ARRAY_COPY_FROMANY
-#endif
-
-
-/************************* array_from_obj *******************************/
-
-/*
- * File: array_from_pyobj.c
- *
- * Description:
- * ------------
- * Provides array_from_pyobj function that returns a contigious array
- * object with the given dimensions and required storage order, either
- * in row-major (C) or column-major (Fortran) order. The function
- * array_from_pyobj is very flexible about its Python object argument
- * that can be any number, list, tuple, or array.
- *
- * array_from_pyobj is used in f2py generated Python extension
- * modules.
- *
- * Author: Pearu Peterson
- * Created: 13-16 January 2002
- * $Id: fortranobject.c,v 1.52 2005/07/11 07:44:20 pearu Exp $
- */
-
-static int
-count_nonpos(const int rank,
- const npy_intp *dims) {
- int i=0,r=0;
- while (ind;
- npy_intp size = PyArray_Size((PyObject *)arr);
- printf("\trank = %d, flags = %d, size = %" NPY_INTP_FMT "\n",
- rank,arr->flags,size);
- printf("\tstrides = ");
- dump_dims(rank,arr->strides);
- printf("\tdimensions = ");
- dump_dims(rank,arr->dimensions);
-}
-#endif
-
-#define SWAPTYPE(a,b,t) {t c; c = (a); (a) = (b); (b) = c; }
-
-static int swap_arrays(PyArrayObject* arr1, PyArrayObject* arr2) {
- SWAPTYPE(arr1->data,arr2->data,char*);
- SWAPTYPE(arr1->nd,arr2->nd,int);
- SWAPTYPE(arr1->dimensions,arr2->dimensions,npy_intp*);
- SWAPTYPE(arr1->strides,arr2->strides,npy_intp*);
- SWAPTYPE(arr1->base,arr2->base,PyObject*);
- SWAPTYPE(arr1->descr,arr2->descr,PyArray_Descr*);
- SWAPTYPE(arr1->flags,arr2->flags,int);
- /* SWAPTYPE(arr1->weakreflist,arr2->weakreflist,PyObject*); */
- return 0;
-}
-
-#define ARRAY_ISCOMPATIBLE(arr,type_num) \
- ( (PyArray_ISINTEGER(arr) && PyTypeNum_ISINTEGER(type_num)) \
- ||(PyArray_ISFLOAT(arr) && PyTypeNum_ISFLOAT(type_num)) \
- ||(PyArray_ISCOMPLEX(arr) && PyTypeNum_ISCOMPLEX(type_num)) \
- ||(PyArray_ISBOOL(arr) && PyTypeNum_ISBOOL(type_num)) \
- )
-
-extern
-PyArrayObject* array_from_pyobj(const int type_num,
- npy_intp *dims,
- const int rank,
- const int intent,
- PyObject *obj) {
- /* Note about reference counting
- -----------------------------
- If the caller returns the array to Python, it must be done with
- Py_BuildValue("N",arr).
- Otherwise, if obj!=arr then the caller must call Py_DECREF(arr).
-
- Note on intent(cache,out,..)
- ---------------------
- Don't expect correct data when returning intent(cache) array.
-
- */
- char mess[200];
- PyArrayObject *arr = NULL;
- PyArray_Descr *descr;
- char typechar;
- int elsize;
-
- if ((intent & F2PY_INTENT_HIDE)
- || ((intent & F2PY_INTENT_CACHE) && (obj==Py_None))
- || ((intent & F2PY_OPTIONAL) && (obj==Py_None))
- ) {
- /* intent(cache), optional, intent(hide) */
- if (count_nonpos(rank,dims)) {
- int i;
- sprintf(mess,"failed to create intent(cache|hide)|optional array"
- "-- must have defined dimensions but got (");
- for(i=0;ielsize;
- typechar = descr->type;
- Py_DECREF(descr);
- if (PyArray_Check(obj)) {
- arr = (PyArrayObject *)obj;
-
- if (intent & F2PY_INTENT_CACHE) {
- /* intent(cache) */
- if (PyArray_ISONESEGMENT(obj)
- && PyArray_ITEMSIZE((PyArrayObject *)obj)>=elsize) {
- if (check_and_fix_dimensions((PyArrayObject *)obj,rank,dims)) {
- return NULL; /*XXX: set exception */
- }
- if (intent & F2PY_INTENT_OUT)
- Py_INCREF(obj);
- return (PyArrayObject *)obj;
- }
- sprintf(mess,"failed to initialize intent(cache) array");
- if (!PyArray_ISONESEGMENT(obj))
- sprintf(mess+strlen(mess)," -- input must be in one segment");
- if (PyArray_ITEMSIZE(arr)descr->type,typechar);
- if (!(F2PY_CHECK_ALIGNMENT(arr, intent)))
- sprintf(mess+strlen(mess)," -- input not %d-aligned", F2PY_GET_ALIGNMENT(intent));
- PyErr_SetString(PyExc_ValueError,mess);
- return NULL;
- }
-
- /* here we have always intent(in) or intent(inplace) */
-
- {
- PyArrayObject *retarr = (PyArrayObject *) \
- PyArray_New(&PyArray_Type, arr->nd, arr->dimensions, type_num,
- NULL,NULL,0,
- !(intent&F2PY_INTENT_C),
- NULL);
- if (retarr==NULL)
- return NULL;
- F2PY_REPORT_ON_ARRAY_COPY_FROMARR;
- if (PyArray_CopyInto(retarr, arr)) {
- Py_DECREF(retarr);
- return NULL;
- }
- if (intent & F2PY_INTENT_INPLACE) {
- if (swap_arrays(arr,retarr))
- return NULL; /* XXX: set exception */
- Py_XDECREF(retarr);
- if (intent & F2PY_INTENT_OUT)
- Py_INCREF(arr);
- } else {
- arr = retarr;
- }
- }
- return arr;
- }
-
- if ((intent & F2PY_INTENT_INOUT) ||
- (intent & F2PY_INTENT_INPLACE) ||
- (intent & F2PY_INTENT_CACHE)) {
- PyErr_SetString(PyExc_TypeError,
- "failed to initialize intent(inout|inplace|cache) "
- "array, input not an array");
- return NULL;
- }
-
- {
- F2PY_REPORT_ON_ARRAY_COPY_FROMANY;
- arr = (PyArrayObject *) \
- PyArray_FromAny(obj,PyArray_DescrFromType(type_num), 0,0,
- ((intent & F2PY_INTENT_C)?NPY_CARRAY:NPY_FARRAY) \
- | NPY_FORCECAST, NULL);
- if (arr==NULL)
- return NULL;
- if (check_and_fix_dimensions(arr,rank,dims))
- return NULL; /*XXX: set exception */
- return arr;
- }
-
-}
-
-/*****************************************/
-/* Helper functions for array_from_pyobj */
-/*****************************************/
-
-static
-int check_and_fix_dimensions(const PyArrayObject* arr,const int rank,npy_intp *dims) {
- /*
- This function fills in blanks (that are -1\'s) in dims list using
- the dimensions from arr. It also checks that non-blank dims will
- match with the corresponding values in arr dimensions.
- */
- const npy_intp arr_size = (arr->nd)?PyArray_Size((PyObject *)arr):1;
-#ifdef DEBUG_COPY_ND_ARRAY
- dump_attrs(arr);
- printf("check_and_fix_dimensions:init: dims=");
- dump_dims(rank,dims);
-#endif
- if (rank > arr->nd) { /* [1,2] -> [[1],[2]]; 1 -> [[1]] */
- npy_intp new_size = 1;
- int free_axe = -1;
- int i;
- npy_intp d;
- /* Fill dims where -1 or 0; check dimensions; calc new_size; */
- for(i=0;ind;++i) {
- d = arr->dimensions[i];
- if (dims[i] >= 0) {
- if (d>1 && dims[i]!=d) {
- fprintf(stderr,"%d-th dimension must be fixed to %" NPY_INTP_FMT
- " but got %" NPY_INTP_FMT "\n",
- i,dims[i], d);
- return 1;
- }
- if (!dims[i]) dims[i] = 1;
- } else {
- dims[i] = d ? d : 1;
- }
- new_size *= dims[i];
- }
- for(i=arr->nd;i1) {
- fprintf(stderr,"%d-th dimension must be %" NPY_INTP_FMT
- " but got 0 (not defined).\n",
- i,dims[i]);
- return 1;
- } else if (free_axe<0)
- free_axe = i;
- else
- dims[i] = 1;
- if (free_axe>=0) {
- dims[free_axe] = arr_size/new_size;
- new_size *= dims[free_axe];
- }
- if (new_size != arr_size) {
- fprintf(stderr,"unexpected array size: new_size=%" NPY_INTP_FMT
- ", got array with arr_size=%" NPY_INTP_FMT " (maybe too many free"
- " indices)\n", new_size,arr_size);
- return 1;
- }
- } else if (rank==arr->nd) {
- npy_intp new_size = 1;
- int i;
- npy_intp d;
- for (i=0; idimensions[i];
- if (dims[i]>=0) {
- if (d > 1 && d!=dims[i]) {
- fprintf(stderr,"%d-th dimension must be fixed to %" NPY_INTP_FMT
- " but got %" NPY_INTP_FMT "\n",
- i,dims[i],d);
- return 1;
- }
- if (!dims[i]) dims[i] = 1;
- } else dims[i] = d;
- new_size *= dims[i];
- }
- if (new_size != arr_size) {
- fprintf(stderr,"unexpected array size: new_size=%" NPY_INTP_FMT
- ", got array with arr_size=%" NPY_INTP_FMT "\n", new_size,arr_size);
- return 1;
- }
- } else { /* [[1,2]] -> [[1],[2]] */
- int i,j;
- npy_intp d;
- int effrank;
- npy_intp size;
- for (i=0,effrank=0;ind;++i)
- if (arr->dimensions[i]>1) ++effrank;
- if (dims[rank-1]>=0)
- if (effrank>rank) {
- fprintf(stderr,"too many axes: %d (effrank=%d), expected rank=%d\n",
- arr->nd,effrank,rank);
- return 1;
- }
-
- for (i=0,j=0;ind && arr->dimensions[j]<2) ++j;
- if (j>=arr->nd) d = 1;
- else d = arr->dimensions[j++];
- if (dims[i]>=0) {
- if (d>1 && d!=dims[i]) {
- fprintf(stderr,"%d-th dimension must be fixed to %" NPY_INTP_FMT
- " but got %" NPY_INTP_FMT " (real index=%d)\n",
- i,dims[i],d,j-1);
- return 1;
- }
- if (!dims[i]) dims[i] = 1;
- } else
- dims[i] = d;
- }
-
- for (i=rank;ind;++i) { /* [[1,2],[3,4]] -> [1,2,3,4] */
- while (jnd && arr->dimensions[j]<2) ++j;
- if (j>=arr->nd) d = 1;
- else d = arr->dimensions[j++];
- dims[rank-1] *= d;
- }
- for (i=0,size=1;ind);
- for (i=0;ind;++i) fprintf(stderr," %" NPY_INTP_FMT,arr->dimensions[i]);
- fprintf(stderr," ]\n");
- return 1;
- }
- }
-#ifdef DEBUG_COPY_ND_ARRAY
- printf("check_and_fix_dimensions:end: dims=");
- dump_dims(rank,dims);
-#endif
- return 0;
-}
-
-/* End of file: array_from_pyobj.c */
-
-/************************* copy_ND_array *******************************/
-
-extern
-int copy_ND_array(const PyArrayObject *arr, PyArrayObject *out)
-{
- F2PY_REPORT_ON_ARRAY_COPY_FROMARR;
- return PyArray_CopyInto(out, (PyArrayObject *)arr);
-}
-
-/*********************************************/
-/* Compatibility functions for Python >= 3.0 */
-/*********************************************/
-
-#if PY_VERSION_HEX >= 0x03000000
-
-PyObject *
-F2PyCapsule_FromVoidPtr(void *ptr, void (*dtor)(PyObject *))
-{
- PyObject *ret = PyCapsule_New(ptr, NULL, dtor);
- if (ret == NULL) {
- PyErr_Clear();
- }
- return ret;
-}
-
-void *
-F2PyCapsule_AsVoidPtr(PyObject *obj)
-{
- void *ret = PyCapsule_GetPointer(obj, NULL);
- if (ret == NULL) {
- PyErr_Clear();
- }
- return ret;
-}
-
-int
-F2PyCapsule_Check(PyObject *ptr)
-{
- return PyCapsule_CheckExact(ptr);
-}
-
-#else
-
-PyObject *
-F2PyCapsule_FromVoidPtr(void *ptr, void (*dtor)(void *))
-{
- return PyCObject_FromVoidPtr(ptr, dtor);
-}
-
-void *
-F2PyCapsule_AsVoidPtr(PyObject *ptr)
-{
- return PyCObject_AsVoidPtr(ptr);
-}
-
-int
-F2PyCapsule_Check(PyObject *ptr)
-{
- return PyCObject_Check(ptr);
-}
-
-#endif
-
-
-#ifdef __cplusplus
-}
-#endif
-/************************* EOF fortranobject.c *******************************/
diff --git a/build/src.macosx-10.10-x86_64-2.7/fortranobject.h b/build/src.macosx-10.10-x86_64-2.7/fortranobject.h
deleted file mode 100644
index 689f78c..0000000
--- a/build/src.macosx-10.10-x86_64-2.7/fortranobject.h
+++ /dev/null
@@ -1,162 +0,0 @@
-#ifndef Py_FORTRANOBJECT_H
-#define Py_FORTRANOBJECT_H
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#include "Python.h"
-
-#ifdef FORTRANOBJECT_C
-#define NO_IMPORT_ARRAY
-#endif
-#define PY_ARRAY_UNIQUE_SYMBOL _npy_f2py_ARRAY_API
-#include "numpy/arrayobject.h"
-
-/*
- * Python 3 support macros
- */
-#if PY_VERSION_HEX >= 0x03000000
-#define PyString_Check PyBytes_Check
-#define PyString_GET_SIZE PyBytes_GET_SIZE
-#define PyString_AS_STRING PyBytes_AS_STRING
-#define PyString_FromString PyBytes_FromString
-#define PyUString_FromStringAndSize PyUnicode_FromStringAndSize
-#define PyString_ConcatAndDel PyBytes_ConcatAndDel
-#define PyString_AsString PyBytes_AsString
-
-#define PyInt_Check PyLong_Check
-#define PyInt_FromLong PyLong_FromLong
-#define PyInt_AS_LONG PyLong_AsLong
-#define PyInt_AsLong PyLong_AsLong
-
-#define PyNumber_Int PyNumber_Long
-
-#else
-
-#define PyUString_FromStringAndSize PyString_FromStringAndSize
-#endif
-
-
-#ifdef F2PY_REPORT_ATEXIT
-#include
- extern void f2py_start_clock(void);
- extern void f2py_stop_clock(void);
- extern void f2py_start_call_clock(void);
- extern void f2py_stop_call_clock(void);
- extern void f2py_cb_start_clock(void);
- extern void f2py_cb_stop_clock(void);
- extern void f2py_cb_start_call_clock(void);
- extern void f2py_cb_stop_call_clock(void);
- extern void f2py_report_on_exit(int,void*);
-#endif
-
-#ifdef DMALLOC
-#include "dmalloc.h"
-#endif
-
-/* Fortran object interface */
-
-/*
-123456789-123456789-123456789-123456789-123456789-123456789-123456789-12
-
-PyFortranObject represents various Fortran objects:
-Fortran (module) routines, COMMON blocks, module data.
-
-Author: Pearu Peterson
-*/
-
-#define F2PY_MAX_DIMS 40
-
-typedef void (*f2py_set_data_func)(char*,npy_intp*);
-typedef void (*f2py_void_func)(void);
-typedef void (*f2py_init_func)(int*,npy_intp*,f2py_set_data_func,int*);
-
- /*typedef void* (*f2py_c_func)(void*,...);*/
-
-typedef void *(*f2pycfunc)(void);
-
-typedef struct {
- char *name; /* attribute (array||routine) name */
- int rank; /* array rank, 0 for scalar, max is F2PY_MAX_DIMS,
- || rank=-1 for Fortran routine */
- struct {npy_intp d[F2PY_MAX_DIMS];} dims; /* dimensions of the array, || not used */
- int type; /* PyArray_ || not used */
- char *data; /* pointer to array || Fortran routine */
- f2py_init_func func; /* initialization function for
- allocatable arrays:
- func(&rank,dims,set_ptr_func,name,len(name))
- || C/API wrapper for Fortran routine */
- char *doc; /* documentation string; only recommended
- for routines. */
-} FortranDataDef;
-
-typedef struct {
- PyObject_HEAD
- int len; /* Number of attributes */
- FortranDataDef *defs; /* An array of FortranDataDef's */
- PyObject *dict; /* Fortran object attribute dictionary */
-} PyFortranObject;
-
-#define PyFortran_Check(op) (Py_TYPE(op) == &PyFortran_Type)
-#define PyFortran_Check1(op) (0==strcmp(Py_TYPE(op)->tp_name,"fortran"))
-
- extern PyTypeObject PyFortran_Type;
- extern int F2PyDict_SetItemString(PyObject* dict, char *name, PyObject *obj);
- extern PyObject * PyFortranObject_New(FortranDataDef* defs, f2py_void_func init);
- extern PyObject * PyFortranObject_NewAsAttr(FortranDataDef* defs);
-
-#if PY_VERSION_HEX >= 0x03000000
-
-PyObject * F2PyCapsule_FromVoidPtr(void *ptr, void (*dtor)(PyObject *));
-void * F2PyCapsule_AsVoidPtr(PyObject *obj);
-int F2PyCapsule_Check(PyObject *ptr);
-
-#else
-
-PyObject * F2PyCapsule_FromVoidPtr(void *ptr, void (*dtor)(void *));
-void * F2PyCapsule_AsVoidPtr(PyObject *ptr);
-int F2PyCapsule_Check(PyObject *ptr);
-
-#endif
-
-#define ISCONTIGUOUS(m) ((m)->flags & NPY_CONTIGUOUS)
-#define F2PY_INTENT_IN 1
-#define F2PY_INTENT_INOUT 2
-#define F2PY_INTENT_OUT 4
-#define F2PY_INTENT_HIDE 8
-#define F2PY_INTENT_CACHE 16
-#define F2PY_INTENT_COPY 32
-#define F2PY_INTENT_C 64
-#define F2PY_OPTIONAL 128
-#define F2PY_INTENT_INPLACE 256
-#define F2PY_INTENT_ALIGNED4 512
-#define F2PY_INTENT_ALIGNED8 1024
-#define F2PY_INTENT_ALIGNED16 2048
-
-#define ARRAY_ISALIGNED(ARR, SIZE) ((size_t)(PyArray_DATA(ARR)) % (SIZE) == 0)
-#define F2PY_ALIGN4(intent) (intent & F2PY_INTENT_ALIGNED4)
-#define F2PY_ALIGN8(intent) (intent & F2PY_INTENT_ALIGNED8)
-#define F2PY_ALIGN16(intent) (intent & F2PY_INTENT_ALIGNED16)
-
-#define F2PY_GET_ALIGNMENT(intent) \
- (F2PY_ALIGN4(intent) ? 4 : \
- (F2PY_ALIGN8(intent) ? 8 : \
- (F2PY_ALIGN16(intent) ? 16 : 1) ))
-#define F2PY_CHECK_ALIGNMENT(arr, intent) ARRAY_ISALIGNED(arr, F2PY_GET_ALIGNMENT(intent))
-
- extern PyArrayObject* array_from_pyobj(const int type_num,
- npy_intp *dims,
- const int rank,
- const int intent,
- PyObject *obj);
- extern int copy_ND_array(const PyArrayObject *in, PyArrayObject *out);
-
-#ifdef DEBUG_COPY_ND_ARRAY
- extern void dump_attrs(const PyArrayObject* arr);
-#endif
-
-
-#ifdef __cplusplus
-}
-#endif
-#endif /* !Py_FORTRANOBJECT_H */
diff --git a/build/src.macosx-10.10-x86_64-2.7/pysar/__config__.py b/build/src.macosx-10.10-x86_64-2.7/pysar/__config__.py
deleted file mode 100644
index 82b7493..0000000
--- a/build/src.macosx-10.10-x86_64-2.7/pysar/__config__.py
+++ /dev/null
@@ -1,21 +0,0 @@
-# This file is generated by /Users/brentminchew/Documents/Python/PySAR/setup.py
-# It contains system_info results at the time of building this package.
-__all__ = ["get_info","show"]
-
-
-def get_info(name):
- g = globals()
- return g.get(name, g.get(name + "_info", {}))
-
-def show():
- for name,info_dict in globals().items():
- if name[0] == "_" or type(info_dict) is not type({}): continue
- print(name + ":")
- if not info_dict:
- print(" NOT AVAILABLE")
- for k,v in info_dict.items():
- v = str(v)
- if k == "sources" and len(v) > 200:
- v = v[:60] + " ...\n... " + v[-60:]
- print(" %s = %s" % (k,v))
-
\ No newline at end of file
diff --git a/build/src.macosx-10.10-x86_64-2.7/pysar/image/_looks_modmodule.c b/build/src.macosx-10.10-x86_64-2.7/pysar/image/_looks_modmodule.c
deleted file mode 100644
index fa73b9f..0000000
--- a/build/src.macosx-10.10-x86_64-2.7/pysar/image/_looks_modmodule.c
+++ /dev/null
@@ -1,1181 +0,0 @@
-/* File: _looks_modmodule.c
- * This file is auto-generated with f2py (version:2).
- * f2py is a Fortran to Python Interface Generator (FPIG), Second Edition,
- * written by Pearu Peterson .
- * See http://cens.ioc.ee/projects/f2py2e/
- * Generation date: Mon Aug 17 15:42:40 2015
- * $Revision:$
- * $Date:$
- * Do not edit this file directly unless you know what you are doing!!!
- */
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/*********************** See f2py2e/cfuncs.py: includes ***********************/
-#include "Python.h"
-#include
-#include "fortranobject.h"
-#include
-
-/**************** See f2py2e/rules.py: mod_rules['modulebody'] ****************/
-static PyObject *_looks_mod_error;
-static PyObject *_looks_mod_module;
-
-/*********************** See f2py2e/cfuncs.py: typedefs ***********************/
-typedef struct {double r,i;} complex_double;
-typedef struct {float r,i;} complex_float;
-
-/****************** See f2py2e/cfuncs.py: typedefs_generated ******************/
-/*need_typedefs_generated*/
-
-/********************** See f2py2e/cfuncs.py: cppmacros **********************/
-#if defined(PREPEND_FORTRAN)
-#if defined(NO_APPEND_FORTRAN)
-#if defined(UPPERCASE_FORTRAN)
-#define F_FUNC(f,F) _##F
-#else
-#define F_FUNC(f,F) _##f
-#endif
-#else
-#if defined(UPPERCASE_FORTRAN)
-#define F_FUNC(f,F) _##F##_
-#else
-#define F_FUNC(f,F) _##f##_
-#endif
-#endif
-#else
-#if defined(NO_APPEND_FORTRAN)
-#if defined(UPPERCASE_FORTRAN)
-#define F_FUNC(f,F) F
-#else
-#define F_FUNC(f,F) f
-#endif
-#else
-#if defined(UPPERCASE_FORTRAN)
-#define F_FUNC(f,F) F##_
-#else
-#define F_FUNC(f,F) f##_
-#endif
-#endif
-#endif
-#if defined(UNDERSCORE_G77)
-#define F_FUNC_US(f,F) F_FUNC(f##_,F##_)
-#else
-#define F_FUNC_US(f,F) F_FUNC(f,F)
-#endif
-
-#define rank(var) var ## _Rank
-#define shape(var,dim) var ## _Dims[dim]
-#define old_rank(var) (((PyArrayObject *)(capi_ ## var ## _tmp))->nd)
-#define old_shape(var,dim) (((PyArrayObject *)(capi_ ## var ## _tmp))->dimensions[dim])
-#define fshape(var,dim) shape(var,rank(var)-dim-1)
-#define len(var) shape(var,0)
-#define flen(var) fshape(var,0)
-#define old_size(var) PyArray_SIZE((PyArrayObject *)(capi_ ## var ## _tmp))
-/* #define index(i) capi_i ## i */
-#define slen(var) capi_ ## var ## _len
-#define size(var, ...) f2py_size((PyArrayObject *)(capi_ ## var ## _tmp), ## __VA_ARGS__, -1)
-
-#define CHECKSCALAR(check,tcheck,name,show,var)\
- if (!(check)) {\
- char errstring[256];\
- sprintf(errstring, "%s: "show, "("tcheck") failed for "name, var);\
- PyErr_SetString(_looks_mod_error,errstring);\
- /*goto capi_fail;*/\
- } else
-#ifdef DEBUGCFUNCS
-#define CFUNCSMESS(mess) fprintf(stderr,"debug-capi:"mess);
-#define CFUNCSMESSPY(mess,obj) CFUNCSMESS(mess) \
- PyObject_Print((PyObject *)obj,stderr,Py_PRINT_RAW);\
- fprintf(stderr,"\n");
-#else
-#define CFUNCSMESS(mess)
-#define CFUNCSMESSPY(mess,obj)
-#endif
-
-#ifndef max
-#define max(a,b) ((a > b) ? (a) : (b))
-#endif
-#ifndef min
-#define min(a,b) ((a < b) ? (a) : (b))
-#endif
-#ifndef MAX
-#define MAX(a,b) ((a > b) ? (a) : (b))
-#endif
-#ifndef MIN
-#define MIN(a,b) ((a < b) ? (a) : (b))
-#endif
-
-#define pyobj_from_complex_float1(v) (PyComplex_FromDoubles(v.r,v.i))
-#define pyobj_from_complex_double1(v) (PyComplex_FromDoubles(v.r,v.i))
-
-/************************ See f2py2e/cfuncs.py: cfuncs ************************/
-static int complex_double_from_pyobj(complex_double* v,PyObject *obj,const char *errmess) {
- Py_complex c;
- if (PyComplex_Check(obj)) {
- c=PyComplex_AsCComplex(obj);
- (*v).r=c.real, (*v).i=c.imag;
- return 1;
- }
- if (PyArray_IsScalar(obj, ComplexFloating)) {
- if (PyArray_IsScalar(obj, CFloat)) {
- npy_cfloat new;
- PyArray_ScalarAsCtype(obj, &new);
- (*v).r = (double)new.real;
- (*v).i = (double)new.imag;
- }
- else if (PyArray_IsScalar(obj, CLongDouble)) {
- npy_clongdouble new;
- PyArray_ScalarAsCtype(obj, &new);
- (*v).r = (double)new.real;
- (*v).i = (double)new.imag;
- }
- else { /* if (PyArray_IsScalar(obj, CDouble)) */
- PyArray_ScalarAsCtype(obj, v);
- }
- return 1;
- }
- if (PyArray_CheckScalar(obj)) { /* 0-dim array or still array scalar */
- PyObject *arr;
- if (PyArray_Check(obj)) {
- arr = PyArray_Cast((PyArrayObject *)obj, NPY_CDOUBLE);
- }
- else {
- arr = PyArray_FromScalar(obj, PyArray_DescrFromType(NPY_CDOUBLE));
- }
- if (arr==NULL) return 0;
- (*v).r = ((npy_cdouble *)PyArray_DATA(arr))->real;
- (*v).i = ((npy_cdouble *)PyArray_DATA(arr))->imag;
- return 1;
- }
- /* Python does not provide PyNumber_Complex function :-( */
- (*v).i=0.0;
- if (PyFloat_Check(obj)) {
-#ifdef __sgi
- (*v).r = PyFloat_AsDouble(obj);
-#else
- (*v).r = PyFloat_AS_DOUBLE(obj);
-#endif
- return 1;
- }
- if (PyInt_Check(obj)) {
- (*v).r = (double)PyInt_AS_LONG(obj);
- return 1;
- }
- if (PyLong_Check(obj)) {
- (*v).r = PyLong_AsDouble(obj);
- return (!PyErr_Occurred());
- }
- if (PySequence_Check(obj) && !(PyString_Check(obj) || PyUnicode_Check(obj))) {
- PyObject *tmp = PySequence_GetItem(obj,0);
- if (tmp) {
- if (complex_double_from_pyobj(v,tmp,errmess)) {
- Py_DECREF(tmp);
- return 1;
- }
- Py_DECREF(tmp);
- }
- }
- {
- PyObject* err = PyErr_Occurred();
- if (err==NULL)
- err = PyExc_TypeError;
- PyErr_SetString(err,errmess);
- }
- return 0;
-}
-
-static int double_from_pyobj(double* v,PyObject *obj,const char *errmess) {
- PyObject* tmp = NULL;
- if (PyFloat_Check(obj)) {
-#ifdef __sgi
- *v = PyFloat_AsDouble(obj);
-#else
- *v = PyFloat_AS_DOUBLE(obj);
-#endif
- return 1;
- }
- tmp = PyNumber_Float(obj);
- if (tmp) {
-#ifdef __sgi
- *v = PyFloat_AsDouble(tmp);
-#else
- *v = PyFloat_AS_DOUBLE(tmp);
-#endif
- Py_DECREF(tmp);
- return 1;
- }
- if (PyComplex_Check(obj))
- tmp = PyObject_GetAttrString(obj,"real");
- else if (PyString_Check(obj) || PyUnicode_Check(obj))
- /*pass*/;
- else if (PySequence_Check(obj))
- tmp = PySequence_GetItem(obj,0);
- if (tmp) {
- PyErr_Clear();
- if (double_from_pyobj(v,tmp,errmess)) {Py_DECREF(tmp); return 1;}
- Py_DECREF(tmp);
- }
- {
- PyObject* err = PyErr_Occurred();
- if (err==NULL) err = _looks_mod_error;
- PyErr_SetString(err,errmess);
- }
- return 0;
-}
-
-static int f2py_size(PyArrayObject* var, ...)
-{
- npy_int sz = 0;
- npy_int dim;
- npy_int rank;
- va_list argp;
- va_start(argp, var);
- dim = va_arg(argp, npy_int);
- if (dim==-1)
- {
- sz = PyArray_SIZE(var);
- }
- else
- {
- rank = PyArray_NDIM(var);
- if (dim>=1 && dim<=rank)
- sz = PyArray_DIM(var, dim-1);
- else
- fprintf(stderr, "f2py_size: 2nd argument value=%d fails to satisfy 1<=value<=%d. Result will be 0.\n", dim, rank);
- }
- va_end(argp);
- return sz;
-}
-
-static int int_from_pyobj(int* v,PyObject *obj,const char *errmess) {
- PyObject* tmp = NULL;
- if (PyInt_Check(obj)) {
- *v = (int)PyInt_AS_LONG(obj);
- return 1;
- }
- tmp = PyNumber_Int(obj);
- if (tmp) {
- *v = PyInt_AS_LONG(tmp);
- Py_DECREF(tmp);
- return 1;
- }
- if (PyComplex_Check(obj))
- tmp = PyObject_GetAttrString(obj,"real");
- else if (PyString_Check(obj) || PyUnicode_Check(obj))
- /*pass*/;
- else if (PySequence_Check(obj))
- tmp = PySequence_GetItem(obj,0);
- if (tmp) {
- PyErr_Clear();
- if (int_from_pyobj(v,tmp,errmess)) {Py_DECREF(tmp); return 1;}
- Py_DECREF(tmp);
- }
- {
- PyObject* err = PyErr_Occurred();
- if (err==NULL) err = _looks_mod_error;
- PyErr_SetString(err,errmess);
- }
- return 0;
-}
-
-static int float_from_pyobj(float* v,PyObject *obj,const char *errmess) {
- double d=0.0;
- if (double_from_pyobj(&d,obj,errmess)) {
- *v = (float)d;
- return 1;
- }
- return 0;
-}
-
-static int complex_float_from_pyobj(complex_float* v,PyObject *obj,const char *errmess) {
- complex_double cd={0.0,0.0};
- if (complex_double_from_pyobj(&cd,obj,errmess)) {
- (*v).r = (float)cd.r;
- (*v).i = (float)cd.i;
- return 1;
- }
- return 0;
-}
-
-
-/********************* See f2py2e/cfuncs.py: userincludes *********************/
-/*need_userincludes*/
-
-/********************* See f2py2e/capi_rules.py: usercode *********************/
-
-
-/* See f2py2e/rules.py */
-extern void F_FUNC_US(look2d_real,LOOK2D_REAL)(float*,int*,int*,int*,int*,float*,int*,int*,float*,int*);
-extern void F_FUNC_US(look2d_double,LOOK2D_DOUBLE)(double*,int*,int*,int*,int*,double*,int*,int*,double*,int*);
-extern void F_FUNC_US(look2d_cmplx,LOOK2D_CMPLX)(complex_float*,int*,int*,int*,int*,complex_float*,int*,int*,complex_float*,int*);
-extern void F_FUNC_US(look2d_dcmplx,LOOK2D_DCMPLX)(complex_double*,int*,int*,int*,int*,complex_double*,int*,int*,complex_double*,int*);
-extern void F_FUNC_US(print_status,PRINT_STATUS)(int*,int*,int*);
-/*eof externroutines*/
-
-/******************** See f2py2e/capi_rules.py: usercode1 ********************/
-
-
-/******************* See f2py2e/cb_rules.py: buildcallback *******************/
-/*need_callbacks*/
-
-/*********************** See f2py2e/rules.py: buildapi ***********************/
-
-/******************************** look2d_real ********************************/
-static char doc_f2py_rout__looks_mod_look2d_real[] = "\
-dataout = look2d_real(datain,cols,lkaz,lkrg,outlen,xnull,nullval,verbose,[inlen])\n\nWrapper for ``look2d_real``.\
-\n\nParameters\n----------\n"
-"datain : input rank-1 array('f') with bounds (inlen)\n"
-"cols : input int\n"
-"lkaz : input int\n"
-"lkrg : input int\n"
-"outlen : input int\n"
-"xnull : input int\n"
-"nullval : input float\n"
-"verbose : input int\n"
-"\nOther Parameters\n----------------\n"
-"inlen : input int, optional\n Default: len(datain)\n"
-"\nReturns\n-------\n"
-"dataout : rank-1 array('f') with bounds (outlen)";
-/* extern void F_FUNC_US(look2d_real,LOOK2D_REAL)(float*,int*,int*,int*,int*,float*,int*,int*,float*,int*); */
-static PyObject *f2py_rout__looks_mod_look2d_real(const PyObject *capi_self,
- PyObject *capi_args,
- PyObject *capi_keywds,
- void (*f2py_func)(float*,int*,int*,int*,int*,float*,int*,int*,float*,int*)) {
- PyObject * volatile capi_buildvalue = NULL;
- volatile int f2py_success = 1;
-/*decl*/
-
- float *datain = NULL;
- npy_intp datain_Dims[1] = {-1};
- const int datain_Rank = 1;
- PyArrayObject *capi_datain_tmp = NULL;
- int capi_datain_intent = 0;
- PyObject *datain_capi = Py_None;
- int inlen = 0;
- PyObject *inlen_capi = Py_None;
- int cols = 0;
- PyObject *cols_capi = Py_None;
- int lkaz = 0;
- PyObject *lkaz_capi = Py_None;
- int lkrg = 0;
- PyObject *lkrg_capi = Py_None;
- float *dataout = NULL;
- npy_intp dataout_Dims[1] = {-1};
- const int dataout_Rank = 1;
- PyArrayObject *capi_dataout_tmp = NULL;
- int capi_dataout_intent = 0;
- int outlen = 0;
- PyObject *outlen_capi = Py_None;
- int xnull = 0;
- PyObject *xnull_capi = Py_None;
- float nullval = 0;
- PyObject *nullval_capi = Py_None;
- int verbose = 0;
- PyObject *verbose_capi = Py_None;
- static char *capi_kwlist[] = {"datain","cols","lkaz","lkrg","outlen","xnull","nullval","verbose","inlen",NULL};
-
-/*routdebugenter*/
-#ifdef F2PY_REPORT_ATEXIT
-f2py_start_clock();
-#endif
- if (!PyArg_ParseTupleAndKeywords(capi_args,capi_keywds,\
- "OOOOOOOO|O:_looks_mod.look2d_real",\
- capi_kwlist,&datain_capi,&cols_capi,&lkaz_capi,&lkrg_capi,&outlen_capi,&xnull_capi,&nullval_capi,&verbose_capi,&inlen_capi))
- return NULL;
-/*frompyobj*/
- /* Processing variable verbose */
- f2py_success = int_from_pyobj(&verbose,verbose_capi,"_looks_mod.look2d_real() 8th argument (verbose) can't be converted to int");
- if (f2py_success) {
- /* Processing variable datain */
- ;
- capi_datain_intent |= F2PY_INTENT_IN;
- capi_datain_tmp = array_from_pyobj(NPY_FLOAT,datain_Dims,datain_Rank,capi_datain_intent,datain_capi);
- if (capi_datain_tmp == NULL) {
- if (!PyErr_Occurred())
- PyErr_SetString(_looks_mod_error,"failed in converting 1st argument `datain' of _looks_mod.look2d_real to C/Fortran array" );
- } else {
- datain = (float *)(capi_datain_tmp->data);
-
- /* Processing variable cols */
- f2py_success = int_from_pyobj(&cols,cols_capi,"_looks_mod.look2d_real() 2nd argument (cols) can't be converted to int");
- if (f2py_success) {
- /* Processing variable lkrg */
- f2py_success = int_from_pyobj(&lkrg,lkrg_capi,"_looks_mod.look2d_real() 4th argument (lkrg) can't be converted to int");
- if (f2py_success) {
- /* Processing variable nullval */
- f2py_success = float_from_pyobj(&nullval,nullval_capi,"_looks_mod.look2d_real() 7th argument (nullval) can't be converted to float");
- if (f2py_success) {
- /* Processing variable outlen */
- f2py_success = int_from_pyobj(&outlen,outlen_capi,"_looks_mod.look2d_real() 5th argument (outlen) can't be converted to int");
- if (f2py_success) {
- /* Processing variable xnull */
- f2py_success = int_from_pyobj(&xnull,xnull_capi,"_looks_mod.look2d_real() 6th argument (xnull) can't be converted to int");
- if (f2py_success) {
- /* Processing variable lkaz */
- f2py_success = int_from_pyobj(&lkaz,lkaz_capi,"_looks_mod.look2d_real() 3rd argument (lkaz) can't be converted to int");
- if (f2py_success) {
- /* Processing variable inlen */
- if (inlen_capi == Py_None) inlen = len(datain); else
- f2py_success = int_from_pyobj(&inlen,inlen_capi,"_looks_mod.look2d_real() 1st keyword (inlen) can't be converted to int");
- if (f2py_success) {
- CHECKSCALAR(len(datain)>=inlen,"len(datain)>=inlen","1st keyword inlen","look2d_real:inlen=%d",inlen) {
- /* Processing variable dataout */
- dataout_Dims[0]=outlen;
- capi_dataout_intent |= F2PY_INTENT_OUT|F2PY_INTENT_HIDE;
- capi_dataout_tmp = array_from_pyobj(NPY_FLOAT,dataout_Dims,dataout_Rank,capi_dataout_intent,Py_None);
- if (capi_dataout_tmp == NULL) {
- if (!PyErr_Occurred())
- PyErr_SetString(_looks_mod_error,"failed in converting hidden `dataout' of _looks_mod.look2d_real to C/Fortran array" );
- } else {
- dataout = (float *)(capi_dataout_tmp->data);
-
-/*end of frompyobj*/
-#ifdef F2PY_REPORT_ATEXIT
-f2py_start_call_clock();
-#endif
-/*callfortranroutine*/
- (*f2py_func)(datain,&inlen,&cols,&lkaz,&lkrg,dataout,&outlen,&xnull,&nullval,&verbose);
-if (PyErr_Occurred())
- f2py_success = 0;
-#ifdef F2PY_REPORT_ATEXIT
-f2py_stop_call_clock();
-#endif
-/*end of callfortranroutine*/
- if (f2py_success) {
-/*pyobjfrom*/
-/*end of pyobjfrom*/
- CFUNCSMESS("Building return value.\n");
- capi_buildvalue = Py_BuildValue("N",capi_dataout_tmp);
-/*closepyobjfrom*/
-/*end of closepyobjfrom*/
- } /*if (f2py_success) after callfortranroutine*/
-/*cleanupfrompyobj*/
- } /*if (capi_dataout_tmp == NULL) ... else of dataout*/
- /* End of cleaning variable dataout */
- } /*CHECKSCALAR(len(datain)>=inlen)*/
- } /*if (f2py_success) of inlen*/
- /* End of cleaning variable inlen */
- } /*if (f2py_success) of lkaz*/
- /* End of cleaning variable lkaz */
- } /*if (f2py_success) of xnull*/
- /* End of cleaning variable xnull */
- } /*if (f2py_success) of outlen*/
- /* End of cleaning variable outlen */
- } /*if (f2py_success) of nullval*/
- /* End of cleaning variable nullval */
- } /*if (f2py_success) of lkrg*/
- /* End of cleaning variable lkrg */
- } /*if (f2py_success) of cols*/
- /* End of cleaning variable cols */
- if((PyObject *)capi_datain_tmp!=datain_capi) {
- Py_XDECREF(capi_datain_tmp); }
- } /*if (capi_datain_tmp == NULL) ... else of datain*/
- /* End of cleaning variable datain */
- } /*if (f2py_success) of verbose*/
- /* End of cleaning variable verbose */
-/*end of cleanupfrompyobj*/
- if (capi_buildvalue == NULL) {
-/*routdebugfailure*/
- } else {
-/*routdebugleave*/
- }
- CFUNCSMESS("Freeing memory.\n");
-/*freemem*/
-#ifdef F2PY_REPORT_ATEXIT
-f2py_stop_clock();
-#endif
- return capi_buildvalue;
-}
-/***************************** end of look2d_real *****************************/
-
-/******************************* look2d_double *******************************/
-static char doc_f2py_rout__looks_mod_look2d_double[] = "\
-dataout = look2d_double(datain,cols,lkaz,lkrg,outlen,xnull,nullval,verbose,[inlen])\n\nWrapper for ``look2d_double``.\
-\n\nParameters\n----------\n"
-"datain : input rank-1 array('d') with bounds (inlen)\n"
-"cols : input int\n"
-"lkaz : input int\n"
-"lkrg : input int\n"
-"outlen : input int\n"
-"xnull : input int\n"
-"nullval : input float\n"
-"verbose : input int\n"
-"\nOther Parameters\n----------------\n"
-"inlen : input int, optional\n Default: len(datain)\n"
-"\nReturns\n-------\n"
-"dataout : rank-1 array('d') with bounds (outlen)";
-/* extern void F_FUNC_US(look2d_double,LOOK2D_DOUBLE)(double*,int*,int*,int*,int*,double*,int*,int*,double*,int*); */
-static PyObject *f2py_rout__looks_mod_look2d_double(const PyObject *capi_self,
- PyObject *capi_args,
- PyObject *capi_keywds,
- void (*f2py_func)(double*,int*,int*,int*,int*,double*,int*,int*,double*,int*)) {
- PyObject * volatile capi_buildvalue = NULL;
- volatile int f2py_success = 1;
-/*decl*/
-
- double *datain = NULL;
- npy_intp datain_Dims[1] = {-1};
- const int datain_Rank = 1;
- PyArrayObject *capi_datain_tmp = NULL;
- int capi_datain_intent = 0;
- PyObject *datain_capi = Py_None;
- int inlen = 0;
- PyObject *inlen_capi = Py_None;
- int cols = 0;
- PyObject *cols_capi = Py_None;
- int lkaz = 0;
- PyObject *lkaz_capi = Py_None;
- int lkrg = 0;
- PyObject *lkrg_capi = Py_None;
- double *dataout = NULL;
- npy_intp dataout_Dims[1] = {-1};
- const int dataout_Rank = 1;
- PyArrayObject *capi_dataout_tmp = NULL;
- int capi_dataout_intent = 0;
- int outlen = 0;
- PyObject *outlen_capi = Py_None;
- int xnull = 0;
- PyObject *xnull_capi = Py_None;
- double nullval = 0;
- PyObject *nullval_capi = Py_None;
- int verbose = 0;
- PyObject *verbose_capi = Py_None;
- static char *capi_kwlist[] = {"datain","cols","lkaz","lkrg","outlen","xnull","nullval","verbose","inlen",NULL};
-
-/*routdebugenter*/
-#ifdef F2PY_REPORT_ATEXIT
-f2py_start_clock();
-#endif
- if (!PyArg_ParseTupleAndKeywords(capi_args,capi_keywds,\
- "OOOOOOOO|O:_looks_mod.look2d_double",\
- capi_kwlist,&datain_capi,&cols_capi,&lkaz_capi,&lkrg_capi,&outlen_capi,&xnull_capi,&nullval_capi,&verbose_capi,&inlen_capi))
- return NULL;
-/*frompyobj*/
- /* Processing variable verbose */
- f2py_success = int_from_pyobj(&verbose,verbose_capi,"_looks_mod.look2d_double() 8th argument (verbose) can't be converted to int");
- if (f2py_success) {
- /* Processing variable datain */
- ;
- capi_datain_intent |= F2PY_INTENT_IN;
- capi_datain_tmp = array_from_pyobj(NPY_DOUBLE,datain_Dims,datain_Rank,capi_datain_intent,datain_capi);
- if (capi_datain_tmp == NULL) {
- if (!PyErr_Occurred())
- PyErr_SetString(_looks_mod_error,"failed in converting 1st argument `datain' of _looks_mod.look2d_double to C/Fortran array" );
- } else {
- datain = (double *)(capi_datain_tmp->data);
-
- /* Processing variable cols */
- f2py_success = int_from_pyobj(&cols,cols_capi,"_looks_mod.look2d_double() 2nd argument (cols) can't be converted to int");
- if (f2py_success) {
- /* Processing variable lkrg */
- f2py_success = int_from_pyobj(&lkrg,lkrg_capi,"_looks_mod.look2d_double() 4th argument (lkrg) can't be converted to int");
- if (f2py_success) {
- /* Processing variable nullval */
- f2py_success = double_from_pyobj(&nullval,nullval_capi,"_looks_mod.look2d_double() 7th argument (nullval) can't be converted to double");
- if (f2py_success) {
- /* Processing variable outlen */
- f2py_success = int_from_pyobj(&outlen,outlen_capi,"_looks_mod.look2d_double() 5th argument (outlen) can't be converted to int");
- if (f2py_success) {
- /* Processing variable xnull */
- f2py_success = int_from_pyobj(&xnull,xnull_capi,"_looks_mod.look2d_double() 6th argument (xnull) can't be converted to int");
- if (f2py_success) {
- /* Processing variable lkaz */
- f2py_success = int_from_pyobj(&lkaz,lkaz_capi,"_looks_mod.look2d_double() 3rd argument (lkaz) can't be converted to int");
- if (f2py_success) {
- /* Processing variable inlen */
- if (inlen_capi == Py_None) inlen = len(datain); else
- f2py_success = int_from_pyobj(&inlen,inlen_capi,"_looks_mod.look2d_double() 1st keyword (inlen) can't be converted to int");
- if (f2py_success) {
- CHECKSCALAR(len(datain)>=inlen,"len(datain)>=inlen","1st keyword inlen","look2d_double:inlen=%d",inlen) {
- /* Processing variable dataout */
- dataout_Dims[0]=outlen;
- capi_dataout_intent |= F2PY_INTENT_OUT|F2PY_INTENT_HIDE;
- capi_dataout_tmp = array_from_pyobj(NPY_DOUBLE,dataout_Dims,dataout_Rank,capi_dataout_intent,Py_None);
- if (capi_dataout_tmp == NULL) {
- if (!PyErr_Occurred())
- PyErr_SetString(_looks_mod_error,"failed in converting hidden `dataout' of _looks_mod.look2d_double to C/Fortran array" );
- } else {
- dataout = (double *)(capi_dataout_tmp->data);
-
-/*end of frompyobj*/
-#ifdef F2PY_REPORT_ATEXIT
-f2py_start_call_clock();
-#endif
-/*callfortranroutine*/
- (*f2py_func)(datain,&inlen,&cols,&lkaz,&lkrg,dataout,&outlen,&xnull,&nullval,&verbose);
-if (PyErr_Occurred())
- f2py_success = 0;
-#ifdef F2PY_REPORT_ATEXIT
-f2py_stop_call_clock();
-#endif
-/*end of callfortranroutine*/
- if (f2py_success) {
-/*pyobjfrom*/
-/*end of pyobjfrom*/
- CFUNCSMESS("Building return value.\n");
- capi_buildvalue = Py_BuildValue("N",capi_dataout_tmp);
-/*closepyobjfrom*/
-/*end of closepyobjfrom*/
- } /*if (f2py_success) after callfortranroutine*/
-/*cleanupfrompyobj*/
- } /*if (capi_dataout_tmp == NULL) ... else of dataout*/
- /* End of cleaning variable dataout */
- } /*CHECKSCALAR(len(datain)>=inlen)*/
- } /*if (f2py_success) of inlen*/
- /* End of cleaning variable inlen */
- } /*if (f2py_success) of lkaz*/
- /* End of cleaning variable lkaz */
- } /*if (f2py_success) of xnull*/
- /* End of cleaning variable xnull */
- } /*if (f2py_success) of outlen*/
- /* End of cleaning variable outlen */
- } /*if (f2py_success) of nullval*/
- /* End of cleaning variable nullval */
- } /*if (f2py_success) of lkrg*/
- /* End of cleaning variable lkrg */
- } /*if (f2py_success) of cols*/
- /* End of cleaning variable cols */
- if((PyObject *)capi_datain_tmp!=datain_capi) {
- Py_XDECREF(capi_datain_tmp); }
- } /*if (capi_datain_tmp == NULL) ... else of datain*/
- /* End of cleaning variable datain */
- } /*if (f2py_success) of verbose*/
- /* End of cleaning variable verbose */
-/*end of cleanupfrompyobj*/
- if (capi_buildvalue == NULL) {
-/*routdebugfailure*/
- } else {
-/*routdebugleave*/
- }
- CFUNCSMESS("Freeing memory.\n");
-/*freemem*/
-#ifdef F2PY_REPORT_ATEXIT
-f2py_stop_clock();
-#endif
- return capi_buildvalue;
-}
-/**************************** end of look2d_double ****************************/
-
-/******************************** look2d_cmplx ********************************/
-static char doc_f2py_rout__looks_mod_look2d_cmplx[] = "\
-dataout = look2d_cmplx(datain,cols,lkaz,lkrg,outlen,xnull,nullval,verbose,[inlen])\n\nWrapper for ``look2d_cmplx``.\
-\n\nParameters\n----------\n"
-"datain : input rank-1 array('F') with bounds (inlen)\n"
-"cols : input int\n"
-"lkaz : input int\n"
-"lkrg : input int\n"
-"outlen : input int\n"
-"xnull : input int\n"
-"nullval : input complex\n"
-"verbose : input int\n"
-"\nOther Parameters\n----------------\n"
-"inlen : input int, optional\n Default: len(datain)\n"
-"\nReturns\n-------\n"
-"dataout : rank-1 array('F') with bounds (outlen)";
-/* extern void F_FUNC_US(look2d_cmplx,LOOK2D_CMPLX)(complex_float*,int*,int*,int*,int*,complex_float*,int*,int*,complex_float*,int*); */
-static PyObject *f2py_rout__looks_mod_look2d_cmplx(const PyObject *capi_self,
- PyObject *capi_args,
- PyObject *capi_keywds,
- void (*f2py_func)(complex_float*,int*,int*,int*,int*,complex_float*,int*,int*,complex_float*,int*)) {
- PyObject * volatile capi_buildvalue = NULL;
- volatile int f2py_success = 1;
-/*decl*/
-
- complex_float *datain = NULL;
- npy_intp datain_Dims[1] = {-1};
- const int datain_Rank = 1;
- PyArrayObject *capi_datain_tmp = NULL;
- int capi_datain_intent = 0;
- PyObject *datain_capi = Py_None;
- int inlen = 0;
- PyObject *inlen_capi = Py_None;
- int cols = 0;
- PyObject *cols_capi = Py_None;
- int lkaz = 0;
- PyObject *lkaz_capi = Py_None;
- int lkrg = 0;
- PyObject *lkrg_capi = Py_None;
- complex_float *dataout = NULL;
- npy_intp dataout_Dims[1] = {-1};
- const int dataout_Rank = 1;
- PyArrayObject *capi_dataout_tmp = NULL;
- int capi_dataout_intent = 0;
- int outlen = 0;
- PyObject *outlen_capi = Py_None;
- int xnull = 0;
- PyObject *xnull_capi = Py_None;
- complex_float nullval;
- PyObject *nullval_capi = Py_None;
- int verbose = 0;
- PyObject *verbose_capi = Py_None;
- static char *capi_kwlist[] = {"datain","cols","lkaz","lkrg","outlen","xnull","nullval","verbose","inlen",NULL};
-
-/*routdebugenter*/
-#ifdef F2PY_REPORT_ATEXIT
-f2py_start_clock();
-#endif
- if (!PyArg_ParseTupleAndKeywords(capi_args,capi_keywds,\
- "OOOOOOOO|O:_looks_mod.look2d_cmplx",\
- capi_kwlist,&datain_capi,&cols_capi,&lkaz_capi,&lkrg_capi,&outlen_capi,&xnull_capi,&nullval_capi,&verbose_capi,&inlen_capi))
- return NULL;
-/*frompyobj*/
- /* Processing variable verbose */
- f2py_success = int_from_pyobj(&verbose,verbose_capi,"_looks_mod.look2d_cmplx() 8th argument (verbose) can't be converted to int");
- if (f2py_success) {
- /* Processing variable datain */
- ;
- capi_datain_intent |= F2PY_INTENT_IN;
- capi_datain_tmp = array_from_pyobj(NPY_CFLOAT,datain_Dims,datain_Rank,capi_datain_intent,datain_capi);
- if (capi_datain_tmp == NULL) {
- if (!PyErr_Occurred())
- PyErr_SetString(_looks_mod_error,"failed in converting 1st argument `datain' of _looks_mod.look2d_cmplx to C/Fortran array" );
- } else {
- datain = (complex_float *)(capi_datain_tmp->data);
-
- /* Processing variable cols */
- f2py_success = int_from_pyobj(&cols,cols_capi,"_looks_mod.look2d_cmplx() 2nd argument (cols) can't be converted to int");
- if (f2py_success) {
- /* Processing variable lkrg */
- f2py_success = int_from_pyobj(&lkrg,lkrg_capi,"_looks_mod.look2d_cmplx() 4th argument (lkrg) can't be converted to int");
- if (f2py_success) {
- /* Processing variable nullval */
- f2py_success = complex_float_from_pyobj(&nullval,nullval_capi,"_looks_mod.look2d_cmplx() 7th argument (nullval) can't be converted to complex_float");
- if (f2py_success) {
- /* Processing variable outlen */
- f2py_success = int_from_pyobj(&outlen,outlen_capi,"_looks_mod.look2d_cmplx() 5th argument (outlen) can't be converted to int");
- if (f2py_success) {
- /* Processing variable xnull */
- f2py_success = int_from_pyobj(&xnull,xnull_capi,"_looks_mod.look2d_cmplx() 6th argument (xnull) can't be converted to int");
- if (f2py_success) {
- /* Processing variable lkaz */
- f2py_success = int_from_pyobj(&lkaz,lkaz_capi,"_looks_mod.look2d_cmplx() 3rd argument (lkaz) can't be converted to int");
- if (f2py_success) {
- /* Processing variable inlen */
- if (inlen_capi == Py_None) inlen = len(datain); else
- f2py_success = int_from_pyobj(&inlen,inlen_capi,"_looks_mod.look2d_cmplx() 1st keyword (inlen) can't be converted to int");
- if (f2py_success) {
- CHECKSCALAR(len(datain)>=inlen,"len(datain)>=inlen","1st keyword inlen","look2d_cmplx:inlen=%d",inlen) {
- /* Processing variable dataout */
- dataout_Dims[0]=outlen;
- capi_dataout_intent |= F2PY_INTENT_OUT|F2PY_INTENT_HIDE;
- capi_dataout_tmp = array_from_pyobj(NPY_CFLOAT,dataout_Dims,dataout_Rank,capi_dataout_intent,Py_None);
- if (capi_dataout_tmp == NULL) {
- if (!PyErr_Occurred())
- PyErr_SetString(_looks_mod_error,"failed in converting hidden `dataout' of _looks_mod.look2d_cmplx to C/Fortran array" );
- } else {
- dataout = (complex_float *)(capi_dataout_tmp->data);
-
-/*end of frompyobj*/
-#ifdef F2PY_REPORT_ATEXIT
-f2py_start_call_clock();
-#endif
-/*callfortranroutine*/
- (*f2py_func)(datain,&inlen,&cols,&lkaz,&lkrg,dataout,&outlen,&xnull,&nullval,&verbose);
-if (PyErr_Occurred())
- f2py_success = 0;
-#ifdef F2PY_REPORT_ATEXIT
-f2py_stop_call_clock();
-#endif
-/*end of callfortranroutine*/
- if (f2py_success) {
-/*pyobjfrom*/
-/*end of pyobjfrom*/
- CFUNCSMESS("Building return value.\n");
- capi_buildvalue = Py_BuildValue("N",capi_dataout_tmp);
-/*closepyobjfrom*/
-/*end of closepyobjfrom*/
- } /*if (f2py_success) after callfortranroutine*/
-/*cleanupfrompyobj*/
- } /*if (capi_dataout_tmp == NULL) ... else of dataout*/
- /* End of cleaning variable dataout */
- } /*CHECKSCALAR(len(datain)>=inlen)*/
- } /*if (f2py_success) of inlen*/
- /* End of cleaning variable inlen */
- } /*if (f2py_success) of lkaz*/
- /* End of cleaning variable lkaz */
- } /*if (f2py_success) of xnull*/
- /* End of cleaning variable xnull */
- } /*if (f2py_success) of outlen*/
- /* End of cleaning variable outlen */
- } /*if (f2py_success) of nullval frompyobj*/
- /* End of cleaning variable nullval */
- } /*if (f2py_success) of lkrg*/
- /* End of cleaning variable lkrg */
- } /*if (f2py_success) of cols*/
- /* End of cleaning variable cols */
- if((PyObject *)capi_datain_tmp!=datain_capi) {
- Py_XDECREF(capi_datain_tmp); }
- } /*if (capi_datain_tmp == NULL) ... else of datain*/
- /* End of cleaning variable datain */
- } /*if (f2py_success) of verbose*/
- /* End of cleaning variable verbose */
-/*end of cleanupfrompyobj*/
- if (capi_buildvalue == NULL) {
-/*routdebugfailure*/
- } else {
-/*routdebugleave*/
- }
- CFUNCSMESS("Freeing memory.\n");
-/*freemem*/
-#ifdef F2PY_REPORT_ATEXIT
-f2py_stop_clock();
-#endif
- return capi_buildvalue;
-}
-/**************************** end of look2d_cmplx ****************************/
-
-/******************************* look2d_dcmplx *******************************/
-static char doc_f2py_rout__looks_mod_look2d_dcmplx[] = "\
-dataout = look2d_dcmplx(datain,cols,lkaz,lkrg,outlen,xnull,nullval,verbose,[inlen])\n\nWrapper for ``look2d_dcmplx``.\
-\n\nParameters\n----------\n"
-"datain : input rank-1 array('D') with bounds (inlen)\n"
-"cols : input int\n"
-"lkaz : input int\n"
-"lkrg : input int\n"
-"outlen : input int\n"
-"xnull : input int\n"
-"nullval : input complex\n"
-"verbose : input int\n"
-"\nOther Parameters\n----------------\n"
-"inlen : input int, optional\n Default: len(datain)\n"
-"\nReturns\n-------\n"
-"dataout : rank-1 array('D') with bounds (outlen)";
-/* extern void F_FUNC_US(look2d_dcmplx,LOOK2D_DCMPLX)(complex_double*,int*,int*,int*,int*,complex_double*,int*,int*,complex_double*,int*); */
-static PyObject *f2py_rout__looks_mod_look2d_dcmplx(const PyObject *capi_self,
- PyObject *capi_args,
- PyObject *capi_keywds,
- void (*f2py_func)(complex_double*,int*,int*,int*,int*,complex_double*,int*,int*,complex_double*,int*)) {
- PyObject * volatile capi_buildvalue = NULL;
- volatile int f2py_success = 1;
-/*decl*/
-
- complex_double *datain = NULL;
- npy_intp datain_Dims[1] = {-1};
- const int datain_Rank = 1;
- PyArrayObject *capi_datain_tmp = NULL;
- int capi_datain_intent = 0;
- PyObject *datain_capi = Py_None;
- int inlen = 0;
- PyObject *inlen_capi = Py_None;
- int cols = 0;
- PyObject *cols_capi = Py_None;
- int lkaz = 0;
- PyObject *lkaz_capi = Py_None;
- int lkrg = 0;
- PyObject *lkrg_capi = Py_None;
- complex_double *dataout = NULL;
- npy_intp dataout_Dims[1] = {-1};
- const int dataout_Rank = 1;
- PyArrayObject *capi_dataout_tmp = NULL;
- int capi_dataout_intent = 0;
- int outlen = 0;
- PyObject *outlen_capi = Py_None;
- int xnull = 0;
- PyObject *xnull_capi = Py_None;
- complex_double nullval;
- PyObject *nullval_capi = Py_None;
- int verbose = 0;
- PyObject *verbose_capi = Py_None;
- static char *capi_kwlist[] = {"datain","cols","lkaz","lkrg","outlen","xnull","nullval","verbose","inlen",NULL};
-
-/*routdebugenter*/
-#ifdef F2PY_REPORT_ATEXIT
-f2py_start_clock();
-#endif
- if (!PyArg_ParseTupleAndKeywords(capi_args,capi_keywds,\
- "OOOOOOOO|O:_looks_mod.look2d_dcmplx",\
- capi_kwlist,&datain_capi,&cols_capi,&lkaz_capi,&lkrg_capi,&outlen_capi,&xnull_capi,&nullval_capi,&verbose_capi,&inlen_capi))
- return NULL;
-/*frompyobj*/
- /* Processing variable verbose */
- f2py_success = int_from_pyobj(&verbose,verbose_capi,"_looks_mod.look2d_dcmplx() 8th argument (verbose) can't be converted to int");
- if (f2py_success) {
- /* Processing variable datain */
- ;
- capi_datain_intent |= F2PY_INTENT_IN;
- capi_datain_tmp = array_from_pyobj(NPY_CDOUBLE,datain_Dims,datain_Rank,capi_datain_intent,datain_capi);
- if (capi_datain_tmp == NULL) {
- if (!PyErr_Occurred())
- PyErr_SetString(_looks_mod_error,"failed in converting 1st argument `datain' of _looks_mod.look2d_dcmplx to C/Fortran array" );
- } else {
- datain = (complex_double *)(capi_datain_tmp->data);
-
- /* Processing variable cols */
- f2py_success = int_from_pyobj(&cols,cols_capi,"_looks_mod.look2d_dcmplx() 2nd argument (cols) can't be converted to int");
- if (f2py_success) {
- /* Processing variable lkrg */
- f2py_success = int_from_pyobj(&lkrg,lkrg_capi,"_looks_mod.look2d_dcmplx() 4th argument (lkrg) can't be converted to int");
- if (f2py_success) {
- /* Processing variable nullval */
- f2py_success = complex_double_from_pyobj(&nullval,nullval_capi,"_looks_mod.look2d_dcmplx() 7th argument (nullval) can't be converted to complex_double");
- if (f2py_success) {
- /* Processing variable outlen */
- f2py_success = int_from_pyobj(&outlen,outlen_capi,"_looks_mod.look2d_dcmplx() 5th argument (outlen) can't be converted to int");
- if (f2py_success) {
- /* Processing variable xnull */
- f2py_success = int_from_pyobj(&xnull,xnull_capi,"_looks_mod.look2d_dcmplx() 6th argument (xnull) can't be converted to int");
- if (f2py_success) {
- /* Processing variable lkaz */
- f2py_success = int_from_pyobj(&lkaz,lkaz_capi,"_looks_mod.look2d_dcmplx() 3rd argument (lkaz) can't be converted to int");
- if (f2py_success) {
- /* Processing variable inlen */
- if (inlen_capi == Py_None) inlen = len(datain); else
- f2py_success = int_from_pyobj(&inlen,inlen_capi,"_looks_mod.look2d_dcmplx() 1st keyword (inlen) can't be converted to int");
- if (f2py_success) {
- CHECKSCALAR(len(datain)>=inlen,"len(datain)>=inlen","1st keyword inlen","look2d_dcmplx:inlen=%d",inlen) {
- /* Processing variable dataout */
- dataout_Dims[0]=outlen;
- capi_dataout_intent |= F2PY_INTENT_OUT|F2PY_INTENT_HIDE;
- capi_dataout_tmp = array_from_pyobj(NPY_CDOUBLE,dataout_Dims,dataout_Rank,capi_dataout_intent,Py_None);
- if (capi_dataout_tmp == NULL) {
- if (!PyErr_Occurred())
- PyErr_SetString(_looks_mod_error,"failed in converting hidden `dataout' of _looks_mod.look2d_dcmplx to C/Fortran array" );
- } else {
- dataout = (complex_double *)(capi_dataout_tmp->data);
-
-/*end of frompyobj*/
-#ifdef F2PY_REPORT_ATEXIT
-f2py_start_call_clock();
-#endif
-/*callfortranroutine*/
- (*f2py_func)(datain,&inlen,&cols,&lkaz,&lkrg,dataout,&outlen,&xnull,&nullval,&verbose);
-if (PyErr_Occurred())
- f2py_success = 0;
-#ifdef F2PY_REPORT_ATEXIT
-f2py_stop_call_clock();
-#endif
-/*end of callfortranroutine*/
- if (f2py_success) {
-/*pyobjfrom*/
-/*end of pyobjfrom*/
- CFUNCSMESS("Building return value.\n");
- capi_buildvalue = Py_BuildValue("N",capi_dataout_tmp);
-/*closepyobjfrom*/
-/*end of closepyobjfrom*/
- } /*if (f2py_success) after callfortranroutine*/
-/*cleanupfrompyobj*/
- } /*if (capi_dataout_tmp == NULL) ... else of dataout*/
- /* End of cleaning variable dataout */
- } /*CHECKSCALAR(len(datain)>=inlen)*/
- } /*if (f2py_success) of inlen*/
- /* End of cleaning variable inlen */
- } /*if (f2py_success) of lkaz*/
- /* End of cleaning variable lkaz */
- } /*if (f2py_success) of xnull*/
- /* End of cleaning variable xnull */
- } /*if (f2py_success) of outlen*/
- /* End of cleaning variable outlen */
- } /*if (f2py_success) of nullval frompyobj*/
- /* End of cleaning variable nullval */
- } /*if (f2py_success) of lkrg*/
- /* End of cleaning variable lkrg */
- } /*if (f2py_success) of cols*/
- /* End of cleaning variable cols */
- if((PyObject *)capi_datain_tmp!=datain_capi) {
- Py_XDECREF(capi_datain_tmp); }
- } /*if (capi_datain_tmp == NULL) ... else of datain*/
- /* End of cleaning variable datain */
- } /*if (f2py_success) of verbose*/
- /* End of cleaning variable verbose */
-/*end of cleanupfrompyobj*/
- if (capi_buildvalue == NULL) {
-/*routdebugfailure*/
- } else {
-/*routdebugleave*/
- }
- CFUNCSMESS("Freeing memory.\n");
-/*freemem*/
-#ifdef F2PY_REPORT_ATEXIT
-f2py_stop_clock();
-#endif
- return capi_buildvalue;
-}
-/**************************** end of look2d_dcmplx ****************************/
-
-/******************************** print_status ********************************/
-static char doc_f2py_rout__looks_mod_print_status[] = "\
-print_status(i,j,s)\n\nWrapper for ``print_status``.\
-\n\nParameters\n----------\n"
-"i : input int\n"
-"j : input int\n"
-"s : input int";
-/* extern void F_FUNC_US(print_status,PRINT_STATUS)(int*,int*,int*); */
-static PyObject *f2py_rout__looks_mod_print_status(const PyObject *capi_self,
- PyObject *capi_args,
- PyObject *capi_keywds,
- void (*f2py_func)(int*,int*,int*)) {
- PyObject * volatile capi_buildvalue = NULL;
- volatile int f2py_success = 1;
-/*decl*/
-
- int i = 0;
- PyObject *i_capi = Py_None;
- int j = 0;
- PyObject *j_capi = Py_None;
- int s = 0;
- PyObject *s_capi = Py_None;
- static char *capi_kwlist[] = {"i","j","s",NULL};
-
-/*routdebugenter*/
-#ifdef F2PY_REPORT_ATEXIT
-f2py_start_clock();
-#endif
- if (!PyArg_ParseTupleAndKeywords(capi_args,capi_keywds,\
- "OOO:_looks_mod.print_status",\
- capi_kwlist,&i_capi,&j_capi,&s_capi))
- return NULL;
-/*frompyobj*/
- /* Processing variable i */
- f2py_success = int_from_pyobj(&i,i_capi,"_looks_mod.print_status() 1st argument (i) can't be converted to int");
- if (f2py_success) {
- /* Processing variable s */
- f2py_success = int_from_pyobj(&s,s_capi,"_looks_mod.print_status() 3rd argument (s) can't be converted to int");
- if (f2py_success) {
- /* Processing variable j */
- f2py_success = int_from_pyobj(&j,j_capi,"_looks_mod.print_status() 2nd argument (j) can't be converted to int");
- if (f2py_success) {
-/*end of frompyobj*/
-#ifdef F2PY_REPORT_ATEXIT
-f2py_start_call_clock();
-#endif
-/*callfortranroutine*/
- (*f2py_func)(&i,&j,&s);
-if (PyErr_Occurred())
- f2py_success = 0;
-#ifdef F2PY_REPORT_ATEXIT
-f2py_stop_call_clock();
-#endif
-/*end of callfortranroutine*/
- if (f2py_success) {
-/*pyobjfrom*/
-/*end of pyobjfrom*/
- CFUNCSMESS("Building return value.\n");
- capi_buildvalue = Py_BuildValue("");
-/*closepyobjfrom*/
-/*end of closepyobjfrom*/
- } /*if (f2py_success) after callfortranroutine*/
-/*cleanupfrompyobj*/
- } /*if (f2py_success) of j*/
- /* End of cleaning variable j */
- } /*if (f2py_success) of s*/
- /* End of cleaning variable s */
- } /*if (f2py_success) of i*/
- /* End of cleaning variable i */
-/*end of cleanupfrompyobj*/
- if (capi_buildvalue == NULL) {
-/*routdebugfailure*/
- } else {
-/*routdebugleave*/
- }
- CFUNCSMESS("Freeing memory.\n");
-/*freemem*/
-#ifdef F2PY_REPORT_ATEXIT
-f2py_stop_clock();
-#endif
- return capi_buildvalue;
-}
-/**************************** end of print_status ****************************/
-/*eof body*/
-
-/******************* See f2py2e/f90mod_rules.py: buildhooks *******************/
-/*need_f90modhooks*/
-
-/************** See f2py2e/rules.py: module_rules['modulebody'] **************/
-
-/******************* See f2py2e/common_rules.py: buildhooks *******************/
-
-/*need_commonhooks*/
-
-/**************************** See f2py2e/rules.py ****************************/
-
-static FortranDataDef f2py_routine_defs[] = {
- {"look2d_real",-1,{{-1}},0,(char *)F_FUNC_US(look2d_real,LOOK2D_REAL),(f2py_init_func)f2py_rout__looks_mod_look2d_real,doc_f2py_rout__looks_mod_look2d_real},
- {"look2d_double",-1,{{-1}},0,(char *)F_FUNC_US(look2d_double,LOOK2D_DOUBLE),(f2py_init_func)f2py_rout__looks_mod_look2d_double,doc_f2py_rout__looks_mod_look2d_double},
- {"look2d_cmplx",-1,{{-1}},0,(char *)F_FUNC_US(look2d_cmplx,LOOK2D_CMPLX),(f2py_init_func)f2py_rout__looks_mod_look2d_cmplx,doc_f2py_rout__looks_mod_look2d_cmplx},
- {"look2d_dcmplx",-1,{{-1}},0,(char *)F_FUNC_US(look2d_dcmplx,LOOK2D_DCMPLX),(f2py_init_func)f2py_rout__looks_mod_look2d_dcmplx,doc_f2py_rout__looks_mod_look2d_dcmplx},
- {"print_status",-1,{{-1}},0,(char *)F_FUNC_US(print_status,PRINT_STATUS),(f2py_init_func)f2py_rout__looks_mod_print_status,doc_f2py_rout__looks_mod_print_status},
-
-/*eof routine_defs*/
- {NULL}
-};
-
-static PyMethodDef f2py_module_methods[] = {
-
- {NULL,NULL}
-};
-
-#if PY_VERSION_HEX >= 0x03000000
-static struct PyModuleDef moduledef = {
- PyModuleDef_HEAD_INIT,
- "_looks_mod",
- NULL,
- -1,
- f2py_module_methods,
- NULL,
- NULL,
- NULL,
- NULL
-};
-#endif
-
-#if PY_VERSION_HEX >= 0x03000000
-#define RETVAL m
-PyMODINIT_FUNC PyInit__looks_mod(void) {
-#else
-#define RETVAL
-PyMODINIT_FUNC init_looks_mod(void) {
-#endif
- int i;
- PyObject *m,*d, *s;
-#if PY_VERSION_HEX >= 0x03000000
- m = _looks_mod_module = PyModule_Create(&moduledef);
-#else
- m = _looks_mod_module = Py_InitModule("_looks_mod", f2py_module_methods);
-#endif
- Py_TYPE(&PyFortran_Type) = &PyType_Type;
- import_array();
- if (PyErr_Occurred())
- {PyErr_SetString(PyExc_ImportError, "can't initialize module _looks_mod (failed to import numpy)"); return RETVAL;}
- d = PyModule_GetDict(m);
- s = PyString_FromString("$Revision: $");
- PyDict_SetItemString(d, "__version__", s);
-#if PY_VERSION_HEX >= 0x03000000
- s = PyUnicode_FromString(
-#else
- s = PyString_FromString(
-#endif
- "This module '_looks_mod' is auto-generated with f2py (version:2).\nFunctions:\n"
-" dataout = look2d_real(datain,cols,lkaz,lkrg,outlen,xnull,nullval,verbose,inlen=len(datain))\n"
-" dataout = look2d_double(datain,cols,lkaz,lkrg,outlen,xnull,nullval,verbose,inlen=len(datain))\n"
-" dataout = look2d_cmplx(datain,cols,lkaz,lkrg,outlen,xnull,nullval,verbose,inlen=len(datain))\n"
-" dataout = look2d_dcmplx(datain,cols,lkaz,lkrg,outlen,xnull,nullval,verbose,inlen=len(datain))\n"
-" print_status(i,j,s)\n"
-".");
- PyDict_SetItemString(d, "__doc__", s);
- _looks_mod_error = PyErr_NewException ("_looks_mod.error", NULL, NULL);
- Py_DECREF(s);
- for(i=0;f2py_routine_defs[i].name!=NULL;i++)
- PyDict_SetItemString(d, f2py_routine_defs[i].name,PyFortranObject_NewAsAttr(&f2py_routine_defs[i]));
-
-
-
-
-
-/*eof initf2pywraphooks*/
-/*eof initf90modhooks*/
-
-/*eof initcommonhooks*/
-
-
-#ifdef F2PY_REPORT_ATEXIT
- if (! PyErr_Occurred())
- on_exit(f2py_report_on_exit,(void*)"_looks_mod");
-#endif
-
- return RETVAL;
-}
-#ifdef __cplusplus
-}
-#endif
diff --git a/build/src.macosx-10.10-x86_64-2.7/pysar/insar/_subsurfmodule.c b/build/src.macosx-10.10-x86_64-2.7/pysar/insar/_subsurfmodule.c
deleted file mode 100644
index f4cd327..0000000
--- a/build/src.macosx-10.10-x86_64-2.7/pysar/insar/_subsurfmodule.c
+++ /dev/null
@@ -1,505 +0,0 @@
-/* File: _subsurfmodule.c
- * This file is auto-generated with f2py (version:2).
- * f2py is a Fortran to Python Interface Generator (FPIG), Second Edition,
- * written by Pearu Peterson .
- * See http://cens.ioc.ee/projects/f2py2e/
- * Generation date: Mon Aug 17 15:42:40 2015
- * $Revision:$
- * $Date:$
- * Do not edit this file directly unless you know what you are doing!!!
- */
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/*********************** See f2py2e/cfuncs.py: includes ***********************/
-#include "Python.h"
-#include
-#include "fortranobject.h"
-#include
-
-/**************** See f2py2e/rules.py: mod_rules['modulebody'] ****************/
-static PyObject *_subsurf_error;
-static PyObject *_subsurf_module;
-
-/*********************** See f2py2e/cfuncs.py: typedefs ***********************/
-#ifdef _WIN32
-typedef __int64 long_long;
-#else
-typedef long long long_long;
-typedef unsigned long long unsigned_long_long;
-#endif
-
-
-/****************** See f2py2e/cfuncs.py: typedefs_generated ******************/
-/*need_typedefs_generated*/
-
-/********************** See f2py2e/cfuncs.py: cppmacros **********************/
-#if defined(PREPEND_FORTRAN)
-#if defined(NO_APPEND_FORTRAN)
-#if defined(UPPERCASE_FORTRAN)
-#define F_FUNC(f,F) _##F
-#else
-#define F_FUNC(f,F) _##f
-#endif
-#else
-#if defined(UPPERCASE_FORTRAN)
-#define F_FUNC(f,F) _##F##_
-#else
-#define F_FUNC(f,F) _##f##_
-#endif
-#endif
-#else
-#if defined(NO_APPEND_FORTRAN)
-#if defined(UPPERCASE_FORTRAN)
-#define F_FUNC(f,F) F
-#else
-#define F_FUNC(f,F) f
-#endif
-#else
-#if defined(UPPERCASE_FORTRAN)
-#define F_FUNC(f,F) F##_
-#else
-#define F_FUNC(f,F) f##_
-#endif
-#endif
-#endif
-#if defined(UNDERSCORE_G77)
-#define F_FUNC_US(f,F) F_FUNC(f##_,F##_)
-#else
-#define F_FUNC_US(f,F) F_FUNC(f,F)
-#endif
-
-#define rank(var) var ## _Rank
-#define shape(var,dim) var ## _Dims[dim]
-#define old_rank(var) (((PyArrayObject *)(capi_ ## var ## _tmp))->nd)
-#define old_shape(var,dim) (((PyArrayObject *)(capi_ ## var ## _tmp))->dimensions[dim])
-#define fshape(var,dim) shape(var,rank(var)-dim-1)
-#define len(var) shape(var,0)
-#define flen(var) fshape(var,0)
-#define old_size(var) PyArray_SIZE((PyArrayObject *)(capi_ ## var ## _tmp))
-/* #define index(i) capi_i ## i */
-#define slen(var) capi_ ## var ## _len
-#define size(var, ...) f2py_size((PyArrayObject *)(capi_ ## var ## _tmp), ## __VA_ARGS__, -1)
-
-#define CHECKSCALAR(check,tcheck,name,show,var)\
- if (!(check)) {\
- char errstring[256];\
- sprintf(errstring, "%s: "show, "("tcheck") failed for "name, var);\
- PyErr_SetString(_subsurf_error,errstring);\
- /*goto capi_fail;*/\
- } else
-#ifdef DEBUGCFUNCS
-#define CFUNCSMESS(mess) fprintf(stderr,"debug-capi:"mess);
-#define CFUNCSMESSPY(mess,obj) CFUNCSMESS(mess) \
- PyObject_Print((PyObject *)obj,stderr,Py_PRINT_RAW);\
- fprintf(stderr,"\n");
-#else
-#define CFUNCSMESS(mess)
-#define CFUNCSMESSPY(mess,obj)
-#endif
-
-#ifndef max
-#define max(a,b) ((a > b) ? (a) : (b))
-#endif
-#ifndef min
-#define min(a,b) ((a < b) ? (a) : (b))
-#endif
-#ifndef MAX
-#define MAX(a,b) ((a > b) ? (a) : (b))
-#endif
-#ifndef MIN
-#define MIN(a,b) ((a < b) ? (a) : (b))
-#endif
-
-
-/************************ See f2py2e/cfuncs.py: cfuncs ************************/
-static int f2py_size(PyArrayObject* var, ...)
-{
- npy_int sz = 0;
- npy_int dim;
- npy_int rank;
- va_list argp;
- va_start(argp, var);
- dim = va_arg(argp, npy_int);
- if (dim==-1)
- {
- sz = PyArray_SIZE(var);
- }
- else
- {
- rank = PyArray_NDIM(var);
- if (dim>=1 && dim<=rank)
- sz = PyArray_DIM(var, dim-1);
- else
- fprintf(stderr, "f2py_size: 2nd argument value=%d fails to satisfy 1<=value<=%d. Result will be 0.\n", dim, rank);
- }
- va_end(argp);
- return sz;
-}
-
-static int double_from_pyobj(double* v,PyObject *obj,const char *errmess) {
- PyObject* tmp = NULL;
- if (PyFloat_Check(obj)) {
-#ifdef __sgi
- *v = PyFloat_AsDouble(obj);
-#else
- *v = PyFloat_AS_DOUBLE(obj);
-#endif
- return 1;
- }
- tmp = PyNumber_Float(obj);
- if (tmp) {
-#ifdef __sgi
- *v = PyFloat_AsDouble(tmp);
-#else
- *v = PyFloat_AS_DOUBLE(tmp);
-#endif
- Py_DECREF(tmp);
- return 1;
- }
- if (PyComplex_Check(obj))
- tmp = PyObject_GetAttrString(obj,"real");
- else if (PyString_Check(obj) || PyUnicode_Check(obj))
- /*pass*/;
- else if (PySequence_Check(obj))
- tmp = PySequence_GetItem(obj,0);
- if (tmp) {
- PyErr_Clear();
- if (double_from_pyobj(v,tmp,errmess)) {Py_DECREF(tmp); return 1;}
- Py_DECREF(tmp);
- }
- {
- PyObject* err = PyErr_Occurred();
- if (err==NULL) err = _subsurf_error;
- PyErr_SetString(err,errmess);
- }
- return 0;
-}
-
-static int long_long_from_pyobj(long_long* v,PyObject *obj,const char *errmess) {
- PyObject* tmp = NULL;
- if (PyLong_Check(obj)) {
- *v = PyLong_AsLongLong(obj);
- return (!PyErr_Occurred());
- }
- if (PyInt_Check(obj)) {
- *v = (long_long)PyInt_AS_LONG(obj);
- return 1;
- }
- tmp = PyNumber_Long(obj);
- if (tmp) {
- *v = PyLong_AsLongLong(tmp);
- Py_DECREF(tmp);
- return (!PyErr_Occurred());
- }
- if (PyComplex_Check(obj))
- tmp = PyObject_GetAttrString(obj,"real");
- else if (PyString_Check(obj) || PyUnicode_Check(obj))
- /*pass*/;
- else if (PySequence_Check(obj))
- tmp = PySequence_GetItem(obj,0);
- if (tmp) {
- PyErr_Clear();
- if (long_long_from_pyobj(v,tmp,errmess)) {Py_DECREF(tmp); return 1;}
- Py_DECREF(tmp);
- }
- {
- PyObject* err = PyErr_Occurred();
- if (err==NULL) err = _subsurf_error;
- PyErr_SetString(err,errmess);
- }
- return 0;
-}
-
-
-/********************* See f2py2e/cfuncs.py: userincludes *********************/
-/*need_userincludes*/
-
-/********************* See f2py2e/capi_rules.py: usercode *********************/
-
-
-/* See f2py2e/rules.py */
-extern void F_FUNC(subsurf,SUBSURF)(double*,float*,float*,double*,long_long*,long_long*,long_long*,double*);
-/*eof externroutines*/
-
-/******************** See f2py2e/capi_rules.py: usercode1 ********************/
-
-
-/******************* See f2py2e/cb_rules.py: buildcallback *******************/
-/*need_callbacks*/
-
-/*********************** See f2py2e/rules.py: buildapi ***********************/
-
-/********************************** subsurf **********************************/
-static char doc_f2py_rout__subsurf_subsurf[] = "\
-subsurf(d,x,y,c,deg,nul,[lc,n])\n\nWrapper for ``subsurf``.\
-\n\nParameters\n----------\n"
-"d : in/output rank-1 array('d') with bounds (n)\n"
-"x : input rank-1 array('f') with bounds (n)\n"
-"y : input rank-1 array('f') with bounds (n)\n"
-"c : input rank-1 array('d') with bounds (lc)\n"
-"deg : input long\n"
-"nul : input float\n"
-"\nOther Parameters\n----------------\n"
-"lc : input long, optional\n Default: len(c)\n"
-"n : input long, optional\n Default: len(d)";
-/* extern void F_FUNC(subsurf,SUBSURF)(double*,float*,float*,double*,long_long*,long_long*,long_long*,double*); */
-static PyObject *f2py_rout__subsurf_subsurf(const PyObject *capi_self,
- PyObject *capi_args,
- PyObject *capi_keywds,
- void (*f2py_func)(double*,float*,float*,double*,long_long*,long_long*,long_long*,double*)) {
- PyObject * volatile capi_buildvalue = NULL;
- volatile int f2py_success = 1;
-/*decl*/
-
- double *d = NULL;
- npy_intp d_Dims[1] = {-1};
- const int d_Rank = 1;
- PyArrayObject *capi_d_tmp = NULL;
- int capi_d_intent = 0;
- PyObject *d_capi = Py_None;
- float *x = NULL;
- npy_intp x_Dims[1] = {-1};
- const int x_Rank = 1;
- PyArrayObject *capi_x_tmp = NULL;
- int capi_x_intent = 0;
- PyObject *x_capi = Py_None;
- float *y = NULL;
- npy_intp y_Dims[1] = {-1};
- const int y_Rank = 1;
- PyArrayObject *capi_y_tmp = NULL;
- int capi_y_intent = 0;
- PyObject *y_capi = Py_None;
- double *c = NULL;
- npy_intp c_Dims[1] = {-1};
- const int c_Rank = 1;
- PyArrayObject *capi_c_tmp = NULL;
- int capi_c_intent = 0;
- PyObject *c_capi = Py_None;
- long_long lc = 0;
- PyObject *lc_capi = Py_None;
- long_long n = 0;
- PyObject *n_capi = Py_None;
- long_long deg = 0;
- PyObject *deg_capi = Py_None;
- double nul = 0;
- PyObject *nul_capi = Py_None;
- static char *capi_kwlist[] = {"d","x","y","c","deg","nul","lc","n",NULL};
-
-/*routdebugenter*/
-#ifdef F2PY_REPORT_ATEXIT
-f2py_start_clock();
-#endif
- if (!PyArg_ParseTupleAndKeywords(capi_args,capi_keywds,\
- "OOOOOO|OO:_subsurf.subsurf",\
- capi_kwlist,&d_capi,&x_capi,&y_capi,&c_capi,°_capi,&nul_capi,&lc_capi,&n_capi))
- return NULL;
-/*frompyobj*/
- /* Processing variable c */
- ;
- capi_c_intent |= F2PY_INTENT_IN;
- capi_c_tmp = array_from_pyobj(NPY_DOUBLE,c_Dims,c_Rank,capi_c_intent,c_capi);
- if (capi_c_tmp == NULL) {
- if (!PyErr_Occurred())
- PyErr_SetString(_subsurf_error,"failed in converting 4th argument `c' of _subsurf.subsurf to C/Fortran array" );
- } else {
- c = (double *)(capi_c_tmp->data);
-
- /* Processing variable nul */
- f2py_success = double_from_pyobj(&nul,nul_capi,"_subsurf.subsurf() 6th argument (nul) can't be converted to double");
- if (f2py_success) {
- /* Processing variable deg */
- f2py_success = long_long_from_pyobj(°,deg_capi,"_subsurf.subsurf() 5th argument (deg) can't be converted to long_long");
- if (f2py_success) {
- /* Processing variable d */
- ;
- capi_d_intent |= F2PY_INTENT_INOUT;
- capi_d_tmp = array_from_pyobj(NPY_DOUBLE,d_Dims,d_Rank,capi_d_intent,d_capi);
- if (capi_d_tmp == NULL) {
- if (!PyErr_Occurred())
- PyErr_SetString(_subsurf_error,"failed in converting 1st argument `d' of _subsurf.subsurf to C/Fortran array" );
- } else {
- d = (double *)(capi_d_tmp->data);
-
- /* Processing variable lc */
- if (lc_capi == Py_None) lc = len(c); else
- f2py_success = long_long_from_pyobj(&lc,lc_capi,"_subsurf.subsurf() 1st keyword (lc) can't be converted to long_long");
- if (f2py_success) {
- CHECKSCALAR(len(c)>=lc,"len(c)>=lc","1st keyword lc","subsurf:lc=%ld",lc) {
- /* Processing variable n */
- if (n_capi == Py_None) n = len(d); else
- f2py_success = long_long_from_pyobj(&n,n_capi,"_subsurf.subsurf() 2nd keyword (n) can't be converted to long_long");
- if (f2py_success) {
- CHECKSCALAR(len(d)>=n,"len(d)>=n","2nd keyword n","subsurf:n=%ld",n) {
- /* Processing variable y */
- y_Dims[0]=n;
- capi_y_intent |= F2PY_INTENT_IN;
- capi_y_tmp = array_from_pyobj(NPY_FLOAT,y_Dims,y_Rank,capi_y_intent,y_capi);
- if (capi_y_tmp == NULL) {
- if (!PyErr_Occurred())
- PyErr_SetString(_subsurf_error,"failed in converting 3rd argument `y' of _subsurf.subsurf to C/Fortran array" );
- } else {
- y = (float *)(capi_y_tmp->data);
-
- /* Processing variable x */
- x_Dims[0]=n;
- capi_x_intent |= F2PY_INTENT_IN;
- capi_x_tmp = array_from_pyobj(NPY_FLOAT,x_Dims,x_Rank,capi_x_intent,x_capi);
- if (capi_x_tmp == NULL) {
- if (!PyErr_Occurred())
- PyErr_SetString(_subsurf_error,"failed in converting 2nd argument `x' of _subsurf.subsurf to C/Fortran array" );
- } else {
- x = (float *)(capi_x_tmp->data);
-
-/*end of frompyobj*/
-#ifdef F2PY_REPORT_ATEXIT
-f2py_start_call_clock();
-#endif
-/*callfortranroutine*/
- (*f2py_func)(d,x,y,c,&lc,&n,°,&nul);
-if (PyErr_Occurred())
- f2py_success = 0;
-#ifdef F2PY_REPORT_ATEXIT
-f2py_stop_call_clock();
-#endif
-/*end of callfortranroutine*/
- if (f2py_success) {
-/*pyobjfrom*/
-/*end of pyobjfrom*/
- CFUNCSMESS("Building return value.\n");
- capi_buildvalue = Py_BuildValue("");
-/*closepyobjfrom*/
-/*end of closepyobjfrom*/
- } /*if (f2py_success) after callfortranroutine*/
-/*cleanupfrompyobj*/
- if((PyObject *)capi_x_tmp!=x_capi) {
- Py_XDECREF(capi_x_tmp); }
- } /*if (capi_x_tmp == NULL) ... else of x*/
- /* End of cleaning variable x */
- if((PyObject *)capi_y_tmp!=y_capi) {
- Py_XDECREF(capi_y_tmp); }
- } /*if (capi_y_tmp == NULL) ... else of y*/
- /* End of cleaning variable y */
- } /*CHECKSCALAR(len(d)>=n)*/
- } /*if (f2py_success) of n*/
- /* End of cleaning variable n */
- } /*CHECKSCALAR(len(c)>=lc)*/
- } /*if (f2py_success) of lc*/
- /* End of cleaning variable lc */
- if((PyObject *)capi_d_tmp!=d_capi) {
- Py_XDECREF(capi_d_tmp); }
- } /*if (capi_d_tmp == NULL) ... else of d*/
- /* End of cleaning variable d */
- } /*if (f2py_success) of deg*/
- /* End of cleaning variable deg */
- } /*if (f2py_success) of nul*/
- /* End of cleaning variable nul */
- if((PyObject *)capi_c_tmp!=c_capi) {
- Py_XDECREF(capi_c_tmp); }
- } /*if (capi_c_tmp == NULL) ... else of c*/
- /* End of cleaning variable c */
-/*end of cleanupfrompyobj*/
- if (capi_buildvalue == NULL) {
-/*routdebugfailure*/
- } else {
-/*routdebugleave*/
- }
- CFUNCSMESS("Freeing memory.\n");
-/*freemem*/
-#ifdef F2PY_REPORT_ATEXIT
-f2py_stop_clock();
-#endif
- return capi_buildvalue;
-}
-/******************************* end of subsurf *******************************/
-/*eof body*/
-
-/******************* See f2py2e/f90mod_rules.py: buildhooks *******************/
-/*need_f90modhooks*/
-
-/************** See f2py2e/rules.py: module_rules['modulebody'] **************/
-
-/******************* See f2py2e/common_rules.py: buildhooks *******************/
-
-/*need_commonhooks*/
-
-/**************************** See f2py2e/rules.py ****************************/
-
-static FortranDataDef f2py_routine_defs[] = {
- {"subsurf",-1,{{-1}},0,(char *)F_FUNC(subsurf,SUBSURF),(f2py_init_func)f2py_rout__subsurf_subsurf,doc_f2py_rout__subsurf_subsurf},
-
-/*eof routine_defs*/
- {NULL}
-};
-
-static PyMethodDef f2py_module_methods[] = {
-
- {NULL,NULL}
-};
-
-#if PY_VERSION_HEX >= 0x03000000
-static struct PyModuleDef moduledef = {
- PyModuleDef_HEAD_INIT,
- "_subsurf",
- NULL,
- -1,
- f2py_module_methods,
- NULL,
- NULL,
- NULL,
- NULL
-};
-#endif
-
-#if PY_VERSION_HEX >= 0x03000000
-#define RETVAL m
-PyMODINIT_FUNC PyInit__subsurf(void) {
-#else
-#define RETVAL
-PyMODINIT_FUNC init_subsurf(void) {
-#endif
- int i;
- PyObject *m,*d, *s;
-#if PY_VERSION_HEX >= 0x03000000
- m = _subsurf_module = PyModule_Create(&moduledef);
-#else
- m = _subsurf_module = Py_InitModule("_subsurf", f2py_module_methods);
-#endif
- Py_TYPE(&PyFortran_Type) = &PyType_Type;
- import_array();
- if (PyErr_Occurred())
- {PyErr_SetString(PyExc_ImportError, "can't initialize module _subsurf (failed to import numpy)"); return RETVAL;}
- d = PyModule_GetDict(m);
- s = PyString_FromString("$Revision: $");
- PyDict_SetItemString(d, "__version__", s);
-#if PY_VERSION_HEX >= 0x03000000
- s = PyUnicode_FromString(
-#else
- s = PyString_FromString(
-#endif
- "This module '_subsurf' is auto-generated with f2py (version:2).\nFunctions:\n"
-" subsurf(d,x,y,c,deg,nul,lc=len(c),n=len(d))\n"
-".");
- PyDict_SetItemString(d, "__doc__", s);
- _subsurf_error = PyErr_NewException ("_subsurf.error", NULL, NULL);
- Py_DECREF(s);
- for(i=0;f2py_routine_defs[i].name!=NULL;i++)
- PyDict_SetItemString(d, f2py_routine_defs[i].name,PyFortranObject_NewAsAttr(&f2py_routine_defs[i]));
-
-/*eof initf2pywraphooks*/
-/*eof initf90modhooks*/
-
-/*eof initcommonhooks*/
-
-
-#ifdef F2PY_REPORT_ATEXIT
- if (! PyErr_Occurred())
- on_exit(f2py_report_on_exit,(void*)"_subsurf");
-#endif
-
- return RETVAL;
-}
-#ifdef __cplusplus
-}
-#endif
diff --git a/build/src.macosx-10.10-x86_64-2.7/pysar/plot/__config__.py b/build/src.macosx-10.10-x86_64-2.7/pysar/plot/__config__.py
deleted file mode 100644
index 82b7493..0000000
--- a/build/src.macosx-10.10-x86_64-2.7/pysar/plot/__config__.py
+++ /dev/null
@@ -1,21 +0,0 @@
-# This file is generated by /Users/brentminchew/Documents/Python/PySAR/setup.py
-# It contains system_info results at the time of building this package.
-__all__ = ["get_info","show"]
-
-
-def get_info(name):
- g = globals()
- return g.get(name, g.get(name + "_info", {}))
-
-def show():
- for name,info_dict in globals().items():
- if name[0] == "_" or type(info_dict) is not type({}): continue
- print(name + ":")
- if not info_dict:
- print(" NOT AVAILABLE")
- for k,v in info_dict.items():
- v = str(v)
- if k == "sources" and len(v) > 200:
- v = v[:60] + " ...\n... " + v[-60:]
- print(" %s = %s" % (k,v))
-
\ No newline at end of file
diff --git a/build/src.macosx-10.10-x86_64-2.7/pysar/plot/cm/__config__.py b/build/src.macosx-10.10-x86_64-2.7/pysar/plot/cm/__config__.py
deleted file mode 100644
index 82b7493..0000000
--- a/build/src.macosx-10.10-x86_64-2.7/pysar/plot/cm/__config__.py
+++ /dev/null
@@ -1,21 +0,0 @@
-# This file is generated by /Users/brentminchew/Documents/Python/PySAR/setup.py
-# It contains system_info results at the time of building this package.
-__all__ = ["get_info","show"]
-
-
-def get_info(name):
- g = globals()
- return g.get(name, g.get(name + "_info", {}))
-
-def show():
- for name,info_dict in globals().items():
- if name[0] == "_" or type(info_dict) is not type({}): continue
- print(name + ":")
- if not info_dict:
- print(" NOT AVAILABLE")
- for k,v in info_dict.items():
- v = str(v)
- if k == "sources" and len(v) > 200:
- v = v[:60] + " ...\n... " + v[-60:]
- print(" %s = %s" % (k,v))
-
\ No newline at end of file
diff --git a/build/src.macosx-10.10-x86_64-2.7/pysar/plot/cm/gist/__config__.py b/build/src.macosx-10.10-x86_64-2.7/pysar/plot/cm/gist/__config__.py
deleted file mode 100644
index 82b7493..0000000
--- a/build/src.macosx-10.10-x86_64-2.7/pysar/plot/cm/gist/__config__.py
+++ /dev/null
@@ -1,21 +0,0 @@
-# This file is generated by /Users/brentminchew/Documents/Python/PySAR/setup.py
-# It contains system_info results at the time of building this package.
-__all__ = ["get_info","show"]
-
-
-def get_info(name):
- g = globals()
- return g.get(name, g.get(name + "_info", {}))
-
-def show():
- for name,info_dict in globals().items():
- if name[0] == "_" or type(info_dict) is not type({}): continue
- print(name + ":")
- if not info_dict:
- print(" NOT AVAILABLE")
- for k,v in info_dict.items():
- v = str(v)
- if k == "sources" and len(v) > 200:
- v = v[:60] + " ...\n... " + v[-60:]
- print(" %s = %s" % (k,v))
-
\ No newline at end of file
diff --git a/build/src.macosx-10.10-x86_64-2.7/pysar/plot/cm/gmt/__config__.py b/build/src.macosx-10.10-x86_64-2.7/pysar/plot/cm/gmt/__config__.py
deleted file mode 100644
index 82b7493..0000000
--- a/build/src.macosx-10.10-x86_64-2.7/pysar/plot/cm/gmt/__config__.py
+++ /dev/null
@@ -1,21 +0,0 @@
-# This file is generated by /Users/brentminchew/Documents/Python/PySAR/setup.py
-# It contains system_info results at the time of building this package.
-__all__ = ["get_info","show"]
-
-
-def get_info(name):
- g = globals()
- return g.get(name, g.get(name + "_info", {}))
-
-def show():
- for name,info_dict in globals().items():
- if name[0] == "_" or type(info_dict) is not type({}): continue
- print(name + ":")
- if not info_dict:
- print(" NOT AVAILABLE")
- for k,v in info_dict.items():
- v = str(v)
- if k == "sources" and len(v) > 200:
- v = v[:60] + " ...\n... " + v[-60:]
- print(" %s = %s" % (k,v))
-
\ No newline at end of file
diff --git a/build/src.macosx-10.10-x86_64-2.7/pysar/plot/cm/grass/__config__.py b/build/src.macosx-10.10-x86_64-2.7/pysar/plot/cm/grass/__config__.py
deleted file mode 100644
index 82b7493..0000000
--- a/build/src.macosx-10.10-x86_64-2.7/pysar/plot/cm/grass/__config__.py
+++ /dev/null
@@ -1,21 +0,0 @@
-# This file is generated by /Users/brentminchew/Documents/Python/PySAR/setup.py
-# It contains system_info results at the time of building this package.
-__all__ = ["get_info","show"]
-
-
-def get_info(name):
- g = globals()
- return g.get(name, g.get(name + "_info", {}))
-
-def show():
- for name,info_dict in globals().items():
- if name[0] == "_" or type(info_dict) is not type({}): continue
- print(name + ":")
- if not info_dict:
- print(" NOT AVAILABLE")
- for k,v in info_dict.items():
- v = str(v)
- if k == "sources" and len(v) > 200:
- v = v[:60] + " ...\n... " + v[-60:]
- print(" %s = %s" % (k,v))
-
\ No newline at end of file
diff --git a/build/src.macosx-10.10-x86_64-2.7/pysar/plot/cm/h5/__config__.py b/build/src.macosx-10.10-x86_64-2.7/pysar/plot/cm/h5/__config__.py
deleted file mode 100644
index 82b7493..0000000
--- a/build/src.macosx-10.10-x86_64-2.7/pysar/plot/cm/h5/__config__.py
+++ /dev/null
@@ -1,21 +0,0 @@
-# This file is generated by /Users/brentminchew/Documents/Python/PySAR/setup.py
-# It contains system_info results at the time of building this package.
-__all__ = ["get_info","show"]
-
-
-def get_info(name):
- g = globals()
- return g.get(name, g.get(name + "_info", {}))
-
-def show():
- for name,info_dict in globals().items():
- if name[0] == "_" or type(info_dict) is not type({}): continue
- print(name + ":")
- if not info_dict:
- print(" NOT AVAILABLE")
- for k,v in info_dict.items():
- v = str(v)
- if k == "sources" and len(v) > 200:
- v = v[:60] + " ...\n... " + v[-60:]
- print(" %s = %s" % (k,v))
-
\ No newline at end of file
diff --git a/build/src.macosx-10.10-x86_64-2.7/pysar/plot/cm/idl/__config__.py b/build/src.macosx-10.10-x86_64-2.7/pysar/plot/cm/idl/__config__.py
deleted file mode 100644
index 82b7493..0000000
--- a/build/src.macosx-10.10-x86_64-2.7/pysar/plot/cm/idl/__config__.py
+++ /dev/null
@@ -1,21 +0,0 @@
-# This file is generated by /Users/brentminchew/Documents/Python/PySAR/setup.py
-# It contains system_info results at the time of building this package.
-__all__ = ["get_info","show"]
-
-
-def get_info(name):
- g = globals()
- return g.get(name, g.get(name + "_info", {}))
-
-def show():
- for name,info_dict in globals().items():
- if name[0] == "_" or type(info_dict) is not type({}): continue
- print(name + ":")
- if not info_dict:
- print(" NOT AVAILABLE")
- for k,v in info_dict.items():
- v = str(v)
- if k == "sources" and len(v) > 200:
- v = v[:60] + " ...\n... " + v[-60:]
- print(" %s = %s" % (k,v))
-
\ No newline at end of file
diff --git a/build/src.macosx-10.10-x86_64-2.7/pysar/plot/cm/imagej/__config__.py b/build/src.macosx-10.10-x86_64-2.7/pysar/plot/cm/imagej/__config__.py
deleted file mode 100644
index 82b7493..0000000
--- a/build/src.macosx-10.10-x86_64-2.7/pysar/plot/cm/imagej/__config__.py
+++ /dev/null
@@ -1,21 +0,0 @@
-# This file is generated by /Users/brentminchew/Documents/Python/PySAR/setup.py
-# It contains system_info results at the time of building this package.
-__all__ = ["get_info","show"]
-
-
-def get_info(name):
- g = globals()
- return g.get(name, g.get(name + "_info", {}))
-
-def show():
- for name,info_dict in globals().items():
- if name[0] == "_" or type(info_dict) is not type({}): continue
- print(name + ":")
- if not info_dict:
- print(" NOT AVAILABLE")
- for k,v in info_dict.items():
- v = str(v)
- if k == "sources" and len(v) > 200:
- v = v[:60] + " ...\n... " + v[-60:]
- print(" %s = %s" % (k,v))
-
\ No newline at end of file
diff --git a/build/src.macosx-10.10-x86_64-2.7/pysar/plot/cm/kst/__config__.py b/build/src.macosx-10.10-x86_64-2.7/pysar/plot/cm/kst/__config__.py
deleted file mode 100644
index 82b7493..0000000
--- a/build/src.macosx-10.10-x86_64-2.7/pysar/plot/cm/kst/__config__.py
+++ /dev/null
@@ -1,21 +0,0 @@
-# This file is generated by /Users/brentminchew/Documents/Python/PySAR/setup.py
-# It contains system_info results at the time of building this package.
-__all__ = ["get_info","show"]
-
-
-def get_info(name):
- g = globals()
- return g.get(name, g.get(name + "_info", {}))
-
-def show():
- for name,info_dict in globals().items():
- if name[0] == "_" or type(info_dict) is not type({}): continue
- print(name + ":")
- if not info_dict:
- print(" NOT AVAILABLE")
- for k,v in info_dict.items():
- v = str(v)
- if k == "sources" and len(v) > 200:
- v = v[:60] + " ...\n... " + v[-60:]
- print(" %s = %s" % (k,v))
-
\ No newline at end of file
diff --git a/build/src.macosx-10.10-x86_64-2.7/pysar/plot/cm/ncl/__config__.py b/build/src.macosx-10.10-x86_64-2.7/pysar/plot/cm/ncl/__config__.py
deleted file mode 100644
index 82b7493..0000000
--- a/build/src.macosx-10.10-x86_64-2.7/pysar/plot/cm/ncl/__config__.py
+++ /dev/null
@@ -1,21 +0,0 @@
-# This file is generated by /Users/brentminchew/Documents/Python/PySAR/setup.py
-# It contains system_info results at the time of building this package.
-__all__ = ["get_info","show"]
-
-
-def get_info(name):
- g = globals()
- return g.get(name, g.get(name + "_info", {}))
-
-def show():
- for name,info_dict in globals().items():
- if name[0] == "_" or type(info_dict) is not type({}): continue
- print(name + ":")
- if not info_dict:
- print(" NOT AVAILABLE")
- for k,v in info_dict.items():
- v = str(v)
- if k == "sources" and len(v) > 200:
- v = v[:60] + " ...\n... " + v[-60:]
- print(" %s = %s" % (k,v))
-
\ No newline at end of file
diff --git a/build/src.macosx-10.10-x86_64-2.7/pysar/signal/_butter_bandpassmodule.c b/build/src.macosx-10.10-x86_64-2.7/pysar/signal/_butter_bandpassmodule.c
deleted file mode 100644
index 4921beb..0000000
--- a/build/src.macosx-10.10-x86_64-2.7/pysar/signal/_butter_bandpassmodule.c
+++ /dev/null
@@ -1,495 +0,0 @@
-/* File: _butter_bandpassmodule.c
- * This file is auto-generated with f2py (version:2).
- * f2py is a Fortran to Python Interface Generator (FPIG), Second Edition,
- * written by Pearu Peterson .
- * See http://cens.ioc.ee/projects/f2py2e/
- * Generation date: Mon Aug 17 15:42:40 2015
- * $Revision:$
- * $Date:$
- * Do not edit this file directly unless you know what you are doing!!!
- */
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/*********************** See f2py2e/cfuncs.py: includes ***********************/
-#include "Python.h"
-#include
-#include "fortranobject.h"
-#include
-
-/**************** See f2py2e/rules.py: mod_rules['modulebody'] ****************/
-static PyObject *_butter_bandpass_error;
-static PyObject *_butter_bandpass_module;
-
-/*********************** See f2py2e/cfuncs.py: typedefs ***********************/
-/*need_typedefs*/
-
-/****************** See f2py2e/cfuncs.py: typedefs_generated ******************/
-/*need_typedefs_generated*/
-
-/********************** See f2py2e/cfuncs.py: cppmacros **********************/
-#if defined(PREPEND_FORTRAN)
-#if defined(NO_APPEND_FORTRAN)
-#if defined(UPPERCASE_FORTRAN)
-#define F_FUNC(f,F) _##F
-#else
-#define F_FUNC(f,F) _##f
-#endif
-#else
-#if defined(UPPERCASE_FORTRAN)
-#define F_FUNC(f,F) _##F##_
-#else
-#define F_FUNC(f,F) _##f##_
-#endif
-#endif
-#else
-#if defined(NO_APPEND_FORTRAN)
-#if defined(UPPERCASE_FORTRAN)
-#define F_FUNC(f,F) F
-#else
-#define F_FUNC(f,F) f
-#endif
-#else
-#if defined(UPPERCASE_FORTRAN)
-#define F_FUNC(f,F) F##_
-#else
-#define F_FUNC(f,F) f##_
-#endif
-#endif
-#endif
-#if defined(UNDERSCORE_G77)
-#define F_FUNC_US(f,F) F_FUNC(f##_,F##_)
-#else
-#define F_FUNC_US(f,F) F_FUNC(f,F)
-#endif
-
-#define rank(var) var ## _Rank
-#define shape(var,dim) var ## _Dims[dim]
-#define old_rank(var) (((PyArrayObject *)(capi_ ## var ## _tmp))->nd)
-#define old_shape(var,dim) (((PyArrayObject *)(capi_ ## var ## _tmp))->dimensions[dim])
-#define fshape(var,dim) shape(var,rank(var)-dim-1)
-#define len(var) shape(var,0)
-#define flen(var) fshape(var,0)
-#define old_size(var) PyArray_SIZE((PyArrayObject *)(capi_ ## var ## _tmp))
-/* #define index(i) capi_i ## i */
-#define slen(var) capi_ ## var ## _len
-#define size(var, ...) f2py_size((PyArrayObject *)(capi_ ## var ## _tmp), ## __VA_ARGS__, -1)
-
-#define CHECKSCALAR(check,tcheck,name,show,var)\
- if (!(check)) {\
- char errstring[256];\
- sprintf(errstring, "%s: "show, "("tcheck") failed for "name, var);\
- PyErr_SetString(_butter_bandpass_error,errstring);\
- /*goto capi_fail;*/\
- } else
-#ifdef DEBUGCFUNCS
-#define CFUNCSMESS(mess) fprintf(stderr,"debug-capi:"mess);
-#define CFUNCSMESSPY(mess,obj) CFUNCSMESS(mess) \
- PyObject_Print((PyObject *)obj,stderr,Py_PRINT_RAW);\
- fprintf(stderr,"\n");
-#else
-#define CFUNCSMESS(mess)
-#define CFUNCSMESSPY(mess,obj)
-#endif
-
-#ifndef max
-#define max(a,b) ((a > b) ? (a) : (b))
-#endif
-#ifndef min
-#define min(a,b) ((a < b) ? (a) : (b))
-#endif
-#ifndef MAX
-#define MAX(a,b) ((a > b) ? (a) : (b))
-#endif
-#ifndef MIN
-#define MIN(a,b) ((a < b) ? (a) : (b))
-#endif
-
-
-/************************ See f2py2e/cfuncs.py: cfuncs ************************/
-static int double_from_pyobj(double* v,PyObject *obj,const char *errmess) {
- PyObject* tmp = NULL;
- if (PyFloat_Check(obj)) {
-#ifdef __sgi
- *v = PyFloat_AsDouble(obj);
-#else
- *v = PyFloat_AS_DOUBLE(obj);
-#endif
- return 1;
- }
- tmp = PyNumber_Float(obj);
- if (tmp) {
-#ifdef __sgi
- *v = PyFloat_AsDouble(tmp);
-#else
- *v = PyFloat_AS_DOUBLE(tmp);
-#endif
- Py_DECREF(tmp);
- return 1;
- }
- if (PyComplex_Check(obj))
- tmp = PyObject_GetAttrString(obj,"real");
- else if (PyString_Check(obj) || PyUnicode_Check(obj))
- /*pass*/;
- else if (PySequence_Check(obj))
- tmp = PySequence_GetItem(obj,0);
- if (tmp) {
- PyErr_Clear();
- if (double_from_pyobj(v,tmp,errmess)) {Py_DECREF(tmp); return 1;}
- Py_DECREF(tmp);
- }
- {
- PyObject* err = PyErr_Occurred();
- if (err==NULL) err = _butter_bandpass_error;
- PyErr_SetString(err,errmess);
- }
- return 0;
-}
-
-static int f2py_size(PyArrayObject* var, ...)
-{
- npy_int sz = 0;
- npy_int dim;
- npy_int rank;
- va_list argp;
- va_start(argp, var);
- dim = va_arg(argp, npy_int);
- if (dim==-1)
- {
- sz = PyArray_SIZE(var);
- }
- else
- {
- rank = PyArray_NDIM(var);
- if (dim>=1 && dim<=rank)
- sz = PyArray_DIM(var, dim-1);
- else
- fprintf(stderr, "f2py_size: 2nd argument value=%d fails to satisfy 1<=value<=%d. Result will be 0.\n", dim, rank);
- }
- va_end(argp);
- return sz;
-}
-
-static int float_from_pyobj(float* v,PyObject *obj,const char *errmess) {
- double d=0.0;
- if (double_from_pyobj(&d,obj,errmess)) {
- *v = (float)d;
- return 1;
- }
- return 0;
-}
-
-static int int_from_pyobj(int* v,PyObject *obj,const char *errmess) {
- PyObject* tmp = NULL;
- if (PyInt_Check(obj)) {
- *v = (int)PyInt_AS_LONG(obj);
- return 1;
- }
- tmp = PyNumber_Int(obj);
- if (tmp) {
- *v = PyInt_AS_LONG(tmp);
- Py_DECREF(tmp);
- return 1;
- }
- if (PyComplex_Check(obj))
- tmp = PyObject_GetAttrString(obj,"real");
- else if (PyString_Check(obj) || PyUnicode_Check(obj))
- /*pass*/;
- else if (PySequence_Check(obj))
- tmp = PySequence_GetItem(obj,0);
- if (tmp) {
- PyErr_Clear();
- if (int_from_pyobj(v,tmp,errmess)) {Py_DECREF(tmp); return 1;}
- Py_DECREF(tmp);
- }
- {
- PyObject* err = PyErr_Occurred();
- if (err==NULL) err = _butter_bandpass_error;
- PyErr_SetString(err,errmess);
- }
- return 0;
-}
-
-
-/********************* See f2py2e/cfuncs.py: userincludes *********************/
-/*need_userincludes*/
-
-/********************* See f2py2e/capi_rules.py: usercode *********************/
-
-
-/* See f2py2e/rules.py */
-extern void F_FUNC(bfilter,BFILTER)(float*,float*,float*,float*,float*,float*,float*,int*,int*,int*);
-/*eof externroutines*/
-
-/******************** See f2py2e/capi_rules.py: usercode1 ********************/
-
-
-/******************* See f2py2e/cb_rules.py: buildcallback *******************/
-/*need_callbacks*/
-
-/*********************** See f2py2e/rules.py: buildapi ***********************/
-
-/********************************** bfilter **********************************/
-static char doc_f2py_rout__butter_bandpass_bfilter[] = "\
-yr,er,ermx = bfilter(xr,f0,fc,dt,m,mzer,[n])\n\nWrapper for ``bfilter``.\
-\n\nParameters\n----------\n"
-"xr : input rank-1 array('f') with bounds (n)\n"
-"f0 : input float\n"
-"fc : input float\n"
-"dt : input float\n"
-"m : input int\n"
-"mzer : input int\n"
-"\nOther Parameters\n----------------\n"
-"n : input int, optional\n Default: len(xr)\n"
-"\nReturns\n-------\n"
-"yr : rank-1 array('f') with bounds (n)\n"
-"er : rank-1 array('f') with bounds (n)\n"
-"ermx : float";
-/* extern void F_FUNC(bfilter,BFILTER)(float*,float*,float*,float*,float*,float*,float*,int*,int*,int*); */
-static PyObject *f2py_rout__butter_bandpass_bfilter(const PyObject *capi_self,
- PyObject *capi_args,
- PyObject *capi_keywds,
- void (*f2py_func)(float*,float*,float*,float*,float*,float*,float*,int*,int*,int*)) {
- PyObject * volatile capi_buildvalue = NULL;
- volatile int f2py_success = 1;
-/*decl*/
-
- float *xr = NULL;
- npy_intp xr_Dims[1] = {-1};
- const int xr_Rank = 1;
- PyArrayObject *capi_xr_tmp = NULL;
- int capi_xr_intent = 0;
- PyObject *xr_capi = Py_None;
- float *yr = NULL;
- npy_intp yr_Dims[1] = {-1};
- const int yr_Rank = 1;
- PyArrayObject *capi_yr_tmp = NULL;
- int capi_yr_intent = 0;
- float *er = NULL;
- npy_intp er_Dims[1] = {-1};
- const int er_Rank = 1;
- PyArrayObject *capi_er_tmp = NULL;
- int capi_er_intent = 0;
- float ermx = 0;
- float f0 = 0;
- PyObject *f0_capi = Py_None;
- float fc = 0;
- PyObject *fc_capi = Py_None;
- float dt = 0;
- PyObject *dt_capi = Py_None;
- int m = 0;
- PyObject *m_capi = Py_None;
- int n = 0;
- PyObject *n_capi = Py_None;
- int mzer = 0;
- PyObject *mzer_capi = Py_None;
- static char *capi_kwlist[] = {"xr","f0","fc","dt","m","mzer","n",NULL};
-
-/*routdebugenter*/
-#ifdef F2PY_REPORT_ATEXIT
-f2py_start_clock();
-#endif
- if (!PyArg_ParseTupleAndKeywords(capi_args,capi_keywds,\
- "OOOOOO|O:_butter_bandpass.bfilter",\
- capi_kwlist,&xr_capi,&f0_capi,&fc_capi,&dt_capi,&m_capi,&mzer_capi,&n_capi))
- return NULL;
-/*frompyobj*/
- /* Processing variable f0 */
- f2py_success = float_from_pyobj(&f0,f0_capi,"_butter_bandpass.bfilter() 2nd argument (f0) can't be converted to float");
- if (f2py_success) {
- /* Processing variable mzer */
- f2py_success = int_from_pyobj(&mzer,mzer_capi,"_butter_bandpass.bfilter() 6th argument (mzer) can't be converted to int");
- if (f2py_success) {
- /* Processing variable fc */
- f2py_success = float_from_pyobj(&fc,fc_capi,"_butter_bandpass.bfilter() 3rd argument (fc) can't be converted to float");
- if (f2py_success) {
- /* Processing variable xr */
- ;
- capi_xr_intent |= F2PY_INTENT_IN;
- capi_xr_tmp = array_from_pyobj(NPY_FLOAT,xr_Dims,xr_Rank,capi_xr_intent,xr_capi);
- if (capi_xr_tmp == NULL) {
- if (!PyErr_Occurred())
- PyErr_SetString(_butter_bandpass_error,"failed in converting 1st argument `xr' of _butter_bandpass.bfilter to C/Fortran array" );
- } else {
- xr = (float *)(capi_xr_tmp->data);
-
- /* Processing variable dt */
- f2py_success = float_from_pyobj(&dt,dt_capi,"_butter_bandpass.bfilter() 4th argument (dt) can't be converted to float");
- if (f2py_success) {
- /* Processing variable m */
- f2py_success = int_from_pyobj(&m,m_capi,"_butter_bandpass.bfilter() 5th argument (m) can't be converted to int");
- if (f2py_success) {
- /* Processing variable ermx */
- /* Processing variable n */
- if (n_capi == Py_None) n = len(xr); else
- f2py_success = int_from_pyobj(&n,n_capi,"_butter_bandpass.bfilter() 1st keyword (n) can't be converted to int");
- if (f2py_success) {
- CHECKSCALAR(len(xr)>=n,"len(xr)>=n","1st keyword n","bfilter:n=%d",n) {
- /* Processing variable yr */
- yr_Dims[0]=n;
- capi_yr_intent |= F2PY_INTENT_OUT|F2PY_INTENT_HIDE;
- capi_yr_tmp = array_from_pyobj(NPY_FLOAT,yr_Dims,yr_Rank,capi_yr_intent,Py_None);
- if (capi_yr_tmp == NULL) {
- if (!PyErr_Occurred())
- PyErr_SetString(_butter_bandpass_error,"failed in converting hidden `yr' of _butter_bandpass.bfilter to C/Fortran array" );
- } else {
- yr = (float *)(capi_yr_tmp->data);
-
- /* Processing variable er */
- er_Dims[0]=n;
- capi_er_intent |= F2PY_INTENT_OUT|F2PY_INTENT_HIDE;
- capi_er_tmp = array_from_pyobj(NPY_FLOAT,er_Dims,er_Rank,capi_er_intent,Py_None);
- if (capi_er_tmp == NULL) {
- if (!PyErr_Occurred())
- PyErr_SetString(_butter_bandpass_error,"failed in converting hidden `er' of _butter_bandpass.bfilter to C/Fortran array" );
- } else {
- er = (float *)(capi_er_tmp->data);
-
-/*end of frompyobj*/
-#ifdef F2PY_REPORT_ATEXIT
-f2py_start_call_clock();
-#endif
-/*callfortranroutine*/
- (*f2py_func)(xr,yr,er,&ermx,&f0,&fc,&dt,&m,&n,&mzer);
-if (PyErr_Occurred())
- f2py_success = 0;
-#ifdef F2PY_REPORT_ATEXIT
-f2py_stop_call_clock();
-#endif
-/*end of callfortranroutine*/
- if (f2py_success) {
-/*pyobjfrom*/
-/*end of pyobjfrom*/
- CFUNCSMESS("Building return value.\n");
- capi_buildvalue = Py_BuildValue("NNf",capi_yr_tmp,capi_er_tmp,ermx);
-/*closepyobjfrom*/
-/*end of closepyobjfrom*/
- } /*if (f2py_success) after callfortranroutine*/
-/*cleanupfrompyobj*/
- } /*if (capi_er_tmp == NULL) ... else of er*/
- /* End of cleaning variable er */
- } /*if (capi_yr_tmp == NULL) ... else of yr*/
- /* End of cleaning variable yr */
- } /*CHECKSCALAR(len(xr)>=n)*/
- } /*if (f2py_success) of n*/
- /* End of cleaning variable n */
- /* End of cleaning variable ermx */
- } /*if (f2py_success) of m*/
- /* End of cleaning variable m */
- } /*if (f2py_success) of dt*/
- /* End of cleaning variable dt */
- if((PyObject *)capi_xr_tmp!=xr_capi) {
- Py_XDECREF(capi_xr_tmp); }
- } /*if (capi_xr_tmp == NULL) ... else of xr*/
- /* End of cleaning variable xr */
- } /*if (f2py_success) of fc*/
- /* End of cleaning variable fc */
- } /*if (f2py_success) of mzer*/
- /* End of cleaning variable mzer */
- } /*if (f2py_success) of f0*/
- /* End of cleaning variable f0 */
-/*end of cleanupfrompyobj*/
- if (capi_buildvalue == NULL) {
-/*routdebugfailure*/
- } else {
-/*routdebugleave*/
- }
- CFUNCSMESS("Freeing memory.\n");
-/*freemem*/
-#ifdef F2PY_REPORT_ATEXIT
-f2py_stop_clock();
-#endif
- return capi_buildvalue;
-}
-/******************************* end of bfilter *******************************/
-/*eof body*/
-
-/******************* See f2py2e/f90mod_rules.py: buildhooks *******************/
-/*need_f90modhooks*/
-
-/************** See f2py2e/rules.py: module_rules['modulebody'] **************/
-
-/******************* See f2py2e/common_rules.py: buildhooks *******************/
-
-/*need_commonhooks*/
-
-/**************************** See f2py2e/rules.py ****************************/
-
-static FortranDataDef f2py_routine_defs[] = {
- {"bfilter",-1,{{-1}},0,(char *)F_FUNC(bfilter,BFILTER),(f2py_init_func)f2py_rout__butter_bandpass_bfilter,doc_f2py_rout__butter_bandpass_bfilter},
-
-/*eof routine_defs*/
- {NULL}
-};
-
-static PyMethodDef f2py_module_methods[] = {
-
- {NULL,NULL}
-};
-
-#if PY_VERSION_HEX >= 0x03000000
-static struct PyModuleDef moduledef = {
- PyModuleDef_HEAD_INIT,
- "_butter_bandpass",
- NULL,
- -1,
- f2py_module_methods,
- NULL,
- NULL,
- NULL,
- NULL
-};
-#endif
-
-#if PY_VERSION_HEX >= 0x03000000
-#define RETVAL m
-PyMODINIT_FUNC PyInit__butter_bandpass(void) {
-#else
-#define RETVAL
-PyMODINIT_FUNC init_butter_bandpass(void) {
-#endif
- int i;
- PyObject *m,*d, *s;
-#if PY_VERSION_HEX >= 0x03000000
- m = _butter_bandpass_module = PyModule_Create(&moduledef);
-#else
- m = _butter_bandpass_module = Py_InitModule("_butter_bandpass", f2py_module_methods);
-#endif
- Py_TYPE(&PyFortran_Type) = &PyType_Type;
- import_array();
- if (PyErr_Occurred())
- {PyErr_SetString(PyExc_ImportError, "can't initialize module _butter_bandpass (failed to import numpy)"); return RETVAL;}
- d = PyModule_GetDict(m);
- s = PyString_FromString("$Revision: $");
- PyDict_SetItemString(d, "__version__", s);
-#if PY_VERSION_HEX >= 0x03000000
- s = PyUnicode_FromString(
-#else
- s = PyString_FromString(
-#endif
- "This module '_butter_bandpass' is auto-generated with f2py (version:2).\nFunctions:\n"
-" yr,er,ermx = bfilter(xr,f0,fc,dt,m,mzer,n=len(xr))\n"
-".");
- PyDict_SetItemString(d, "__doc__", s);
- _butter_bandpass_error = PyErr_NewException ("_butter_bandpass.error", NULL, NULL);
- Py_DECREF(s);
- for(i=0;f2py_routine_defs[i].name!=NULL;i++)
- PyDict_SetItemString(d, f2py_routine_defs[i].name,PyFortranObject_NewAsAttr(&f2py_routine_defs[i]));
-
-/*eof initf2pywraphooks*/
-/*eof initf90modhooks*/
-
-/*eof initcommonhooks*/
-
-
-#ifdef F2PY_REPORT_ATEXIT
- if (! PyErr_Occurred())
- on_exit(f2py_report_on_exit,(void*)"_butter_bandpass");
-#endif
-
- return RETVAL;
-}
-#ifdef __cplusplus
-}
-#endif
diff --git a/build/src.macosx-10.10-x86_64-2.7/pysar/signal/_xapiir_sub-f2pywrappers.f b/build/src.macosx-10.10-x86_64-2.7/pysar/signal/_xapiir_sub-f2pywrappers.f
deleted file mode 100644
index 43c4ed0..0000000
--- a/build/src.macosx-10.10-x86_64-2.7/pysar/signal/_xapiir_sub-f2pywrappers.f
+++ /dev/null
@@ -1,12 +0,0 @@
-C -*- fortran -*-
-C This file is autogenerated with f2py (version:2)
-C It contains Fortran 77 wrappers to fortran functions.
-
- subroutine f2pywrapwarp (warpf2pywrap, f, ts)
- external warp
- real f
- real ts
- real warpf2pywrap, warp
- warpf2pywrap = warp(f, ts)
- end
-
diff --git a/build/src.macosx-10.10-x86_64-2.7/pysar/signal/_xapiir_submodule.c b/build/src.macosx-10.10-x86_64-2.7/pysar/signal/_xapiir_submodule.c
deleted file mode 100644
index 61431ef..0000000
--- a/build/src.macosx-10.10-x86_64-2.7/pysar/signal/_xapiir_submodule.c
+++ /dev/null
@@ -1,2757 +0,0 @@
-/* File: _xapiir_submodule.c
- * This file is auto-generated with f2py (version:2).
- * f2py is a Fortran to Python Interface Generator (FPIG), Second Edition,
- * written by Pearu Peterson .
- * See http://cens.ioc.ee/projects/f2py2e/
- * Generation date: Mon Aug 17 15:42:40 2015
- * $Revision:$
- * $Date:$
- * Do not edit this file directly unless you know what you are doing!!!
- */
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/*********************** See f2py2e/cfuncs.py: includes ***********************/
-#include "Python.h"
-#include
-#include "fortranobject.h"
-#include
-#include
-
-/**************** See f2py2e/rules.py: mod_rules['modulebody'] ****************/
-static PyObject *_xapiir_sub_error;
-static PyObject *_xapiir_sub_module;
-
-/*********************** See f2py2e/cfuncs.py: typedefs ***********************/
-typedef char * string;
-typedef struct {float r,i;} complex_float;
-
-/****************** See f2py2e/cfuncs.py: typedefs_generated ******************/
-/*need_typedefs_generated*/
-
-/********************** See f2py2e/cfuncs.py: cppmacros **********************/
-\
-#define FAILNULL(p) do { \
- if ((p) == NULL) { \
- PyErr_SetString(PyExc_MemoryError, "NULL pointer found"); \
- goto capi_fail; \
- } \
-} while (0)
-
-#define STRINGMALLOC(str,len)\
- if ((str = (string)malloc(sizeof(char)*(len+1))) == NULL) {\
- PyErr_SetString(PyExc_MemoryError, "out of memory");\
- goto capi_fail;\
- } else {\
- (str)[len] = '\0';\
- }
-
-#if defined(PREPEND_FORTRAN)
-#if defined(NO_APPEND_FORTRAN)
-#if defined(UPPERCASE_FORTRAN)
-#define F_FUNC(f,F) _##F
-#else
-#define F_FUNC(f,F) _##f
-#endif
-#else
-#if defined(UPPERCASE_FORTRAN)
-#define F_FUNC(f,F) _##F##_
-#else
-#define F_FUNC(f,F) _##f##_
-#endif
-#endif
-#else
-#if defined(NO_APPEND_FORTRAN)
-#if defined(UPPERCASE_FORTRAN)
-#define F_FUNC(f,F) F
-#else
-#define F_FUNC(f,F) f
-#endif
-#else
-#if defined(UPPERCASE_FORTRAN)
-#define F_FUNC(f,F) F##_
-#else
-#define F_FUNC(f,F) f##_
-#endif
-#endif
-#endif
-#if defined(UNDERSCORE_G77)
-#define F_FUNC_US(f,F) F_FUNC(f##_,F##_)
-#else
-#define F_FUNC_US(f,F) F_FUNC(f,F)
-#endif
-
-#define rank(var) var ## _Rank
-#define shape(var,dim) var ## _Dims[dim]
-#define old_rank(var) (((PyArrayObject *)(capi_ ## var ## _tmp))->nd)
-#define old_shape(var,dim) (((PyArrayObject *)(capi_ ## var ## _tmp))->dimensions[dim])
-#define fshape(var,dim) shape(var,rank(var)-dim-1)
-#define len(var) shape(var,0)
-#define flen(var) fshape(var,0)
-#define old_size(var) PyArray_SIZE((PyArrayObject *)(capi_ ## var ## _tmp))
-/* #define index(i) capi_i ## i */
-#define slen(var) capi_ ## var ## _len
-#define size(var, ...) f2py_size((PyArrayObject *)(capi_ ## var ## _tmp), ## __VA_ARGS__, -1)
-
-#define STRINGFREE(str) do {if (!(str == NULL)) free(str);} while (0)
-
-#define CHECKSCALAR(check,tcheck,name,show,var)\
- if (!(check)) {\
- char errstring[256];\
- sprintf(errstring, "%s: "show, "("tcheck") failed for "name, var);\
- PyErr_SetString(_xapiir_sub_error,errstring);\
- /*goto capi_fail;*/\
- } else
-#ifdef DEBUGCFUNCS
-#define CFUNCSMESS(mess) fprintf(stderr,"debug-capi:"mess);
-#define CFUNCSMESSPY(mess,obj) CFUNCSMESS(mess) \
- PyObject_Print((PyObject *)obj,stderr,Py_PRINT_RAW);\
- fprintf(stderr,"\n");
-#else
-#define CFUNCSMESS(mess)
-#define CFUNCSMESSPY(mess,obj)
-#endif
-
-#ifndef max
-#define max(a,b) ((a > b) ? (a) : (b))
-#endif
-#ifndef min
-#define min(a,b) ((a < b) ? (a) : (b))
-#endif
-#ifndef MAX
-#define MAX(a,b) ((a > b) ? (a) : (b))
-#endif
-#ifndef MIN
-#define MIN(a,b) ((a < b) ? (a) : (b))
-#endif
-
-#if defined(PREPEND_FORTRAN)
-#if defined(NO_APPEND_FORTRAN)
-#if defined(UPPERCASE_FORTRAN)
-#define F_WRAPPEDFUNC(f,F) _F2PYWRAP##F
-#else
-#define F_WRAPPEDFUNC(f,F) _f2pywrap##f
-#endif
-#else
-#if defined(UPPERCASE_FORTRAN)
-#define F_WRAPPEDFUNC(f,F) _F2PYWRAP##F##_
-#else
-#define F_WRAPPEDFUNC(f,F) _f2pywrap##f##_
-#endif
-#endif
-#else
-#if defined(NO_APPEND_FORTRAN)
-#if defined(UPPERCASE_FORTRAN)
-#define F_WRAPPEDFUNC(f,F) F2PYWRAP##F
-#else
-#define F_WRAPPEDFUNC(f,F) f2pywrap##f
-#endif
-#else
-#if defined(UPPERCASE_FORTRAN)
-#define F_WRAPPEDFUNC(f,F) F2PYWRAP##F##_
-#else
-#define F_WRAPPEDFUNC(f,F) f2pywrap##f##_
-#endif
-#endif
-#endif
-#if defined(UNDERSCORE_G77)
-#define F_WRAPPEDFUNC_US(f,F) F_WRAPPEDFUNC(f##_,F##_)
-#else
-#define F_WRAPPEDFUNC_US(f,F) F_WRAPPEDFUNC(f,F)
-#endif
-
-#define STRINGCOPYN(to,from,buf_size) \
- do { \
- int _m = (buf_size); \
- char *_to = (to); \
- char *_from = (from); \
- FAILNULL(_to); FAILNULL(_from); \
- (void)strncpy(_to, _from, sizeof(char)*_m); \
- _to[_m-1] = '\0'; \
- /* Padding with spaces instead of nulls */ \
- for (_m -= 2; _m >= 0 && _to[_m] == '\0'; _m--) { \
- _to[_m] = ' '; \
- } \
- } while (0)
-
-
-/************************ See f2py2e/cfuncs.py: cfuncs ************************/
-static int double_from_pyobj(double* v,PyObject *obj,const char *errmess) {
- PyObject* tmp = NULL;
- if (PyFloat_Check(obj)) {
-#ifdef __sgi
- *v = PyFloat_AsDouble(obj);
-#else
- *v = PyFloat_AS_DOUBLE(obj);
-#endif
- return 1;
- }
- tmp = PyNumber_Float(obj);
- if (tmp) {
-#ifdef __sgi
- *v = PyFloat_AsDouble(tmp);
-#else
- *v = PyFloat_AS_DOUBLE(tmp);
-#endif
- Py_DECREF(tmp);
- return 1;
- }
- if (PyComplex_Check(obj))
- tmp = PyObject_GetAttrString(obj,"real");
- else if (PyString_Check(obj) || PyUnicode_Check(obj))
- /*pass*/;
- else if (PySequence_Check(obj))
- tmp = PySequence_GetItem(obj,0);
- if (tmp) {
- PyErr_Clear();
- if (double_from_pyobj(v,tmp,errmess)) {Py_DECREF(tmp); return 1;}
- Py_DECREF(tmp);
- }
- {
- PyObject* err = PyErr_Occurred();
- if (err==NULL) err = _xapiir_sub_error;
- PyErr_SetString(err,errmess);
- }
- return 0;
-}
-
-static int f2py_size(PyArrayObject* var, ...)
-{
- npy_int sz = 0;
- npy_int dim;
- npy_int rank;
- va_list argp;
- va_start(argp, var);
- dim = va_arg(argp, npy_int);
- if (dim==-1)
- {
- sz = PyArray_SIZE(var);
- }
- else
- {
- rank = PyArray_NDIM(var);
- if (dim>=1 && dim<=rank)
- sz = PyArray_DIM(var, dim-1);
- else
- fprintf(stderr, "f2py_size: 2nd argument value=%d fails to satisfy 1<=value<=%d. Result will be 0.\n", dim, rank);
- }
- va_end(argp);
- return sz;
-}
-
-static int float_from_pyobj(float* v,PyObject *obj,const char *errmess) {
- double d=0.0;
- if (double_from_pyobj(&d,obj,errmess)) {
- *v = (float)d;
- return 1;
- }
- return 0;
-}
-
-static int int_from_pyobj(int* v,PyObject *obj,const char *errmess) {
- PyObject* tmp = NULL;
- if (PyInt_Check(obj)) {
- *v = (int)PyInt_AS_LONG(obj);
- return 1;
- }
- tmp = PyNumber_Int(obj);
- if (tmp) {
- *v = PyInt_AS_LONG(tmp);
- Py_DECREF(tmp);
- return 1;
- }
- if (PyComplex_Check(obj))
- tmp = PyObject_GetAttrString(obj,"real");
- else if (PyString_Check(obj) || PyUnicode_Check(obj))
- /*pass*/;
- else if (PySequence_Check(obj))
- tmp = PySequence_GetItem(obj,0);
- if (tmp) {
- PyErr_Clear();
- if (int_from_pyobj(v,tmp,errmess)) {Py_DECREF(tmp); return 1;}
- Py_DECREF(tmp);
- }
- {
- PyObject* err = PyErr_Occurred();
- if (err==NULL) err = _xapiir_sub_error;
- PyErr_SetString(err,errmess);
- }
- return 0;
-}
-
-static int string_from_pyobj(string *str,int *len,const string inistr,PyObject *obj,const char *errmess) {
- PyArrayObject *arr = NULL;
- PyObject *tmp = NULL;
-#ifdef DEBUGCFUNCS
-fprintf(stderr,"string_from_pyobj(str='%s',len=%d,inistr='%s',obj=%p)\n",(char*)str,*len,(char *)inistr,obj);
-#endif
- if (obj == Py_None) {
- if (*len == -1)
- *len = strlen(inistr); /* Will this cause problems? */
- STRINGMALLOC(*str,*len);
- STRINGCOPYN(*str,inistr,*len+1);
- return 1;
- }
- if (PyArray_Check(obj)) {
- if ((arr = (PyArrayObject *)obj) == NULL)
- goto capi_fail;
- if (!ISCONTIGUOUS(arr)) {
- PyErr_SetString(PyExc_ValueError,"array object is non-contiguous.");
- goto capi_fail;
- }
- if (*len == -1)
- *len = (arr->descr->elsize)*PyArray_SIZE(arr);
- STRINGMALLOC(*str,*len);
- STRINGCOPYN(*str,arr->data,*len+1);
- return 1;
- }
- if (PyString_Check(obj)) {
- tmp = obj;
- Py_INCREF(tmp);
- }
-#if PY_VERSION_HEX >= 0x03000000
- else if (PyUnicode_Check(obj)) {
- tmp = PyUnicode_AsASCIIString(obj);
- }
- else {
- PyObject *tmp2;
- tmp2 = PyObject_Str(obj);
- if (tmp2) {
- tmp = PyUnicode_AsASCIIString(tmp2);
- Py_DECREF(tmp2);
- }
- else {
- tmp = NULL;
- }
- }
-#else
- else {
- tmp = PyObject_Str(obj);
- }
-#endif
- if (tmp == NULL) goto capi_fail;
- if (*len == -1)
- *len = PyString_GET_SIZE(tmp);
- STRINGMALLOC(*str,*len);
- STRINGCOPYN(*str,PyString_AS_STRING(tmp),*len+1);
- Py_DECREF(tmp);
- return 1;
-capi_fail:
- Py_XDECREF(tmp);
- {
- PyObject* err = PyErr_Occurred();
- if (err==NULL) err = _xapiir_sub_error;
- PyErr_SetString(err,errmess);
- }
- return 0;
-}
-
-
-/********************* See f2py2e/cfuncs.py: userincludes *********************/
-/*need_userincludes*/
-
-/********************* See f2py2e/capi_rules.py: usercode *********************/
-
-
-/* See f2py2e/rules.py */
-extern void F_FUNC(xapiir,XAPIIR)(float*,int*,string,float*,float*,int*,string,float*,float*,float*,int*,int*,size_t,size_t);
-extern void F_FUNC(apply,APPLY)(float*,int*,int*,float*,float*,int*,int*);
-extern void F_FUNC(design,DESIGN)(int*,string,string,float*,float*,float*,float*,float*,float*,float*,int*,size_t,size_t);
-extern void F_FUNC(buroots,BUROOTS)(complex_float*,string*,float*,int*,int*);
-extern void F_FUNC(beroots,BEROOTS)(complex_float*,string*,float*,int*,int*);
-extern void F_FUNC(chebparm,CHEBPARM)(float*,float*,int*,float*,float*);
-extern void F_FUNC(c1roots,C1ROOTS)(complex_float*,string*,float*,int*,int*,float*);
-extern void F_FUNC(c2roots,C2ROOTS)(complex_float*,complex_float*,string*,float*,int*,int*,float*,float*);
-extern void F_WRAPPEDFUNC(warp,WARP)(float*,float*,float*);
-extern void F_FUNC(lp,LP)(complex_float*,complex_float*,string*,float*,int*,float*,float*);
-extern void F_FUNC(lptbp,LPTBP)(complex_float*,complex_float*,string*,float*,int*,float*,float*,float*,float*);
-extern void F_FUNC(lptbr,LPTBR)(complex_float*,complex_float*,string*,float*,int*,float*,float*,float*,float*);
-extern void F_FUNC(lpthp,LPTHP)(complex_float*,complex_float*,string*,float*,int*,float*,float*);
-extern void F_FUNC(cutoffs,CUTOFFS)(float*,float*,int*,float*);
-extern void F_FUNC(bilin2,BILIN2)(float*,float*,int*);
-/*eof externroutines*/
-
-/******************** See f2py2e/capi_rules.py: usercode1 ********************/
-
-
-/******************* See f2py2e/cb_rules.py: buildcallback *******************/
-/*need_callbacks*/
-
-/*********************** See f2py2e/rules.py: buildapi ***********************/
-
-/*********************************** xapiir ***********************************/
-static char doc_f2py_rout__xapiir_sub_xapiir[] = "\
-xapiir(data,nsamps,aproto,trbndw,a,iord,type_bn,flo,fhi,ts,passes,[max_nt])\n\nWrapper for ``xapiir``.\
-\n\nParameters\n----------\n"
-"data : in/output rank-1 array('f') with bounds (max_nt)\n"
-"nsamps : input int\n"
-"aproto : input string(len=2)\n"
-"trbndw : input float\n"
-"a : input float\n"
-"iord : input int\n"
-"type_bn : input string(len=2)\n"
-"flo : input float\n"
-"fhi : input float\n"
-"ts : input float\n"
-"passes : input int\n"
-"\nOther Parameters\n----------------\n"
-"max_nt : input int, optional\n Default: len(data)";
-/* extern void F_FUNC(xapiir,XAPIIR)(float*,int*,string,float*,float*,int*,string,float*,float*,float*,int*,int*,size_t,size_t); */
-static PyObject *f2py_rout__xapiir_sub_xapiir(const PyObject *capi_self,
- PyObject *capi_args,
- PyObject *capi_keywds,
- void (*f2py_func)(float*,int*,string,float*,float*,int*,string,float*,float*,float*,int*,int*,size_t,size_t)) {
- PyObject * volatile capi_buildvalue = NULL;
- volatile int f2py_success = 1;
-/*decl*/
-
- float *data = NULL;
- npy_intp data_Dims[1] = {-1};
- const int data_Rank = 1;
- PyArrayObject *capi_data_tmp = NULL;
- int capi_data_intent = 0;
- PyObject *data_capi = Py_None;
- int nsamps = 0;
- PyObject *nsamps_capi = Py_None;
- string aproto = NULL;
- int slen(aproto);
- PyObject *aproto_capi = Py_None;
- float trbndw = 0;
- PyObject *trbndw_capi = Py_None;
- float a = 0;
- PyObject *a_capi = Py_None;
- int iord = 0;
- PyObject *iord_capi = Py_None;
- string type_bn = NULL;
- int slen(type_bn);
- PyObject *type_bn_capi = Py_None;
- float flo = 0;
- PyObject *flo_capi = Py_None;
- float fhi = 0;
- PyObject *fhi_capi = Py_None;
- float ts = 0;
- PyObject *ts_capi = Py_None;
- int passes = 0;
- PyObject *passes_capi = Py_None;
- int max_nt = 0;
- PyObject *max_nt_capi = Py_None;
- static char *capi_kwlist[] = {"data","nsamps","aproto","trbndw","a","iord","type_bn","flo","fhi","ts","passes","max_nt",NULL};
-
-/*routdebugenter*/
-#ifdef F2PY_REPORT_ATEXIT
-f2py_start_clock();
-#endif
- if (!PyArg_ParseTupleAndKeywords(capi_args,capi_keywds,\
- "OOOOOOOOOOO|O:_xapiir_sub.xapiir",\
- capi_kwlist,&data_capi,&nsamps_capi,&aproto_capi,&trbndw_capi,&a_capi,&iord_capi,&type_bn_capi,&flo_capi,&fhi_capi,&ts_capi,&passes_capi,&max_nt_capi))
- return NULL;
-/*frompyobj*/
- /* Processing variable a */
- f2py_success = float_from_pyobj(&a,a_capi,"_xapiir_sub.xapiir() 5th argument (a) can't be converted to float");
- if (f2py_success) {
- /* Processing variable passes */
- f2py_success = int_from_pyobj(&passes,passes_capi,"_xapiir_sub.xapiir() 11st argument (passes) can't be converted to int");
- if (f2py_success) {
- /* Processing variable trbndw */
- f2py_success = float_from_pyobj(&trbndw,trbndw_capi,"_xapiir_sub.xapiir() 4th argument (trbndw) can't be converted to float");
- if (f2py_success) {
- /* Processing variable fhi */
- f2py_success = float_from_pyobj(&fhi,fhi_capi,"_xapiir_sub.xapiir() 9th argument (fhi) can't be converted to float");
- if (f2py_success) {
- /* Processing variable iord */
- f2py_success = int_from_pyobj(&iord,iord_capi,"_xapiir_sub.xapiir() 6th argument (iord) can't be converted to int");
- if (f2py_success) {
- /* Processing variable ts */
- f2py_success = float_from_pyobj(&ts,ts_capi,"_xapiir_sub.xapiir() 10th argument (ts) can't be converted to float");
- if (f2py_success) {
- /* Processing variable nsamps */
- f2py_success = int_from_pyobj(&nsamps,nsamps_capi,"_xapiir_sub.xapiir() 2nd argument (nsamps) can't be converted to int");
- if (f2py_success) {
- /* Processing variable aproto */
- slen(aproto) = 2;
- f2py_success = string_from_pyobj(&aproto,&slen(aproto),"",aproto_capi,"string_from_pyobj failed in converting 3rd argument `aproto' of _xapiir_sub.xapiir to C string");
- if (f2py_success) {
- /* Processing variable flo */
- f2py_success = float_from_pyobj(&flo,flo_capi,"_xapiir_sub.xapiir() 8th argument (flo) can't be converted to float");
- if (f2py_success) {
- /* Processing variable type_bn */
- slen(type_bn) = 2;
- f2py_success = string_from_pyobj(&type_bn,&slen(type_bn),"",type_bn_capi,"string_from_pyobj failed in converting 7th argument `type_bn' of _xapiir_sub.xapiir to C string");
- if (f2py_success) {
- /* Processing variable data */
- ;
- capi_data_intent |= F2PY_INTENT_INOUT;
- capi_data_tmp = array_from_pyobj(NPY_FLOAT,data_Dims,data_Rank,capi_data_intent,data_capi);
- if (capi_data_tmp == NULL) {
- if (!PyErr_Occurred())
- PyErr_SetString(_xapiir_sub_error,"failed in converting 1st argument `data' of _xapiir_sub.xapiir to C/Fortran array" );
- } else {
- data = (float *)(capi_data_tmp->data);
-
- /* Processing variable max_nt */
- if (max_nt_capi == Py_None) max_nt = len(data); else
- f2py_success = int_from_pyobj(&max_nt,max_nt_capi,"_xapiir_sub.xapiir() 1st keyword (max_nt) can't be converted to int");
- if (f2py_success) {
- CHECKSCALAR(len(data)>=max_nt,"len(data)>=max_nt","1st keyword max_nt","xapiir:max_nt=%d",max_nt) {
-/*end of frompyobj*/
-#ifdef F2PY_REPORT_ATEXIT
-f2py_start_call_clock();
-#endif
-/*callfortranroutine*/
- (*f2py_func)(data,&nsamps,aproto,&trbndw,&a,&iord,type_bn,&flo,&fhi,&ts,&passes,&max_nt,slen(aproto),slen(type_bn));
-if (PyErr_Occurred())
- f2py_success = 0;
-#ifdef F2PY_REPORT_ATEXIT
-f2py_stop_call_clock();
-#endif
-/*end of callfortranroutine*/
- if (f2py_success) {
-/*pyobjfrom*/
-/*end of pyobjfrom*/
- CFUNCSMESS("Building return value.\n");
- capi_buildvalue = Py_BuildValue("");
-/*closepyobjfrom*/
-/*end of closepyobjfrom*/
- } /*if (f2py_success) after callfortranroutine*/
-/*cleanupfrompyobj*/
- } /*CHECKSCALAR(len(data)>=max_nt)*/
- } /*if (f2py_success) of max_nt*/
- /* End of cleaning variable max_nt */
- if((PyObject *)capi_data_tmp!=data_capi) {
- Py_XDECREF(capi_data_tmp); }
- } /*if (capi_data_tmp == NULL) ... else of data*/
- /* End of cleaning variable data */
- STRINGFREE(type_bn);
- } /*if (f2py_success) of type_bn*/
- /* End of cleaning variable type_bn */
- } /*if (f2py_success) of flo*/
- /* End of cleaning variable flo */
- STRINGFREE(aproto);
- } /*if (f2py_success) of aproto*/
- /* End of cleaning variable aproto */
- } /*if (f2py_success) of nsamps*/
- /* End of cleaning variable nsamps */
- } /*if (f2py_success) of ts*/
- /* End of cleaning variable ts */
- } /*if (f2py_success) of iord*/
- /* End of cleaning variable iord */
- } /*if (f2py_success) of fhi*/
- /* End of cleaning variable fhi */
- } /*if (f2py_success) of trbndw*/
- /* End of cleaning variable trbndw */
- } /*if (f2py_success) of passes*/
- /* End of cleaning variable passes */
- } /*if (f2py_success) of a*/
- /* End of cleaning variable a */
-/*end of cleanupfrompyobj*/
- if (capi_buildvalue == NULL) {
-/*routdebugfailure*/
- } else {
-/*routdebugleave*/
- }
- CFUNCSMESS("Freeing memory.\n");
-/*freemem*/
-#ifdef F2PY_REPORT_ATEXIT
-f2py_stop_clock();
-#endif
- return capi_buildvalue;
-}
-/******************************* end of xapiir *******************************/
-
-/*********************************** apply ***********************************/
-static char doc_f2py_rout__xapiir_sub_apply[] = "\
-apply(data,nsamps,zp,sn,sd,nsects,[max_nt])\n\nWrapper for ``apply``.\
-\n\nParameters\n----------\n"
-"data : input rank-1 array('f') with bounds (max_nt)\n"
-"nsamps : input int\n"
-"zp : input int\n"
-"sn : input rank-1 array('f') with bounds (1)\n"
-"sd : input rank-1 array('f') with bounds (1)\n"
-"nsects : input int\n"
-"\nOther Parameters\n----------------\n"
-"max_nt : input int, optional\n Default: len(data)";
-/* extern void F_FUNC(apply,APPLY)(float*,int*,int*,float*,float*,int*,int*); */
-static PyObject *f2py_rout__xapiir_sub_apply(const PyObject *capi_self,
- PyObject *capi_args,
- PyObject *capi_keywds,
- void (*f2py_func)(float*,int*,int*,float*,float*,int*,int*)) {
- PyObject * volatile capi_buildvalue = NULL;
- volatile int f2py_success = 1;
-/*decl*/
-
- float *data = NULL;
- npy_intp data_Dims[1] = {-1};
- const int data_Rank = 1;
- PyArrayObject *capi_data_tmp = NULL;
- int capi_data_intent = 0;
- PyObject *data_capi = Py_None;
- int nsamps = 0;
- PyObject *nsamps_capi = Py_None;
- int zp = 0;
- PyObject *zp_capi = Py_None;
- float *sn = NULL;
- npy_intp sn_Dims[1] = {-1};
- const int sn_Rank = 1;
- PyArrayObject *capi_sn_tmp = NULL;
- int capi_sn_intent = 0;
- PyObject *sn_capi = Py_None;
- float *sd = NULL;
- npy_intp sd_Dims[1] = {-1};
- const int sd_Rank = 1;
- PyArrayObject *capi_sd_tmp = NULL;
- int capi_sd_intent = 0;
- PyObject *sd_capi = Py_None;
- int nsects = 0;
- PyObject *nsects_capi = Py_None;
- int max_nt = 0;
- PyObject *max_nt_capi = Py_None;
- static char *capi_kwlist[] = {"data","nsamps","zp","sn","sd","nsects","max_nt",NULL};
-
-/*routdebugenter*/
-#ifdef F2PY_REPORT_ATEXIT
-f2py_start_clock();
-#endif
- if (!PyArg_ParseTupleAndKeywords(capi_args,capi_keywds,\
- "OOOOOO|O:_xapiir_sub.apply",\
- capi_kwlist,&data_capi,&nsamps_capi,&zp_capi,&sn_capi,&sd_capi,&nsects_capi,&max_nt_capi))
- return NULL;
-/*frompyobj*/
- /* Processing variable zp */
- zp = (int)PyObject_IsTrue(zp_capi);
- f2py_success = 1;
- if (f2py_success) {
- /* Processing variable nsamps */
- f2py_success = int_from_pyobj(&nsamps,nsamps_capi,"_xapiir_sub.apply() 2nd argument (nsamps) can't be converted to int");
- if (f2py_success) {
- /* Processing variable nsects */
- f2py_success = int_from_pyobj(&nsects,nsects_capi,"_xapiir_sub.apply() 6th argument (nsects) can't be converted to int");
- if (f2py_success) {
- /* Processing variable sd */
- sd_Dims[0]=1;
- capi_sd_intent |= F2PY_INTENT_IN;
- capi_sd_tmp = array_from_pyobj(NPY_FLOAT,sd_Dims,sd_Rank,capi_sd_intent,sd_capi);
- if (capi_sd_tmp == NULL) {
- if (!PyErr_Occurred())
- PyErr_SetString(_xapiir_sub_error,"failed in converting 5th argument `sd' of _xapiir_sub.apply to C/Fortran array" );
- } else {
- sd = (float *)(capi_sd_tmp->data);
-
- /* Processing variable data */
- ;
- capi_data_intent |= F2PY_INTENT_IN;
- capi_data_tmp = array_from_pyobj(NPY_FLOAT,data_Dims,data_Rank,capi_data_intent,data_capi);
- if (capi_data_tmp == NULL) {
- if (!PyErr_Occurred())
- PyErr_SetString(_xapiir_sub_error,"failed in converting 1st argument `data' of _xapiir_sub.apply to C/Fortran array" );
- } else {
- data = (float *)(capi_data_tmp->data);
-
- /* Processing variable sn */
- sn_Dims[0]=1;
- capi_sn_intent |= F2PY_INTENT_IN;
- capi_sn_tmp = array_from_pyobj(NPY_FLOAT,sn_Dims,sn_Rank,capi_sn_intent,sn_capi);
- if (capi_sn_tmp == NULL) {
- if (!PyErr_Occurred())
- PyErr_SetString(_xapiir_sub_error,"failed in converting 4th argument `sn' of _xapiir_sub.apply to C/Fortran array" );
- } else {
- sn = (float *)(capi_sn_tmp->data);
-
- /* Processing variable max_nt */
- if (max_nt_capi == Py_None) max_nt = len(data); else
- f2py_success = int_from_pyobj(&max_nt,max_nt_capi,"_xapiir_sub.apply() 1st keyword (max_nt) can't be converted to int");
- if (f2py_success) {
- CHECKSCALAR(len(data)>=max_nt,"len(data)>=max_nt","1st keyword max_nt","apply:max_nt=%d",max_nt) {
-/*end of frompyobj*/
-#ifdef F2PY_REPORT_ATEXIT
-f2py_start_call_clock();
-#endif
-/*callfortranroutine*/
- (*f2py_func)(data,&nsamps,&zp,sn,sd,&nsects,&max_nt);
-if (PyErr_Occurred())
- f2py_success = 0;
-#ifdef F2PY_REPORT_ATEXIT
-f2py_stop_call_clock();
-#endif
-/*end of callfortranroutine*/
- if (f2py_success) {
-/*pyobjfrom*/
-/*end of pyobjfrom*/
- CFUNCSMESS("Building return value.\n");
- capi_buildvalue = Py_BuildValue("");
-/*closepyobjfrom*/
-/*end of closepyobjfrom*/
- } /*if (f2py_success) after callfortranroutine*/
-/*cleanupfrompyobj*/
- } /*CHECKSCALAR(len(data)>=max_nt)*/
- } /*if (f2py_success) of max_nt*/
- /* End of cleaning variable max_nt */
- if((PyObject *)capi_sn_tmp!=sn_capi) {
- Py_XDECREF(capi_sn_tmp); }
- } /*if (capi_sn_tmp == NULL) ... else of sn*/
- /* End of cleaning variable sn */
- if((PyObject *)capi_data_tmp!=data_capi) {
- Py_XDECREF(capi_data_tmp); }
- } /*if (capi_data_tmp == NULL) ... else of data*/
- /* End of cleaning variable data */
- if((PyObject *)capi_sd_tmp!=sd_capi) {
- Py_XDECREF(capi_sd_tmp); }
- } /*if (capi_sd_tmp == NULL) ... else of sd*/
- /* End of cleaning variable sd */
- } /*if (f2py_success) of nsects*/
- /* End of cleaning variable nsects */
- } /*if (f2py_success) of nsamps*/
- /* End of cleaning variable nsamps */
- } /*if (f2py_success) of zp*/
- /* End of cleaning variable zp */
-/*end of cleanupfrompyobj*/
- if (capi_buildvalue == NULL) {
-/*routdebugfailure*/
- } else {
-/*routdebugleave*/
- }
- CFUNCSMESS("Freeing memory.\n");
-/*freemem*/
-#ifdef F2PY_REPORT_ATEXIT
-f2py_stop_clock();
-#endif
- return capi_buildvalue;
-}
-/******************************** end of apply ********************************/
-
-/*********************************** design ***********************************/
-static char doc_f2py_rout__xapiir_sub_design[] = "\
-design(iord,type_bn,aproto,a,trbndw,fl,fh,ts,sn,sd,nsects)\n\nWrapper for ``design``.\
-\n\nParameters\n----------\n"
-"iord : input int\n"
-"type_bn : input string(len=2)\n"
-"aproto : input string(len=2)\n"
-"a : input float\n"
-"trbndw : input float\n"
-"fl : input float\n"
-"fh : input float\n"
-"ts : input float\n"
-"sn : input rank-1 array('f') with bounds (1)\n"
-"sd : input rank-1 array('f') with bounds (1)\n"
-"nsects : input int";
-/* extern void F_FUNC(design,DESIGN)(int*,string,string,float*,float*,float*,float*,float*,float*,float*,int*,size_t,size_t); */
-static PyObject *f2py_rout__xapiir_sub_design(const PyObject *capi_self,
- PyObject *capi_args,
- PyObject *capi_keywds,
- void (*f2py_func)(int*,string,string,float*,float*,float*,float*,float*,float*,float*,int*,size_t,size_t)) {
- PyObject * volatile capi_buildvalue = NULL;
- volatile int f2py_success = 1;
-/*decl*/
-
- int iord = 0;
- PyObject *iord_capi = Py_None;
- string type_bn = NULL;
- int slen(type_bn);
- PyObject *type_bn_capi = Py_None;
- string aproto = NULL;
- int slen(aproto);
- PyObject *aproto_capi = Py_None;
- float a = 0;
- PyObject *a_capi = Py_None;
- float trbndw = 0;
- PyObject *trbndw_capi = Py_None;
- float fl = 0;
- PyObject *fl_capi = Py_None;
- float fh = 0;
- PyObject *fh_capi = Py_None;
- float ts = 0;
- PyObject *ts_capi = Py_None;
- float *sn = NULL;
- npy_intp sn_Dims[1] = {-1};
- const int sn_Rank = 1;
- PyArrayObject *capi_sn_tmp = NULL;
- int capi_sn_intent = 0;
- PyObject *sn_capi = Py_None;
- float *sd = NULL;
- npy_intp sd_Dims[1] = {-1};
- const int sd_Rank = 1;
- PyArrayObject *capi_sd_tmp = NULL;
- int capi_sd_intent = 0;
- PyObject *sd_capi = Py_None;
- int nsects = 0;
- PyObject *nsects_capi = Py_None;
- static char *capi_kwlist[] = {"iord","type_bn","aproto","a","trbndw","fl","fh","ts","sn","sd","nsects",NULL};
-
-/*routdebugenter*/
-#ifdef F2PY_REPORT_ATEXIT
-f2py_start_clock();
-#endif
- if (!PyArg_ParseTupleAndKeywords(capi_args,capi_keywds,\
- "OOOOOOOOOOO:_xapiir_sub.design",\
- capi_kwlist,&iord_capi,&type_bn_capi,&aproto_capi,&a_capi,&trbndw_capi,&fl_capi,&fh_capi,&ts_capi,&sn_capi,&sd_capi,&nsects_capi))
- return NULL;
-/*frompyobj*/
- /* Processing variable a */
- f2py_success = float_from_pyobj(&a,a_capi,"_xapiir_sub.design() 4th argument (a) can't be converted to float");
- if (f2py_success) {
- /* Processing variable trbndw */
- f2py_success = float_from_pyobj(&trbndw,trbndw_capi,"_xapiir_sub.design() 5th argument (trbndw) can't be converted to float");
- if (f2py_success) {
- /* Processing variable type_bn */
- slen(type_bn) = 2;
- f2py_success = string_from_pyobj(&type_bn,&slen(type_bn),"",type_bn_capi,"string_from_pyobj failed in converting 2nd argument `type_bn' of _xapiir_sub.design to C string");
- if (f2py_success) {
- /* Processing variable iord */
- f2py_success = int_from_pyobj(&iord,iord_capi,"_xapiir_sub.design() 1st argument (iord) can't be converted to int");
- if (f2py_success) {
- /* Processing variable ts */
- f2py_success = float_from_pyobj(&ts,ts_capi,"_xapiir_sub.design() 8th argument (ts) can't be converted to float");
- if (f2py_success) {
- /* Processing variable aproto */
- slen(aproto) = 2;
- f2py_success = string_from_pyobj(&aproto,&slen(aproto),"",aproto_capi,"string_from_pyobj failed in converting 3rd argument `aproto' of _xapiir_sub.design to C string");
- if (f2py_success) {
- /* Processing variable sn */
- sn_Dims[0]=1;
- capi_sn_intent |= F2PY_INTENT_IN;
- capi_sn_tmp = array_from_pyobj(NPY_FLOAT,sn_Dims,sn_Rank,capi_sn_intent,sn_capi);
- if (capi_sn_tmp == NULL) {
- if (!PyErr_Occurred())
- PyErr_SetString(_xapiir_sub_error,"failed in converting 9th argument `sn' of _xapiir_sub.design to C/Fortran array" );
- } else {
- sn = (float *)(capi_sn_tmp->data);
-
- /* Processing variable fh */
- f2py_success = float_from_pyobj(&fh,fh_capi,"_xapiir_sub.design() 7th argument (fh) can't be converted to float");
- if (f2py_success) {
- /* Processing variable fl */
- f2py_success = float_from_pyobj(&fl,fl_capi,"_xapiir_sub.design() 6th argument (fl) can't be converted to float");
- if (f2py_success) {
- /* Processing variable nsects */
- f2py_success = int_from_pyobj(&nsects,nsects_capi,"_xapiir_sub.design() 11st argument (nsects) can't be converted to int");
- if (f2py_success) {
- /* Processing variable sd */
- sd_Dims[0]=1;
- capi_sd_intent |= F2PY_INTENT_IN;
- capi_sd_tmp = array_from_pyobj(NPY_FLOAT,sd_Dims,sd_Rank,capi_sd_intent,sd_capi);
- if (capi_sd_tmp == NULL) {
- if (!PyErr_Occurred())
- PyErr_SetString(_xapiir_sub_error,"failed in converting 10th argument `sd' of _xapiir_sub.design to C/Fortran array" );
- } else {
- sd = (float *)(capi_sd_tmp->data);
-
-/*end of frompyobj*/
-#ifdef F2PY_REPORT_ATEXIT
-f2py_start_call_clock();
-#endif
-/*callfortranroutine*/
- (*f2py_func)(&iord,type_bn,aproto,&a,&trbndw,&fl,&fh,&ts,sn,sd,&nsects,slen(type_bn),slen(aproto));
-if (PyErr_Occurred())
- f2py_success = 0;
-#ifdef F2PY_REPORT_ATEXIT
-f2py_stop_call_clock();
-#endif
-/*end of callfortranroutine*/
- if (f2py_success) {
-/*pyobjfrom*/
-/*end of pyobjfrom*/
- CFUNCSMESS("Building return value.\n");
- capi_buildvalue = Py_BuildValue("");
-/*closepyobjfrom*/
-/*end of closepyobjfrom*/
- } /*if (f2py_success) after callfortranroutine*/
-/*cleanupfrompyobj*/
- if((PyObject *)capi_sd_tmp!=sd_capi) {
- Py_XDECREF(capi_sd_tmp); }
- } /*if (capi_sd_tmp == NULL) ... else of sd*/
- /* End of cleaning variable sd */
- } /*if (f2py_success) of nsects*/
- /* End of cleaning variable nsects */
- } /*if (f2py_success) of fl*/
- /* End of cleaning variable fl */
- } /*if (f2py_success) of fh*/
- /* End of cleaning variable fh */
- if((PyObject *)capi_sn_tmp!=sn_capi) {
- Py_XDECREF(capi_sn_tmp); }
- } /*if (capi_sn_tmp == NULL) ... else of sn*/
- /* End of cleaning variable sn */
- STRINGFREE(aproto);
- } /*if (f2py_success) of aproto*/
- /* End of cleaning variable aproto */
- } /*if (f2py_success) of ts*/
- /* End of cleaning variable ts */
- } /*if (f2py_success) of iord*/
- /* End of cleaning variable iord */
- STRINGFREE(type_bn);
- } /*if (f2py_success) of type_bn*/
- /* End of cleaning variable type_bn */
- } /*if (f2py_success) of trbndw*/
- /* End of cleaning variable trbndw */
- } /*if (f2py_success) of a*/
- /* End of cleaning variable a */
-/*end of cleanupfrompyobj*/
- if (capi_buildvalue == NULL) {
-/*routdebugfailure*/
- } else {
-/*routdebugleave*/
- }
- CFUNCSMESS("Freeing memory.\n");
-/*freemem*/
-#ifdef F2PY_REPORT_ATEXIT
-f2py_stop_clock();
-#endif
- return capi_buildvalue;
-}
-/******************************* end of design *******************************/
-
-/********************************** buroots **********************************/
-static char doc_f2py_rout__xapiir_sub_buroots[] = "\
-buroots(p,rtype,dcvalue,nsects,iord)\n\nWrapper for ``buroots``.\
-\n\nParameters\n----------\n"
-"p : input rank-1 array('F') with bounds (1)\n"
-"rtype : input rank-2 array('S') with bounds (1,3)\n"
-"dcvalue : input float\n"
-"nsects : input int\n"
-"iord : input int";
-/* extern void F_FUNC(buroots,BUROOTS)(complex_float*,string*,float*,int*,int*); */
-static PyObject *f2py_rout__xapiir_sub_buroots(const PyObject *capi_self,
- PyObject *capi_args,
- PyObject *capi_keywds,
- void (*f2py_func)(complex_float*,string*,float*,int*,int*)) {
- PyObject * volatile capi_buildvalue = NULL;
- volatile int f2py_success = 1;
-/*decl*/
-
- complex_float *p = NULL;
- npy_intp p_Dims[1] = {-1};
- const int p_Rank = 1;
- PyArrayObject *capi_p_tmp = NULL;
- int capi_p_intent = 0;
- PyObject *p_capi = Py_None;
- string *rtype = NULL;
- npy_intp rtype_Dims[2] = {-1, -1};
- const int rtype_Rank = 2;
- PyArrayObject *capi_rtype_tmp = NULL;
- int capi_rtype_intent = 0;
- PyObject *rtype_capi = Py_None;
- float dcvalue = 0;
- PyObject *dcvalue_capi = Py_None;
- int nsects = 0;
- PyObject *nsects_capi = Py_None;
- int iord = 0;
- PyObject *iord_capi = Py_None;
- static char *capi_kwlist[] = {"p","rtype","dcvalue","nsects","iord",NULL};
-
-/*routdebugenter*/
-#ifdef F2PY_REPORT_ATEXIT
-f2py_start_clock();
-#endif
- if (!PyArg_ParseTupleAndKeywords(capi_args,capi_keywds,\
- "OOOOO:_xapiir_sub.buroots",\
- capi_kwlist,&p_capi,&rtype_capi,&dcvalue_capi,&nsects_capi,&iord_capi))
- return NULL;
-/*frompyobj*/
- /* Processing variable dcvalue */
- f2py_success = float_from_pyobj(&dcvalue,dcvalue_capi,"_xapiir_sub.buroots() 3rd argument (dcvalue) can't be converted to float");
- if (f2py_success) {
- /* Processing variable rtype */
- rtype_Dims[0]=1,rtype_Dims[1]=3;
- capi_rtype_intent |= F2PY_INTENT_IN|F2PY_INTENT_C;
- capi_rtype_tmp = array_from_pyobj(NPY_CHAR,rtype_Dims,rtype_Rank,capi_rtype_intent,rtype_capi);
- if (capi_rtype_tmp == NULL) {
- if (!PyErr_Occurred())
- PyErr_SetString(_xapiir_sub_error,"failed in converting 2nd argument `rtype' of _xapiir_sub.buroots to C/Fortran array" );
- } else {
- rtype = (string *)(capi_rtype_tmp->data);
-
- /* Processing variable nsects */
- f2py_success = int_from_pyobj(&nsects,nsects_capi,"_xapiir_sub.buroots() 4th argument (nsects) can't be converted to int");
- if (f2py_success) {
- /* Processing variable iord */
- f2py_success = int_from_pyobj(&iord,iord_capi,"_xapiir_sub.buroots() 5th argument (iord) can't be converted to int");
- if (f2py_success) {
- /* Processing variable p */
- p_Dims[0]=1;
- capi_p_intent |= F2PY_INTENT_IN;
- capi_p_tmp = array_from_pyobj(NPY_CFLOAT,p_Dims,p_Rank,capi_p_intent,p_capi);
- if (capi_p_tmp == NULL) {
- if (!PyErr_Occurred())
- PyErr_SetString(_xapiir_sub_error,"failed in converting 1st argument `p' of _xapiir_sub.buroots to C/Fortran array" );
- } else {
- p = (complex_float *)(capi_p_tmp->data);
-
-/*end of frompyobj*/
-#ifdef F2PY_REPORT_ATEXIT
-f2py_start_call_clock();
-#endif
-/*callfortranroutine*/
- (*f2py_func)(p,rtype,&dcvalue,&nsects,&iord);
-if (PyErr_Occurred())
- f2py_success = 0;
-#ifdef F2PY_REPORT_ATEXIT
-f2py_stop_call_clock();
-#endif
-/*end of callfortranroutine*/
- if (f2py_success) {
-/*pyobjfrom*/
-/*end of pyobjfrom*/
- CFUNCSMESS("Building return value.\n");
- capi_buildvalue = Py_BuildValue("");
-/*closepyobjfrom*/
-/*end of closepyobjfrom*/
- } /*if (f2py_success) after callfortranroutine*/
-/*cleanupfrompyobj*/
- if((PyObject *)capi_p_tmp!=p_capi) {
- Py_XDECREF(capi_p_tmp); }
- } /*if (capi_p_tmp == NULL) ... else of p*/
- /* End of cleaning variable p */
- } /*if (f2py_success) of iord*/
- /* End of cleaning variable iord */
- } /*if (f2py_success) of nsects*/
- /* End of cleaning variable nsects */
- if((PyObject *)capi_rtype_tmp!=rtype_capi) {
- Py_XDECREF(capi_rtype_tmp); }
- } /*if (capi_rtype_tmp == NULL) ... else of rtype*/
- /* End of cleaning variable rtype */
- } /*if (f2py_success) of dcvalue*/
- /* End of cleaning variable dcvalue */
-/*end of cleanupfrompyobj*/
- if (capi_buildvalue == NULL) {
-/*routdebugfailure*/
- } else {
-/*routdebugleave*/
- }
- CFUNCSMESS("Freeing memory.\n");
-/*freemem*/
-#ifdef F2PY_REPORT_ATEXIT
-f2py_stop_clock();
-#endif
- return capi_buildvalue;
-}
-/******************************* end of buroots *******************************/
-
-/********************************** beroots **********************************/
-static char doc_f2py_rout__xapiir_sub_beroots[] = "\
-beroots(p,rtype,dcvalue,nsects,iord)\n\nWrapper for ``beroots``.\
-\n\nParameters\n----------\n"
-"p : input rank-1 array('F') with bounds (*)\n"
-"rtype : input rank-2 array('S') with bounds (*,3)\n"
-"dcvalue : input float\n"
-"nsects : input int\n"
-"iord : input int";
-/* extern void F_FUNC(beroots,BEROOTS)(complex_float*,string*,float*,int*,int*); */
-static PyObject *f2py_rout__xapiir_sub_beroots(const PyObject *capi_self,
- PyObject *capi_args,
- PyObject *capi_keywds,
- void (*f2py_func)(complex_float*,string*,float*,int*,int*)) {
- PyObject * volatile capi_buildvalue = NULL;
- volatile int f2py_success = 1;
-/*decl*/
-
- complex_float *p = NULL;
- npy_intp p_Dims[1] = {-1};
- const int p_Rank = 1;
- PyArrayObject *capi_p_tmp = NULL;
- int capi_p_intent = 0;
- PyObject *p_capi = Py_None;
- string *rtype = NULL;
- npy_intp rtype_Dims[2] = {-1, -1};
- const int rtype_Rank = 2;
- PyArrayObject *capi_rtype_tmp = NULL;
- int capi_rtype_intent = 0;
- PyObject *rtype_capi = Py_None;
- float dcvalue = 0;
- PyObject *dcvalue_capi = Py_None;
- int nsects = 0;
- PyObject *nsects_capi = Py_None;
- int iord = 0;
- PyObject *iord_capi = Py_None;
- static char *capi_kwlist[] = {"p","rtype","dcvalue","nsects","iord",NULL};
-
-/*routdebugenter*/
-#ifdef F2PY_REPORT_ATEXIT
-f2py_start_clock();
-#endif
- if (!PyArg_ParseTupleAndKeywords(capi_args,capi_keywds,\
- "OOOOO:_xapiir_sub.beroots",\
- capi_kwlist,&p_capi,&rtype_capi,&dcvalue_capi,&nsects_capi,&iord_capi))
- return NULL;
-/*frompyobj*/
- /* Processing variable nsects */
- f2py_success = int_from_pyobj(&nsects,nsects_capi,"_xapiir_sub.beroots() 4th argument (nsects) can't be converted to int");
- if (f2py_success) {
- /* Processing variable p */
- ;
- capi_p_intent |= F2PY_INTENT_IN;
- capi_p_tmp = array_from_pyobj(NPY_CFLOAT,p_Dims,p_Rank,capi_p_intent,p_capi);
- if (capi_p_tmp == NULL) {
- if (!PyErr_Occurred())
- PyErr_SetString(_xapiir_sub_error,"failed in converting 1st argument `p' of _xapiir_sub.beroots to C/Fortran array" );
- } else {
- p = (complex_float *)(capi_p_tmp->data);
-
- /* Processing variable iord */
- f2py_success = int_from_pyobj(&iord,iord_capi,"_xapiir_sub.beroots() 5th argument (iord) can't be converted to int");
- if (f2py_success) {
- /* Processing variable rtype */
- rtype_Dims[1]=3;
- capi_rtype_intent |= F2PY_INTENT_IN|F2PY_INTENT_C;
- capi_rtype_tmp = array_from_pyobj(NPY_CHAR,rtype_Dims,rtype_Rank,capi_rtype_intent,rtype_capi);
- if (capi_rtype_tmp == NULL) {
- if (!PyErr_Occurred())
- PyErr_SetString(_xapiir_sub_error,"failed in converting 2nd argument `rtype' of _xapiir_sub.beroots to C/Fortran array" );
- } else {
- rtype = (string *)(capi_rtype_tmp->data);
-
- /* Processing variable dcvalue */
- f2py_success = float_from_pyobj(&dcvalue,dcvalue_capi,"_xapiir_sub.beroots() 3rd argument (dcvalue) can't be converted to float");
- if (f2py_success) {
-/*end of frompyobj*/
-#ifdef F2PY_REPORT_ATEXIT
-f2py_start_call_clock();
-#endif
-/*callfortranroutine*/
- (*f2py_func)(p,rtype,&dcvalue,&nsects,&iord);
-if (PyErr_Occurred())
- f2py_success = 0;
-#ifdef F2PY_REPORT_ATEXIT
-f2py_stop_call_clock();
-#endif
-/*end of callfortranroutine*/
- if (f2py_success) {
-/*pyobjfrom*/
-/*end of pyobjfrom*/
- CFUNCSMESS("Building return value.\n");
- capi_buildvalue = Py_BuildValue("");
-/*closepyobjfrom*/
-/*end of closepyobjfrom*/
- } /*if (f2py_success) after callfortranroutine*/
-/*cleanupfrompyobj*/
- } /*if (f2py_success) of dcvalue*/
- /* End of cleaning variable dcvalue */
- if((PyObject *)capi_rtype_tmp!=rtype_capi) {
- Py_XDECREF(capi_rtype_tmp); }
- } /*if (capi_rtype_tmp == NULL) ... else of rtype*/
- /* End of cleaning variable rtype */
- } /*if (f2py_success) of iord*/
- /* End of cleaning variable iord */
- if((PyObject *)capi_p_tmp!=p_capi) {
- Py_XDECREF(capi_p_tmp); }
- } /*if (capi_p_tmp == NULL) ... else of p*/
- /* End of cleaning variable p */
- } /*if (f2py_success) of nsects*/
- /* End of cleaning variable nsects */
-/*end of cleanupfrompyobj*/
- if (capi_buildvalue == NULL) {
-/*routdebugfailure*/
- } else {
-/*routdebugleave*/
- }
- CFUNCSMESS("Freeing memory.\n");
-/*freemem*/
-#ifdef F2PY_REPORT_ATEXIT
-f2py_stop_clock();
-#endif
- return capi_buildvalue;
-}
-/******************************* end of beroots *******************************/
-
-/********************************** chebparm **********************************/
-static char doc_f2py_rout__xapiir_sub_chebparm[] = "\
-chebparm(a,trbndw,iord,eps,ripple)\n\nWrapper for ``chebparm``.\
-\n\nParameters\n----------\n"
-"a : input float\n"
-"trbndw : input float\n"
-"iord : input int\n"
-"eps : input float\n"
-"ripple : input float";
-/* extern void F_FUNC(chebparm,CHEBPARM)(float*,float*,int*,float*,float*); */
-static PyObject *f2py_rout__xapiir_sub_chebparm(const PyObject *capi_self,
- PyObject *capi_args,
- PyObject *capi_keywds,
- void (*f2py_func)(float*,float*,int*,float*,float*)) {
- PyObject * volatile capi_buildvalue = NULL;
- volatile int f2py_success = 1;
-/*decl*/
-
- float a = 0;
- PyObject *a_capi = Py_None;
- float trbndw = 0;
- PyObject *trbndw_capi = Py_None;
- int iord = 0;
- PyObject *iord_capi = Py_None;
- float eps = 0;
- PyObject *eps_capi = Py_None;
- float ripple = 0;
- PyObject *ripple_capi = Py_None;
- static char *capi_kwlist[] = {"a","trbndw","iord","eps","ripple",NULL};
-
-/*routdebugenter*/
-#ifdef F2PY_REPORT_ATEXIT
-f2py_start_clock();
-#endif
- if (!PyArg_ParseTupleAndKeywords(capi_args,capi_keywds,\
- "OOOOO:_xapiir_sub.chebparm",\
- capi_kwlist,&a_capi,&trbndw_capi,&iord_capi,&eps_capi,&ripple_capi))
- return NULL;
-/*frompyobj*/
- /* Processing variable a */
- f2py_success = float_from_pyobj(&a,a_capi,"_xapiir_sub.chebparm() 1st argument (a) can't be converted to float");
- if (f2py_success) {
- /* Processing variable ripple */
- f2py_success = float_from_pyobj(&ripple,ripple_capi,"_xapiir_sub.chebparm() 5th argument (ripple) can't be converted to float");
- if (f2py_success) {
- /* Processing variable iord */
- f2py_success = int_from_pyobj(&iord,iord_capi,"_xapiir_sub.chebparm() 3rd argument (iord) can't be converted to int");
- if (f2py_success) {
- /* Processing variable trbndw */
- f2py_success = float_from_pyobj(&trbndw,trbndw_capi,"_xapiir_sub.chebparm() 2nd argument (trbndw) can't be converted to float");
- if (f2py_success) {
- /* Processing variable eps */
- f2py_success = float_from_pyobj(&eps,eps_capi,"_xapiir_sub.chebparm() 4th argument (eps) can't be converted to float");
- if (f2py_success) {
-/*end of frompyobj*/
-#ifdef F2PY_REPORT_ATEXIT
-f2py_start_call_clock();
-#endif
-/*callfortranroutine*/
- (*f2py_func)(&a,&trbndw,&iord,&eps,&ripple);
-if (PyErr_Occurred())
- f2py_success = 0;
-#ifdef F2PY_REPORT_ATEXIT
-f2py_stop_call_clock();
-#endif
-/*end of callfortranroutine*/
- if (f2py_success) {
-/*pyobjfrom*/
-/*end of pyobjfrom*/
- CFUNCSMESS("Building return value.\n");
- capi_buildvalue = Py_BuildValue("");
-/*closepyobjfrom*/
-/*end of closepyobjfrom*/
- } /*if (f2py_success) after callfortranroutine*/
-/*cleanupfrompyobj*/
- } /*if (f2py_success) of eps*/
- /* End of cleaning variable eps */
- } /*if (f2py_success) of trbndw*/
- /* End of cleaning variable trbndw */
- } /*if (f2py_success) of iord*/
- /* End of cleaning variable iord */
- } /*if (f2py_success) of ripple*/
- /* End of cleaning variable ripple */
- } /*if (f2py_success) of a*/
- /* End of cleaning variable a */
-/*end of cleanupfrompyobj*/
- if (capi_buildvalue == NULL) {
-/*routdebugfailure*/
- } else {
-/*routdebugleave*/
- }
- CFUNCSMESS("Freeing memory.\n");
-/*freemem*/
-#ifdef F2PY_REPORT_ATEXIT
-f2py_stop_clock();
-#endif
- return capi_buildvalue;
-}
-/****************************** end of chebparm ******************************/
-
-/********************************** c1roots **********************************/
-static char doc_f2py_rout__xapiir_sub_c1roots[] = "\
-c1roots(p,rtype,dcvalue,nsects,iord,eps)\n\nWrapper for ``c1roots``.\
-\n\nParameters\n----------\n"
-"p : input rank-1 array('F') with bounds (1)\n"
-"rtype : input rank-2 array('S') with bounds (1,3)\n"
-"dcvalue : input float\n"
-"nsects : input int\n"
-"iord : input int\n"
-"eps : input float";
-/* extern void F_FUNC(c1roots,C1ROOTS)(complex_float*,string*,float*,int*,int*,float*); */
-static PyObject *f2py_rout__xapiir_sub_c1roots(const PyObject *capi_self,
- PyObject *capi_args,
- PyObject *capi_keywds,
- void (*f2py_func)(complex_float*,string*,float*,int*,int*,float*)) {
- PyObject * volatile capi_buildvalue = NULL;
- volatile int f2py_success = 1;
-/*decl*/
-
- complex_float *p = NULL;
- npy_intp p_Dims[1] = {-1};
- const int p_Rank = 1;
- PyArrayObject *capi_p_tmp = NULL;
- int capi_p_intent = 0;
- PyObject *p_capi = Py_None;
- string *rtype = NULL;
- npy_intp rtype_Dims[2] = {-1, -1};
- const int rtype_Rank = 2;
- PyArrayObject *capi_rtype_tmp = NULL;
- int capi_rtype_intent = 0;
- PyObject *rtype_capi = Py_None;
- float dcvalue = 0;
- PyObject *dcvalue_capi = Py_None;
- int nsects = 0;
- PyObject *nsects_capi = Py_None;
- int iord = 0;
- PyObject *iord_capi = Py_None;
- float eps = 0;
- PyObject *eps_capi = Py_None;
- static char *capi_kwlist[] = {"p","rtype","dcvalue","nsects","iord","eps",NULL};
-
-/*routdebugenter*/
-#ifdef F2PY_REPORT_ATEXIT
-f2py_start_clock();
-#endif
- if (!PyArg_ParseTupleAndKeywords(capi_args,capi_keywds,\
- "OOOOOO:_xapiir_sub.c1roots",\
- capi_kwlist,&p_capi,&rtype_capi,&dcvalue_capi,&nsects_capi,&iord_capi,&eps_capi))
- return NULL;
-/*frompyobj*/
- /* Processing variable dcvalue */
- f2py_success = float_from_pyobj(&dcvalue,dcvalue_capi,"_xapiir_sub.c1roots() 3rd argument (dcvalue) can't be converted to float");
- if (f2py_success) {
- /* Processing variable rtype */
- rtype_Dims[0]=1,rtype_Dims[1]=3;
- capi_rtype_intent |= F2PY_INTENT_IN|F2PY_INTENT_C;
- capi_rtype_tmp = array_from_pyobj(NPY_CHAR,rtype_Dims,rtype_Rank,capi_rtype_intent,rtype_capi);
- if (capi_rtype_tmp == NULL) {
- if (!PyErr_Occurred())
- PyErr_SetString(_xapiir_sub_error,"failed in converting 2nd argument `rtype' of _xapiir_sub.c1roots to C/Fortran array" );
- } else {
- rtype = (string *)(capi_rtype_tmp->data);
-
- /* Processing variable nsects */
- f2py_success = int_from_pyobj(&nsects,nsects_capi,"_xapiir_sub.c1roots() 4th argument (nsects) can't be converted to int");
- if (f2py_success) {
- /* Processing variable iord */
- f2py_success = int_from_pyobj(&iord,iord_capi,"_xapiir_sub.c1roots() 5th argument (iord) can't be converted to int");
- if (f2py_success) {
- /* Processing variable eps */
- f2py_success = float_from_pyobj(&eps,eps_capi,"_xapiir_sub.c1roots() 6th argument (eps) can't be converted to float");
- if (f2py_success) {
- /* Processing variable p */
- p_Dims[0]=1;
- capi_p_intent |= F2PY_INTENT_IN;
- capi_p_tmp = array_from_pyobj(NPY_CFLOAT,p_Dims,p_Rank,capi_p_intent,p_capi);
- if (capi_p_tmp == NULL) {
- if (!PyErr_Occurred())
- PyErr_SetString(_xapiir_sub_error,"failed in converting 1st argument `p' of _xapiir_sub.c1roots to C/Fortran array" );
- } else {
- p = (complex_float *)(capi_p_tmp->data);
-
-/*end of frompyobj*/
-#ifdef F2PY_REPORT_ATEXIT
-f2py_start_call_clock();
-#endif
-/*callfortranroutine*/
- (*f2py_func)(p,rtype,&dcvalue,&nsects,&iord,&eps);
-if (PyErr_Occurred())
- f2py_success = 0;
-#ifdef F2PY_REPORT_ATEXIT
-f2py_stop_call_clock();
-#endif
-/*end of callfortranroutine*/
- if (f2py_success) {
-/*pyobjfrom*/
-/*end of pyobjfrom*/
- CFUNCSMESS("Building return value.\n");
- capi_buildvalue = Py_BuildValue("");
-/*closepyobjfrom*/
-/*end of closepyobjfrom*/
- } /*if (f2py_success) after callfortranroutine*/
-/*cleanupfrompyobj*/
- if((PyObject *)capi_p_tmp!=p_capi) {
- Py_XDECREF(capi_p_tmp); }
- } /*if (capi_p_tmp == NULL) ... else of p*/
- /* End of cleaning variable p */
- } /*if (f2py_success) of eps*/
- /* End of cleaning variable eps */
- } /*if (f2py_success) of iord*/
- /* End of cleaning variable iord */
- } /*if (f2py_success) of nsects*/
- /* End of cleaning variable nsects */
- if((PyObject *)capi_rtype_tmp!=rtype_capi) {
- Py_XDECREF(capi_rtype_tmp); }
- } /*if (capi_rtype_tmp == NULL) ... else of rtype*/
- /* End of cleaning variable rtype */
- } /*if (f2py_success) of dcvalue*/
- /* End of cleaning variable dcvalue */
-/*end of cleanupfrompyobj*/
- if (capi_buildvalue == NULL) {
-/*routdebugfailure*/
- } else {
-/*routdebugleave*/
- }
- CFUNCSMESS("Freeing memory.\n");
-/*freemem*/
-#ifdef F2PY_REPORT_ATEXIT
-f2py_stop_clock();
-#endif
- return capi_buildvalue;
-}
-/******************************* end of c1roots *******************************/
-
-/********************************** c2roots **********************************/
-static char doc_f2py_rout__xapiir_sub_c2roots[] = "\
-c2roots(p,z,rtype,dcvalue,nsects,iord,a,omegar)\n\nWrapper for ``c2roots``.\
-\n\nParameters\n----------\n"
-"p : input rank-1 array('F') with bounds (1)\n"
-"z : input rank-1 array('F') with bounds (1)\n"
-"rtype : input rank-2 array('S') with bounds (1,3)\n"
-"dcvalue : input float\n"
-"nsects : input int\n"
-"iord : input int\n"
-"a : input float\n"
-"omegar : input float";
-/* extern void F_FUNC(c2roots,C2ROOTS)(complex_float*,complex_float*,string*,float*,int*,int*,float*,float*); */
-static PyObject *f2py_rout__xapiir_sub_c2roots(const PyObject *capi_self,
- PyObject *capi_args,
- PyObject *capi_keywds,
- void (*f2py_func)(complex_float*,complex_float*,string*,float*,int*,int*,float*,float*)) {
- PyObject * volatile capi_buildvalue = NULL;
- volatile int f2py_success = 1;
-/*decl*/
-
- complex_float *p = NULL;
- npy_intp p_Dims[1] = {-1};
- const int p_Rank = 1;
- PyArrayObject *capi_p_tmp = NULL;
- int capi_p_intent = 0;
- PyObject *p_capi = Py_None;
- complex_float *z = NULL;
- npy_intp z_Dims[1] = {-1};
- const int z_Rank = 1;
- PyArrayObject *capi_z_tmp = NULL;
- int capi_z_intent = 0;
- PyObject *z_capi = Py_None;
- string *rtype = NULL;
- npy_intp rtype_Dims[2] = {-1, -1};
- const int rtype_Rank = 2;
- PyArrayObject *capi_rtype_tmp = NULL;
- int capi_rtype_intent = 0;
- PyObject *rtype_capi = Py_None;
- float dcvalue = 0;
- PyObject *dcvalue_capi = Py_None;
- int nsects = 0;
- PyObject *nsects_capi = Py_None;
- int iord = 0;
- PyObject *iord_capi = Py_None;
- float a = 0;
- PyObject *a_capi = Py_None;
- float omegar = 0;
- PyObject *omegar_capi = Py_None;
- static char *capi_kwlist[] = {"p","z","rtype","dcvalue","nsects","iord","a","omegar",NULL};
-
-/*routdebugenter*/
-#ifdef F2PY_REPORT_ATEXIT
-f2py_start_clock();
-#endif
- if (!PyArg_ParseTupleAndKeywords(capi_args,capi_keywds,\
- "OOOOOOOO:_xapiir_sub.c2roots",\
- capi_kwlist,&p_capi,&z_capi,&rtype_capi,&dcvalue_capi,&nsects_capi,&iord_capi,&a_capi,&omegar_capi))
- return NULL;
-/*frompyobj*/
- /* Processing variable a */
- f2py_success = float_from_pyobj(&a,a_capi,"_xapiir_sub.c2roots() 7th argument (a) can't be converted to float");
- if (f2py_success) {
- /* Processing variable dcvalue */
- f2py_success = float_from_pyobj(&dcvalue,dcvalue_capi,"_xapiir_sub.c2roots() 4th argument (dcvalue) can't be converted to float");
- if (f2py_success) {
- /* Processing variable rtype */
- rtype_Dims[0]=1,rtype_Dims[1]=3;
- capi_rtype_intent |= F2PY_INTENT_IN|F2PY_INTENT_C;
- capi_rtype_tmp = array_from_pyobj(NPY_CHAR,rtype_Dims,rtype_Rank,capi_rtype_intent,rtype_capi);
- if (capi_rtype_tmp == NULL) {
- if (!PyErr_Occurred())
- PyErr_SetString(_xapiir_sub_error,"failed in converting 3rd argument `rtype' of _xapiir_sub.c2roots to C/Fortran array" );
- } else {
- rtype = (string *)(capi_rtype_tmp->data);
-
- /* Processing variable iord */
- f2py_success = int_from_pyobj(&iord,iord_capi,"_xapiir_sub.c2roots() 6th argument (iord) can't be converted to int");
- if (f2py_success) {
- /* Processing variable p */
- p_Dims[0]=1;
- capi_p_intent |= F2PY_INTENT_IN;
- capi_p_tmp = array_from_pyobj(NPY_CFLOAT,p_Dims,p_Rank,capi_p_intent,p_capi);
- if (capi_p_tmp == NULL) {
- if (!PyErr_Occurred())
- PyErr_SetString(_xapiir_sub_error,"failed in converting 1st argument `p' of _xapiir_sub.c2roots to C/Fortran array" );
- } else {
- p = (complex_float *)(capi_p_tmp->data);
-
- /* Processing variable nsects */
- f2py_success = int_from_pyobj(&nsects,nsects_capi,"_xapiir_sub.c2roots() 5th argument (nsects) can't be converted to int");
- if (f2py_success) {
- /* Processing variable z */
- z_Dims[0]=1;
- capi_z_intent |= F2PY_INTENT_IN;
- capi_z_tmp = array_from_pyobj(NPY_CFLOAT,z_Dims,z_Rank,capi_z_intent,z_capi);
- if (capi_z_tmp == NULL) {
- if (!PyErr_Occurred())
- PyErr_SetString(_xapiir_sub_error,"failed in converting 2nd argument `z' of _xapiir_sub.c2roots to C/Fortran array" );
- } else {
- z = (complex_float *)(capi_z_tmp->data);
-
- /* Processing variable omegar */
- f2py_success = float_from_pyobj(&omegar,omegar_capi,"_xapiir_sub.c2roots() 8th argument (omegar) can't be converted to float");
- if (f2py_success) {
-/*end of frompyobj*/
-#ifdef F2PY_REPORT_ATEXIT
-f2py_start_call_clock();
-#endif
-/*callfortranroutine*/
- (*f2py_func)(p,z,rtype,&dcvalue,&nsects,&iord,&a,&omegar);
-if (PyErr_Occurred())
- f2py_success = 0;
-#ifdef F2PY_REPORT_ATEXIT
-f2py_stop_call_clock();
-#endif
-/*end of callfortranroutine*/
- if (f2py_success) {
-/*pyobjfrom*/
-/*end of pyobjfrom*/
- CFUNCSMESS("Building return value.\n");
- capi_buildvalue = Py_BuildValue("");
-/*closepyobjfrom*/
-/*end of closepyobjfrom*/
- } /*if (f2py_success) after callfortranroutine*/
-/*cleanupfrompyobj*/
- } /*if (f2py_success) of omegar*/
- /* End of cleaning variable omegar */
- if((PyObject *)capi_z_tmp!=z_capi) {
- Py_XDECREF(capi_z_tmp); }
- } /*if (capi_z_tmp == NULL) ... else of z*/
- /* End of cleaning variable z */
- } /*if (f2py_success) of nsects*/
- /* End of cleaning variable nsects */
- if((PyObject *)capi_p_tmp!=p_capi) {
- Py_XDECREF(capi_p_tmp); }
- } /*if (capi_p_tmp == NULL) ... else of p*/
- /* End of cleaning variable p */
- } /*if (f2py_success) of iord*/
- /* End of cleaning variable iord */
- if((PyObject *)capi_rtype_tmp!=rtype_capi) {
- Py_XDECREF(capi_rtype_tmp); }
- } /*if (capi_rtype_tmp == NULL) ... else of rtype*/
- /* End of cleaning variable rtype */
- } /*if (f2py_success) of dcvalue*/
- /* End of cleaning variable dcvalue */
- } /*if (f2py_success) of a*/
- /* End of cleaning variable a */
-/*end of cleanupfrompyobj*/
- if (capi_buildvalue == NULL) {
-/*routdebugfailure*/
- } else {
-/*routdebugleave*/
- }
- CFUNCSMESS("Freeing memory.\n");
-/*freemem*/
-#ifdef F2PY_REPORT_ATEXIT
-f2py_stop_clock();
-#endif
- return capi_buildvalue;
-}
-/******************************* end of c2roots *******************************/
-
-/************************************ warp ************************************/
-static char doc_f2py_rout__xapiir_sub_warp[] = "\
-warp = warp(f,ts)\n\nWrapper for ``warp``.\
-\n\nParameters\n----------\n"
-"f : input float\n"
-"ts : input float\n"
-"\nReturns\n-------\n"
-"warp : float";
-/* extern void F_WRAPPEDFUNC(warp,WARP)(float*,float*,float*); */
-static PyObject *f2py_rout__xapiir_sub_warp(const PyObject *capi_self,
- PyObject *capi_args,
- PyObject *capi_keywds,
- void (*f2py_func)(float*,float*,float*)) {
- PyObject * volatile capi_buildvalue = NULL;
- volatile int f2py_success = 1;
-/*decl*/
-
- float warp = 0;
- float f = 0;
- PyObject *f_capi = Py_None;
- float ts = 0;
- PyObject *ts_capi = Py_None;
- static char *capi_kwlist[] = {"f","ts",NULL};
-
-/*routdebugenter*/
-#ifdef F2PY_REPORT_ATEXIT
-f2py_start_clock();
-#endif
- if (!PyArg_ParseTupleAndKeywords(capi_args,capi_keywds,\
- "OO:_xapiir_sub.warp",\
- capi_kwlist,&f_capi,&ts_capi))
- return NULL;
-/*frompyobj*/
- /* Processing variable ts */
- f2py_success = float_from_pyobj(&ts,ts_capi,"_xapiir_sub.warp() 2nd argument (ts) can't be converted to float");
- if (f2py_success) {
- /* Processing variable warp */
- /* Processing variable f */
- f2py_success = float_from_pyobj(&f,f_capi,"_xapiir_sub.warp() 1st argument (f) can't be converted to float");
- if (f2py_success) {
-/*end of frompyobj*/
-#ifdef F2PY_REPORT_ATEXIT
-f2py_start_call_clock();
-#endif
-/*callfortranroutine*/
- (*f2py_func)(&warp,&f,&ts);
-if (PyErr_Occurred())
- f2py_success = 0;
-#ifdef F2PY_REPORT_ATEXIT
-f2py_stop_call_clock();
-#endif
-/*end of callfortranroutine*/
- if (f2py_success) {
-/*pyobjfrom*/
-/*end of pyobjfrom*/
- CFUNCSMESS("Building return value.\n");
- capi_buildvalue = Py_BuildValue("f",warp);
-/*closepyobjfrom*/
-/*end of closepyobjfrom*/
- } /*if (f2py_success) after callfortranroutine*/
-/*cleanupfrompyobj*/
- } /*if (f2py_success) of f*/
- /* End of cleaning variable f */
- /* End of cleaning variable warp */
- } /*if (f2py_success) of ts*/
- /* End of cleaning variable ts */
-/*end of cleanupfrompyobj*/
- if (capi_buildvalue == NULL) {
-/*routdebugfailure*/
- } else {
-/*routdebugleave*/
- }
- CFUNCSMESS("Freeing memory.\n");
-/*freemem*/
-#ifdef F2PY_REPORT_ATEXIT
-f2py_stop_clock();
-#endif
- return capi_buildvalue;
-}
-/******************************** end of warp ********************************/
-
-/************************************* lp *************************************/
-static char doc_f2py_rout__xapiir_sub_lp[] = "\
-lp(p,z,rtype,dcvalue,nsects,sn,sd)\n\nWrapper for ``lp``.\
-\n\nParameters\n----------\n"
-"p : input rank-1 array('F') with bounds (*)\n"
-"z : input rank-1 array('F') with bounds (*)\n"
-"rtype : input rank-2 array('S') with bounds (*,3)\n"
-"dcvalue : input float\n"
-"nsects : input int\n"
-"sn : input rank-1 array('f') with bounds (*)\n"
-"sd : input rank-1 array('f') with bounds (*)";
-/* extern void F_FUNC(lp,LP)(complex_float*,complex_float*,string*,float*,int*,float*,float*); */
-static PyObject *f2py_rout__xapiir_sub_lp(const PyObject *capi_self,
- PyObject *capi_args,
- PyObject *capi_keywds,
- void (*f2py_func)(complex_float*,complex_float*,string*,float*,int*,float*,float*)) {
- PyObject * volatile capi_buildvalue = NULL;
- volatile int f2py_success = 1;
-/*decl*/
-
- complex_float *p = NULL;
- npy_intp p_Dims[1] = {-1};
- const int p_Rank = 1;
- PyArrayObject *capi_p_tmp = NULL;
- int capi_p_intent = 0;
- PyObject *p_capi = Py_None;
- complex_float *z = NULL;
- npy_intp z_Dims[1] = {-1};
- const int z_Rank = 1;
- PyArrayObject *capi_z_tmp = NULL;
- int capi_z_intent = 0;
- PyObject *z_capi = Py_None;
- string *rtype = NULL;
- npy_intp rtype_Dims[2] = {-1, -1};
- const int rtype_Rank = 2;
- PyArrayObject *capi_rtype_tmp = NULL;
- int capi_rtype_intent = 0;
- PyObject *rtype_capi = Py_None;
- float dcvalue = 0;
- PyObject *dcvalue_capi = Py_None;
- int nsects = 0;
- PyObject *nsects_capi = Py_None;
- float *sn = NULL;
- npy_intp sn_Dims[1] = {-1};
- const int sn_Rank = 1;
- PyArrayObject *capi_sn_tmp = NULL;
- int capi_sn_intent = 0;
- PyObject *sn_capi = Py_None;
- float *sd = NULL;
- npy_intp sd_Dims[1] = {-1};
- const int sd_Rank = 1;
- PyArrayObject *capi_sd_tmp = NULL;
- int capi_sd_intent = 0;
- PyObject *sd_capi = Py_None;
- static char *capi_kwlist[] = {"p","z","rtype","dcvalue","nsects","sn","sd",NULL};
-
-/*routdebugenter*/
-#ifdef F2PY_REPORT_ATEXIT
-f2py_start_clock();
-#endif
- if (!PyArg_ParseTupleAndKeywords(capi_args,capi_keywds,\
- "OOOOOOO:_xapiir_sub.lp",\
- capi_kwlist,&p_capi,&z_capi,&rtype_capi,&dcvalue_capi,&nsects_capi,&sn_capi,&sd_capi))
- return NULL;
-/*frompyobj*/
- /* Processing variable dcvalue */
- f2py_success = float_from_pyobj(&dcvalue,dcvalue_capi,"_xapiir_sub.lp() 4th argument (dcvalue) can't be converted to float");
- if (f2py_success) {
- /* Processing variable sn */
- ;
- capi_sn_intent |= F2PY_INTENT_IN;
- capi_sn_tmp = array_from_pyobj(NPY_FLOAT,sn_Dims,sn_Rank,capi_sn_intent,sn_capi);
- if (capi_sn_tmp == NULL) {
- if (!PyErr_Occurred())
- PyErr_SetString(_xapiir_sub_error,"failed in converting 6th argument `sn' of _xapiir_sub.lp to C/Fortran array" );
- } else {
- sn = (float *)(capi_sn_tmp->data);
-
- /* Processing variable rtype */
- rtype_Dims[1]=3;
- capi_rtype_intent |= F2PY_INTENT_IN|F2PY_INTENT_C;
- capi_rtype_tmp = array_from_pyobj(NPY_CHAR,rtype_Dims,rtype_Rank,capi_rtype_intent,rtype_capi);
- if (capi_rtype_tmp == NULL) {
- if (!PyErr_Occurred())
- PyErr_SetString(_xapiir_sub_error,"failed in converting 3rd argument `rtype' of _xapiir_sub.lp to C/Fortran array" );
- } else {
- rtype = (string *)(capi_rtype_tmp->data);
-
- /* Processing variable nsects */
- f2py_success = int_from_pyobj(&nsects,nsects_capi,"_xapiir_sub.lp() 5th argument (nsects) can't be converted to int");
- if (f2py_success) {
- /* Processing variable z */
- ;
- capi_z_intent |= F2PY_INTENT_IN;
- capi_z_tmp = array_from_pyobj(NPY_CFLOAT,z_Dims,z_Rank,capi_z_intent,z_capi);
- if (capi_z_tmp == NULL) {
- if (!PyErr_Occurred())
- PyErr_SetString(_xapiir_sub_error,"failed in converting 2nd argument `z' of _xapiir_sub.lp to C/Fortran array" );
- } else {
- z = (complex_float *)(capi_z_tmp->data);
-
- /* Processing variable p */
- ;
- capi_p_intent |= F2PY_INTENT_IN;
- capi_p_tmp = array_from_pyobj(NPY_CFLOAT,p_Dims,p_Rank,capi_p_intent,p_capi);
- if (capi_p_tmp == NULL) {
- if (!PyErr_Occurred())
- PyErr_SetString(_xapiir_sub_error,"failed in converting 1st argument `p' of _xapiir_sub.lp to C/Fortran array" );
- } else {
- p = (complex_float *)(capi_p_tmp->data);
-
- /* Processing variable sd */
- ;
- capi_sd_intent |= F2PY_INTENT_IN;
- capi_sd_tmp = array_from_pyobj(NPY_FLOAT,sd_Dims,sd_Rank,capi_sd_intent,sd_capi);
- if (capi_sd_tmp == NULL) {
- if (!PyErr_Occurred())
- PyErr_SetString(_xapiir_sub_error,"failed in converting 7th argument `sd' of _xapiir_sub.lp to C/Fortran array" );
- } else {
- sd = (float *)(capi_sd_tmp->data);
-
-/*end of frompyobj*/
-#ifdef F2PY_REPORT_ATEXIT
-f2py_start_call_clock();
-#endif
-/*callfortranroutine*/
- (*f2py_func)(p,z,rtype,&dcvalue,&nsects,sn,sd);
-if (PyErr_Occurred())
- f2py_success = 0;
-#ifdef F2PY_REPORT_ATEXIT
-f2py_stop_call_clock();
-#endif
-/*end of callfortranroutine*/
- if (f2py_success) {
-/*pyobjfrom*/
-/*end of pyobjfrom*/
- CFUNCSMESS("Building return value.\n");
- capi_buildvalue = Py_BuildValue("");
-/*closepyobjfrom*/
-/*end of closepyobjfrom*/
- } /*if (f2py_success) after callfortranroutine*/
-/*cleanupfrompyobj*/
- if((PyObject *)capi_sd_tmp!=sd_capi) {
- Py_XDECREF(capi_sd_tmp); }
- } /*if (capi_sd_tmp == NULL) ... else of sd*/
- /* End of cleaning variable sd */
- if((PyObject *)capi_p_tmp!=p_capi) {
- Py_XDECREF(capi_p_tmp); }
- } /*if (capi_p_tmp == NULL) ... else of p*/
- /* End of cleaning variable p */
- if((PyObject *)capi_z_tmp!=z_capi) {
- Py_XDECREF(capi_z_tmp); }
- } /*if (capi_z_tmp == NULL) ... else of z*/
- /* End of cleaning variable z */
- } /*if (f2py_success) of nsects*/
- /* End of cleaning variable nsects */
- if((PyObject *)capi_rtype_tmp!=rtype_capi) {
- Py_XDECREF(capi_rtype_tmp); }
- } /*if (capi_rtype_tmp == NULL) ... else of rtype*/
- /* End of cleaning variable rtype */
- if((PyObject *)capi_sn_tmp!=sn_capi) {
- Py_XDECREF(capi_sn_tmp); }
- } /*if (capi_sn_tmp == NULL) ... else of sn*/
- /* End of cleaning variable sn */
- } /*if (f2py_success) of dcvalue*/
- /* End of cleaning variable dcvalue */
-/*end of cleanupfrompyobj*/
- if (capi_buildvalue == NULL) {
-/*routdebugfailure*/
- } else {
-/*routdebugleave*/
- }
- CFUNCSMESS("Freeing memory.\n");
-/*freemem*/
-#ifdef F2PY_REPORT_ATEXIT
-f2py_stop_clock();
-#endif
- return capi_buildvalue;
-}
-/********************************* end of lp *********************************/
-
-/*********************************** lptbp ***********************************/
-static char doc_f2py_rout__xapiir_sub_lptbp[] = "\
-lptbp(p,z,rtype,dcvalue,nsects,fl,fh,sn,sd)\n\nWrapper for ``lptbp``.\
-\n\nParameters\n----------\n"
-"p : input rank-1 array('F') with bounds (*)\n"
-"z : input rank-1 array('F') with bounds (*)\n"
-"rtype : input rank-2 array('S') with bounds (*,3)\n"
-"dcvalue : input float\n"
-"nsects : input int\n"
-"fl : input float\n"
-"fh : input float\n"
-"sn : input rank-1 array('f') with bounds (*)\n"
-"sd : input rank-1 array('f') with bounds (*)";
-/* extern void F_FUNC(lptbp,LPTBP)(complex_float*,complex_float*,string*,float*,int*,float*,float*,float*,float*); */
-static PyObject *f2py_rout__xapiir_sub_lptbp(const PyObject *capi_self,
- PyObject *capi_args,
- PyObject *capi_keywds,
- void (*f2py_func)(complex_float*,complex_float*,string*,float*,int*,float*,float*,float*,float*)) {
- PyObject * volatile capi_buildvalue = NULL;
- volatile int f2py_success = 1;
-/*decl*/
-
- complex_float *p = NULL;
- npy_intp p_Dims[1] = {-1};
- const int p_Rank = 1;
- PyArrayObject *capi_p_tmp = NULL;
- int capi_p_intent = 0;
- PyObject *p_capi = Py_None;
- complex_float *z = NULL;
- npy_intp z_Dims[1] = {-1};
- const int z_Rank = 1;
- PyArrayObject *capi_z_tmp = NULL;
- int capi_z_intent = 0;
- PyObject *z_capi = Py_None;
- string *rtype = NULL;
- npy_intp rtype_Dims[2] = {-1, -1};
- const int rtype_Rank = 2;
- PyArrayObject *capi_rtype_tmp = NULL;
- int capi_rtype_intent = 0;
- PyObject *rtype_capi = Py_None;
- float dcvalue = 0;
- PyObject *dcvalue_capi = Py_None;
- int nsects = 0;
- PyObject *nsects_capi = Py_None;
- float fl = 0;
- PyObject *fl_capi = Py_None;
- float fh = 0;
- PyObject *fh_capi = Py_None;
- float *sn = NULL;
- npy_intp sn_Dims[1] = {-1};
- const int sn_Rank = 1;
- PyArrayObject *capi_sn_tmp = NULL;
- int capi_sn_intent = 0;
- PyObject *sn_capi = Py_None;
- float *sd = NULL;
- npy_intp sd_Dims[1] = {-1};
- const int sd_Rank = 1;
- PyArrayObject *capi_sd_tmp = NULL;
- int capi_sd_intent = 0;
- PyObject *sd_capi = Py_None;
- static char *capi_kwlist[] = {"p","z","rtype","dcvalue","nsects","fl","fh","sn","sd",NULL};
-
-/*routdebugenter*/
-#ifdef F2PY_REPORT_ATEXIT
-f2py_start_clock();
-#endif
- if (!PyArg_ParseTupleAndKeywords(capi_args,capi_keywds,\
- "OOOOOOOOO:_xapiir_sub.lptbp",\
- capi_kwlist,&p_capi,&z_capi,&rtype_capi,&dcvalue_capi,&nsects_capi,&fl_capi,&fh_capi,&sn_capi,&sd_capi))
- return NULL;
-/*frompyobj*/
- /* Processing variable fh */
- f2py_success = float_from_pyobj(&fh,fh_capi,"_xapiir_sub.lptbp() 7th argument (fh) can't be converted to float");
- if (f2py_success) {
- /* Processing variable fl */
- f2py_success = float_from_pyobj(&fl,fl_capi,"_xapiir_sub.lptbp() 6th argument (fl) can't be converted to float");
- if (f2py_success) {
- /* Processing variable dcvalue */
- f2py_success = float_from_pyobj(&dcvalue,dcvalue_capi,"_xapiir_sub.lptbp() 4th argument (dcvalue) can't be converted to float");
- if (f2py_success) {
- /* Processing variable rtype */
- rtype_Dims[1]=3;
- capi_rtype_intent |= F2PY_INTENT_IN|F2PY_INTENT_C;
- capi_rtype_tmp = array_from_pyobj(NPY_CHAR,rtype_Dims,rtype_Rank,capi_rtype_intent,rtype_capi);
- if (capi_rtype_tmp == NULL) {
- if (!PyErr_Occurred())
- PyErr_SetString(_xapiir_sub_error,"failed in converting 3rd argument `rtype' of _xapiir_sub.lptbp to C/Fortran array" );
- } else {
- rtype = (string *)(capi_rtype_tmp->data);
-
- /* Processing variable p */
- ;
- capi_p_intent |= F2PY_INTENT_IN;
- capi_p_tmp = array_from_pyobj(NPY_CFLOAT,p_Dims,p_Rank,capi_p_intent,p_capi);
- if (capi_p_tmp == NULL) {
- if (!PyErr_Occurred())
- PyErr_SetString(_xapiir_sub_error,"failed in converting 1st argument `p' of _xapiir_sub.lptbp to C/Fortran array" );
- } else {
- p = (complex_float *)(capi_p_tmp->data);
-
- /* Processing variable sn */
- ;
- capi_sn_intent |= F2PY_INTENT_IN;
- capi_sn_tmp = array_from_pyobj(NPY_FLOAT,sn_Dims,sn_Rank,capi_sn_intent,sn_capi);
- if (capi_sn_tmp == NULL) {
- if (!PyErr_Occurred())
- PyErr_SetString(_xapiir_sub_error,"failed in converting 8th argument `sn' of _xapiir_sub.lptbp to C/Fortran array" );
- } else {
- sn = (float *)(capi_sn_tmp->data);
-
- /* Processing variable nsects */
- f2py_success = int_from_pyobj(&nsects,nsects_capi,"_xapiir_sub.lptbp() 5th argument (nsects) can't be converted to int");
- if (f2py_success) {
- /* Processing variable z */
- ;
- capi_z_intent |= F2PY_INTENT_IN;
- capi_z_tmp = array_from_pyobj(NPY_CFLOAT,z_Dims,z_Rank,capi_z_intent,z_capi);
- if (capi_z_tmp == NULL) {
- if (!PyErr_Occurred())
- PyErr_SetString(_xapiir_sub_error,"failed in converting 2nd argument `z' of _xapiir_sub.lptbp to C/Fortran array" );
- } else {
- z = (complex_float *)(capi_z_tmp->data);
-
- /* Processing variable sd */
- ;
- capi_sd_intent |= F2PY_INTENT_IN;
- capi_sd_tmp = array_from_pyobj(NPY_FLOAT,sd_Dims,sd_Rank,capi_sd_intent,sd_capi);
- if (capi_sd_tmp == NULL) {
- if (!PyErr_Occurred())
- PyErr_SetString(_xapiir_sub_error,"failed in converting 9th argument `sd' of _xapiir_sub.lptbp to C/Fortran array" );
- } else {
- sd = (float *)(capi_sd_tmp->data);
-
-/*end of frompyobj*/
-#ifdef F2PY_REPORT_ATEXIT
-f2py_start_call_clock();
-#endif
-/*callfortranroutine*/
- (*f2py_func)(p,z,rtype,&dcvalue,&nsects,&fl,&fh,sn,sd);
-if (PyErr_Occurred())
- f2py_success = 0;
-#ifdef F2PY_REPORT_ATEXIT
-f2py_stop_call_clock();
-#endif
-/*end of callfortranroutine*/
- if (f2py_success) {
-/*pyobjfrom*/
-/*end of pyobjfrom*/
- CFUNCSMESS("Building return value.\n");
- capi_buildvalue = Py_BuildValue("");
-/*closepyobjfrom*/
-/*end of closepyobjfrom*/
- } /*if (f2py_success) after callfortranroutine*/
-/*cleanupfrompyobj*/
- if((PyObject *)capi_sd_tmp!=sd_capi) {
- Py_XDECREF(capi_sd_tmp); }
- } /*if (capi_sd_tmp == NULL) ... else of sd*/
- /* End of cleaning variable sd */
- if((PyObject *)capi_z_tmp!=z_capi) {
- Py_XDECREF(capi_z_tmp); }
- } /*if (capi_z_tmp == NULL) ... else of z*/
- /* End of cleaning variable z */
- } /*if (f2py_success) of nsects*/
- /* End of cleaning variable nsects */
- if((PyObject *)capi_sn_tmp!=sn_capi) {
- Py_XDECREF(capi_sn_tmp); }
- } /*if (capi_sn_tmp == NULL) ... else of sn*/
- /* End of cleaning variable sn */
- if((PyObject *)capi_p_tmp!=p_capi) {
- Py_XDECREF(capi_p_tmp); }
- } /*if (capi_p_tmp == NULL) ... else of p*/
- /* End of cleaning variable p */
- if((PyObject *)capi_rtype_tmp!=rtype_capi) {
- Py_XDECREF(capi_rtype_tmp); }
- } /*if (capi_rtype_tmp == NULL) ... else of rtype*/
- /* End of cleaning variable rtype */
- } /*if (f2py_success) of dcvalue*/
- /* End of cleaning variable dcvalue */
- } /*if (f2py_success) of fl*/
- /* End of cleaning variable fl */
- } /*if (f2py_success) of fh*/
- /* End of cleaning variable fh */
-/*end of cleanupfrompyobj*/
- if (capi_buildvalue == NULL) {
-/*routdebugfailure*/
- } else {
-/*routdebugleave*/
- }
- CFUNCSMESS("Freeing memory.\n");
-/*freemem*/
-#ifdef F2PY_REPORT_ATEXIT
-f2py_stop_clock();
-#endif
- return capi_buildvalue;
-}
-/******************************** end of lptbp ********************************/
-
-/*********************************** lptbr ***********************************/
-static char doc_f2py_rout__xapiir_sub_lptbr[] = "\
-lptbr(p,z,rtype,dcvalue,nsects,fl,fh,sn,sd)\n\nWrapper for ``lptbr``.\
-\n\nParameters\n----------\n"
-"p : input rank-1 array('F') with bounds (*)\n"
-"z : input rank-1 array('F') with bounds (*)\n"
-"rtype : input rank-2 array('S') with bounds (*,3)\n"
-"dcvalue : input float\n"
-"nsects : input int\n"
-"fl : input float\n"
-"fh : input float\n"
-"sn : input rank-1 array('f') with bounds (*)\n"
-"sd : input rank-1 array('f') with bounds (*)";
-/* extern void F_FUNC(lptbr,LPTBR)(complex_float*,complex_float*,string*,float*,int*,float*,float*,float*,float*); */
-static PyObject *f2py_rout__xapiir_sub_lptbr(const PyObject *capi_self,
- PyObject *capi_args,
- PyObject *capi_keywds,
- void (*f2py_func)(complex_float*,complex_float*,string*,float*,int*,float*,float*,float*,float*)) {
- PyObject * volatile capi_buildvalue = NULL;
- volatile int f2py_success = 1;
-/*decl*/
-
- complex_float *p = NULL;
- npy_intp p_Dims[1] = {-1};
- const int p_Rank = 1;
- PyArrayObject *capi_p_tmp = NULL;
- int capi_p_intent = 0;
- PyObject *p_capi = Py_None;
- complex_float *z = NULL;
- npy_intp z_Dims[1] = {-1};
- const int z_Rank = 1;
- PyArrayObject *capi_z_tmp = NULL;
- int capi_z_intent = 0;
- PyObject *z_capi = Py_None;
- string *rtype = NULL;
- npy_intp rtype_Dims[2] = {-1, -1};
- const int rtype_Rank = 2;
- PyArrayObject *capi_rtype_tmp = NULL;
- int capi_rtype_intent = 0;
- PyObject *rtype_capi = Py_None;
- float dcvalue = 0;
- PyObject *dcvalue_capi = Py_None;
- int nsects = 0;
- PyObject *nsects_capi = Py_None;
- float fl = 0;
- PyObject *fl_capi = Py_None;
- float fh = 0;
- PyObject *fh_capi = Py_None;
- float *sn = NULL;
- npy_intp sn_Dims[1] = {-1};
- const int sn_Rank = 1;
- PyArrayObject *capi_sn_tmp = NULL;
- int capi_sn_intent = 0;
- PyObject *sn_capi = Py_None;
- float *sd = NULL;
- npy_intp sd_Dims[1] = {-1};
- const int sd_Rank = 1;
- PyArrayObject *capi_sd_tmp = NULL;
- int capi_sd_intent = 0;
- PyObject *sd_capi = Py_None;
- static char *capi_kwlist[] = {"p","z","rtype","dcvalue","nsects","fl","fh","sn","sd",NULL};
-
-/*routdebugenter*/
-#ifdef F2PY_REPORT_ATEXIT
-f2py_start_clock();
-#endif
- if (!PyArg_ParseTupleAndKeywords(capi_args,capi_keywds,\
- "OOOOOOOOO:_xapiir_sub.lptbr",\
- capi_kwlist,&p_capi,&z_capi,&rtype_capi,&dcvalue_capi,&nsects_capi,&fl_capi,&fh_capi,&sn_capi,&sd_capi))
- return NULL;
-/*frompyobj*/
- /* Processing variable dcvalue */
- f2py_success = float_from_pyobj(&dcvalue,dcvalue_capi,"_xapiir_sub.lptbr() 4th argument (dcvalue) can't be converted to float");
- if (f2py_success) {
- /* Processing variable rtype */
- rtype_Dims[1]=3;
- capi_rtype_intent |= F2PY_INTENT_IN|F2PY_INTENT_C;
- capi_rtype_tmp = array_from_pyobj(NPY_CHAR,rtype_Dims,rtype_Rank,capi_rtype_intent,rtype_capi);
- if (capi_rtype_tmp == NULL) {
- if (!PyErr_Occurred())
- PyErr_SetString(_xapiir_sub_error,"failed in converting 3rd argument `rtype' of _xapiir_sub.lptbr to C/Fortran array" );
- } else {
- rtype = (string *)(capi_rtype_tmp->data);
-
- /* Processing variable p */
- ;
- capi_p_intent |= F2PY_INTENT_IN;
- capi_p_tmp = array_from_pyobj(NPY_CFLOAT,p_Dims,p_Rank,capi_p_intent,p_capi);
- if (capi_p_tmp == NULL) {
- if (!PyErr_Occurred())
- PyErr_SetString(_xapiir_sub_error,"failed in converting 1st argument `p' of _xapiir_sub.lptbr to C/Fortran array" );
- } else {
- p = (complex_float *)(capi_p_tmp->data);
-
- /* Processing variable fh */
- f2py_success = float_from_pyobj(&fh,fh_capi,"_xapiir_sub.lptbr() 7th argument (fh) can't be converted to float");
- if (f2py_success) {
- /* Processing variable sn */
- ;
- capi_sn_intent |= F2PY_INTENT_IN;
- capi_sn_tmp = array_from_pyobj(NPY_FLOAT,sn_Dims,sn_Rank,capi_sn_intent,sn_capi);
- if (capi_sn_tmp == NULL) {
- if (!PyErr_Occurred())
- PyErr_SetString(_xapiir_sub_error,"failed in converting 8th argument `sn' of _xapiir_sub.lptbr to C/Fortran array" );
- } else {
- sn = (float *)(capi_sn_tmp->data);
-
- /* Processing variable nsects */
- f2py_success = int_from_pyobj(&nsects,nsects_capi,"_xapiir_sub.lptbr() 5th argument (nsects) can't be converted to int");
- if (f2py_success) {
- /* Processing variable z */
- ;
- capi_z_intent |= F2PY_INTENT_IN;
- capi_z_tmp = array_from_pyobj(NPY_CFLOAT,z_Dims,z_Rank,capi_z_intent,z_capi);
- if (capi_z_tmp == NULL) {
- if (!PyErr_Occurred())
- PyErr_SetString(_xapiir_sub_error,"failed in converting 2nd argument `z' of _xapiir_sub.lptbr to C/Fortran array" );
- } else {
- z = (complex_float *)(capi_z_tmp->data);
-
- /* Processing variable fl */
- f2py_success = float_from_pyobj(&fl,fl_capi,"_xapiir_sub.lptbr() 6th argument (fl) can't be converted to float");
- if (f2py_success) {
- /* Processing variable sd */
- ;
- capi_sd_intent |= F2PY_INTENT_IN;
- capi_sd_tmp = array_from_pyobj(NPY_FLOAT,sd_Dims,sd_Rank,capi_sd_intent,sd_capi);
- if (capi_sd_tmp == NULL) {
- if (!PyErr_Occurred())
- PyErr_SetString(_xapiir_sub_error,"failed in converting 9th argument `sd' of _xapiir_sub.lptbr to C/Fortran array" );
- } else {
- sd = (float *)(capi_sd_tmp->data);
-
-/*end of frompyobj*/
-#ifdef F2PY_REPORT_ATEXIT
-f2py_start_call_clock();
-#endif
-/*callfortranroutine*/
- (*f2py_func)(p,z,rtype,&dcvalue,&nsects,&fl,&fh,sn,sd);
-if (PyErr_Occurred())
- f2py_success = 0;
-#ifdef F2PY_REPORT_ATEXIT
-f2py_stop_call_clock();
-#endif
-/*end of callfortranroutine*/
- if (f2py_success) {
-/*pyobjfrom*/
-/*end of pyobjfrom*/
- CFUNCSMESS("Building return value.\n");
- capi_buildvalue = Py_BuildValue("");
-/*closepyobjfrom*/
-/*end of closepyobjfrom*/
- } /*if (f2py_success) after callfortranroutine*/
-/*cleanupfrompyobj*/
- if((PyObject *)capi_sd_tmp!=sd_capi) {
- Py_XDECREF(capi_sd_tmp); }
- } /*if (capi_sd_tmp == NULL) ... else of sd*/
- /* End of cleaning variable sd */
- } /*if (f2py_success) of fl*/
- /* End of cleaning variable fl */
- if((PyObject *)capi_z_tmp!=z_capi) {
- Py_XDECREF(capi_z_tmp); }
- } /*if (capi_z_tmp == NULL) ... else of z*/
- /* End of cleaning variable z */
- } /*if (f2py_success) of nsects*/
- /* End of cleaning variable nsects */
- if((PyObject *)capi_sn_tmp!=sn_capi) {
- Py_XDECREF(capi_sn_tmp); }
- } /*if (capi_sn_tmp == NULL) ... else of sn*/
- /* End of cleaning variable sn */
- } /*if (f2py_success) of fh*/
- /* End of cleaning variable fh */
- if((PyObject *)capi_p_tmp!=p_capi) {
- Py_XDECREF(capi_p_tmp); }
- } /*if (capi_p_tmp == NULL) ... else of p*/
- /* End of cleaning variable p */
- if((PyObject *)capi_rtype_tmp!=rtype_capi) {
- Py_XDECREF(capi_rtype_tmp); }
- } /*if (capi_rtype_tmp == NULL) ... else of rtype*/
- /* End of cleaning variable rtype */
- } /*if (f2py_success) of dcvalue*/
- /* End of cleaning variable dcvalue */
-/*end of cleanupfrompyobj*/
- if (capi_buildvalue == NULL) {
-/*routdebugfailure*/
- } else {
-/*routdebugleave*/
- }
- CFUNCSMESS("Freeing memory.\n");
-/*freemem*/
-#ifdef F2PY_REPORT_ATEXIT
-f2py_stop_clock();
-#endif
- return capi_buildvalue;
-}
-/******************************** end of lptbr ********************************/
-
-/*********************************** lpthp ***********************************/
-static char doc_f2py_rout__xapiir_sub_lpthp[] = "\
-lpthp(p,z,rtype,dcvalue,nsects,sn,sd)\n\nWrapper for ``lpthp``.\
-\n\nParameters\n----------\n"
-"p : input rank-1 array('F') with bounds (*)\n"
-"z : input rank-1 array('F') with bounds (*)\n"
-"rtype : input rank-2 array('S') with bounds (*,3)\n"
-"dcvalue : input float\n"
-"nsects : input int\n"
-"sn : input rank-1 array('f') with bounds (*)\n"
-"sd : input rank-1 array('f') with bounds (*)";
-/* extern void F_FUNC(lpthp,LPTHP)(complex_float*,complex_float*,string*,float*,int*,float*,float*); */
-static PyObject *f2py_rout__xapiir_sub_lpthp(const PyObject *capi_self,
- PyObject *capi_args,
- PyObject *capi_keywds,
- void (*f2py_func)(complex_float*,complex_float*,string*,float*,int*,float*,float*)) {
- PyObject * volatile capi_buildvalue = NULL;
- volatile int f2py_success = 1;
-/*decl*/
-
- complex_float *p = NULL;
- npy_intp p_Dims[1] = {-1};
- const int p_Rank = 1;
- PyArrayObject *capi_p_tmp = NULL;
- int capi_p_intent = 0;
- PyObject *p_capi = Py_None;
- complex_float *z = NULL;
- npy_intp z_Dims[1] = {-1};
- const int z_Rank = 1;
- PyArrayObject *capi_z_tmp = NULL;
- int capi_z_intent = 0;
- PyObject *z_capi = Py_None;
- string *rtype = NULL;
- npy_intp rtype_Dims[2] = {-1, -1};
- const int rtype_Rank = 2;
- PyArrayObject *capi_rtype_tmp = NULL;
- int capi_rtype_intent = 0;
- PyObject *rtype_capi = Py_None;
- float dcvalue = 0;
- PyObject *dcvalue_capi = Py_None;
- int nsects = 0;
- PyObject *nsects_capi = Py_None;
- float *sn = NULL;
- npy_intp sn_Dims[1] = {-1};
- const int sn_Rank = 1;
- PyArrayObject *capi_sn_tmp = NULL;
- int capi_sn_intent = 0;
- PyObject *sn_capi = Py_None;
- float *sd = NULL;
- npy_intp sd_Dims[1] = {-1};
- const int sd_Rank = 1;
- PyArrayObject *capi_sd_tmp = NULL;
- int capi_sd_intent = 0;
- PyObject *sd_capi = Py_None;
- static char *capi_kwlist[] = {"p","z","rtype","dcvalue","nsects","sn","sd",NULL};
-
-/*routdebugenter*/
-#ifdef F2PY_REPORT_ATEXIT
-f2py_start_clock();
-#endif
- if (!PyArg_ParseTupleAndKeywords(capi_args,capi_keywds,\
- "OOOOOOO:_xapiir_sub.lpthp",\
- capi_kwlist,&p_capi,&z_capi,&rtype_capi,&dcvalue_capi,&nsects_capi,&sn_capi,&sd_capi))
- return NULL;
-/*frompyobj*/
- /* Processing variable dcvalue */
- f2py_success = float_from_pyobj(&dcvalue,dcvalue_capi,"_xapiir_sub.lpthp() 4th argument (dcvalue) can't be converted to float");
- if (f2py_success) {
- /* Processing variable sn */
- ;
- capi_sn_intent |= F2PY_INTENT_IN;
- capi_sn_tmp = array_from_pyobj(NPY_FLOAT,sn_Dims,sn_Rank,capi_sn_intent,sn_capi);
- if (capi_sn_tmp == NULL) {
- if (!PyErr_Occurred())
- PyErr_SetString(_xapiir_sub_error,"failed in converting 6th argument `sn' of _xapiir_sub.lpthp to C/Fortran array" );
- } else {
- sn = (float *)(capi_sn_tmp->data);
-
- /* Processing variable rtype */
- rtype_Dims[1]=3;
- capi_rtype_intent |= F2PY_INTENT_IN|F2PY_INTENT_C;
- capi_rtype_tmp = array_from_pyobj(NPY_CHAR,rtype_Dims,rtype_Rank,capi_rtype_intent,rtype_capi);
- if (capi_rtype_tmp == NULL) {
- if (!PyErr_Occurred())
- PyErr_SetString(_xapiir_sub_error,"failed in converting 3rd argument `rtype' of _xapiir_sub.lpthp to C/Fortran array" );
- } else {
- rtype = (string *)(capi_rtype_tmp->data);
-
- /* Processing variable nsects */
- f2py_success = int_from_pyobj(&nsects,nsects_capi,"_xapiir_sub.lpthp() 5th argument (nsects) can't be converted to int");
- if (f2py_success) {
- /* Processing variable z */
- ;
- capi_z_intent |= F2PY_INTENT_IN;
- capi_z_tmp = array_from_pyobj(NPY_CFLOAT,z_Dims,z_Rank,capi_z_intent,z_capi);
- if (capi_z_tmp == NULL) {
- if (!PyErr_Occurred())
- PyErr_SetString(_xapiir_sub_error,"failed in converting 2nd argument `z' of _xapiir_sub.lpthp to C/Fortran array" );
- } else {
- z = (complex_float *)(capi_z_tmp->data);
-
- /* Processing variable p */
- ;
- capi_p_intent |= F2PY_INTENT_IN;
- capi_p_tmp = array_from_pyobj(NPY_CFLOAT,p_Dims,p_Rank,capi_p_intent,p_capi);
- if (capi_p_tmp == NULL) {
- if (!PyErr_Occurred())
- PyErr_SetString(_xapiir_sub_error,"failed in converting 1st argument `p' of _xapiir_sub.lpthp to C/Fortran array" );
- } else {
- p = (complex_float *)(capi_p_tmp->data);
-
- /* Processing variable sd */
- ;
- capi_sd_intent |= F2PY_INTENT_IN;
- capi_sd_tmp = array_from_pyobj(NPY_FLOAT,sd_Dims,sd_Rank,capi_sd_intent,sd_capi);
- if (capi_sd_tmp == NULL) {
- if (!PyErr_Occurred())
- PyErr_SetString(_xapiir_sub_error,"failed in converting 7th argument `sd' of _xapiir_sub.lpthp to C/Fortran array" );
- } else {
- sd = (float *)(capi_sd_tmp->data);
-
-/*end of frompyobj*/
-#ifdef F2PY_REPORT_ATEXIT
-f2py_start_call_clock();
-#endif
-/*callfortranroutine*/
- (*f2py_func)(p,z,rtype,&dcvalue,&nsects,sn,sd);
-if (PyErr_Occurred())
- f2py_success = 0;
-#ifdef F2PY_REPORT_ATEXIT
-f2py_stop_call_clock();
-#endif
-/*end of callfortranroutine*/
- if (f2py_success) {
-/*pyobjfrom*/
-/*end of pyobjfrom*/
- CFUNCSMESS("Building return value.\n");
- capi_buildvalue = Py_BuildValue("");
-/*closepyobjfrom*/
-/*end of closepyobjfrom*/
- } /*if (f2py_success) after callfortranroutine*/
-/*cleanupfrompyobj*/
- if((PyObject *)capi_sd_tmp!=sd_capi) {
- Py_XDECREF(capi_sd_tmp); }
- } /*if (capi_sd_tmp == NULL) ... else of sd*/
- /* End of cleaning variable sd */
- if((PyObject *)capi_p_tmp!=p_capi) {
- Py_XDECREF(capi_p_tmp); }
- } /*if (capi_p_tmp == NULL) ... else of p*/
- /* End of cleaning variable p */
- if((PyObject *)capi_z_tmp!=z_capi) {
- Py_XDECREF(capi_z_tmp); }
- } /*if (capi_z_tmp == NULL) ... else of z*/
- /* End of cleaning variable z */
- } /*if (f2py_success) of nsects*/
- /* End of cleaning variable nsects */
- if((PyObject *)capi_rtype_tmp!=rtype_capi) {
- Py_XDECREF(capi_rtype_tmp); }
- } /*if (capi_rtype_tmp == NULL) ... else of rtype*/
- /* End of cleaning variable rtype */
- if((PyObject *)capi_sn_tmp!=sn_capi) {
- Py_XDECREF(capi_sn_tmp); }
- } /*if (capi_sn_tmp == NULL) ... else of sn*/
- /* End of cleaning variable sn */
- } /*if (f2py_success) of dcvalue*/
- /* End of cleaning variable dcvalue */
-/*end of cleanupfrompyobj*/
- if (capi_buildvalue == NULL) {
-/*routdebugfailure*/
- } else {
-/*routdebugleave*/
- }
- CFUNCSMESS("Freeing memory.\n");
-/*freemem*/
-#ifdef F2PY_REPORT_ATEXIT
-f2py_stop_clock();
-#endif
- return capi_buildvalue;
-}
-/******************************** end of lpthp ********************************/
-
-/********************************** cutoffs **********************************/
-static char doc_f2py_rout__xapiir_sub_cutoffs[] = "\
-cutoffs(sn,sd,nsects,f)\n\nWrapper for ``cutoffs``.\
-\n\nParameters\n----------\n"
-"sn : input rank-1 array('f') with bounds (1)\n"
-"sd : input rank-1 array('f') with bounds (1)\n"
-"nsects : input int\n"
-"f : input float";
-/* extern void F_FUNC(cutoffs,CUTOFFS)(float*,float*,int*,float*); */
-static PyObject *f2py_rout__xapiir_sub_cutoffs(const PyObject *capi_self,
- PyObject *capi_args,
- PyObject *capi_keywds,
- void (*f2py_func)(float*,float*,int*,float*)) {
- PyObject * volatile capi_buildvalue = NULL;
- volatile int f2py_success = 1;
-/*decl*/
-
- float *sn = NULL;
- npy_intp sn_Dims[1] = {-1};
- const int sn_Rank = 1;
- PyArrayObject *capi_sn_tmp = NULL;
- int capi_sn_intent = 0;
- PyObject *sn_capi = Py_None;
- float *sd = NULL;
- npy_intp sd_Dims[1] = {-1};
- const int sd_Rank = 1;
- PyArrayObject *capi_sd_tmp = NULL;
- int capi_sd_intent = 0;
- PyObject *sd_capi = Py_None;
- int nsects = 0;
- PyObject *nsects_capi = Py_None;
- float f = 0;
- PyObject *f_capi = Py_None;
- static char *capi_kwlist[] = {"sn","sd","nsects","f",NULL};
-
-/*routdebugenter*/
-#ifdef F2PY_REPORT_ATEXIT
-f2py_start_clock();
-#endif
- if (!PyArg_ParseTupleAndKeywords(capi_args,capi_keywds,\
- "OOOO:_xapiir_sub.cutoffs",\
- capi_kwlist,&sn_capi,&sd_capi,&nsects_capi,&f_capi))
- return NULL;
-/*frompyobj*/
- /* Processing variable nsects */
- f2py_success = int_from_pyobj(&nsects,nsects_capi,"_xapiir_sub.cutoffs() 3rd argument (nsects) can't be converted to int");
- if (f2py_success) {
- /* Processing variable sd */
- sd_Dims[0]=1;
- capi_sd_intent |= F2PY_INTENT_IN;
- capi_sd_tmp = array_from_pyobj(NPY_FLOAT,sd_Dims,sd_Rank,capi_sd_intent,sd_capi);
- if (capi_sd_tmp == NULL) {
- if (!PyErr_Occurred())
- PyErr_SetString(_xapiir_sub_error,"failed in converting 2nd argument `sd' of _xapiir_sub.cutoffs to C/Fortran array" );
- } else {
- sd = (float *)(capi_sd_tmp->data);
-
- /* Processing variable sn */
- sn_Dims[0]=1;
- capi_sn_intent |= F2PY_INTENT_IN;
- capi_sn_tmp = array_from_pyobj(NPY_FLOAT,sn_Dims,sn_Rank,capi_sn_intent,sn_capi);
- if (capi_sn_tmp == NULL) {
- if (!PyErr_Occurred())
- PyErr_SetString(_xapiir_sub_error,"failed in converting 1st argument `sn' of _xapiir_sub.cutoffs to C/Fortran array" );
- } else {
- sn = (float *)(capi_sn_tmp->data);
-
- /* Processing variable f */
- f2py_success = float_from_pyobj(&f,f_capi,"_xapiir_sub.cutoffs() 4th argument (f) can't be converted to float");
- if (f2py_success) {
-/*end of frompyobj*/
-#ifdef F2PY_REPORT_ATEXIT
-f2py_start_call_clock();
-#endif
-/*callfortranroutine*/
- (*f2py_func)(sn,sd,&nsects,&f);
-if (PyErr_Occurred())
- f2py_success = 0;
-#ifdef F2PY_REPORT_ATEXIT
-f2py_stop_call_clock();
-#endif
-/*end of callfortranroutine*/
- if (f2py_success) {
-/*pyobjfrom*/
-/*end of pyobjfrom*/
- CFUNCSMESS("Building return value.\n");
- capi_buildvalue = Py_BuildValue("");
-/*closepyobjfrom*/
-/*end of closepyobjfrom*/
- } /*if (f2py_success) after callfortranroutine*/
-/*cleanupfrompyobj*/
- } /*if (f2py_success) of f*/
- /* End of cleaning variable f */
- if((PyObject *)capi_sn_tmp!=sn_capi) {
- Py_XDECREF(capi_sn_tmp); }
- } /*if (capi_sn_tmp == NULL) ... else of sn*/
- /* End of cleaning variable sn */
- if((PyObject *)capi_sd_tmp!=sd_capi) {
- Py_XDECREF(capi_sd_tmp); }
- } /*if (capi_sd_tmp == NULL) ... else of sd*/
- /* End of cleaning variable sd */
- } /*if (f2py_success) of nsects*/
- /* End of cleaning variable nsects */
-/*end of cleanupfrompyobj*/
- if (capi_buildvalue == NULL) {
-/*routdebugfailure*/
- } else {
-/*routdebugleave*/
- }
- CFUNCSMESS("Freeing memory.\n");
-/*freemem*/
-#ifdef F2PY_REPORT_ATEXIT
-f2py_stop_clock();
-#endif
- return capi_buildvalue;
-}
-/******************************* end of cutoffs *******************************/
-
-/*********************************** bilin2 ***********************************/
-static char doc_f2py_rout__xapiir_sub_bilin2[] = "\
-bilin2(sn,sd,nsects)\n\nWrapper for ``bilin2``.\
-\n\nParameters\n----------\n"
-"sn : input rank-1 array('f') with bounds (1)\n"
-"sd : input rank-1 array('f') with bounds (1)\n"
-"nsects : input int";
-/* extern void F_FUNC(bilin2,BILIN2)(float*,float*,int*); */
-static PyObject *f2py_rout__xapiir_sub_bilin2(const PyObject *capi_self,
- PyObject *capi_args,
- PyObject *capi_keywds,
- void (*f2py_func)(float*,float*,int*)) {
- PyObject * volatile capi_buildvalue = NULL;
- volatile int f2py_success = 1;
-/*decl*/
-
- float *sn = NULL;
- npy_intp sn_Dims[1] = {-1};
- const int sn_Rank = 1;
- PyArrayObject *capi_sn_tmp = NULL;
- int capi_sn_intent = 0;
- PyObject *sn_capi = Py_None;
- float *sd = NULL;
- npy_intp sd_Dims[1] = {-1};
- const int sd_Rank = 1;
- PyArrayObject *capi_sd_tmp = NULL;
- int capi_sd_intent = 0;
- PyObject *sd_capi = Py_None;
- int nsects = 0;
- PyObject *nsects_capi = Py_None;
- static char *capi_kwlist[] = {"sn","sd","nsects",NULL};
-
-/*routdebugenter*/
-#ifdef F2PY_REPORT_ATEXIT
-f2py_start_clock();
-#endif
- if (!PyArg_ParseTupleAndKeywords(capi_args,capi_keywds,\
- "OOO:_xapiir_sub.bilin2",\
- capi_kwlist,&sn_capi,&sd_capi,&nsects_capi))
- return NULL;
-/*frompyobj*/
- /* Processing variable nsects */
- f2py_success = int_from_pyobj(&nsects,nsects_capi,"_xapiir_sub.bilin2() 3rd argument (nsects) can't be converted to int");
- if (f2py_success) {
- /* Processing variable sn */
- sn_Dims[0]=1;
- capi_sn_intent |= F2PY_INTENT_IN;
- capi_sn_tmp = array_from_pyobj(NPY_FLOAT,sn_Dims,sn_Rank,capi_sn_intent,sn_capi);
- if (capi_sn_tmp == NULL) {
- if (!PyErr_Occurred())
- PyErr_SetString(_xapiir_sub_error,"failed in converting 1st argument `sn' of _xapiir_sub.bilin2 to C/Fortran array" );
- } else {
- sn = (float *)(capi_sn_tmp->data);
-
- /* Processing variable sd */
- sd_Dims[0]=1;
- capi_sd_intent |= F2PY_INTENT_IN;
- capi_sd_tmp = array_from_pyobj(NPY_FLOAT,sd_Dims,sd_Rank,capi_sd_intent,sd_capi);
- if (capi_sd_tmp == NULL) {
- if (!PyErr_Occurred())
- PyErr_SetString(_xapiir_sub_error,"failed in converting 2nd argument `sd' of _xapiir_sub.bilin2 to C/Fortran array" );
- } else {
- sd = (float *)(capi_sd_tmp->data);
-
-/*end of frompyobj*/
-#ifdef F2PY_REPORT_ATEXIT
-f2py_start_call_clock();
-#endif
-/*callfortranroutine*/
- (*f2py_func)(sn,sd,&nsects);
-if (PyErr_Occurred())
- f2py_success = 0;
-#ifdef F2PY_REPORT_ATEXIT
-f2py_stop_call_clock();
-#endif
-/*end of callfortranroutine*/
- if (f2py_success) {
-/*pyobjfrom*/
-/*end of pyobjfrom*/
- CFUNCSMESS("Building return value.\n");
- capi_buildvalue = Py_BuildValue("");
-/*closepyobjfrom*/
-/*end of closepyobjfrom*/
- } /*if (f2py_success) after callfortranroutine*/
-/*cleanupfrompyobj*/
- if((PyObject *)capi_sd_tmp!=sd_capi) {
- Py_XDECREF(capi_sd_tmp); }
- } /*if (capi_sd_tmp == NULL) ... else of sd*/
- /* End of cleaning variable sd */
- if((PyObject *)capi_sn_tmp!=sn_capi) {
- Py_XDECREF(capi_sn_tmp); }
- } /*if (capi_sn_tmp == NULL) ... else of sn*/
- /* End of cleaning variable sn */
- } /*if (f2py_success) of nsects*/
- /* End of cleaning variable nsects */
-/*end of cleanupfrompyobj*/
- if (capi_buildvalue == NULL) {
-/*routdebugfailure*/
- } else {
-/*routdebugleave*/
- }
- CFUNCSMESS("Freeing memory.\n");
-/*freemem*/
-#ifdef F2PY_REPORT_ATEXIT
-f2py_stop_clock();
-#endif
- return capi_buildvalue;
-}
-/******************************* end of bilin2 *******************************/
-/*eof body*/
-
-/******************* See f2py2e/f90mod_rules.py: buildhooks *******************/
-/*need_f90modhooks*/
-
-/************** See f2py2e/rules.py: module_rules['modulebody'] **************/
-
-/******************* See f2py2e/common_rules.py: buildhooks *******************/
-
-/*need_commonhooks*/
-
-/**************************** See f2py2e/rules.py ****************************/
-
-static FortranDataDef f2py_routine_defs[] = {
- {"xapiir",-1,{{-1}},0,(char *)F_FUNC(xapiir,XAPIIR),(f2py_init_func)f2py_rout__xapiir_sub_xapiir,doc_f2py_rout__xapiir_sub_xapiir},
- {"apply",-1,{{-1}},0,(char *)F_FUNC(apply,APPLY),(f2py_init_func)f2py_rout__xapiir_sub_apply,doc_f2py_rout__xapiir_sub_apply},
- {"design",-1,{{-1}},0,(char *)F_FUNC(design,DESIGN),(f2py_init_func)f2py_rout__xapiir_sub_design,doc_f2py_rout__xapiir_sub_design},
- {"buroots",-1,{{-1}},0,(char *)F_FUNC(buroots,BUROOTS),(f2py_init_func)f2py_rout__xapiir_sub_buroots,doc_f2py_rout__xapiir_sub_buroots},
- {"beroots",-1,{{-1}},0,(char *)F_FUNC(beroots,BEROOTS),(f2py_init_func)f2py_rout__xapiir_sub_beroots,doc_f2py_rout__xapiir_sub_beroots},
- {"chebparm",-1,{{-1}},0,(char *)F_FUNC(chebparm,CHEBPARM),(f2py_init_func)f2py_rout__xapiir_sub_chebparm,doc_f2py_rout__xapiir_sub_chebparm},
- {"c1roots",-1,{{-1}},0,(char *)F_FUNC(c1roots,C1ROOTS),(f2py_init_func)f2py_rout__xapiir_sub_c1roots,doc_f2py_rout__xapiir_sub_c1roots},
- {"c2roots",-1,{{-1}},0,(char *)F_FUNC(c2roots,C2ROOTS),(f2py_init_func)f2py_rout__xapiir_sub_c2roots,doc_f2py_rout__xapiir_sub_c2roots},
- {"warp",-1,{{-1}},0,(char *)F_WRAPPEDFUNC(warp,WARP),(f2py_init_func)f2py_rout__xapiir_sub_warp,doc_f2py_rout__xapiir_sub_warp},
- {"lp",-1,{{-1}},0,(char *)F_FUNC(lp,LP),(f2py_init_func)f2py_rout__xapiir_sub_lp,doc_f2py_rout__xapiir_sub_lp},
- {"lptbp",-1,{{-1}},0,(char *)F_FUNC(lptbp,LPTBP),(f2py_init_func)f2py_rout__xapiir_sub_lptbp,doc_f2py_rout__xapiir_sub_lptbp},
- {"lptbr",-1,{{-1}},0,(char *)F_FUNC(lptbr,LPTBR),(f2py_init_func)f2py_rout__xapiir_sub_lptbr,doc_f2py_rout__xapiir_sub_lptbr},
- {"lpthp",-1,{{-1}},0,(char *)F_FUNC(lpthp,LPTHP),(f2py_init_func)f2py_rout__xapiir_sub_lpthp,doc_f2py_rout__xapiir_sub_lpthp},
- {"cutoffs",-1,{{-1}},0,(char *)F_FUNC(cutoffs,CUTOFFS),(f2py_init_func)f2py_rout__xapiir_sub_cutoffs,doc_f2py_rout__xapiir_sub_cutoffs},
- {"bilin2",-1,{{-1}},0,(char *)F_FUNC(bilin2,BILIN2),(f2py_init_func)f2py_rout__xapiir_sub_bilin2,doc_f2py_rout__xapiir_sub_bilin2},
-
-/*eof routine_defs*/
- {NULL}
-};
-
-static PyMethodDef f2py_module_methods[] = {
-
- {NULL,NULL}
-};
-
-#if PY_VERSION_HEX >= 0x03000000
-static struct PyModuleDef moduledef = {
- PyModuleDef_HEAD_INIT,
- "_xapiir_sub",
- NULL,
- -1,
- f2py_module_methods,
- NULL,
- NULL,
- NULL,
- NULL
-};
-#endif
-
-#if PY_VERSION_HEX >= 0x03000000
-#define RETVAL m
-PyMODINIT_FUNC PyInit__xapiir_sub(void) {
-#else
-#define RETVAL
-PyMODINIT_FUNC init_xapiir_sub(void) {
-#endif
- int i;
- PyObject *m,*d, *s;
-#if PY_VERSION_HEX >= 0x03000000
- m = _xapiir_sub_module = PyModule_Create(&moduledef);
-#else
- m = _xapiir_sub_module = Py_InitModule("_xapiir_sub", f2py_module_methods);
-#endif
- Py_TYPE(&PyFortran_Type) = &PyType_Type;
- import_array();
- if (PyErr_Occurred())
- {PyErr_SetString(PyExc_ImportError, "can't initialize module _xapiir_sub (failed to import numpy)"); return RETVAL;}
- d = PyModule_GetDict(m);
- s = PyString_FromString("$Revision: $");
- PyDict_SetItemString(d, "__version__", s);
-#if PY_VERSION_HEX >= 0x03000000
- s = PyUnicode_FromString(
-#else
- s = PyString_FromString(
-#endif
- "This module '_xapiir_sub' is auto-generated with f2py (version:2).\nFunctions:\n"
-" xapiir(data,nsamps,aproto,trbndw,a,iord,type_bn,flo,fhi,ts,passes,max_nt=len(data))\n"
-" apply(data,nsamps,zp,sn,sd,nsects,max_nt=len(data))\n"
-" design(iord,type_bn,aproto,a,trbndw,fl,fh,ts,sn,sd,nsects)\n"
-" buroots(p,rtype,dcvalue,nsects,iord)\n"
-" beroots(p,rtype,dcvalue,nsects,iord)\n"
-" chebparm(a,trbndw,iord,eps,ripple)\n"
-" c1roots(p,rtype,dcvalue,nsects,iord,eps)\n"
-" c2roots(p,z,rtype,dcvalue,nsects,iord,a,omegar)\n"
-" warp = warp(f,ts)\n"
-" lp(p,z,rtype,dcvalue,nsects,sn,sd)\n"
-" lptbp(p,z,rtype,dcvalue,nsects,fl,fh,sn,sd)\n"
-" lptbr(p,z,rtype,dcvalue,nsects,fl,fh,sn,sd)\n"
-" lpthp(p,z,rtype,dcvalue,nsects,sn,sd)\n"
-" cutoffs(sn,sd,nsects,f)\n"
-" bilin2(sn,sd,nsects)\n"
-".");
- PyDict_SetItemString(d, "__doc__", s);
- _xapiir_sub_error = PyErr_NewException ("_xapiir_sub.error", NULL, NULL);
- Py_DECREF(s);
- for(i=0;f2py_routine_defs[i].name!=NULL;i++)
- PyDict_SetItemString(d, f2py_routine_defs[i].name,PyFortranObject_NewAsAttr(&f2py_routine_defs[i]));
-
-
-
-
-
-
-
-
-
- {
- extern float F_FUNC(warp,WARP)(void);
- PyObject* o = PyDict_GetItemString(d,"warp");
- PyObject_SetAttrString(o,"_cpointer", F2PyCapsule_FromVoidPtr((void*)F_FUNC(warp,WARP),NULL));
-#if PY_VERSION_HEX >= 0x03000000
- PyObject_SetAttrString(o,"__name__", PyUnicode_FromString("warp"));
-#else
- PyObject_SetAttrString(o,"__name__", PyString_FromString("warp"));
-#endif
- }
-
-
-
-
-
-
-
-/*eof initf2pywraphooks*/
-/*eof initf90modhooks*/
-
-/*eof initcommonhooks*/
-
-
-#ifdef F2PY_REPORT_ATEXIT
- if (! PyErr_Occurred())
- on_exit(f2py_report_on_exit,(void*)"_xapiir_sub");
-#endif
-
- return RETVAL;
-}
-#ifdef __cplusplus
-}
-#endif
diff --git a/build/temp.macosx-10.10-x86_64-2.7/build/src.macosx-10.10-x86_64-2.7/fortranobject.o b/build/temp.macosx-10.10-x86_64-2.7/build/src.macosx-10.10-x86_64-2.7/fortranobject.o
deleted file mode 100644
index 1d9050d..0000000
Binary files a/build/temp.macosx-10.10-x86_64-2.7/build/src.macosx-10.10-x86_64-2.7/fortranobject.o and /dev/null differ
diff --git a/build/temp.macosx-10.10-x86_64-2.7/build/src.macosx-10.10-x86_64-2.7/pysar/image/_looks_modmodule.o b/build/temp.macosx-10.10-x86_64-2.7/build/src.macosx-10.10-x86_64-2.7/pysar/image/_looks_modmodule.o
deleted file mode 100644
index a938c4f..0000000
Binary files a/build/temp.macosx-10.10-x86_64-2.7/build/src.macosx-10.10-x86_64-2.7/pysar/image/_looks_modmodule.o and /dev/null differ
diff --git a/build/temp.macosx-10.10-x86_64-2.7/build/src.macosx-10.10-x86_64-2.7/pysar/insar/_subsurfmodule.o b/build/temp.macosx-10.10-x86_64-2.7/build/src.macosx-10.10-x86_64-2.7/pysar/insar/_subsurfmodule.o
deleted file mode 100644
index a36a964..0000000
Binary files a/build/temp.macosx-10.10-x86_64-2.7/build/src.macosx-10.10-x86_64-2.7/pysar/insar/_subsurfmodule.o and /dev/null differ
diff --git a/build/temp.macosx-10.10-x86_64-2.7/build/src.macosx-10.10-x86_64-2.7/pysar/signal/_butter_bandpassmodule.o b/build/temp.macosx-10.10-x86_64-2.7/build/src.macosx-10.10-x86_64-2.7/pysar/signal/_butter_bandpassmodule.o
deleted file mode 100644
index 1e99dfe..0000000
Binary files a/build/temp.macosx-10.10-x86_64-2.7/build/src.macosx-10.10-x86_64-2.7/pysar/signal/_butter_bandpassmodule.o and /dev/null differ
diff --git a/build/temp.macosx-10.10-x86_64-2.7/build/src.macosx-10.10-x86_64-2.7/pysar/signal/_xapiir_sub-f2pywrappers.o b/build/temp.macosx-10.10-x86_64-2.7/build/src.macosx-10.10-x86_64-2.7/pysar/signal/_xapiir_sub-f2pywrappers.o
deleted file mode 100644
index 753d5fa..0000000
Binary files a/build/temp.macosx-10.10-x86_64-2.7/build/src.macosx-10.10-x86_64-2.7/pysar/signal/_xapiir_sub-f2pywrappers.o and /dev/null differ
diff --git a/build/temp.macosx-10.10-x86_64-2.7/build/src.macosx-10.10-x86_64-2.7/pysar/signal/_xapiir_submodule.o b/build/temp.macosx-10.10-x86_64-2.7/build/src.macosx-10.10-x86_64-2.7/pysar/signal/_xapiir_submodule.o
deleted file mode 100644
index e99a4b9..0000000
Binary files a/build/temp.macosx-10.10-x86_64-2.7/build/src.macosx-10.10-x86_64-2.7/pysar/signal/_xapiir_submodule.o and /dev/null differ
diff --git a/build/temp.macosx-10.10-x86_64-2.7/libconefiltpack.a b/build/temp.macosx-10.10-x86_64-2.7/libconefiltpack.a
deleted file mode 100644
index 599368e..0000000
Binary files a/build/temp.macosx-10.10-x86_64-2.7/libconefiltpack.a and /dev/null differ
diff --git a/build/temp.macosx-10.10-x86_64-2.7/libmedfiltpack.a b/build/temp.macosx-10.10-x86_64-2.7/libmedfiltpack.a
deleted file mode 100644
index 62da2cc..0000000
Binary files a/build/temp.macosx-10.10-x86_64-2.7/libmedfiltpack.a and /dev/null differ
diff --git a/build/temp.macosx-10.10-x86_64-2.7/libpdpack.a b/build/temp.macosx-10.10-x86_64-2.7/libpdpack.a
deleted file mode 100644
index 54d98e6..0000000
Binary files a/build/temp.macosx-10.10-x86_64-2.7/libpdpack.a and /dev/null differ
diff --git a/build/temp.macosx-10.10-x86_64-2.7/pysar/image/_looks_mod.o b/build/temp.macosx-10.10-x86_64-2.7/pysar/image/_looks_mod.o
deleted file mode 100644
index 2082fd0..0000000
Binary files a/build/temp.macosx-10.10-x86_64-2.7/pysar/image/_looks_mod.o and /dev/null differ
diff --git a/build/temp.macosx-10.10-x86_64-2.7/pysar/insar/_subsurf.o b/build/temp.macosx-10.10-x86_64-2.7/pysar/insar/_subsurf.o
deleted file mode 100644
index 1ffbdb5..0000000
Binary files a/build/temp.macosx-10.10-x86_64-2.7/pysar/insar/_subsurf.o and /dev/null differ
diff --git a/build/temp.macosx-10.10-x86_64-2.7/pysar/polsar/src/decomp_modc.o b/build/temp.macosx-10.10-x86_64-2.7/pysar/polsar/src/decomp_modc.o
deleted file mode 100644
index 73e6642..0000000
Binary files a/build/temp.macosx-10.10-x86_64-2.7/pysar/polsar/src/decomp_modc.o and /dev/null differ
diff --git a/build/temp.macosx-10.10-x86_64-2.7/pysar/polsar/src/pdpack.o b/build/temp.macosx-10.10-x86_64-2.7/pysar/polsar/src/pdpack.o
deleted file mode 100644
index b563b0a..0000000
Binary files a/build/temp.macosx-10.10-x86_64-2.7/pysar/polsar/src/pdpack.o and /dev/null differ
diff --git a/build/temp.macosx-10.10-x86_64-2.7/pysar/signal/filter_modules/butter_bandpass.o b/build/temp.macosx-10.10-x86_64-2.7/pysar/signal/filter_modules/butter_bandpass.o
deleted file mode 100644
index 15ae5ea..0000000
Binary files a/build/temp.macosx-10.10-x86_64-2.7/pysar/signal/filter_modules/butter_bandpass.o and /dev/null differ
diff --git a/build/temp.macosx-10.10-x86_64-2.7/pysar/signal/filter_modules/conefilt.o b/build/temp.macosx-10.10-x86_64-2.7/pysar/signal/filter_modules/conefilt.o
deleted file mode 100644
index f4a0d0c..0000000
Binary files a/build/temp.macosx-10.10-x86_64-2.7/pysar/signal/filter_modules/conefilt.o and /dev/null differ
diff --git a/build/temp.macosx-10.10-x86_64-2.7/pysar/signal/filter_modules/conefilt_modc.o b/build/temp.macosx-10.10-x86_64-2.7/pysar/signal/filter_modules/conefilt_modc.o
deleted file mode 100644
index b69b7c9..0000000
Binary files a/build/temp.macosx-10.10-x86_64-2.7/pysar/signal/filter_modules/conefilt_modc.o and /dev/null differ
diff --git a/build/temp.macosx-10.10-x86_64-2.7/pysar/signal/filter_modules/filter_modc.o b/build/temp.macosx-10.10-x86_64-2.7/pysar/signal/filter_modules/filter_modc.o
deleted file mode 100644
index be52ee2..0000000
Binary files a/build/temp.macosx-10.10-x86_64-2.7/pysar/signal/filter_modules/filter_modc.o and /dev/null differ
diff --git a/build/temp.macosx-10.10-x86_64-2.7/pysar/signal/filter_modules/medfilt.o b/build/temp.macosx-10.10-x86_64-2.7/pysar/signal/filter_modules/medfilt.o
deleted file mode 100644
index 023b2b9..0000000
Binary files a/build/temp.macosx-10.10-x86_64-2.7/pysar/signal/filter_modules/medfilt.o and /dev/null differ
diff --git a/build/temp.macosx-10.10-x86_64-2.7/pysar/signal/filter_modules/medfilt_modc.o b/build/temp.macosx-10.10-x86_64-2.7/pysar/signal/filter_modules/medfilt_modc.o
deleted file mode 100644
index c0133c0..0000000
Binary files a/build/temp.macosx-10.10-x86_64-2.7/pysar/signal/filter_modules/medfilt_modc.o and /dev/null differ
diff --git a/build/temp.macosx-10.10-x86_64-2.7/pysar/signal/filter_modules/xapiir_sub.o b/build/temp.macosx-10.10-x86_64-2.7/pysar/signal/filter_modules/xapiir_sub.o
deleted file mode 100644
index a0c65b3..0000000
Binary files a/build/temp.macosx-10.10-x86_64-2.7/pysar/signal/filter_modules/xapiir_sub.o and /dev/null differ
diff --git a/pysar/etc/setup.pyc b/pysar/etc/setup.pyc
index d5e2b88..fb9d28e 100644
Binary files a/pysar/etc/setup.pyc and b/pysar/etc/setup.pyc differ
diff --git a/pysar/image/setup.pyc b/pysar/image/setup.pyc
index a0831ee..ac73e94 100644
Binary files a/pysar/image/setup.pyc and b/pysar/image/setup.pyc differ
diff --git a/pysar/insar/setup.pyc b/pysar/insar/setup.pyc
index a64af9d..57f7e01 100644
Binary files a/pysar/insar/setup.pyc and b/pysar/insar/setup.pyc differ
diff --git a/pysar/math/setup.pyc b/pysar/math/setup.pyc
index 304f4d5..63a2c33 100644
Binary files a/pysar/math/setup.pyc and b/pysar/math/setup.pyc differ
diff --git a/pysar/plot/cm/gist/setup.pyc b/pysar/plot/cm/gist/setup.pyc
index 9485114..01699e6 100644
Binary files a/pysar/plot/cm/gist/setup.pyc and b/pysar/plot/cm/gist/setup.pyc differ
diff --git a/pysar/plot/cm/gmt/setup.pyc b/pysar/plot/cm/gmt/setup.pyc
index f58d1db..85ada39 100644
Binary files a/pysar/plot/cm/gmt/setup.pyc and b/pysar/plot/cm/gmt/setup.pyc differ
diff --git a/pysar/plot/cm/grass/setup.pyc b/pysar/plot/cm/grass/setup.pyc
index 713696f..3fb3f65 100644
Binary files a/pysar/plot/cm/grass/setup.pyc and b/pysar/plot/cm/grass/setup.pyc differ
diff --git a/pysar/plot/cm/h5/setup.pyc b/pysar/plot/cm/h5/setup.pyc
index 78603c5..eb797a8 100644
Binary files a/pysar/plot/cm/h5/setup.pyc and b/pysar/plot/cm/h5/setup.pyc differ
diff --git a/pysar/plot/cm/idl/setup.pyc b/pysar/plot/cm/idl/setup.pyc
index 1782d9a..90c05ad 100644
Binary files a/pysar/plot/cm/idl/setup.pyc and b/pysar/plot/cm/idl/setup.pyc differ
diff --git a/pysar/plot/cm/imagej/setup.pyc b/pysar/plot/cm/imagej/setup.pyc
index dca823a..ea97118 100644
Binary files a/pysar/plot/cm/imagej/setup.pyc and b/pysar/plot/cm/imagej/setup.pyc differ
diff --git a/pysar/plot/cm/kst/setup.pyc b/pysar/plot/cm/kst/setup.pyc
index b8d7cf3..c2b51c6 100644
Binary files a/pysar/plot/cm/kst/setup.pyc and b/pysar/plot/cm/kst/setup.pyc differ
diff --git a/pysar/plot/cm/ncl/setup.pyc b/pysar/plot/cm/ncl/setup.pyc
index 28bc6b6..0d3f3cc 100644
Binary files a/pysar/plot/cm/ncl/setup.pyc and b/pysar/plot/cm/ncl/setup.pyc differ
diff --git a/pysar/plot/cm/setup.pyc b/pysar/plot/cm/setup.pyc
index dbe27f6..06288c4 100644
Binary files a/pysar/plot/cm/setup.pyc and b/pysar/plot/cm/setup.pyc differ
diff --git a/pysar/plot/setup.pyc b/pysar/plot/setup.pyc
index 3692200..38c4656 100644
Binary files a/pysar/plot/setup.pyc and b/pysar/plot/setup.pyc differ
diff --git a/pysar/polsar/setup.pyc b/pysar/polsar/setup.pyc
index adeacc5..b600544 100644
Binary files a/pysar/polsar/setup.pyc and b/pysar/polsar/setup.pyc differ
diff --git a/pysar/setup.pyc b/pysar/setup.pyc
index 3ace948..dc28d7e 100644
Binary files a/pysar/setup.pyc and b/pysar/setup.pyc differ
diff --git a/pysar/signal/setup.pyc b/pysar/signal/setup.pyc
index 7e47c59..3cdfeff 100644
Binary files a/pysar/signal/setup.pyc and b/pysar/signal/setup.pyc differ
diff --git a/pysar/utils/setup.pyc b/pysar/utils/setup.pyc
index f83fa6f..2ca1815 100644
Binary files a/pysar/utils/setup.pyc and b/pysar/utils/setup.pyc differ