def read_info(self):
    self.obs_info_file = os.path.join(self.results_dir, self.utc, 'obs.info')
    if (not os.path.exists(self.obs_info_file)):
        raise Exception('obs.info file({0}) does not exist'.format(self.obs_info_file))
    with open(self.obs_info_file) as h:
        lines = h.readlines()
    hdr_tmp = {}
    for line in lines:
        if (line.startswith('#') or (line == '') or (line == '\n')):
            continue
        key = line.split()[0].strip()
        val = line.split()[1].strip()
        val = self.check_type(val)
        hdr_tmp[key] = val
        if ((key == 'INT') and self.is_failed):
            val = 0
    keys = hdr_tmp.keys()
    values = hdr_tmp.values()
    tmp = namedtuple('INFO', keys)
    self.info = tmp(*values)
    filterbank_name = (self.utc + '.fil')
    filterbank_file = os.path.join(self.archives_dir, self.utc, 'FB/BEAM_001/', filterbank_name)
    if os.path.exists(filterbank_file):
        filt_header = F(filterbank_file).header
        self.tobs = filt_header.tobs
        if (self.info.INT > self.tobs):
            self.tobs = self.info.INT
    else:
        self.tobs = self.info.INT
    return self.info
def read_info(self):
    self.obs_info_file = os.path.join(self.results_dir, self.utc, 'obs.info')
    if (not os.path.exists(self.obs_info_file)):
        raise Exception('obs.info file({0}) does not exist'.format(self.obs_info_file))
    with open(self.obs_info_file) as h:
        lines = h.readlines()
    hdr_tmp = {}
    for line in lines:
        if (line.startswith('#') or (line == ) or (line == '\n')):
            continue
        key = line.split()[0].strip()
        val = line.split()[1].strip()
        val = self.check_type(val)
        hdr_tmp[key] = val
        if ((key == 'INT') and self.is_failed):
            val = 0
    keys = hdr_tmp.keys()
    values = hdr_tmp.values()
    tmp = namedtuple('INFO', keys)
    self.info = tmp(*values)
    filterbank_name = (self.utc + '.fil')
    filterbank_file = os.path.join(self.archives_dir, self.utc, 'FB/BEAM_001/', filterbank_name)
    if os.path.exists(filterbank_file):
        filt_header = F(filterbank_file).header
        self.tobs = filt_header.tobs
        if (self.info.INT > self.tobs):
            self.tobs = self.info.INT
    else:
        self.tobs = self.info.INT
    return self.info