Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
C
CFA Analysis
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
JOSSOUD Olivier
CFA Analysis
Commits
ce0dd95e
Commit
ce0dd95e
authored
5 years ago
by
JOSSOUD Olivier
Browse files
Options
Downloads
Plain Diff
Merge remote-tracking branch 'origin/master'
parents
4fe424f2
630e6856
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/dataprovider/exploprovider.py
+4
-3
4 additions, 3 deletions
src/dataprovider/exploprovider.py
src/dataprovider/picarroprovider.py
+4
-0
4 additions, 0 deletions
src/dataprovider/picarroprovider.py
with
8 additions
and
3 deletions
src/dataprovider/exploprovider.py
+
4
−
3
View file @
ce0dd95e
...
...
@@ -116,8 +116,8 @@ class Dataset:
picarro_df
=
self
.
picarro_prvd
.
get_df
(
self
.
first_data_datetime
,
self
.
last_data_datetime
,
[
"
H2O
"
,
"
Delta_D_H
"
,
"
Delta_18_16
"
])
except
:
print
(
"
Failed to get Picarro data
"
)
except
ValueError
as
e
:
print
(
"
Failed to get Picarro data
:
"
+
str
(
e
)
)
return
picarro_df
.
to_csv
(
path_or_buf
=
self
.
full_directory_name
+
"
/
"
+
picarro_filename
,
...
...
@@ -340,7 +340,8 @@ class InstrumentPeriodicLog(InstrumentLog):
def
__get_df__
(
self
)
->
pd
.
DataFrame
:
df
=
pd
.
read_csv
(
self
.
full_file_name
,
sep
=
"
\t
"
,
parse_dates
=
[
"
datetime
"
])
df
[
"
datetime
"
]
=
df
[
"
datetime
"
].
dt
.
tz_localize
(
'
UTC
'
)
if
not
df
.
empty
:
df
[
"
datetime
"
]
=
df
[
"
datetime
"
].
dt
.
tz_localize
(
'
UTC
'
)
return
df
def
get_variables
(
self
):
...
...
This diff is collapsed.
Click to expand it.
src/dataprovider/picarroprovider.py
+
4
−
0
View file @
ce0dd95e
...
...
@@ -2,6 +2,7 @@ import pandas as pd
import
numpy
as
np
import
datetime
import
os
import
utils
import
re
from
config
import
Config
...
...
@@ -38,6 +39,9 @@ class PicarroProvider:
picarro_df
[
"
datetime
"
]
=
pd
.
to_datetime
(
picarro_df
[
"
DATE
"
]
+
"
"
+
picarro_df
[
"
TIME
"
]).
dt
.
tz_localize
(
'
UTC
'
)
picarro_df
=
picarro_df
.
drop
(
columns
=
[
"
DATE
"
,
"
TIME
"
])
picarro_df
=
picarro_df
[(
picarro_df
[
"
datetime
"
]
>=
first_datetime
)
&
(
picarro_df
[
"
datetime
"
]
<=
last_datetime
)]
if
picarro_df
.
empty
:
raise
ValueError
(
"
No Picarro data available between
"
+
first_datetime
.
strftime
(
utils
.
datetime_format
)
+
"
and
"
+
last_datetime
.
strftime
(
utils
.
datetime_format
))
picarro_df
=
picarro_df
.
sort_values
(
by
=
[
'
datetime
'
])
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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!
Save comment
Cancel
Please
register
or
sign in
to comment