示例#1
0
    def __init__(self, name, id):
        Daemon.__init__(self, name, str(id))
        self.beams = []

        self.ftp_server = "sun-store.kat.ac.za"
        self.ftp_username = "******"
        self.ftp_password = "******"
示例#2
0
    def __init__(self, name, id):
        Daemon.__init__(self, name, str(id))
        StreamBased.__init__(self, id, self.cfg)

        self.processing_dir = self.cfg["CLIENT_STATS_DIR"]
        self.valid_plots = []
        self.results = {}

        self.results["lock"] = threading.Lock()
        self.results["valid"] = False

        self.results["hg_npol"] = self.cfg["NPOL"]
        self.results["hg_ndim"] = self.cfg["NDIM"]

        (host, beam_id, subband_id) = self.cfg["STREAM_" + id].split(":")
        self.beam_name = self.cfg["BEAM_" + beam_id]

        (cfreq, bw,
         nchan) = self.cfg["SUBBAND_CONFIG_" + subband_id].split(":")
        self.cfreq = cfreq

        self.gen_timeseries = True
        self.gen_freqtime = True
        self.gen_bandpass = True
        self.gen_histogram = True

        self.hg_valid = False
        self.ft_valid = False
        self.bp_valid = False
        self.ms_valid = False
        self.ts_valid = False

        self.pref_freq = 0
        self.histogram_abs_xmax = 128
示例#3
0
  def __init__ (self, name, id):
    Daemon.__init__(self, name, str(id))
    StreamBased.__init__(self, id, self.cfg)

    self.processing_dir = self.cfg["CLIENT_STATS_DIR"]
    self.valid_plots = []
    self.results = {}

    self.results["lock"] = threading.Lock()
    self.results["valid"] = False

    self.results["hg_npol"] = self.cfg["NPOL"]
    self.results["hg_ndim"] = self.cfg["NDIM"]


    (host, beam_id, subband_id) = self.cfg["STREAM_" + id].split(":")
    self.beam_name = self.cfg["BEAM_" + beam_id]

    (cfreq, bw, nchan) = self.cfg["SUBBAND_CONFIG_" + subband_id].split(":")
    self.cfreq = cfreq

    self.gen_timeseries = True
    self.gen_freqtime = True
    self.gen_bandpass = True
    self.gen_histogram = True

    self.hg_valid = False
    self.ft_valid = False
    self.bp_valid = False
    self.ms_valid = False
    self.ts_valid = False

    self.pref_freq = 0
    self.histogram_abs_xmax = 128
示例#4
0
  def __init__ (self, name, id):
    Daemon.__init__(self, name, str(id))

    self.plot_types = ["freq_vs_phase", "flux_vs_phase", "time_vs_phase", "bandpass", "snr_vs_time"]
    self.plot_resses = ["lo", "hi"]
    self.valid_plots = []
    for plot_type in self.plot_types:
      for plot_res in self.plot_resses:
        self.valid_plots.append(plot_type + "_" + plot_res)

    self.zap_psh_script = "zap.psh"
    self.convert_psrfits = True
    self.psrfits_rf_filename = False
    self.nchan_plot = 1024
    self.beams = []
    self.subbands = []
    self.results = {}
    self.snr_history = {}

    self.snr_plot = SNRPlot()

    self.suffixes = { "flux_vs_phase_lo": "flux.lo.png",
                      "flux_vs_phase_hi": "flux.hi.png",
                      "freq_vs_phase_lo": "freq.lo.png",
                      "freq_vs_phase_hi": "freq.hi.png",
                      "time_vs_phase_lo": "time.lo.png",
                      "time_vs_phase_hi": "time.hi.png",
                      "snr_vs_time_lo":   "snrt.lo.png",
                      "snr_vs_time_hi":   "snrt.hi.png",
                      "bandpass_lo":      "band.lo.png",
                      "bandpass_hi":      "band.hi.png" }
    def __init__(self, name, id):
        Daemon.__init__(self, name, str(id))
        StreamBased.__init__(self, id, self.cfg)

        self.valid_plots = []
        self.results = {}

        self.results["lock"] = threading.Lock()
        self.results["valid"] = False

        (host, beam_id, sub_id) = self.cfg["STREAM_" + id].split(":")
        self.beam = self.cfg["BEAM_" + beam_id]

        (cfreq, bw, nchan) = self.cfg["SUBBAND_CONFIG_" + sub_id].split(":")
        self.cfreq = cfreq

        self.proc_dir = self.cfg["CLIENT_PREPROC_DIR"] + "/processing/" + \
            self.beam
        self.fin_dir = self.cfg["CLIENT_PREPROC_DIR"] + "/finished/" + \
            self.beam
        self.send_dir = self.cfg["CLIENT_PREPROC_DIR"] + "/send/" + \
            self.beam
        self.fail_dir = self.cfg["CLIENT_PREPROC_DIR"] + "/failed/" + \
            self.beam

        self.dirty_valid = False
        self.cleaned_valid = False
        self.gains_valid = False
