Session and Observation Specification for a Single LWA Station

DP-Based Stations

class lsl.common.sdf.Observer(name, id, first=None, last=None)

Class to hold information about an observer.

class lsl.common.sdf.ProjectOffice(project=None, sessions=None, observations=None)

Class to hold comments from the LWA object office. This class isn’t really needed to create SD files, but it is helpful for parsing SD files.

class lsl.common.sdf.Project(observer, name, id, sessions=None, comments=None, projectOffice=None)

Class to hold all the information about a specific session for a project/proposal.

Changed in version 1.2.1: Added a new writeto() method to directly write the SDF to a file.

append(newSession)

Add a new Session to the list of sessions.

render(session=0, verbose=False)

Create a session definition file that corresponds to the specified session. Returns the SD file’s contents as a string.

update()

Update the various sessions that are part of this project.

validate(verbose=False)

Examine all of the sessions and all of their observations to check for validity. If everything is valid, return True. Otherwise, return False.

writeto(filename, session=0, verbose=False, clobber=False)

Create a session definition file that corresponds to the specified session and write it to the provided filename.

class lsl.common.sdf.Session(name, id, observations=None, dataReturnMethod='DRSU', comments=None, station=<ephem.Observer date='2019/12/19 18:49:34' epoch='2000/1/1 12:00:00' lon='-107:37:42.1' lat='34:04:08.0' elevation=2133.6m horizon=0:00:00.0 temp=15.0C pressure=0.0mBar>)

Class to hold all of the observations in a session.

append(newObservation)

Add a new Observation to the list of observations.

setConfigurationAuthority(value)

Set the configuration request authority to a particular value in the range of 0 to 65,535. Higher values provide higher authority to set FEE and ASP parameters.

setDRXBeam(value)

Set the beam to use in the range of 1 to 4 or -1 to let MCS decide.

setDataReturnMethod(method)

Set the data return method for the session. Valid values are: UCF, DRSU, and ‘USB Harddrives’.

setMIBRecordInterval(component, interval)

Set the record interval for one of the level-1 subsystems (ASP, DP_, etc.) to a particular value in minutes. A KeyError is raised if an invalid sub-system is specified.

Special Values are:
  • -1 = use the MCS default interval
  • 0 = never record the MIB entries (the entries are still updated, however)
setMIBUpdateInterval(component, interval)

Set the update interval for one of the level-1 subsystems (ASP, DP_, etc.) to a particular value in minutes. A KeyError is raised if an invalid sub-system is specified.

Special Values are:
  • -1 = use the MCS default interval
  • 0 = request no updates to the MIB entries
setSpectrometerChannels(value)

Set the number of spectrometer channels to generate, 0 to disable.

setSpectrometerIntegration(value)

Set the number of spectrometer FFT integrations to use, 0 to disable.

setSpectrometerMetatag(value)

Set the spectrometer metatag, ‘’ to disable.

setStation(station)

Update the station used by the project for source computations.

New in version 1.2.0.

setUCFUsername(username)

Set the username to use for UCF data copies.

update()

Update the various observations in the session.

validate(verbose=False)

Examine all of the observations associated with the session to check for validity. If everything is valid, return True. Otherwise, return False.

class lsl.common.sdf.Observation(name, target, start, duration, mode, ra, dec, frequency1, frequency2, filter, gain=-1, MaxSNR=False, comments=None)

Class to hold the specifics of an observations. It currently handles TBW, TBN, TRK_RADEC, TRK_SOL, TRK_JOV, and Stepped

Changed in version 1.0.0: Added support for RA/dec values as ephem.hours/ephem.degrees instances

computeVisibility(station=<ephem.Observer date='2019/12/19 18:49:34' epoch='2000/1/1 12:00:00' lon='-107:37:42.1' lat='34:04:08.0' elevation=2133.6m horizon=0:00:00.0 temp=15.0C pressure=0.0mBar>)

Place holder for functions that return the fractional visibility of the target during the observation period.

estimateBytes()

Place holder for functions that return the estimate size of the data set being defined by the observation.

getBeamType()

Return a valid value for beam type based on whether maximum S/N beam forming has been requested.

getDuration()

Parse the self.duration string with the format of HH:MM:SS.SSS to return the number of milliseconds in that period.

getFixedBody()

Place holder for functions that return ephem.Body objects (or None) that define the pointing center of the observation.

