Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
VERIFY
CIF
Commits
1efc916d
Commit
1efc916d
authored
Apr 22, 2020
by
Espen Sollum
Browse files
Removed debugging statements
parent
5bd98a13
Changes
1
Hide whitespace changes
Inline
Side-by-side
pycif/plugins/obsvects/standard/init_background.py
View file @
1efc916d
...
...
@@ -100,26 +100,5 @@ def init_background(obsvect, **kwargs):
for
i
,
name
in
enumerate
(
obsvect
.
cini_names
):
obsvect
.
datastore
[
name
]
=
cini
[:,
i
]
# ESO: debugging by reading cini from flexinvert
#if True:
if
False
:
with
open
(
"cini.txt"
)
as
f
:
ci1
=
f
.
readlines
()
d1
=
[
i
.
split
()[
0
]
for
i
in
ci1
]
s1
=
[
i
.
split
()[
1
].
lower
()
for
i
in
ci1
]
v1
=
[
np
.
float64
(
i
.
split
()[
2
])
for
i
in
ci1
]
ndf
=
pd
.
DataFrame
({
"obs_cini_0"
:
v1
,
"station"
:
s1
},
index
=
[
dt
.
datetime
.
strptime
(
i
,
'%Y%m%d%H%M%S'
)
for
i
in
d1
])
ndf
.
index
.
rename
(
'index'
,
inplace
=
True
)
sort_order
=
getattr
(
obsvect
,
'sort_order'
,
[
'index'
,
'station'
])
# ndf.sort_values(['index', 'station'], inplace=True)
# obsvect.datastore.sort_values(['index', 'station'], inplace=True)
ndf
.
sort_values
(
sort_order
,
inplace
=
True
)
obsvect
.
datastore
.
sort_values
(
sort_order
,
inplace
=
True
)
obsvect
.
datastore
[
'obs_cini_0'
]
=
ndf
[
'obs_cini_0'
]
return
obsvect
Write
Preview
Supports
Markdown
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