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
6cca316d
Commit
6cca316d
authored
Nov 11, 2017
by
syz
Browse files
Moved the pixels calculation to the very end to avoid initialization problems
parent
8d7304d7
Changes
1
Hide whitespace changes
Inline
Side-by-side
pycroscopy/processing/process.py
View file @
6cca316d
...
...
@@ -50,7 +50,7 @@ class Process(object):
Encapsulates the typical steps performed when applying a processing function to a dataset.
"""
def
__init__
(
self
,
h5_main
,
cores
=
None
,
max_mem_mb
=
1024
,
verbose
=
False
):
def
__init__
(
self
,
h5_main
,
cores
=
None
,
max_mem_mb
=
4
*
1024
,
verbose
=
False
):
"""
Parameters
----------
...
...
@@ -76,17 +76,18 @@ class Process(object):
else
:
raise
ValueError
(
'Provided dataset is not a "Main" dataset with necessary ancillary datasets'
)
# Determining the max size of the data that can be put into memory
self
.
verbose
=
verbose
self
.
_set_memory_and_cores
(
cores
=
cores
,
mem
=
max_mem_mb
)
self
.
_max_pos_per_read
=
None
self
.
_max_mem_mb
=
None
self
.
_start_pos
=
0
self
.
_end_pos
=
self
.
h5_main
.
shape
[
0
]
self
.
_max_pos_per_read
=
None
self
.
_results
=
None
self
.
h5_results_grp
=
None
# Determining the max size of the data that can be put into memory
self
.
_set_memory_and_cores
(
cores
=
cores
,
mem
=
max_mem_mb
)
def
_set_memory_and_cores
(
self
,
cores
=
1
,
mem
=
1024
):
"""
...
...
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