示例#6
0
  def __init__ (self, name, id):
    Daemon.__init__(self, name, str(id))
    self.beams = []

    self.ftp_server = "sun-store.kat.ac.za"
    self.ftp_username = "******"
    self.ftp_password = "******"
示例#7
0
    def __init__(self, name, id):
        Daemon.__init__(self, name, str(id))
        StreamBased.__init__(self, id, self.cfg)

        self.configured = False
        self.running = False
        self.local_config = []
示例#8
0
    def __init__(self, name, id):
        Daemon.__init__(self, name, str(id))
        StreamBased.__init__(self, id, self.cfg)

        self.valid_plots = []
        self.results = {}

        self.results["lock"] = threading.Lock()
        self.results["valid"] = False

        (host, beam_id, sub_id) = self.cfg["STREAM_" + id].split(":")
        self.beam = self.cfg["BEAM_" + beam_id]

        (cfreq, bw, nchan) = self.cfg["SUBBAND_CONFIG_" + sub_id].split(":")
        self.cfreq = cfreq

        self.proc_dir = self.cfg["CLIENT_PREPROC_DIR"] + "/processing/" + \
            self.beam
        self.fin_dir = self.cfg["CLIENT_PREPROC_DIR"] + "/finished/" + \
            self.beam
        self.send_dir = self.cfg["CLIENT_PREPROC_DIR"] + "/send/" + \
            self.beam
        self.fail_dir = self.cfg["CLIENT_PREPROC_DIR"] + "/failed/" + \
            self.beam

        self.dirty_valid = False
        self.cleaned_valid = False
        self.gains_valid = False
示例#9
0
  def __init__ (self, name, id):
    Daemon.__init__(self, name, str(id))
    StreamBased.__init__(self, id, self.cfg)

    self.configured = False
    self.running = False
    self.local_config = []
示例#10
0
  def __init__ (self, name, id):
    Daemon.__init__(self, name, str(id))

    self.valid_plots = ["freq_vs_phase", "flux_vs_phase", "time_vs_phase", "bandpass", "snr_vs_time"]
    self.beams = []
    self.subbands = []
    self.results = {}
    self.source_number = 0
示例#11
0
    def __init__(self, name, id):
        Daemon.__init__(self, name, str(id))
        self.beam_state = {}
        self.cam_config = {}
        self.beam_config = {}
        self.tcs_host = "None"
        self.tcs_port = -1
        self.beam_name = "None"
        self.lmc = "None"
        self.repack = "None"
        self.beam = str(id)
        self.host = []
        self.katcp = []
        self.pubsub = []
        self.snr = 0
        self.stddev = 0

        if not (self.cfg["INDEPENDENT_BEAMS"] == "true"):
            raise Exception(
                "KATCPDaemon incompatible with INDEPENDENT_BEAMS != true")

        self.reset_cam_config()

        # get a list of all LMCs

        for i in range(int(self.cfg["NUM_STREAM"])):
            (host, beam, subband) = self.cfg["STREAM_" + str(i)].split(":")
            if (beam == self.beam):
                if not self.lmc == "None":
                    raise Exception("KATCPDaemon more than 1 matching lmc")
                self.lmc = host + ":" + self.cfg["LMC_PORT"]
                self.host = host

        self.lmc_cmd = "<?xml version=\"1.0\" encoding=\"ISO-8859-1\"?>" + \
                       "<lmc_cmd>" + \
                       "<requestor>katcp daemon</requestor>" + \
                       "<command>host_status</command>" + \
                       "</lmc_cmd>"

        self.cpu_temp_pattern = re.compile("cpu[0-9]+_temp")
        self.fan_speed_pattern = re.compile("fan[0-9,a-z]+")
        self.power_supply_pattern = re.compile("ps[0-9]+_status")

        # get a list of all the repacking scripts
        for i in range(int(self.cfg["NUM_STREAM"])):
            (host, beam, subband) = self.cfg["STREAM_" + str(i)].split(":")
            if beam == self.beam:
                if not self.repack == "None":
                    raise Exception("KATCPDaemon more than 1 matching repack")
                self.repack = host + ":" + str(
                    int(self.cfg["STREAM_REPACK_PORT"]) + i)
        self.repack_cmd = "<?xml version=\"1.0\" encoding=\"ISO-8859-1\"?>" + \
                          "<repack_request>" + \
                          "<requestor>katcp daemon</requestor>" + \
                          "<type>state</type>" + \
                          "</repack_request>"