getFrequency1()

Return the number of “tuning words” corresponding to the first frequency.

getFrequency2()

Return the number of “tuning words” corresponding to the second frequency.

getMJD()

Return the modified Julian Date corresponding to the date/time of the self.start string.

getMPM()

Return the number of milliseconds between the date/time specified in the self.start string and the previous UT midnight.

setStart(start)

Set the observation start time.

update()

Update the computed parameters from the string values.

validate(station=<ephem.Observer date='2019/12/19 18:49:34' epoch='2000/1/1 12:00:00' lon='-107:37:42.1' lat='34:04:08.0' elevation=2133.6m horizon=0:00:00.0 temp=15.0C pressure=0.0mBar>, verbose=False)

Place holder for functions that evaluate the observation and return True if it is valid, False otherwise.

class lsl.common.sdf.TBW(name, target, start, samples, bits=12, comments=None)

Sub-class of Observation specifically for TBW observations. It features a reduced number of parameters needed to setup the observation and provides extra information about the number of data bits and the number of samples.

Note

TBW read-out times in ms are calculated using (samples/196000+1)*5000 per MCS

Required Arguments:
  • observation name
  • observation target
  • observation start date/time (UTC YYYY/MM/DD HH:MM:SS.SSS string)
  • integer number of samples
Optional Keywords:
  • bits - number of data bits (4 or 12)
  • comments - comments about the observation
estimateBytes()

Estimate the data volume for the specified type and duration of observations. For TBW:

bytes = samples / samplesPerFrame * 1224 bytes * 260 stands
update()

Update the computed parameters from the string values.

validate(station=<ephem.Observer date='2019/12/19 18:49:34' epoch='2000/1/1 12:00:00' lon='-107:37:42.1' lat='34:04:08.0' elevation=2133.6m horizon=0:00:00.0 temp=15.0C pressure=0.0mBar>, verbose=False)

Evaluate the observation and return True if it is valid, False otherwise.

class lsl.common.sdf.TBN(name, target, start, duration, frequency, filter, gain=-1, comments=None)

Sub-class of Observation specifically for TBN observations. It features a reduced number of parameters needed to setup the observation.

Required Arguments:
  • observation name
  • observation target
  • observation start date/time (UTC YYYY/MM/DD HH:MM:SS.SSS string or timezone- aware datetime instance)
  • observation duration (HH:MM:SS.SSS string or timedelta instance)
  • observation frequency (Hz)
  • integer filter code
Optional Keywords:
  • comments - comments about the observation
estimateBytes()

Estimate the data volume for the specified type and duration of observations. For TBN:

bytes = duration * sampleRate / 512 * 1048 bytes * 260 stands * 2 pols.
setDuration(duration)

Set the observation duration.

setFrequency1(frequency1)

Set the frequency in Hz corresponding to tuning 1.

validate(station=<ephem.Observer date='2019/12/19 18:49:34' epoch='2000/1/1 12:00:00' lon='-107:37:42.1' lat='34:04:08.0' elevation=2133.6m horizon=0:00:00.0 temp=15.0C pressure=0.0mBar>, verbose=False)

Evaluate the observation and return True if it is valid, False otherwise.

..note::
This version of sdf allows for TBN tuning between 5 and 93 MHz.
class lsl.common.sdf.DRX(name, target, start, duration, ra, dec, frequency1, frequency2, filter, gain=-1, MaxSNR=False, comments=None)
Required Arguments:
  • observation name
  • observation target
  • observation start date/time (UTC YYYY/MM/DD HH:MM:SS.SSS string or timezone- aware datetime instance)
  • observation duration (HH:MM:SS.SSS string or timedelta instance)
  • observation RA in hours, J2000.0 or ephem.hours instance
  • observation Dec in degrees, J2000.0 or ephem.hours instance
  • observation tuning frequency 1 (Hz)
  • observation tuning frequency 1 (Hz)
  • integer filter code
Optional Keywords:
  • MaxSNR - specifies if maximum signal-to-noise beam forming is to be used

    (default = False)

  • comments - comments about the observation

setDec(dec)

Set the pointing Dec.

setRA(ra)

Set the pointing RA.

class lsl.common.sdf.Solar(name, target, start, duration, frequency1, frequency2, filter, gain=-1, MaxSNR=False, comments=None)

Sub-class of DRX specifically for Solar DRX observations. It features a reduced number of parameters needed to setup the observation.

Required Arguments:
  • observation name
  • observation target
  • observation start date/time (UTC YYYY/MM/DD HH:MM:SS.SSS string or timezone- aware datetime instance)
  • observation duration (HH:MM:SS.SSS string or timedelta instance)
  • observation tuning frequency 1 (Hz)
  • observation tuning frequency 1 (Hz)
  • integer filter code
Optional Keywords:
  • MaxSNR - specifies if maximum signal-to-noise beam forming is to be used

    (default = False)

  • comments - comments about the observation

getFixedBody()

Return an ephem.Body object corresponding to where the observation is pointed. None if the observation mode is either TBN or TBW.

class lsl.common.sdf.Jovian(name, target, start, duration, frequency1, frequency2, filter, gain=-1, MaxSNR=False, comments=None)

Sub-class of DRX specifically for Jovian DRX observations. It features a reduced number of parameters needed to setup the observation.

Required Arguments:
  • observation name
  • observation target
  • observation start date/time (UTC YYYY/MM/DD HH:MM:SS.SSS string or timezone- aware datetime instance)
  • observation duration (HH:MM:SS.SSS string or timedelta instance)
  • observation tuning frequency 1 (Hz)
  • observation tuning frequency 1 (Hz)
  • integer filter code
Optional Keywords:
  • MaxSNR - specifies if maximum signal-to-noise beam forming is to be used

    (default = False)

  • comments - comments about the observation

getFixedBody()

Return an ephem.Body object corresponding to where the observation is pointed. None if the observation mode is either TBN or TBW.

class lsl.common.sdf.Stepped(name, target, start, filter, steps=None, RADec=True, gain=-1, comments=None)

Sub-class of Observation for dealing with STEPPED-mode observations. It features a reduced number of parameters needed to setup the observation and added support for the individual steps.

Required Arguments:
  • observation name
  • observation target
  • observation start date/time (UTC YYYY/MM/DD HH:MM:SS.SSS string or timezone- aware datetime instance)
  • integer filter code
Optional Keywords:
  • steps - array of BeamStep objects that specify the different steps
  • comments - comments about the observation
append(newStep)

Add a new BeamStep step to the list of steps.

computeVisibility(station=<ephem.Observer date='2019/12/19 18:49:34' epoch='2000/1/1 12:00:00' lon='-107:37:42.1' lat='34:04:08.0' elevation=2133.6m horizon=0:00:00.0 temp=15.0C pressure=0.0mBar>)

Return the fractional visibility of the target during the observation period.

estimateBytes()

Estimate the data volume for the specified type and duration of observations. For DRX:

bytes = duration * sampleRate / 4096 * 4128 bytes * 2 tunings * 2 pols.
getDuration()

Parse the list of BeamStep objects to get the total observation duration as the number of milliseconds in that period.

setBeamDipoleMode(stand, beamGain=0.04, dipoleGain=1.0, pol='X', station=<ephem.Observer date='2019/12/19 18:49:34' epoch='2000/1/1 12:00:00' lon='-107:37:42.1' lat='34:04:08.0' elevation=2133.6m horizon=0:00:00.0 temp=15.0C pressure=0.0mBar>)

Convert the current observation to a ‘beam-dipole mode’ observation with the specified stand. Setting the stand to zero will disable the ‘beam-dipole mode’ for this observation’.

Keywords:
  • beamGain - BAM gain to use for each dipole in the beam

    default: 0.04; range: 0.0 to 1.0

  • dipoleGain - BAM gain to use for the single dipole

    default: 1.0; range: 0.0 to 1.0

  • pol - Polarization to record default: “X”

  • station - lsl.common.stations instance to use for mapping

    default: lsl.common.stations.lwa1

update()

Update the computed parameters from the string values.

validate(station=<ephem.Observer date='2019/12/19 18:49:34' epoch='2000/1/1 12:00:00' lon='-107:37:42.1' lat='34:04:08.0' elevation=2133.6m horizon=0:00:00.0 temp=15.0C pressure=0.0mBar>, verbose=False)

Evaluate the observation and return True if it is valid, False otherwise.

class lsl.common.sdf.BeamStep(c1, c2, duration, frequency1, frequency2, RADec=True, MaxSNR=False, SpecDelays=None, SpecGains=None)

Class for holding all of the information (pointing center, tuning frequencies, etc.)associated with a particular step.

Required Keywords:
  • pointing coordinate 1 (RA [hours] or azimuth [degrees] or ephem.hours/ephem.degrees instance)
  • pointing coordinate 2 (dec or elevation/altitude [degrees] or ephem.degrees instance)
  • observation duration (HH:MM:SS.SSS string or timedelta instance)
  • observation tuning frequency 1 (Hz)
  • observation tuning frequency 1 (Hz)
Optional Keywords:
  • RADec - whether the coordinates are in RA/Dec or Az/El pairs (default=RA/Dec)

  • MaxSNR - specifies if maximum signal-to-noise beam forming is to be used

    (default = False)

  • SpecDelays - 520 list of delays to apply for each antenna

  • SpecGains - 260 by 2 by 2 list of gains ([[XY, XY], [YX, YY]]) to apply for each antenna

If SpecDelays is specified, SpecGains must also be specified. Specifying both SpecDelays and SpecGains overrides the MaxSNR keyword.

Changed in version 1.0.0: Added support for azimuth/altitude and RA/dec values as ephem.hours/ephem.degrees instances

getBeamType()

Return a valid value for beam type based on whether maximum S/N beam forming has been requested.

getDuration()

Parse the self.duration string with the format of HH:MM:SS.SSS to return the number of milliseconds in that period.

getFixedBody()

Return an ephem.Body object corresponding to where the observation is pointed. None if the observation mode is either TBN or TBW.

getFrequency1()

Return the number of “tuning words” corresponding to the first frequency.

getFrequency2()

Return the number of “tuning words” corresponding to the second frequency.

setC1(c1)

Set the pointing c1.

setC2(c2)

Set the pointing c2

setDuration(duration)

Set the observation duration.

setFrequency1(frequency1)

Set the frequency in Hz corresponding to tuning 1.

setFrequency2(frequency2)

Set the frequency in Hz correpsonding to tuning 2.

update()

Update the settings.

validate(station=<ephem.Observer date='2019/12/19 18:49:34' epoch='2000/1/1 12:00:00' lon='-107:37:42.1' lat='34:04:08.0' elevation=2133.6m horizon=0:00:00.0 temp=15.0C pressure=0.0mBar>, verbose=False)

Evaluate the step and return True if it is valid, False otherwise.

lsl.common.sdf.parseSDF(filename, verbose=False)

Given a filename, read the file’s contents into the SDM instance and return that instance.

lsl.common.sdf.getObservationStartStop(obs)

Given an observation, get the start and stop times (returned as a two- element tuple of UTC datetime instances).

New in version 1.0.0.

lsl.common.sdf.isValid(filename, verbose=False)

Given a filename, see if it is valid SDF file or not.

New in version 1.2.0.

ADP-Based Stations

class lsl.common.sdfADP.Observer(name, id, first=None, last=None)

Class to hold information about an observer.

class lsl.common.sdfADP.ProjectOffice(project=None, sessions=None, observations=None)

Class to hold comments from the LWA object office. This class isn’t really needed to create SD files, but it is helpful for parsing SD files.

class lsl.common.sdfADP.Project(observer, name, id, sessions=None, comments=None, projectOffice=None)

Class to hold all the information about a specific session for a project/proposal.

Changed in version 1.2.1: Added a new writeto() method to directly write the SDF to a file.

append(newSession)

Add a new Session to the list of sessions.

render(session=0, verbose=False)

Create a session definition file that corresponds to the specified session. Returns the SD file’s contents as a string.

update()

Update the various sessions that are part of this project.

validate(verbose=False)

Examine all of the sessions and all of their observations to check for validity. If everything is valid, return True. Otherwise, return False.

writeto(filename, session=0, verbose=False, clobber=False)

Create a session definition file that corresponds to the specified session and write it to the provided filename.

class lsl.common.sdfADP.Session(name, id, observations=None, dataReturnMethod='DRSU', comments=None, station=<ephem.Observer date='2019/12/19 18:49:35' epoch='2000/1/1 12:00:00' lon='-106:53:08.8' lat='34:20:54.1' elevation=1477.8m horizon=0:00:00.0 temp=15.0C pressure=0.0mBar>)

Class to hold all of the observations in a session.

append(newObservation)

Add a new Observation to the list of observations.

setConfigurationAuthority(value)

Set the configuration request authority to a particular value in the range of 0 to 65,535. Higher values provide higher authority to set FEE and ASP parameters.

setDRXBeam(value)

Set the beam to use in the range of 1 to 4 or -1 to let MCS decide.

setDataReturnMethod(method)

Set the data return method for the session. Valid values are: UCF, DRSU, and ‘USB Harddrives’.

setMIBRecordInterval(component, interval)

Set the record interval for one of the level-1 subsystems (ASP, DP_, etc.) to a particular value in minutes. A KeyError is raised if an invalid sub-system is specified.

Special Values are:
  • -1 = use the MCS default interval
  • 0 = never record the MIB entries (the entries are still updated, however)
setMIBUpdateInterval(component, interval)

Set the update interval for one of the level-1 subsystems (ASP, DP_, etc.) to a particular value in minutes. A KeyError is raised if an invalid sub-system is specified.

Special Values are:
  • -1 = use the MCS default interval
  • 0 = request no updates to the MIB entries
setSpectrometerChannels(value)

Set the number of spectrometer channels to generate, 0 to disable.

setSpectrometerIntegration(value)

Set the number of spectrometer FFT integrations to use, 0 to disable.

setSpectrometerMetatag(value)

Set the spectrometer metatag, ‘’ to disable.

setStation(station)

Update the station used by the project for source computations.

New in version 1.2.0.

setUCFUsername(username)

Set the username to use for UCF data copies.

update()

Update the various observations in the session.

validate(verbose=False)

Examine all of the observations associated with the session to check for validity. If everything is valid, return True. Otherwise, return False.

class lsl.common.sdfADP.Observation(name, target, start, duration, mode, ra, dec, frequency1, frequency2, filter, gain=-1, MaxSNR=False, comments=None)

Class to hold the specifics of an observations. It currently handles TBN, TRK_RADEC, TRK_SOL, TRK_JOV, and Stepped

Changed in version 1.0.0: Added support for RA/dec values as ephem.hours/ephem.degrees instances

computeVisibility(station=<ephem.Observer date='2019/12/19 18:49:35' epoch='2000/1/1 12:00:00' lon='-106:53:08.8' lat='34:20:54.1' elevation=1477.8m horizon=0:00:00.0 temp=15.0C pressure=0.0mBar>)

Place holder for functions that return the fractional visibility of the target during the observation period.

estimateBytes()

Place holder for functions that return the estimate size of the data set being defined by the observation.

getBeamType()

Return a valid value for beam type based on whether maximum S/N beam forming has been requested.

getDuration()

Parse the self.duration string with the format of HH:MM:SS.SSS to return the number of milliseconds in that period.

getFixedBody()

Place holder for functions that return ephem.Body objects (or None) that define the pointing center of the observation.

getFrequency1()

Return the number of “tuning words” corresponding to the first frequency.

getFrequency2()

Return the number of “tuning words” corresponding to the second frequency.

getMJD()

Return the modified Julian Date corresponding to the date/time of the self.start string.

getMPM()

Return the number of milliseconds between the date/time specified in the self.start string and the previous UT midnight.

setStart(start)

Set the observation start time.

update()

Update the computed parameters from the string values.

validate(station=<ephem.Observer date='2019/12/19 18:49:35' epoch='2000/1/1 12:00:00' lon='-106:53:08.8' lat='34:20:54.1' elevation=1477.8m horizon=0:00:00.0 temp=15.0C pressure=0.0mBar>, verbose=False)

Place holder for functions that evaluate the observation and return True if it is valid, False otherwise.

class lsl.common.sdfADP.TBN(name, target, start, duration, frequency, filter, gain=-1, comments=None)

Sub-class of Observation specifically for TBN observations. It features a reduced number of parameters needed to setup the observation.

Required Arguments:
  • observation name
  • observation target
  • observation start date/time (UTC YYYY/MM/DD HH:MM:SS.SSS string or timezone- aware datetime instance)
  • observation duration (HH:MM:SS.SSS string or timedelta instance)
  • observation frequency (Hz)
  • integer filter code
Optional Keywords:
  • comments - comments about the observation
estimateBytes()

Estimate the data volume for the specified type and duration of observations. For TBN:

bytes = duration * sampleRate / 512 * 1048 bytes * 256 stands * 2 pols.
setDuration(duration)

Set the observation duration.

setFrequency1(frequency1)

Set the frequency in Hz corresponding to tuning 1.

