Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
LOFAR
Manage
Activity
Members
Labels
Plan
Issues
Wiki
Jira issues
Open Jira
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Code review 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
RadioObservatory
LOFAR
Commits
263bc431
Commit
263bc431
authored
6 years ago
by
Jorrit Schaap
Browse files
Options
Downloads
Patches
Plain Diff
SW-567
: minor bug fix in hostname2stationname conversion
parent
c015100d
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
LCS/PyCommon/lcu_utils.py
+2
-2
2 additions, 2 deletions
LCS/PyCommon/lcu_utils.py
with
2 additions
and
2 deletions
LCS/PyCommon/lcu_utils.py
+
2
−
2
View file @
263bc431
...
...
@@ -79,7 +79,7 @@ def get_current_stations(station_group='today', as_host_names=True):
station_hostnames
.
append
(
station_hostname
)
if
as_host_names
:
logger
.
info
(
"
stations in group
'
%s
'
: %s
"
,
station_group
,
'
'
.
join
(
station_hostnames
))
logger
.
info
(
"
station
hostname
s in group
'
%s
'
: %s
"
,
station_group
,
'
'
.
join
(
station_hostnames
))
return
station_hostnames
station_names
=
[
hostname2stationname
(
x
)
for
x
in
station_hostnames
]
...
...
@@ -98,7 +98,7 @@ def stationname2hostname(station_name):
def
hostname2stationname
(
station_hostname
):
'''
Convert a lcu hostname to a parset-like station name , like cs001c or cs001c.control.lofar to CS001
'''
# assume a hostname is encoded as stationname in lowercase with a c appended, like cs001c for CS001
return
station_name
.
split
(
'
.
'
)[
0
].
strip
()[
-
1
].
upper
()
return
station_
host
name
.
split
(
'
.
'
)[
0
].
strip
()[
:
-
1
].
upper
()
def
get_stations_rcu_mode
(
stations
=
None
):
'''
...
...
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