Commit c425fc98 authored by ssomnath's avatar ssomnath
Browse files

Using sidpy instead of pyUSID wherever appropriate

parent 4fe06d7d
......@@ -26,11 +26,11 @@
``` python
# Make sure needed packages are installed and up-to-date
import sys
!conda install --yes --prefix {sys.prefix} numpy scipy matplotlib scikit-learn Ipython ipywidgets h5py
!{sys.executable} -m pip install -U --no-deps pycroscopy # this will automatically install pyUSID as well
!{sys.executable} -m pip install -U --no-deps pycroscopy # this will automatically install sidpy and pyUSID as well
%% Cell type:code id: tags:
``` python
......@@ -104,11 +104,11 @@
You can select desired file type by choosing the second option in the pull down menu on the bottom right of the file window
%% Cell type:code id: tags:
``` python
input_file_path = usid.io_utils.file_dialog(caption='Select translated .h5 file or raw experiment data',
input_file_path ='Select translated .h5 file or raw experiment data',
file_filter='Parameters for raw BE data (*.txt *.mat *xls *.xlsx);; \
Translated file (*.h5)')
(data_dir, filename) = os.path.split(input_file_path)
......@@ -152,17 +152,17 @@
%% Cell type:code id: tags:
``` python
print('Datasets and datagroups within the file:\n------------------------------------')
print('\nThe main dataset:\n------------------------------------')
print('\nMetadata or attributes in the measurement datagroup\n------------------------------------')
for key, val in usid.hdf_utils.get_attributes(h5_main.parent.parent).items():
for key, val in sidpy.hdf.hdf_utils.get_attributes(h5_main.parent.parent).items():
print('{} : {}'.format(key, val))
%% Cell type:markdown id: tags:
......@@ -177,29 +177,29 @@
pos_labels = h5_main.pos_dim_labels
print(pos_labels, pos_dims)
h5_meas_grp = h5_main.parent.parent
parm_dict = usid.hdf_utils.get_attributes(h5_meas_grp)
parm_dict = sidpy.hdf.hdf_utils.get_attributes(h5_meas_grp)
expt_type = usid.hdf_utils.get_attr(h5_file, 'data_type')
expt_type = sidpy.hdf.hdf_utils.get_attr(h5_file, 'data_type')
is_ckpfm = expt_type == 'cKPFMData'
if is_ckpfm:
num_write_steps = parm_dict['VS_num_DC_write_steps']
num_read_steps = parm_dict['VS_num_read_steps']
num_fields = 2
if expt_type != 'BELineData':
vs_mode = usid.hdf_utils.get_attr(h5_meas_grp, 'VS_mode')
vs_mode = sidpy.hdf.hdf_utils.get_attr(h5_meas_grp, 'VS_mode')
field_mode = usid.hdf_utils.get_attr(h5_meas_grp, 'VS_measure_in_field_loops')
field_mode = sidpy.hdf.hdf_utils.get_attr(h5_meas_grp, 'VS_measure_in_field_loops')
except KeyError:
print('field mode could not be found. Setting to default value')
field_mode = 'out-of-field'
vs_cycle_frac = usid.hdf_utils.get_attr(h5_meas_grp, 'VS_cycle_fraction')
vs_cycle_frac = sidpy.hdf.hdf_utils.get_attr(h5_meas_grp, 'VS_cycle_fraction')
except KeyError:
print('VS cycle fraction could not be found. Setting to default value')
vs_cycle_frac = 'full'
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