validate(station=<ephem.Observer date='2019/12/19 18:49:35' epoch='2000/1/1 12:00:00' lon='-106:53:08.8' lat='34:20:54.1' elevation=1477.8m horizon=0:00:00.0 temp=15.0C pressure=0.0mBar>, verbose=False)

Evaluate the observation and return True if it is valid, False otherwise.

..note::
This version of sdf allows for TBN tuning between 5 and 93 MHz.
class lsl.common.sdfADP.DRX(name, target, start, duration, ra, dec, frequency1, frequency2, filter, gain=-1, MaxSNR=False, comments=None)
Required Arguments:
  • observation name
  • observation target
  • observation start date/time (UTC YYYY/MM/DD HH:MM:SS.SSS string or timezone- aware datetime instance)
  • observation duration (HH:MM:SS.SSS string or timedelta instance)
  • observation RA in hours, J2000.0 or ephem.hours instance
  • observation Dec in degrees, J2000.0 or ephem.hours instance
  • observation tuning frequency 1 (Hz)
  • observation tuning frequency 1 (Hz)
  • integer filter code
Optional Keywords:
  • MaxSNR - specifies if maximum signal-to-noise beam forming is to be used

    (default = False)

  • comments - comments about the observation

setDec(dec)

Set the pointing Dec.

setRA(ra)

Set the pointing RA.

class lsl.common.sdfADP.Solar(name, target, start, duration, frequency1, frequency2, filter, gain=-1, MaxSNR=False, comments=None)

Sub-class of DRX specifically for Solar DRX observations. It features a reduced number of parameters needed to setup the observation.

Required Arguments:
  • observation name
  • observation target
  • observation start date/time (UTC YYYY/MM/DD HH:MM:SS.SSS string or timezone- aware datetime instance)
  • observation duration (HH:MM:SS.SSS string or timedelta instance)
  • observation tuning frequency 1 (Hz)
  • observation tuning frequency 1 (Hz)
  • integer filter code
Optional Keywords:
  • MaxSNR - specifies if maximum signal-to-noise beam forming is to be used

    (default = False)

  • comments - comments about the observation

getFixedBody()

Return an ephem.Body object corresponding to where the observation is pointed. None if the observation mode is TBN.

class lsl.common.sdfADP.Jovian(name, target, start, duration, frequency1, frequency2, filter, gain=-1, MaxSNR=False, comments=None)

Sub-class of DRX specifically for Jovian DRX observations. It features a reduced number of parameters needed to setup the observation.

Required Arguments:
  • observation name
  • observation target
  • observation start date/time (UTC YYYY/MM/DD HH:MM:SS.SSS string or timezone- aware datetime instance)
  • observation duration (HH:MM:SS.SSS string or timedelta instance)
  • observation tuning frequency 1 (Hz)
  • observation tuning frequency 1 (Hz)
  • integer filter code
Optional Keywords:
  • MaxSNR - specifies if maximum signal-to-noise beam forming is to be used

    (default = False)

  • comments - comments about the observation

getFixedBody()

Return an ephem.Body object corresponding to where the observation is pointed. None if the observation mode is TBN.

class lsl.common.sdfADP.Stepped(name, target, start, filter, steps=None, RADec=True, gain=-1, comments=None)

Sub-class of Observation for dealing with STEPPED-mode observations. It features a reduced number of parameters needed to setup the observation and added support for the individual steps.

Required Arguments:
  • observation name
  • observation target
  • observation start date/time (UTC YYYY/MM/DD HH:MM:SS.SSS string or timezone- aware datetime instance)
  • integer filter code
Optional Keywords:
  • steps - array of BeamStep objects that specify the different steps
  • comments - comments about the observation
append(newStep)

Add a new BeamStep step to the list of steps.

computeVisibility(station=<ephem.Observer date='2019/12/19 18:49:35' epoch='2000/1/1 12:00:00' lon='-106:53:08.8' lat='34:20:54.1' elevation=1477.8m horizon=0:00:00.0 temp=15.0C pressure=0.0mBar>)

Return the fractional visibility of the target during the observation period.

estimateBytes()

Estimate the data volume for the specified type and duration of observations. For DRX:

bytes = duration * sampleRate / 4096 * 4128 bytes * 2 tunings * 2 pols.
getDuration()

Parse the list of BeamStep objects to get the total observation duration as the number of milliseconds in that period.

