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
45cab2ca
Commit
45cab2ca
authored
Aug 22, 2017
by
Unknown
Browse files
More PEP8
parent
df724721
Changes
5
Hide whitespace changes
Inline
Side-by-side
pycroscopy/analysis/be_loop_model.py
View file @
45cab2ca
...
...
@@ -624,9 +624,9 @@ class BELoopModel(Model):
# step 5: Move the voltage dimension to the first dim
order_dc_outside_nd
=
[
self
.
_dc_offset_index
]
+
list
(
range
(
self
.
_dc_offset_index
))
+
\
list
(
range
(
self
.
_dc_offset_index
+
1
,
len
(
fit_nd
.
shape
)))
list
(
range
(
self
.
_dc_offset_index
+
1
,
len
(
fit_nd
.
shape
)))
order_dc_offset_reverse
=
list
(
range
(
1
,
self
.
_dc_offset_index
+
1
))
+
[
0
]
+
\
list
(
range
(
self
.
_dc_offset_index
+
1
,
len
(
fit_nd
.
shape
)))
list
(
range
(
self
.
_dc_offset_index
+
1
,
len
(
fit_nd
.
shape
)))
fit_nd2
=
np
.
transpose
(
fit_nd
,
tuple
(
order_dc_outside_nd
))
dim_names_dc_out
=
dim_names_orig
[
order_dc_outside_nd
]
if
verbose
:
...
...
@@ -946,7 +946,7 @@ class BELoopModel(Model):
self
.
data
=
None
guess
=
self
.
h5_guess
[
self
.
_start_pos
:
self
.
_end_pos
,
self
.
_current_met_spec_slice
].
reshape
([
-
1
,
1
])
self
.
_current_met_spec_slice
].
reshape
([
-
1
,
1
])
self
.
guess
=
compound_to_scalar
(
guess
)[:,
:
-
1
]
def
_create_guess_datasets
(
self
):
...
...
pycroscopy/io/be_hdf_utils.py
View file @
45cab2ca
...
...
@@ -208,7 +208,7 @@ def getIndicesforPlotGroup(h5_udvs_inds, ds_udvs, plt_grp_name):
step_bin_indices
[
indx
,
:]
=
np
.
where
(
spec_ind_udvs_step_col
==
step
)[
0
]
oneD_indices
=
step_bin_indices
.
reshape
((
step_bin_indices
.
shape
[
0
]
*
step_bin_indices
.
shape
[
1
]))
return
(
step_bin_indices
,
oneD_indices
,
udvs_plt_grp_col
)
return
step_bin_indices
,
oneD_indices
,
udvs_plt_grp_col
def
reshapeToOneStep
(
raw_mat
,
num_steps
):
...
...
pycroscopy/io/translators/be_odf_relaxation.py
View file @
45cab2ca
...
...
@@ -311,7 +311,7 @@ class BEodfRelaxationTranslator(Translator):
for
pix_ind
in
range
(
num_pix
):
print
(
'Reading pixel #{}, file position {}'
.
format
(
pix_ind
,
hex
(
pix_ind
*
bytes_per_pix
)))
pix_vec
=
np
.
fromstring
(
f_real
.
read
(
int
(
bytes_per_pix
)),
dtype
=
'f'
)
+
\
1j
*
np
.
fromstring
(
f_imag
.
read
(
int
(
bytes_per_pix
)),
dtype
=
'f'
)
1j
*
np
.
fromstring
(
f_imag
.
read
(
int
(
bytes_per_pix
)),
dtype
=
'f'
)
# Make chronologically correct
pix_mat
=
np
.
reshape
(
pix_vec
,
(
parm_dict
[
'BE_bins_per_read'
],
...
...
pycroscopy/io/translators/beps_ndf.py
View file @
45cab2ca
...
...
@@ -194,11 +194,11 @@ class BEPSndfTranslator(Translator):
for
prsr
in
parsers
:
wave_type
=
prsr
.
get_wave_type
()
if
self
.
parm_dict
[
'VS_mode'
]
==
'AC modulation mode with time reversal'
and
\
self
.
BE_bin_inds
is
not
None
:
if
np
.
sign
(
wave_type
)
==
-
1
:
bin_fft
=
self
.
BE_wave
[
self
.
BE_bin_inds
]
elif
np
.
sign
(
wave_type
)
==
1
:
bin_fft
=
self
.
BE_wave_rev
[
self
.
BE_bin_inds
]
self
.
BE_bin_inds
is
not
None
:
if
np
.
sign
(
wave_type
)
==
-
1
:
bin_fft
=
self
.
BE_wave
[
self
.
BE_bin_inds
]
elif
np
.
sign
(
wave_type
)
==
1
:
bin_fft
=
self
.
BE_wave_rev
[
self
.
BE_bin_inds
]
else
:
bin_fft
=
None
...
...
@@ -258,7 +258,7 @@ class BEPSndfTranslator(Translator):
ds_pos_ind
=
MicroDataset
(
'Position_Indices'
,
self
.
pos_mat
[
self
.
ds_pixel_start_indx
:
self
.
ds_pixel_start_indx
+
self
.
ds_pixel_index
,
:],
self
.
ds_pixel_index
,
:],
dtype
=
np
.
uint
)
ds_pos_ind
.
attrs
[
'labels'
]
=
pos_slice_dict
...
...
@@ -283,7 +283,7 @@ class BEPSndfTranslator(Translator):
self
.
pos_vals_list
[:,
2
]
*=
1E+6
# convert to microns
pos_val_mat
=
np
.
float32
(
self
.
pos_mat
[
self
.
ds_pixel_start_indx
:
self
.
ds_pixel_start_indx
+
self
.
ds_pixel_index
,
:])
self
.
ds_pixel_index
,
:])
for
col_ind
,
targ_dim_name
in
enumerate
([
'X'
,
'Y'
,
'Z'
]):
if
targ_dim_name
in
self
.
pos_labels
:
...
...
pycroscopy/processing/atom_finding.py
View file @
45cab2ca
...
...
@@ -369,9 +369,11 @@ def apply_find(file_path_h5, file_name_h5, file_path_png, file_name_png, filter_
for
k1
in
range
(
-
filter_width
,
filter_width
+
1
):
for
k2
in
range
(
-
filter_width
,
filter_width
+
1
):
mat_large
[
filter_width
-
k1
:
-
(
filter_width
+
k1
)
-
1
,
filter_width
-
k2
:
-
(
filter_width
+
k2
)
-
1
]
=
np
.
minimum
(
mat_large
[
filter_width
-
k1
:
-
filter_width
-
k1
-
1
,
filter_width
-
k2
:
-
filter_width
-
k2
-
1
],
h5_image
)
filter_width
-
k2
:
-
(
filter_width
+
k2
)
-
1
]
=
np
.
minimum
(
mat_large
[
filter_width
-
k1
:
-
filter_width
-
k1
-
1
,
filter_width
-
k2
:
-
filter_width
-
k2
-
1
],
h5_image
)
deconv_mat_temp
=
mat_large
[
filter_width
:
len
(
mat_larg
[
1
,
:])
-
filter_width
,
filter_width
:
len
(
mat_larg
[:,
1
])
-
filter_width
]
...
...
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