示例#12
0
  def __init__ (self, name, id):
    Daemon.__init__(self, name, str(id))

    self.valid_plots = ["freq_vs_phase", "flux_vs_phase", "time_vs_phase", "bandpass", "snr_vs_time"]
    self.beam = ""
    self.subbands = []
    self.results = {}
    self.snr_history = {}

    self.snr_plot = SNRPlot()
示例#13
0
  def __init__ (self, name, id):
    Daemon.__init__(self, name, str(id))

    self.valid_plots = ["freq_vs_phase", "flux_vs_phase", "time_vs_phase", "bandpass", "snr_vs_time"]
    self.beams = []
    self.subbands = []
    self.results = {}
    self.snr_history = {}

    self.snr_plot = SNRPlot()
示例#14
0
    def __init__(self, name, id):
        Daemon.__init__(self, name, str(id))

        self.beam = ""
        self.subbands = []
        self.results = {}
        self.results["lock"] = threading.Lock()
        self.results["valid"] = False
        self.beam_name = ""
        self.valid_plots = ["timeseries", "histogram", "freqtime"]
示例#15
0
    def __init__(self, name, id):
        Daemon.__init__(self, name, str(id))

        self.valid_plots = [
            "freq_vs_phase", "flux_vs_phase", "time_vs_phase", "bandpass",
            "snr_vs_time"
        ]
        self.beams = []
        self.subbands = []
        self.results = {}
        self.source_number = 0
示例#16
0
  def __init__ (self, name, id):
    Daemon.__init__(self, name, str(id))
    self.beams = []

    self.rsync_username = "******"
    self.rsync_server = "herschel.atnf.csiro.au"
    self.rsync_module = "uwl_incoming"
    self.rsync_options =  "-ah --relative --stats --no-g --no-l --omit-dir-times " + \
                          "--password-file=/home/uwb/.ssh/herschel_pw --bwlimit=122070"

    self.num_rsync = 4
    self.rsync_servers = ["10.17.10.1", "10.17.10.1", "10.17.10.2", "10.17.10.2"]
    self.rsync_modules = ["uwl_incoming_0", "uwl_incoming_1", "uwl_incoming_2", "uwl_incoming_3"]
示例#17
0
  def __init__ (self, name, hostname):
    Daemon.__init__(self, name, hostname)
    HostBased.__init__(self, hostname, self.cfg)

    self.resource_lock = threading.Lock()

    self.resource_lock.acquire()

    self.disks = {}
    self.loads = { 'ncore': '0', '1min': '0', '5min': '0', '15min': '0' }
    self.ntp_sync = True
    self.smrbs = {}
    self.sensors = {}
    self.disks_to_monitor = []
示例#18
0
    def __init__(self, name, id):
        Daemon.__init__(self, name, str(id))
        self.beams = []

        self.rsync_username = "******"
        self.rsync_server = "herschel.atnf.csiro.au"
        self.rsync_module = "uwl_incoming"
        self.rsync_options =  "-ah --relative --stats --no-g --no-l --omit-dir-times " + \
                              "--password-file=/home/uwb/.ssh/herschel_pw --bwlimit=122070"

        self.num_rsync = 4
        self.rsync_servers = [
            "10.17.10.1", "10.17.10.1", "10.17.10.2", "10.17.10.2"
        ]
        self.rsync_modules = [
            "uwl_incoming_0", "uwl_incoming_1", "uwl_incoming_2",
            "uwl_incoming_3"
        ]
