Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
N
nexus
Manage
Activity
Members
Labels
Plan
Issues
14
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
5
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
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
Software Public
PASSOFT
nexus
Commits
c00cea3f
Commit
c00cea3f
authored
4 years ago
by
Lloyd Carothers
Browse files
Options
Downloads
Patches
Plain Diff
Refactor function determining if chan is geophysical by name to hardware.py.
parent
5813af47
No related branches found
Branches containing commit
No related tags found
1 merge request
!4
Adjust what channel names are considered geophysical channels, and responses fetched from NRL.
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
nexus/hardware.py
+6
-0
6 additions, 0 deletions
nexus/hardware.py
nexus/obspyImproved.py
+1
-1
1 addition, 1 deletion
nexus/obspyImproved.py
with
7 additions
and
1 deletion
nexus/hardware.py
+
6
−
0
View file @
c00cea3f
...
...
@@ -22,6 +22,12 @@ resp_dir = os.path.join(etc_dir, 'SOH_RESP')
defaultsfile
=
os
.
path
.
join
(
etc_dir
,
'
nexus.hardware
'
)
def
chan_name_is_geophysical
(
channel_code
):
if
channel_code
[
1
]
in
(
'
H
'
,
'
L
'
,
'
G
'
,
'
N
'
):
return
True
else
:
return
False
class
PlaceHolder
(
Enum
):
GAIN
=
1
SR
=
2
...
...
This diff is collapsed.
Click to expand it.
nexus/obspyImproved.py
+
1
−
1
View file @
c00cea3f
...
...
@@ -408,7 +408,7 @@ class InventoryIm(Inventory):
continue
dl
=
DLS
.
get
(
chan
.
data_logger
.
type
)
# Geophysical seismic channel use sensor and datalogger
if
chan
.
code
[
1
]
in
(
'
H
'
,
'
L
'
,
'
G
'
,
'
N
'
):
if
hardware
.
chan_name_is_geophysical
(
chan
.
code
):
if
not
(
hasattr
(
chan
.
sensor
,
'
type
'
)
and
chan
.
sensor
.
type
in
SENSORS
.
names
()):
print
(
'
Sensor not defined, skipping.
'
)
...
...
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