Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Vasudevan, Rama K
pycroscopy
Commits
2c8968d5
Commit
2c8968d5
authored
Sep 21, 2016
by
nlaanait
Browse files
Porting of Image Transformation and Feature Extraction routines.
parent
ffa03440
Changes
15
Hide whitespace changes
Inline
Side-by-side
pycroscopy/analysis/utils/be_loop.py
View file @
2c8968d5
...
...
@@ -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
###############################################################################
...
...
pycroscopy/io/microdata.py
View file @
2c8968d5
...
...
@@ -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
...
...
pycroscopy/io/translators/be_odf.py
View file @
2c8968d5
...
...
@@ -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
...
...
pycroscopy/io/translators/be_utils.py
View file @
2c8968d5
...
...
@@ -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
#%%############################################################################
...
...
pycroscopy/io/translators/fast_iv.py
View file @
2c8968d5
...
...
@@ -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
):
"""
...
...
pycroscopy/io/translators/general_dynamic_mode.py
View file @
2c8968d5
...
...
@@ -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
):
"""
...
...
pycroscopy/io/translators/gmode_line.py
View file @
2c8968d5
...
...
@@ -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
):
"""
...
...
pycroscopy/io/translators/ptychography.py
View file @
2c8968d5
...
...
@@ -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
):
"""
...
...
pycroscopy/io/translators/sporc.py
View file @
2c8968d5
...
...
@@ -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
):
"""
...
...
pycroscopy/processing/cluster.py
View file @
2c8968d5
...
...
@@ -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
):
"""
...
...
pycroscopy/processing/decomposition.py
View file @
2c8968d5
...
...
@@ -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
):
"""
...
...
pycroscopy/processing/gmode_utils.py
View file @
2c8968d5
...
...
@@ -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
###############################################################################
...
...
pycroscopy/processing/svd_utils.py
View file @
2c8968d5
...
...
@@ -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
...
...
pycroscopy/viz/plot_utils.py
View file @
2c8968d5
...
...
@@ -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
...
...
setup.py
View file @
2c8968d5
...
...
@@ -9,7 +9,7 @@ with open(path.join(here, 'README.rst')) as f:
setup
(
name
=
'pycroscopy'
,
version
=
'0.0a
3
'
,
version
=
'0.0a
4
'
,
description
=
'A suite of Python libraries for high performance scientific computing of microscopy data.'
,
long_description
=
long_description
,
classifiers
=
[
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment