Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
nomad-lab
nomad-FAIR
Commits
0e7870ea
Commit
0e7870ea
authored
Jan 26, 2021
by
Alvin Noe Ladines
Committed by
Markus Scheidgen
Feb 02, 2021
Browse files
Fixed issue
#484
parent
862790ae
Changes
6
Hide whitespace changes
Inline
Side-by-side
elastic
@
6c8d32cd
Compare
0b328877
...
6c8d32cd
Subproject commit
0b328877ed067154661276da6251a501aaca8d57
Subproject commit
6c8d32cd0107b0cfda9890c82240d5309c568e1f
exciting
@
7160799b
Compare
7ad1a65e
...
7160799b
Subproject commit 7
ad1a65e1ccd0f413f6b822ffd263854272db7e5
Subproject commit 7
160799b23d96a7557584f319822227548d4dd1d
fhi-aims
@
076cff5b
Compare
2247da57
...
076cff5b
Subproject commit
2247da576335a97e776ae58091d82774f5122525
Subproject commit
076cff5b53332309fbd35a5febf2c748cf611519
phonopy
@
edec79da
Compare
c09f6414
...
edec79da
Subproject commit
c09f64143b6df098bd06882465fb9e4d29c44578
Subproject commit
edec79dae93b1730d77205168c02aaaa5683ea13
nomad/parsing/file_parser/file_parser.py
View file @
0e7870ea
...
...
@@ -73,6 +73,9 @@ class FileParser:
results default will be returned. A pint unit can be provided which is attached
to the returned value.
'''
if
self
.
mainfile
is
None
:
return
default
self
.
_key
=
key
self
.
_kwargs
=
kwargs
val
=
self
.
results
.
get
(
key
,
None
)
...
...
nomad/parsing/file_parser/text_parser.py
View file @
0e7870ea
...
...
@@ -103,7 +103,7 @@ class Quantity:
self
.
shape
=
None
elif
isinstance
(
quantity
,
mQuantity
):
self
.
name
=
quantity
.
name
self
.
dtype
=
quantity
.
type
self
.
dtype
=
quantity
.
type
.
type
if
isinstance
(
quantity
.
type
,
np
.
dtype
)
else
quantity
.
type
self
.
unit
=
quantity
.
unit
# check if metainfo shape has dependencies
self
.
shape
=
quantity
.
shape
...
...
@@ -425,6 +425,7 @@ class TextParser(FileParser):
span
=
np
.
array
(
res
.
span
())
+
self
.
file_offset
sub_parser
=
quantity
.
_sub_parser
.
copy
()
sub_parser
.
mainfile
=
self
.
mainfile
sub_parser
.
logger
=
self
.
logger
if
(
span
[
1
]
-
span
[
0
])
<
mmap
.
PAGESIZE
or
True
:
# self.logger.warn(
# 'Cannot use sub parser on quantity %s with blocks with size <'
...
...
@@ -447,6 +448,7 @@ class TextParser(FileParser):
span
=
np
.
array
(
res
.
span
())
+
self
.
file_offset
sub_parser
=
quantity
.
_sub_parser
.
copy
()
sub_parser
.
mainfile
=
self
.
mainfile
sub_parser
.
logger
=
self
.
logger
if
(
span
[
1
]
-
span
[
0
])
<
mmap
.
PAGESIZE
or
True
:
# self.logger.warn(
# 'Cannot use sub parser on quantity %s with blocks with size <'
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a 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