Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
python
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
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
Tom Rink
python
Commits
ecc3efad
Commit
ecc3efad
authored
3 years ago
by
tomrink
Browse files
Options
Downloads
Patches
Plain Diff
snapshot...
parent
8b5f563a
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
modules/icing/pirep_goes.py
+15
-0
15 additions, 0 deletions
modules/icing/pirep_goes.py
with
15 additions
and
0 deletions
modules/icing/pirep_goes.py
+
15
−
0
View file @
ecc3efad
...
@@ -1244,6 +1244,21 @@ def split_data(num_obs, perc=0.2, skip=1, shuffle=True):
...
@@ -1244,6 +1244,21 @@ def split_data(num_obs, perc=0.2, skip=1, shuffle=True):
return
train_idxs
[::
skip
],
test_idxs
[::
skip
]
return
train_idxs
[::
skip
],
test_idxs
[::
skip
]
def
normalize
(
data
,
param
,
mean_std_dict
):
if
mean_std_dict
.
get
(
param
)
is
None
:
return
data
mean
,
std
=
mean_std_dict
.
get
(
param
)
data
-=
mean
data
/=
std
not_valid
=
np
.
invert
(
np
.
isnan
(
data
))
data
[
not_valid
]
=
0
return
data
def
test
(
filename
,
skip
=
1
):
def
test
(
filename
,
skip
=
1
):
h5f
=
h5py
.
File
(
filename
,
'
r
'
)
h5f
=
h5py
.
File
(
filename
,
'
r
'
)
time
=
h5f
[
'
time
'
]
time
=
h5f
[
'
time
'
]
...
...
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