setBeamDipoleMode(stand, beamGain=0.04, dipoleGain=1.0, pol='X', station=<ephem.Observer date='2019/12/19 18:49:35' epoch='2000/1/1 12:00:00' lon='-106:53:08.8' lat='34:20:54.1' elevation=1477.8m horizon=0:00:00.0 temp=15.0C pressure=0.0mBar>)

Convert the current observation to a ‘beam-dipole mode’ observation with the specified stand. Setting the stand to zero will disable the ‘beam-dipole mode’ for this observation’.

Keywords:
  • beamGain - BAM gain to use for each dipole in the beam

    default: 0.04; range: 0.0 to 1.0

  • dipoleGain - BAM gain to use for the single dipole

    default: 1.0; range: 0.0 to 1.0

  • pol - Polarization to record default: “X”

  • station - lsl.common.stations instance to use for mapping

    default: lsl.common.stations.lwasv

update()

Update the computed parameters from the string values.

validate(station=<ephem.Observer date='2019/12/19 18:49:35' epoch='2000/1/1 12:00:00' lon='-106:53:08.8' lat='34:20:54.1' elevation=1477.8m horizon=0:00:00.0 temp=15.0C pressure=0.0mBar>, verbose=False)

Evaluate the observation and return True if it is valid, False otherwise.

class lsl.common.sdfADP.BeamStep(c1, c2, duration, frequency1, frequency2, RADec=True, MaxSNR=False, SpecDelays=None, SpecGains=None)

Class for holding all of the information (pointing center, tuning frequencies, etc.)associated with a particular step.

Required Keywords:
  • pointing coordinate 1 (RA [hours] or azimuth [degrees] or ephem.hours/ephem.degrees instance)
  • pointing coordinate 2 (dec or elevation/altitude [degrees] or ephem.degrees instance)
  • observation duration (HH:MM:SS.SSS string or timedelta instance)
  • observation tuning frequency 1 (Hz)
  • observation tuning frequency 1 (Hz)
Optional Keywords:
  • RADec - whether the coordinates are in RA/Dec or Az/El pairs (default=RA/Dec)

  • MaxSNR - specifies if maximum signal-to-noise beam forming is to be used

    (default = False)

  • SpecDelays - 512 list of delays to apply for each antenna

  • SpecGains - 256 by 2 by 2 list of gains ([[XY, XY], [YX, YY]]) to apply for each antenna

If SpecDelays is specified, SpecGains must also be specified. Specifying both SpecDelays and SpecGains overrides the MaxSNR keyword.

Changed in version 1.0.0: Added support for azimuth/altitude and RA/dec values as ephem.hours/ephem.degrees instances

getBeamType()

Return a valid value for beam type based on whether maximum S/N beam forming has been requested.

getDuration()

Parse the self.duration string with the format of HH:MM:SS.SSS to return the number of milliseconds in that period.

getFixedBody()

Return an ephem.Body object corresponding to where the observation is pointed. None if the observation mode is TBN.

getFrequency1()

Return the number of “tuning words” corresponding to the first frequency.

getFrequency2()

Return the number of “tuning words” corresponding to the second frequency.

setC1(c1)

Set the pointing c1.

setC2(c2)

Set the pointing c2

setDuration(duration)

Set the observation duration.

setFrequency1(frequency1)

Set the frequency in Hz corresponding to tuning 1.

setFrequency2(frequency2)

Set the frequency in Hz correpsonding to tuning 2.

update()

Update the settings.

validate(station=<ephem.Observer date='2019/12/19 18:49:35' epoch='2000/1/1 12:00:00' lon='-106:53:08.8' lat='34:20:54.1' elevation=1477.8m horizon=0:00:00.0 temp=15.0C pressure=0.0mBar>, verbose=False)

Evaluate the step and return True if it is valid, False otherwise.

lsl.common.sdfADP.parseSDF(filename, verbose=False)

Given a filename, read the file’s contents into the SDM instance and return that instance.

lsl.common.sdfADP.getObservationStartStop(obs)

Given an observation, get the start and stop times (returned as a two- element tuple of UTC datetime instances).

New in version 1.0.0.

lsl.common.sdfADP.isValid(filename, verbose=False)

Given a filename, see if it is valid SDF file or not.

New in version 1.2.0.

Table Of Contents

Previous topic

Station Meta-Data

Next topic

Run and Scan Specification for the LWA Swarm

This Page