Commit 2c8968d5 authored by nlaanait's avatar nlaanait
Browse files

Porting of Image Transformation and Feature Extraction routines.

parent ffa03440
......@@ -8,13 +8,15 @@ Various helper functions for aiding loop fitting and projection
"""
from __future__ import division
from scipy.special import erf, erfinv
import matplotlib.pyplot as plt
import numpy as np
from scipy import stats
from scipy.optimize import least_squares
from scipy.spatial import ConvexHull
import matplotlib.pyplot as plt
from scipy.optimize import leastsq
from scipy.spatial import ConvexHull
from scipy.special import erf, erfinv
###############################################################################
......
......@@ -5,10 +5,12 @@ Created on Wed Dec 16 10:42:03 2015
@author: Suhas Somnath, Numan Laanait
"""
from warnings import warn
import socket
from warnings import warn
from .io_utils import getTimeStamp
class MicroData(object):
'''
Generic class that is extended by the MicroDataGroup and MicroDataset objects
......
......@@ -6,18 +6,22 @@ Created on Tue Nov 3 15:24:12 2015
"""
from __future__ import division; # int/int = float
import numpy as np; # For array operations
from warnings import warn
from os import path, listdir, remove # File Path formatting
from warnings import warn
import numpy as np; # For array operations
from scipy.io.matlab import loadmat; # To load parameters stored in Matlab .mat file
from .be_utils import trimUDVS, getSpectroscopicParmLabel, parmsToDict, generatePlotGroups, createSpecVals
from .translator import Translator # Because this class extends the abstract Translator class
from .utils import makePositionMat, getPositionSlicing, generateDummyMainParms
from .be_utils import trimUDVS, getSpectroscopicParmLabel, parmsToDict, generatePlotGroups, createSpecVals
from ..microdata import MicroDataGroup, MicroDataset # The building blocks for defining heirarchical storage in the H5 file
from ..io_hdf5 import ioHDF5 # Now the translator is responsible for writing the data.
from ..hdf_utils import getH5DsetRefs, linkRefs
from ..be_hdf_utils import maxReadPixels
from ..hdf_utils import getH5DsetRefs, linkRefs
from ..io_hdf5 import ioHDF5 # Now the translator is responsible for writing the data.
from ..microdata import MicroDataGroup, MicroDataset # The building blocks for defining heirarchical storage in the H5 file
class BEodfTranslator(Translator):
"""
Translates either the Band Excitation (BE) scan or Band Excitation
......
......@@ -8,18 +8,18 @@ Created on Tue Jan 05 07:55:56 2016
from os import path
from warnings import warn
import h5py
import matplotlib.pyplot as plt
import numpy as np
from ..hdf_utils import getH5DsetRefs
from ..microdata import MicroDataset,MicroDataGroup
from ..be_hdf_utils import getActiveUDVSsteps,maxReadPixels
from ..io_utils import getAvailableMem
from ..hdf_utils import getAuxData, getDataSet, getH5DsetRefs, linkRefs
from ..io_hdf5 import ioHDF5
from ...viz.plot_utils import plot1DSpectrum, plot2DSpectrogram, plotHistgrams
from ..io_utils import getAvailableMem
from ..microdata import MicroDataset,MicroDataGroup
from ...processing.proc_utils import buildHistogram
import h5py
from ...viz.plot_utils import plot1DSpectrum, plot2DSpectrogram, plotHistgrams
#%%############################################################################
......
......@@ -6,15 +6,19 @@ Created on Sun May 29 17:58:35 2016
"""
from __future__ import division # int/int = float
import numpy as np # For array operations
from os import path, remove # File Path formatting
from warnings import warn
import h5py
import numpy as np # For array operations
from .translator import Translator
from .utils import makePositionMat, getPositionSlicing, generateDummyMainParms
from ..microdata import MicroDataGroup, MicroDataset # The building blocks for defining heirarchical storage in the H5 file
from ..io_hdf5 import ioHDF5 # Now the translator is responsible for writing the data.
from ..hdf_utils import getH5DsetRefs, linkRefs
from ..io_hdf5 import ioHDF5 # Now the translator is responsible for writing the data.
from ..microdata import MicroDataGroup, MicroDataset # The building blocks for defining heirarchical storage in the H5 file
class FastIVTranslator(Translator):
"""
......
......@@ -6,15 +6,19 @@ Created on Fri Mar 04 11:12:45 2016
"""
from __future__ import print_function, division # int/int = float
import numpy as np # For array operations
from os import path, remove# File Path formatting
import numpy as np # For array operations
from scipy.io.matlab import loadmat # To load parameters stored in Matlab .mat file
from .gmode_utils import readGmodeParms
from .translator import Translator # Because this class extends the abstract Translator class
from .utils import makePositionMat, getPositionSlicing, generateDummyMainParms
from .gmode_utils import readGmodeParms
from ..microdata import MicroDataGroup, MicroDataset # The building blocks for defining heirarchical storage in the H5 file
from ..io_hdf5 import ioHDF5 # Now the translator is responsible for writing the data.
from ..hdf_utils import getH5DsetRefs, linkRefs
from ..io_hdf5 import ioHDF5 # Now the translator is responsible for writing the data.
from ..microdata import MicroDataGroup, MicroDataset # The building blocks for defining heirarchical storage in the H5 file
class GDMTranslator(Translator):
"""
......
......@@ -5,16 +5,20 @@ Created on Sat Nov 07 15:21:46 2015
@author: Suhas Somnath
"""
from __future__ import division, print_function # int/int = float
import numpy as np # For array operations
from os import path, listdir, remove # File Path formatting
from warnings import warn
import numpy as np # For array operations
from scipy.io.matlab import loadmat # To load parameters stored in Matlab .mat file
from .be_utils import parmsToDict
from .translator import Translator
from .utils import interpretFreq, makePositionMat, getPositionSlicing, generateDummyMainParms
from .be_utils import parmsToDict
from ..microdata import MicroDataGroup, MicroDataset # The building blocks for defining heirarchical storage in the H5 file
from ..io_hdf5 import ioHDF5 # Now the translator is responsible for writing the data.
from ..hdf_utils import getH5DsetRefs, linkRefs
from ..io_hdf5 import ioHDF5 # Now the translator is responsible for writing the data.
from ..microdata import MicroDataGroup, MicroDataset # The building blocks for defining heirarchical storage in the H5 file
class GLineTranslator(Translator):
"""
......
......@@ -4,14 +4,17 @@ Created on Feb 9, 2016
@author: Chris Smith
"""
import numpy as np
import os
import numpy as np
from scipy.misc import imread
from ..io_hdf5 import ioHDF5
from ..microdata import MicroDataGroup, MicroDataset
from ..hdf_utils import getH5DsetRefs, linkRefs
from .translator import Translator
from .utils import generateDummyMainParms, makePositionMat, getPositionSlicing
from ..hdf_utils import getH5DsetRefs, linkRefs
from ..io_hdf5 import ioHDF5
from ..microdata import MicroDataGroup, MicroDataset
class PtychographyTranslator(Translator):
"""
......
......@@ -6,15 +6,19 @@ Created on Tue Mar 29 16:04:34 2016
"""
from __future__ import print_function, division; # int/int = float
import numpy as np; # For array operations
from os import path, remove # File Path formatting
from scipy.io.matlab import loadmat # To load parameters stored in Matlab .mat file
import h5py
import numpy as np; # For array operations
from scipy.io.matlab import loadmat # To load parameters stored in Matlab .mat file
from .translator import Translator # Because this class extends the abstract Translator class
from .utils import makePositionMat, getPositionSlicing, generateDummyMainParms
from ..hdf_utils import getH5DsetRefs, linkRefs
from ..microdata import MicroDataGroup, MicroDataset # The building blocks for defining heirarchical storage in the H5 file
from ..io_hdf5 import ioHDF5 # Now the translator is responsible for writing the data.
from ..microdata import MicroDataGroup, MicroDataset # The building blocks for defining heirarchical storage in the H5 file
class SporcTranslator(Translator):
"""
......
......@@ -6,11 +6,13 @@ Created on Tue Jan 05 07:55:56 2016
"""
import numpy as np
import sklearn.cluster as cls
from ..io.io_hdf5 import ioHDF5
from ..io.hdf_utils import checkIfMain
from ..io.hdf_utils import getH5DsetRefs, checkAndLinkAncillary
from ..io.io_hdf5 import ioHDF5
from ..io.io_utils import check_dtype, transformToTargetType
from ..io.microdata import MicroDataGroup, MicroDataset
from ..io.hdf_utils import getH5DsetRefs, checkAndLinkAncillary
class Cluster(object):
"""
......
......@@ -4,14 +4,16 @@ Created on Tue Jan 05 07:55:56 2016
@author: Suhas Somnath, Chris Smith
"""
import h5py
import numpy as np
import sklearn.decomposition as dec
import h5py
from ..io.io_hdf5 import ioHDF5
from ..io.hdf_utils import checkIfMain
from ..io.hdf_utils import getH5DsetRefs, checkAndLinkAncillary
from ..io.io_hdf5 import ioHDF5
from ..io.io_utils import check_dtype, transformToTargetType
from ..io.microdata import MicroDataGroup, MicroDataset
from ..io.hdf_utils import getH5DsetRefs, checkAndLinkAncillary
class Decomposition(object):
"""
......
......@@ -5,16 +5,18 @@ Created on Thu May 05 13:29:12 2016
@author: Suhas Somnath
"""
import numpy as np
import matplotlib.pyplot as plt
from warnings import warn
from multiprocessing import Pool, cpu_count
import itertools
from ..io.io_utils import getTimeStamp
from ..io.hdf_utils import getH5DsetRefs, getH5GroupRef, linkRefs
from ..viz.plot_utils import rainbowPlot
from multiprocessing import Pool, cpu_count
from warnings import warn
import matplotlib.pyplot as plt
import numpy as np
from .fft import getNoiseFloor, noiseBandFilter, makeLPF, harmonicsPassFilter
from ..io.hdf_utils import getH5DsetRefs, getH5GroupRef, linkRefs
from ..io.io_utils import getTimeStamp
from ..io.microdata import MicroDataGroup, MicroDataset
from ..viz.plot_utils import rainbowPlot
###############################################################################
......
......@@ -6,12 +6,14 @@ Created on Mon Mar 28 09:45:08 2016
"""
import time
import numpy as np
from warnings import warn
import numpy as np
from sklearn.utils.extmath import randomized_svd
from ..io.io_hdf5 import ioHDF5
from ..io.hdf_utils import getH5DsetRefs, checkAndLinkAncillary, \
getH5RegRefIndices, createRefFromIndices, checkIfMain
from ..io.io_hdf5 import ioHDF5
from ..io.io_utils import check_dtype
from ..io.microdata import MicroDataset, MicroDataGroup
......
......@@ -5,13 +5,16 @@ Created on Thu May 05 13:29:12 2016
@author: Suhas Somnath
"""
from __future__ import division # int/int = float
import numpy as np
import matplotlib.pyplot as plt
from warnings import warn
import h5py
import matplotlib.pyplot as plt
import numpy as np
from mpl_toolkits.axes_grid1 import make_axes_locatable
from scipy.cluster.hierarchy import linkage, dendrogram
from scipy.spatial.distance import pdist
from warnings import warn
from mpl_toolkits.axes_grid1 import make_axes_locatable
from ..analysis.utils.be_loop import loopFitFunction
......
......@@ -9,7 +9,7 @@ with open(path.join(here, 'README.rst')) as f:
setup(
name='pycroscopy',
version='0.0a3',
version='0.0a4',
description='A suite of Python libraries for high performance scientific computing of microscopy data.',
long_description= long_description,
classifiers=[
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment