Ejemplo n.º 1
0
def parse_taustartts(subtables):
    """ extract observation time from CASA table header
    """
    observation_table = subtables["LOFAR_OBSERVATION"]
    julianstart = observation_table.getcol("OBSERVATION_START")[0]
    unixstart = julian2unix(julianstart)
    taustart_ts = datetime.datetime.fromtimestamp(unixstart)
    return taustart_ts
Ejemplo n.º 2
0
 def parse_taustartts(self):
     """ extract image start time from CASA table header
     """
     # Note that we sort the table in order of ascending start time then choose
     # the first value to ensure we get the earliest possible starting time.
     observation_table = self.subtables['LOFAR_OBSERVATION']
     julianstart = observation_table.query(sortlist="OBSERVATION_START",
                                           limit=1).getcell(
                                               "OBSERVATION_START", 0)
     unixstart = julian2unix(julianstart)
     taustart_ts = datetime.datetime.fromtimestamp(unixstart)
     return taustart_ts
Ejemplo n.º 3
0
def parse_taustartts(subtables):
    """ extract image start time from CASA table header
    """
    # Note that we sort the table in order of ascending start time then choose
    # the first value to ensure we get the earliest possible starting time.
    observation_table = subtables['LOFAR_OBSERVATION']
    julianstart = observation_table.query(
        sortlist="OBSERVATION_START", limit=1).getcell(
        "OBSERVATION_START", 0
    )
    unixstart = julian2unix(julianstart)
    taustart_ts = datetime.datetime.fromtimestamp(unixstart)
    return taustart_ts
Ejemplo n.º 4
0
 def test_julian2unix(self):
     self.assertEqual(coordinates.julian2unix(coordinates.unix_epoch), 0)