Commit 8dc1e10c authored by ssomnath's avatar ssomnath
Browse files

generate_dummy_main_parms no longer used

parent c5e1b069
......@@ -15,7 +15,7 @@ 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, nf32
from pyUSID.io.translator import Translator, generate_dummy_main_parms
from pyUSID.io.translator import Translator
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, write_region_references, \
create_indexed_group, write_simple_attrs, write_book_keeping_attrs, copy_attributes,\
......@@ -298,7 +298,7 @@ class BEodfTranslator(Translator):
h5_f = h5py.File(h5_path)
# Then write root level attributes
global_parms = generate_dummy_main_parms()
global_parms = dict()
global_parms['grid_size_x'] = parm_dict['grid_num_cols']
global_parms['grid_size_y'] = parm_dict['grid_num_rows']
try:
......
......@@ -16,7 +16,7 @@ import h5py
from .df_utils.be_utils import trimUDVS, getSpectroscopicParmLabel, generatePlotGroups, createSpecVals, maxReadPixels, \
nf32
from pyUSID.io.translator import Translator, generate_dummy_main_parms
from pyUSID.io.translator import Translator
from pyUSID.io.write_utils import INDICES_DTYPE, Dimension
from pyUSID.io.hdf_utils import create_indexed_group, write_main_dataset, write_simple_attrs
......@@ -161,7 +161,7 @@ class BEodfRelaxationTranslator(Translator):
parm_dict['num_pix'] = num_pix
parm_dict['num_udvs_steps'] = num_actual_udvs_steps
global_parms = generate_dummy_main_parms()
global_parms = dict()
global_parms['grid_size_x'] = parm_dict['grid_num_cols']
global_parms['grid_size_y'] = parm_dict['grid_num_rows']
global_parms['experiment_date'] = parm_dict['File_date_and_time']
......
......@@ -9,7 +9,7 @@ from skimage.measure import block_reduce
# Pycroscopy imports
from pyUSID.io.hdf_utils import get_h5_obj_refs, link_as_main, get_attr
from pyUSID.io.dtype_utils import stack_real_to_compound
from pyUSID.io.translator import Translator, generate_dummy_main_parms
from pyUSID.io.translator import Translator
from pyUSID import USIDataset
from pyUSID.io.write_utils import Dimension, calc_chunks
from pyUSID.io.image import read_image
......@@ -412,7 +412,7 @@ class FakeBEPSGenerator(Translator):
'''
# Set up the basic group structure
root_grp = VirtualGroup('')
root_parms = generate_dummy_main_parms()
root_parms = dict()
root_parms['translator'] = 'FAKEBEPS'
root_parms['data_type'] = data_gen_parms['data_type']
root_grp.attrs = root_parms
......
......@@ -17,7 +17,7 @@ from scipy.io.matlab import loadmat # To load parameters stored in Matlab .mat
from .df_utils.be_utils import trimUDVS, getSpectroscopicParmLabel, parmsToDict, generatePlotGroups, \
normalizeBEresponse, createSpecVals, nf32
from pyUSID.io.translator import Translator, generate_dummy_main_parms
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 pyUSID.io.usi_data import USIDataset
......@@ -181,7 +181,7 @@ class BEPSndfTranslator(Translator):
# self.pos_mat = np.int32(self.pos_mat)
# Helping Eric out a bit. Remove this section at a later time:
main_parms = generate_dummy_main_parms()
main_parms = dict()
# main_parms['grid_size_x'] = self.parm_dict['grid_num_cols']
# main_parms['grid_size_y'] = self.parm_dict['grid_num_rows']
main_parms['grid_size_x'] = self.parm_dict['grid_num_rows']
......
......@@ -11,7 +11,7 @@ from collections import OrderedDict
import numpy as np
import h5py
from pyUSID.io.translator import Translator, generate_dummy_main_parms
from pyUSID.io.translator import Translator
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 .df_utils.base_utils import read_binary_data
......@@ -66,7 +66,7 @@ class BrukerAFMTranslator(Translator):
else:
data_type = 1
global_parms = generate_dummy_main_parms()
global_parms = dict()
global_parms['data_type'] = 'Bruker_AFM_' + type_suffixes[data_type]
global_parms['translator'] = 'Bruker_AFM'
write_simple_attrs(h5_file, global_parms)
......
......@@ -14,8 +14,7 @@ from scipy.io.matlab import loadmat # To load parameters stored in Matlab .mat
import h5py
from .df_utils.gmode_utils import readGmodeParms
from pyUSID.io.translator import Translator, \
generate_dummy_main_parms # Because this class extends the abstract Translator class
from pyUSID.io.translator import Translator # Because this class extends the abstract Translator class
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
......@@ -83,7 +82,7 @@ class GDMTranslator(Translator):
num_pix = num_rows * num_cols
global_parms = generate_dummy_main_parms()
global_parms = dict()
global_parms['grid_size_x'] = parm_dict['grid_num_cols']
global_parms['grid_size_y'] = parm_dict['grid_num_rows']
# assuming that the experiment was completed:
......
......@@ -14,8 +14,7 @@ from scipy.io.matlab import loadmat # To load parameters stored in Matlab .mat
import h5py
from .df_utils.gmode_utils import readGmodeParms
from pyUSID.io.translator import Translator, \
generate_dummy_main_parms # Because this class extends the abstract Translator class
from pyUSID.io.translator import Translator # Because this class extends the abstract Translator class
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
......@@ -83,7 +82,7 @@ class GVSTranslator(Translator):
num_pix = num_rows * num_cols
global_parms = generate_dummy_main_parms()
global_parms = dict()
global_parms['grid_size_x'] = parm_dict['grid_num_cols']
global_parms['grid_size_y'] = parm_dict['grid_num_rows']
# assuming that the experiment was completed:
......
......@@ -13,7 +13,7 @@ from warnings import warn
import h5py
import numpy as np # For array operations
from pyUSID.io.translator import Translator, generate_dummy_main_parms
from pyUSID.io.translator import Translator
from pyUSID.io.write_utils import Dimension
from pyUSID.io.hdf_utils import write_main_dataset, create_indexed_group, write_simple_attrs
......@@ -59,7 +59,7 @@ class GIVTranslator(Translator):
with h5py.File(h5_path) as h5_f:
h5_meas_grp = create_indexed_group(h5_f, 'Measurement')
global_parms = generate_dummy_main_parms()
global_parms = dict()
global_parms.update({'data_type': 'gIV', 'translator': 'gIV'})
write_simple_attrs(h5_meas_grp, global_parms)
......
......@@ -14,7 +14,7 @@ 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, generate_dummy_main_parms
from pyUSID.io.translator import Translator
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
......@@ -133,7 +133,7 @@ class GLineTranslator(Translator):
# First finish writing all global parameters, create the file too:
h5_f = h5py.File(h5_path, 'w')
global_parms = generate_dummy_main_parms()
global_parms = dict()
global_parms['data_type'] = 'G_mode_line'
global_parms['translator'] = 'G_mode_line'
write_simple_attrs(h5_f, global_parms)
......
......@@ -16,7 +16,6 @@ from scipy.io.matlab import loadmat # To load parameters stored in Matlab .mat
from .df_utils.be_utils import parmsToDict
from .gmode_line import GLineTranslator
from pyUSID.io.translator import generate_dummy_main_parms
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
......@@ -112,7 +111,7 @@ class GTuneTranslator(GLineTranslator):
# First finish writing all global parameters, create the file too:
h5_file = h5py.File(h5_path, 'w')
global_parms = generate_dummy_main_parms()
global_parms = dict()
global_parms['data_type'] = 'G_mode_line'
global_parms['translator'] = 'G_mode_line'
......
......@@ -11,7 +11,7 @@ import sys
import numpy as np
import h5py
from pyUSID.io.translator import Translator, generate_dummy_main_parms
from pyUSID.io.translator import Translator
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
......@@ -57,7 +57,7 @@ class GwyddionTranslator(Translator):
or
GwyddionGWY_<gwy_meta['title']>
"""
self.global_parms = generate_dummy_main_parms()
self.global_parms = dict()
self.global_parms['translator'] = 'Gwyddion'
# Create the measurement group
......
......@@ -11,8 +11,7 @@ import numpy as np # For array operations
import h5py
from igor import binarywave as bw
from pyUSID.io.translator import Translator, \
generate_dummy_main_parms # Because this class extends the abstract Translator class
from pyUSID.io.translator import Translator # Because this class extends the abstract Translator class
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
......@@ -34,7 +33,7 @@ class IgorIBWTranslator(Translator):
Returns
-------
bool : Whether or not this translator can read this file
bool : Whether or not this translator can read this file
"""
file_path = path.abspath(file_path)
extension = path.splitext(file_path)[1][1:]
......@@ -148,7 +147,7 @@ class IgorIBWTranslator(Translator):
meas_grp = create_indexed_group(h5_file, grp_name)
# Write file and measurement level parameters
global_parms = generate_dummy_main_parms()
global_parms = dict()
global_parms['data_type'] = 'IgorIBW_' + type_suffix
global_parms['translator'] = 'IgorIBW'
write_simple_attrs(h5_file, global_parms)
......
......@@ -17,7 +17,7 @@ import h5py
from .df_utils.image_utils import no_bin
from .df_utils.dm_utils import read_dm3
from pyUSID.io.image import read_image
from pyUSID.io.translator import Translator, generate_dummy_main_parms
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
......@@ -313,7 +313,7 @@ class ImageStackTranslator(Translator):
num_pixels = usize*vsize
num_files = scan_size_x*scan_size_y
root_parms = generate_dummy_main_parms()
root_parms = dict()
root_parms['data_type'] = 'ImageStackData'
main_parms = {'num_images': num_files,
......
......@@ -18,7 +18,7 @@ from skimage.util import crop
from .df_utils.image_utils import unnest_parm_dicts
from .df_utils.dm_utils import read_dm3
from pyUSID.io.translator import Translator, generate_dummy_main_parms
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
......@@ -474,7 +474,7 @@ class NDataTranslator(Translator):
HDF5 Dateset that the mean over all Spectroscopic steps will be
written into
"""
root_parms = generate_dummy_main_parms()
root_parms = dict()
root_parms['data_type'] = 'PtychographyData'
# Create the hdf5 data Group
......
......@@ -16,7 +16,7 @@ from skimage.util import crop
from .df_utils import dm4reader
from .df_utils.dm_utils import parse_dm4_parms, read_dm3
from pyUSID.io.translator import Translator, generate_dummy_main_parms
from pyUSID.io.translator import Translator
from pyUSID.io.write_utils import Dimension, calc_chunks
from pyUSID.io.hdf_utils import create_indexed_group, write_main_dataset, write_simple_attrs
from pycroscopy.io.translators.image import read_image
......@@ -414,7 +414,7 @@ class OneViewTranslator(Translator):
num_pixels = usize * vsize
num_files = scan_size_x * scan_size_y
root_parms = generate_dummy_main_parms()
root_parms = dict()
root_parms['data_type'] = 'PtychographyData'
main_parms = {'num_images': num_files,
......
......@@ -13,8 +13,7 @@ import h5py
import numpy as np # For array operations
from scipy.io.matlab import loadmat # To load parameters stored in Matlab .mat file
from pyUSID.io.translator import Translator, \
generate_dummy_main_parms # Because this class extends the abstract Translator class
from pyUSID.io.translator import Translator # Because this class extends the abstract Translator class
from pyUSID.io.write_utils import Dimension, INDICES_DTYPE, VALUES_DTYPE
from pyUSID.io.hdf_utils import get_h5_obj_refs, link_h5_objects_as_attrs
from ..write_utils import build_ind_val_dsets
......@@ -93,7 +92,7 @@ class SporcTranslator(Translator):
chan_grp.add_children([ds_pos_ind, ds_pos_val, ds_spec_inds, ds_spec_vals,
ds_excit_wfm, ds_raw_data])
global_parms = generate_dummy_main_parms()
global_parms = dict()
global_parms['grid_size_x'] = parm_dict['grid_num_cols']
global_parms['grid_size_y'] = parm_dict['grid_num_rows']
# assuming that the experiment was completed:
......
......@@ -14,7 +14,7 @@ import h5py
from .df_utils.dm_utils import read_dm3
from pyUSID.io.image import read_image
from pyUSID.io.translator import Translator, generate_dummy_main_parms
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
......@@ -333,7 +333,7 @@ class MovieTranslator(Translator):
"""
num_pixels = usize * vsize
root_parms = generate_dummy_main_parms()
root_parms = dict()
root_parms['data_type'] = 'PtychographyData'
main_parms['num_images'] = num_images
......
......@@ -12,7 +12,7 @@ from os import path, remove, listdir # File Path formatting
import numpy as np # For array operations
import h5py
from scipy.io import loadmat
from pyUSID.io.translator import Translator, generate_dummy_main_parms
from pyUSID.io.translator import Translator
from pyUSID.io.write_utils import Dimension
from pyUSID.io.hdf_utils import get_h5_obj_refs, link_h5_objects_as_attrs, \
write_simple_attrs, write_main_dataset, create_indexed_group
......@@ -126,7 +126,7 @@ class TRKPFMTranslator(Translator):
h5_meas_group = create_indexed_group(h5_file, 'Measurement')
#Set up some parameters that will be written as attributes to this Measurement group
global_parms = generate_dummy_main_parms()
global_parms = dict()
global_parms['data_type'] = 'trKPFM'
global_parms['translator'] = 'trKPFM'
write_simple_attrs(h5_meas_group, global_parms)
......
Supports Markdown
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