示例#19
0
    def __init__(self, name, id):
        Daemon.__init__(self, name, str(id))

        self.plot_types = [
            "freq_vs_phase", "flux_vs_phase", "time_vs_phase", "bandpass",
            "snr_vs_time"
        ]
        self.plot_resses = ["lo", "hi"]
        self.valid_plots = []
        for plot_type in self.plot_types:
            for plot_res in self.plot_resses:
                self.valid_plots.append(plot_type + "_" + plot_res)

        self.zap_psh_script = "zap.psh"
        self.convert_psrfits = True
        self.psrfits_rf_filename = False
        self.nchan_plot = 1024
        self.beams = []
        self.subbands = []
        self.results = {}
        self.snr_history = {}

        self.snr_plot = SNRPlot()

        self.suffixes = {
            "flux_vs_phase_lo": "flux.lo.png",
            "flux_vs_phase_hi": "flux.hi.png",
            "freq_vs_phase_lo": "freq.lo.png",
            "freq_vs_phase_hi": "freq.hi.png",
            "time_vs_phase_lo": "time.lo.png",
            "time_vs_phase_hi": "time.hi.png",
            "snr_vs_time_lo": "snrt.lo.png",
            "snr_vs_time_hi": "snrt.hi.png",
            "bandpass_lo": "band.lo.png",
            "bandpass_hi": "band.hi.png"
        }
示例#20
0
文件: spip_tcs.py 项目: ajameson/spip
 def __init__ (self, name, id):
   Daemon.__init__(self, name, str(id))
   self.beam_states = {}
   self.host = sockets.getHostNameShort()
   self.start_offset_seconds = 5
示例#21
0
    def __init__(self, name, id):
        Daemon.__init__(self, name, str(id))
        self.beam_state = {}
        self.cam_config = {}
        self.beam_config = {}
        self.tcs_host = "None"
        self.tcs_port = -1
        self.beam_name = "None"
        self.lmc = "None"
        self.repack = "None"
        self.beam = str(id)
        self.host = []
        self.katcp = []
        self.pubsub = []
        self.snr = 0
        self.stddev = 0

        if not (self.cfg["INDEPENDENT_BEAMS"] == "true"):
            raise Exception(
                "KATCPDaemon incompatible with INDEPENDENT_BEAMS != true")

        self.input_nchan = 0
        for i in range(int(self.cfg["NUM_STREAM"])):
            (cfreq, bw,
             nchan) = self.cfg["SUBBAND_CONFIG_" + str(i)].split(":")
            self.input_nchan = self.input_nchan + int(nchan)

        self.reset_cam_config()

        # get a list of all LMCs
        for i in range(int(self.cfg["NUM_STREAM"])):
            (host, beam, subband) = self.cfg["STREAM_" + str(i)].split(":")
            if (beam == self.beam):
                # if not self.lmc == "None":
                #   raise Exception ("KATCPDaemon more than 1 matching lmc")
                self.lmc = host + ":" + self.cfg["LMC_PORT"]
                self.host = host

        self.lmc_cmd = "<?xml version=\"1.0\" encoding=\"ISO-8859-1\"?>" + \
                       "<lmc_cmd>" + \
                       "<requestor>katcp daemon</requestor>" + \
                       "<command>host_status</command>" + \
                       "</lmc_cmd>"

        self.cpu_temp_pattern = re.compile("cpu[0-9]+_temp")
        self.fan_speed_pattern = re.compile("fan[0-9,a-z]+")
        self.power_supply_pattern = re.compile("ps[0-9]+_status")

        # get the repacking host:port for this beam
        for i in range(int(self.cfg["NUM_STREAM"])):
            (host, beam_id,
             subband_id) = self.cfg["STREAM_" + str(i)].split(":")
            # if the beam resides on this host
            if beam == self.beam:
                # if the current beam is not configured
                if self.repack == "None":
                    self.repack = host + ":" + str(
                        int(self.cfg["BEAM_REPACK_FOLD_PORT"]) + int(beam))

        if self.repack == "None":
            raise Exception("KATCPDaemon could not find beam repack daemon")

        self.repack_cmd = "<?xml version=\"1.0\" encoding=\"ISO-8859-1\"?>" + \
                          "<repack_request>" + \
                          "<requestor>katcp daemon</requestor>" + \
                          "<type>state</type>" + \
                          "</repack_request>"
示例#22
0
 def __init__(self, name, id):
     Daemon.__init__(self, name, str(id))
     self.beams = []
