Commit ba49d199 authored by ssomnath's avatar ssomnath
Browse files

Using sidpy instead of pyUSID wherever appropriate

parent c425fc98
......@@ -15,8 +15,11 @@ from time import time, sleep
from warnings import warn
import h5py
from pyUSID.io.hdf_utils import assign_group_index, write_simple_attrs
from pyUSID.io.reg_ref import attempt_reg_ref_build, write_region_references
from sidpy.hdf.hdf_utils import write_simple_attrs
from sidpy.hdf.reg_ref import attempt_reg_ref_build, write_region_references
from pyUSID.io.hdf_utils import assign_group_index
from .virtual_data import VirtualGroup, VirtualDataset, VirtualData
from ..__version__ import version
......
......@@ -10,9 +10,10 @@ import os
import sys
import re # used to get note values
from pyUSID.io.translator import Translator
from sidpy.sid import Translator
from sidpy.hdf.hdf_utils import write_simple_attrs, print_tree, get_attributes
from pyUSID.io.write_utils import Dimension, make_indices_matrix
from pyUSID.io.hdf_utils import create_indexed_group, write_main_dataset, write_simple_attrs, print_tree, get_attributes
from pyUSID.io.hdf_utils import create_indexed_group, write_main_dataset
if sys.version_info.major == 3:
unicode = str
......
......@@ -18,14 +18,16 @@ from scipy.io.matlab import loadmat # To load parameters stored in Matlab .mat
from .df_utils.be_utils import trimUDVS, getSpectroscopicParmLabel, parmsToDict, generatePlotGroups, \
createSpecVals, requires_conjugate, generate_bipolar_triangular_waveform, \
infer_bipolar_triangular_fraction_phase, nf32
from pyUSID.io.reg_ref import write_region_references
from pyUSID.io.translator import Translator
from sidpy.hdf.hdf_utils import write_simple_attrs
from sidpy.hdf.reg_ref import write_region_references
from sidpy.sid import Translator
from sidpy.proc.comp_utils import get_available_memory
from pyUSID.io.write_utils import INDICES_DTYPE, VALUES_DTYPE, Dimension, calc_chunks
from pyUSID.io.hdf_utils import write_ind_val_dsets, write_main_dataset, \
create_indexed_group, write_simple_attrs, write_book_keeping_attrs, copy_attributes,\
create_indexed_group, write_book_keeping_attrs, copy_attributes,\
write_reduced_anc_dsets, get_unit_values
from pyUSID.io.usi_data import USIDataset
from pyUSID.processing.comp_utils import get_available_memory
if sys.version_info.major == 3:
unicode = str
......
......@@ -9,16 +9,16 @@ from __future__ import division, print_function, absolute_import, unicode_litera
from os import path, 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
import h5py
from .df_utils.be_utils import trimUDVS, getSpectroscopicParmLabel, generatePlotGroups, createSpecVals, maxReadPixels, \
nf32
from pyUSID.io.translator import Translator
from sidpy.sid import Translator
from sidpy.hdf.hdf_utils import write_simple_attrs
from pyUSID.io.write_utils import INDICES_DTYPE, Dimension
from pyUSID.io.hdf_utils import create_indexed_group, write_main_dataset, write_simple_attrs
from pyUSID.io.hdf_utils import create_indexed_group, write_main_dataset
from .df_utils.be_utils import trimUDVS, getSpectroscopicParmLabel, \
generatePlotGroups, createSpecVals, maxReadPixels, nf32
class BEodfRelaxationTranslator(Translator):
......
......@@ -7,11 +7,12 @@ import numpy as np
from sklearn.utils import gen_batches
from skimage.measure import block_reduce
# Pycroscopy imports
from pyUSID.io.hdf_utils import get_h5_obj_refs, link_as_main, get_attr, copy_dataset, \
write_main_dataset, write_simple_attrs, create_indexed_group, create_results_group, write_reduced_anc_dsets
from pyUSID.io.dtype_utils import stack_real_to_compound
from pyUSID.io.translator import Translator
from pyUSID import USIDataset
from sidpy.hdf.hdf_utils import get_attr, write_simple_attrs
from sidpy.hdf.dtype_utils import stack_real_to_compound
from sidpy.sid import Translator
from pyUSID.io.hdf_utils import link_as_main, copy_dataset, \
write_main_dataset, create_indexed_group, create_results_group, \
write_reduced_anc_dsets
from pyUSID.io.write_utils import Dimension, calc_chunks
from pyUSID.io.image import read_image
from ...analysis.utils.be_loop import loop_fit_function
......
......@@ -16,12 +16,15 @@ import numpy as np
import xlrd as xlreader # To read the UDVS spreadsheet
from scipy.io.matlab import loadmat # To load parameters stored in Matlab .mat file
from .df_utils.be_utils import trimUDVS, getSpectroscopicParmLabel, parmsToDict, generatePlotGroups, \
normalizeBEresponse, createSpecVals, nf32
from pyUSID.io.translator import Translator
from pyUSID.io.write_utils import make_indices_matrix, VALUES_DTYPE, INDICES_DTYPE, calc_chunks
from pyUSID.io.hdf_utils import get_h5_obj_refs, link_h5_objects_as_attrs
from sidpy.sid import Translator
from sidpy.hdf.hdf_utils import get_h5_obj_refs, link_h5_objects_as_attrs
from pyUSID.io.write_utils import make_indices_matrix, VALUES_DTYPE, \
INDICES_DTYPE, calc_chunks
from pyUSID.io.usi_data import USIDataset
from .df_utils.be_utils import trimUDVS, getSpectroscopicParmLabel, \
parmsToDict, generatePlotGroups, normalizeBEresponse, createSpecVals, nf32
from ..hdf_writer import HDFwriter
from ..virtual_data import VirtualGroup, VirtualDataset
......
......@@ -11,9 +11,12 @@ from collections import OrderedDict
import numpy as np
import h5py
from pyUSID.io.translator import Translator
from sidpy.sid import Translator
from sidpy.hdf.hdf_utils import write_simple_attrs
from pyUSID.io.write_utils import Dimension
from pyUSID.io.hdf_utils import create_indexed_group, write_main_dataset, write_simple_attrs, write_ind_val_dsets
from pyUSID.io.hdf_utils import create_indexed_group, write_main_dataset, \
write_ind_val_dsets
from .df_utils.base_utils import read_binary_data
# TODO: Adopt missing aspects / features from https://github.com/paruch-group/distortcorrect/blob/master/afm/filereader/readNanoscope.py
......
......@@ -15,12 +15,13 @@ import matplotlib.pyplot as plt
import numpy as np
import xlrd as xlreader
from pyUSID.io.hdf_utils import get_auxiliary_datasets, find_dataset, \
link_h5_objects_as_attrs, get_attr, create_indexed_group, \
write_simple_attrs, write_main_dataset, get_unit_values
from sidpy.hdf.hdf_utils import write_simple_attrs, link_h5_objects_as_attrs, \
get_attr, get_auxiliary_datasets
from sidpy.proc.comp_utils import get_available_memory, parallel_compute
from pyUSID.io.hdf_utils import find_dataset, create_indexed_group, \
write_main_dataset, get_unit_values
from pyUSID.io.write_utils import create_spec_inds_from_vals, Dimension
from pyUSID.processing.comp_utils import get_available_memory, parallel_compute
from ....processing.histogram import build_histogram
from ....analysis.utils.be_sho import SHOestimateGuess
......
......@@ -12,9 +12,11 @@ import h5py
import numpy as np # For array operations
from scipy.io import loadmat
from pyUSID.io.translator import Translator
from sidpy.sid import Translator
from sidpy.hdf.hdf_utils import write_simple_attrs
from pyUSID.io.write_utils import Dimension
from pyUSID.io.hdf_utils import write_main_dataset, create_indexed_group, write_simple_attrs
from pyUSID.io.hdf_utils import write_main_dataset, create_indexed_group
class ForcIVTranslator(Translator):
......
......@@ -13,11 +13,13 @@ import numpy as np # For array operations
from scipy.io.matlab import loadmat # To load parameters stored in Matlab .mat file
import h5py
from .df_utils.gmode_utils import readGmodeParms
from pyUSID.io.translator import Translator # Because this class extends the abstract Translator class
from sidpy.sid import Translator
from sidpy.hdf.hdf_utils import write_simple_attrs, link_h5_objects_as_attrs
from pyUSID.io.write_utils import VALUES_DTYPE, Dimension
from pyUSID.io.hdf_utils import link_h5_objects_as_attrs, create_indexed_group, \
write_simple_attrs, write_main_dataset
from pyUSID.io.hdf_utils import create_indexed_group, write_main_dataset
from .df_utils.gmode_utils import readGmodeParms
class GDMTranslator(Translator):
......
......@@ -13,11 +13,13 @@ import numpy as np # For array operations
from scipy.io.matlab import loadmat # To load parameters stored in Matlab .mat file
import h5py
from .df_utils.gmode_utils import readGmodeParms
from pyUSID.io.translator import Translator # Because this class extends the abstract Translator class
from sidpy.sid import Translator
from sidpy.hdf.hdf_utils import write_simple_attrs, link_h5_objects_as_attrs
from pyUSID.io.write_utils import VALUES_DTYPE, Dimension
from pyUSID.io.hdf_utils import link_h5_objects_as_attrs, create_indexed_group, \
write_simple_attrs, write_main_dataset
from pyUSID.io.hdf_utils import create_indexed_group, write_main_dataset
from .df_utils.gmode_utils import readGmodeParms
class GVSTranslator(Translator):
......@@ -59,7 +61,7 @@ class GVSTranslator(Translator):
#parm_dict['freq_sweep_delay'] = np.float(freq_sweep_parms['delay'].item())
gen_sig = parm_data['genSig']
#parm_dict['wfm_fix_d_fast'] = np.int32(gen_sig['restrictT'].item())
#freq_array = np.float32(parm_data['freqArray'])
freq_array = np.float32(parm_data['freqArray'])
# prepare and write spectroscopic values
samp_rate = parm_dict['IO_down_samp_rate_[Hz]']
......
......@@ -13,9 +13,11 @@ from warnings import warn
import h5py
import numpy as np # For array operations
from pyUSID.io.translator import Translator
from sidpy.sid import Translator
from sidpy.hdf.hdf_utils import write_simple_attrs
from pyUSID.io.write_utils import Dimension
from pyUSID.io.hdf_utils import write_main_dataset, create_indexed_group, write_simple_attrs
from pyUSID.io.hdf_utils import write_main_dataset, create_indexed_group
class GIVTranslator(Translator):
......
......@@ -12,10 +12,14 @@ import h5py
import numpy as np
from scipy.io.matlab import loadmat # To load parameters stored in Matlab .mat file
from .df_utils.be_utils import parmsToDict
from pyUSID.io.translator import Translator
from sidpy.sid import Translator
from sidpy.hdf.hdf_utils import write_simple_attrs
from pyUSID.io.write_utils import VALUES_DTYPE, Dimension
from pyUSID.io.hdf_utils import write_main_dataset, create_indexed_group, write_simple_attrs, write_ind_val_dsets
from pyUSID.io.hdf_utils import write_main_dataset, create_indexed_group, \
write_ind_val_dsets
from .df_utils.be_utils import parmsToDict
if sys.version_info.major == 3:
unicode = str
......
......@@ -14,10 +14,14 @@ import h5py
import numpy as np
from scipy.io.matlab import loadmat # To load parameters stored in Matlab .mat file
from sidpy.hdf.hdf_utils import write_simple_attrs
from pyUSID.io.write_utils import VALUES_DTYPE, Dimension
from pyUSID.io.hdf_utils import create_indexed_group, write_ind_val_dsets, \
write_main_dataset
from .df_utils.be_utils import parmsToDict
from .gmode_line import GLineTranslator
from pyUSID.io.write_utils import VALUES_DTYPE, Dimension
from pyUSID.io.hdf_utils import write_simple_attrs, create_indexed_group, write_ind_val_dsets, write_main_dataset
class GTuneTranslator(GLineTranslator):
......
......@@ -11,9 +11,12 @@ import sys
import numpy as np
import h5py
from pyUSID.io.translator import Translator
from sidpy.sid import Translator
from sidpy.hdf.hdf_utils import write_simple_attrs
from pyUSID.io.write_utils import Dimension
from pyUSID.io.hdf_utils import create_indexed_group, write_main_dataset, write_simple_attrs, write_ind_val_dsets
from pyUSID.io.hdf_utils import create_indexed_group, write_main_dataset, \
write_ind_val_dsets
# packages specific to this kind of file
from .df_utils.gsf_read import gsf_read
......
......@@ -12,9 +12,12 @@ import numpy as np # For array operations
import h5py
from igor import binarywave as bw
from pyUSID.io.translator import Translator # Because this class extends the abstract Translator class
from sidpy.sid import Translator
from sidpy.hdf.hdf_utils import write_simple_attrs
from pyUSID.io.write_utils import VALUES_DTYPE, Dimension
from pyUSID.io.hdf_utils import create_indexed_group, write_main_dataset, write_simple_attrs, write_ind_val_dsets
from pyUSID.io.hdf_utils import create_indexed_group, write_main_dataset, \
write_ind_val_dsets
if sys.version_info.major == 3:
unicode = str
......
......@@ -14,13 +14,16 @@ from PIL import Image
from skimage.measure import block_reduce
import h5py
from .df_utils.image_utils import no_bin
from .df_utils.dm_utils import read_dm3
from sidpy.sid import Translator
from sidpy.hdf.hdf_utils import write_simple_attrs, get_h5_obj_refs
from pyUSID.io.image import read_image
from pyUSID.io.translator import Translator
from pyUSID.io.write_utils import Dimension, calc_chunks
from pyUSID.io.hdf_utils import get_h5_obj_refs, link_as_main, write_main_dataset, \
write_simple_attrs, create_indexed_group
from pyUSID.io.hdf_utils import link_as_main, write_main_dataset, \
create_indexed_group
from .df_utils.image_utils import no_bin
from .df_utils.dm_utils import read_dm3
class ImageStackTranslator(Translator):
......
......@@ -13,12 +13,15 @@ import h5py
import os
import numpy as np
from .df_utils.be_utils import remove_non_exist_spec_dim_labs
from pyUSID.io.translator import Translator
from pyUSID.io.hdf_utils import get_attr, link_as_main, find_results_groups, \
check_and_link_ancillary, find_dataset, write_simple_attrs
from sidpy.sid import Translator
from sidpy.hdf.hdf_utils import get_attr, write_simple_attrs
from pyUSID.io.hdf_utils import link_as_main, find_results_groups, \
check_and_link_ancillary, find_dataset
from pyUSID.io.write_utils import create_spec_inds_from_vals
from .df_utils.be_utils import remove_non_exist_spec_dim_labs
if sys.version_info.major == 3:
unicode = str
......
......@@ -7,10 +7,14 @@ import os
from warnings import warn
import numpy as np
import h5py
from pyUSID.io.hdf_utils import (create_indexed_group, write_main_dataset,
write_simple_attrs, Dimension,
write_ind_val_dsets)
from pyUSID.io.translator import Translator
from sidpy.sid import Translator
from sidpy.hdf.hdf_utils import write_simple_attrs
from pyUSID.io.hdf_utils import create_indexed_group, write_main_dataset,\
write_ind_val_dsets
from pyUSID.io.write_utils import Dimension
from .df_utils.nanonis_utils import read_nanonis_file
# TODO: Adopt any missing features from https://github.com/paruch-group/distortcorrect/blob/master/afm/filereader/nanonisFileReader.py
......
......@@ -16,11 +16,14 @@ import numpy as np
from skimage.measure import block_reduce
from skimage.util import crop
from sidpy.sid import Translator
from sidpy.hdf.hdf_utils import write_simple_attrs
from pyUSID.io.write_utils import Dimension, calc_chunks
from pyUSID.io.hdf_utils import write_main_dataset, create_indexed_group
from .df_utils.image_utils import unnest_parm_dicts
from .df_utils.dm_utils import read_dm3
from pyUSID.io.translator import Translator
from pyUSID.io.write_utils import Dimension, calc_chunks
from pyUSID.io.hdf_utils import write_main_dataset, create_indexed_group, write_simple_attrs
class NDataTranslator(Translator):
......
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