Skip to content
Snippets Groups Projects
Code owners
Assign users and groups as approvers for specific file changes. Learn more.
config.py 1.57 KiB
#!/usr/bin/env python3
#
# Copyright (C) 2023
# ASTRON (Netherlands Institute for Radio Astronomy)
# P.O.Box 2, 7990 AA Dwingeloo, The Netherlands
#
# This file is part of the LOFAR software suite.
# The LOFAR software suite is free software: you can redistribute it and/or
# modify it under the terms of the GNU General Public License as published
# by the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# The LOFAR software suite is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License along
# with the LOFAR software suite. If not, see <http://www.gnu.org/licenses/>.
#
# $Id$

from lofar.common import isProductionEnvironment

def station_to_host(station: str) -> str:
    """Convert name of station into connectable URL for connecting to PyTango"""
    return f"{station}c.control.lofar"

# Node from which observations are started on COBALT
COBALT_HEADNODE = "cbm299.control.lofar" if isProductionEnvironment() else "localhost"

# Storage location for parsets on COBALT_HEADNODE
COBALT_PARSET_DIR = "/opt/lofar/var/run"

# Name pattern for parsets stored on COBALT_HEADNODE
# This naming is consistent with earlier systems (OnlineControl)
COBALT_PARSET_FILENAME_PATTERN = f"CorrProc_%(subtask_id).param"

# Script to start observations on COBALT_HEADNODE
COBALT_STARTBGL_SCRIPT = "/opt/lofar/bin/startBGL.sh"