def recordData(fileName='data/'+OBSERVATION, sun=True, moon=False,
        recordLength=60.0, verbose=False, showPlot=False):
    """Re-point telescope every t seconds.
        fileName (string
    Args:
    fileName (string, optional): Data file to record (in npz format). Data is saved
        as a dictionary with 5 items -- 'ra' records RA of the source
        in decimal hours, 'dec' records Dec in decimal degrees, 'lst'
        records the LST at the time that the voltage was measured, 'jd'
        records the JD at which the voltage was measured, and 'volts'
        records the measured voltage in units of Volts. Default is a file
        called 'voltdata.npz'.
    sun (bool, optional): If set to true, will record the Sun's RA and Dec to the
        file. Default is to record RA or Dec.
    moon (bool, optional): If set to true, will record the Moon's RA and Dec to the
        file. Default is not to record RA or Dec.
    recordLength(float, optional): Length to run the observations for, in seconds.
        Default will cause recordDVM to run until interrupted by Ctrl+C or
        terminal kill.
    verbose (bool, optional): If true, will print out information about each voltage
        measurement as it is taken.
    showPlot (bool, optional): If true, will show a live plot of the data being
        recorded to disk (requires X11 to be on).
    """
    logger = logging.getLogger('interf')
    try:
        logger.debug('Recording data for %f seconds', recordLength)
        radiolab.recordDVM(fileName, sun, moon, recordLength, verbose, showPlot)
    except Exception, e:
        logger.error(str(e))
Exemple #2
0
 def take_data(self):
     """Wrapper around radiolab.recordDVM that logs and sets the filename to the session name."""
     datafile = os.path.join(DATADIR, "{session}.npz".format(session=self.session))
     logger.info("Taking data for {session} to {datafile}".format(session=self.session, datafile=datafile))
     radiolab.recordDVM(
         filename=datafile, sun=type(self.source) is not ephem.FixedBody, verbose=True, showPlot=False
     )
Exemple #3
0
def recordData(fileName='data/' + "unknown_" +
               time.strftime("%m-%d-%Y_%H%M%S"),
               sun=False,
               moon=False,
               recordLength=60.0,
               verbose=False,
               showPlot=False):
    """
    Record data from the interferometer.

    Args:
    fileName (string, optional): Data file to record (in npz format). Data is saved
        as a dictionary with 5 items -- 'ra' records RA of the source
        in decimal hours, 'dec' records Dec in decimal degrees, 'lst'
        records the LST at the time that the voltage was measured, 'jd'
        records the JD at which the voltage was measured, and 'volts'
        records the measured voltage in units of Volts. Default is a file
        called 'voltdata.npz'.
    sun (bool, optional): If set to true, will record the Sun's RA and Dec to the
        file. Default is not to record RA or Dec.
    moon (bool, optional): If set to true, will record the Moon's RA and Dec to the
        file. Default is not to record RA or Dec.
    recordLength(float, optional): Length to run the observations for, in seconds.
        Default will cause recordDVM to run until interrupted by Ctrl+C or
        terminal kill.
    verbose (bool, optional): If true, will print out information about each voltage
        measurement as it is taken.
    showPlot (bool, optional): If true, will show a live plot of the data being
        recorded to disk (requires X11 to be on).
    """
    logger = logging.getLogger('interf')
    try:
        logger.debug('Recording data for %f seconds', recordLength)
        radiolab.recordDVM(fileName, sun, moon, recordLength, verbose,
                           showPlot)
    except Exception, e:
        logger.error(str(e))
def rec():

    rlb.recordDVM(filename='pnt.npz', recordLength=t_s)
Exemple #5
0
 def take_data(self):
     datafile = os.path.join(DATADIR, "{session}.npz".format(session=self.session))
     logger.info("Taking data for {session} to {datafile}".format(
         session=self.session, datafile=datafile))
     radiolab.recordDVM(filename=datafile, sun=type(self.source) is not ephem.FixedBody,
             verbose=True, showPlot=False)