示例#23
0
 def __init__ (self, name, id):
   Daemon.__init__(self, name, str(id))
   self.beams = []
示例#24
0
文件: spip_lmc.py 项目: ewanbarr/spip
 def __init__(self, name, hostname):
     Daemon.__init__(self, name, hostname)
     HostBased.__init__(self, hostname, self.cfg)
示例#25
0
  def __init__ (self, name, id):
    Daemon.__init__(self, name, str(id))
    self.beam_state = {}
    self.cam_config = {}
    self.beam_config = {}
    self.tcs_host = "None"
    self.tcs_port = -1
    self.beam_name = "None"
    self.lmc = "None"
    self.repack = "None"
    self.beam = str(id)
    self.host = []
    self.katcp = []
    self.pubsub = []
    self.snr = 0
    self.stddev = 0

    if not (self.cfg["INDEPENDENT_BEAMS"] == "true"):
      raise Exception ("KATCPDaemon incompatible with INDEPENDENT_BEAMS != true")

    self.input_nchan = 0
    for i in range(int(self.cfg["NUM_STREAM"])):
      (cfreq, bw, nchan) = self.cfg["SUBBAND_CONFIG_" + str(i)].split(":")
      self.input_nchan = self.input_nchan + int(nchan)

    self.reset_cam_config()

    # get a list of all LMCs
    for i in range(int(self.cfg["NUM_STREAM"])):
      (host, beam, subband) = self.cfg["STREAM_" + str(i)].split(":")
      if (beam == self.beam):
        # if not self.lmc == "None":
        #   raise Exception ("KATCPDaemon more than 1 matching lmc")
        self.lmc = host +  ":" + self.cfg["LMC_PORT"]
        self.host = host

    self.lmc_cmd = "<?xml version=\"1.0\" encoding=\"ISO-8859-1\"?>" + \
                   "<lmc_cmd>" + \
                   "<requestor>katcp daemon</requestor>" + \
                   "<command>host_status</command>" + \
                   "</lmc_cmd>"

    self.cpu_temp_pattern  = re.compile("cpu[0-9]+_temp")
    self.fan_speed_pattern = re.compile("fan[0-9,a-z]+")
    self.power_supply_pattern = re.compile("ps[0-9]+_status")

    # get the repacking host:port for this beam
    for i in range(int(self.cfg["NUM_STREAM"])):
      (host, beam_id, subband_id) = self.cfg["STREAM_" + str(i)].split(":")
      # if the beam resides on this host
      if beam == self.beam:
        # if the current beam is not configured
        if self.repack == "None":
          self.repack = host + ":" + str(int(self.cfg["BEAM_REPACK_FOLD_PORT"]) + int(beam))
    
    if self.repack == "None":
      raise Exception ("KATCPDaemon could not find beam repack daemon")

    self.repack_cmd = "<?xml version=\"1.0\" encoding=\"ISO-8859-1\"?>" + \
                      "<repack_request>" + \
                      "<requestor>katcp daemon</requestor>" + \
                      "<type>state</type>" + \
                      "</repack_request>"
示例#26
0
 def __init__(self, name, id):
     Daemon.__init__(self, name, str(id))
     self.beam_states = {}
     self.host = sockets.getHostNameShort()
     self.start_offset_seconds = 20
示例#27
0
 def __init__(self, name, id):
     Daemon.__init__(self, name, str(id))
     self.timestamp_re = re.compile(
         "^\[\d\d\d\d-\d\d-\d\d-\d\d:\d\d:\d\d\.\d\d\d\d\d\d\]")
示例#28
0
 def __init__(self, name, id):
     Daemon.__init__(self, name, str(id))
     StreamBased.__init__(self, id, self.cfg)
示例#29
0
 def __init__(self, name, id):
     Daemon.__init__(self, name, str(id))
     self.beam_cfg = {}
     self.host = sockets.getHostNameShort()
示例#30
0
 def __init__ (self, name, id):
   Daemon.__init__(self, name, str(id))
   StreamBased.__init__(self, id, self.cfg)
示例#31
0
 def __init__ (self, name, id):
   Daemon.__init__(self, name, str(id))
   self.timestamp_re = re.compile ("^\[\d\d\d\d-\d\d-\d\d-\d\d:\d\d:\d\d\.\d\d\d\]")