Station Meta-Data

Station-Level Data

lsl.common.stations.geo2ecef(lat, lon, elev)

Convert latitude (rad), longitude (rad), elevation (m) to earth- centered, earth-fixed coordinates.

class lsl.common.stations.LWAStation(name, lat, long, elev, id='', antennas=None)

Object to hold information about the a LWA station. This object can create a ephem.Observer representation of itself and identify which stands were in use at a given time. Stores station:

  • Name (name)
  • ID code (id)
  • Latitiude in radians [but initialized as degrees] (N is positive, lat)
  • Longitude in radians [but initialized as degrees] (W is negative, lon)
  • Elevation in meters (elev)
  • List of Antenna instances (antennas)

LWAStation also provides several functional attributes for dealing with the station’s location on Earth. These include:

  • getObserver: Return an ephem.Observer instance representing the station
  • getAIPYLocation: Return a tuple for setting the location of an AIPY AntennaArray instance
  • getGeocentricLocation: Return a tuple of the EC-EF coordinates of the station
  • getECEFTransform: Return a 3x3 tranformation matrix to convert antenna positions to EC-EF coordinates
getAIPYLocation()

Return a tuple that can be used by AIPY for specifying a array location.

getAntennas()

Return the list of Antenna instances for the station, sorted by digitizer number.

getCables()

Return a list of Cable instances for each antenna, sorted by digitizer number.

getECEFTransform()

Return a 3x3 tranformation matrix that converts a baseline in [east, north, elevation] to earh-centered, earth-fixed coordinates for that baseline [x, y, z]. Based off the ‘local_to_eci’ function in the lwda_fits-dev library.

getGeocentricLocation()

Return a tuple with earth-centered, earth-fixed coordinates for the station.

getObserver(date=None, JD=False)

Return a ephem.Observer object for this site.

getPols()

Return a list of polarization (0 == N-S; 1 == E-W) for each antenna, sorted by digitizer number.

getStands()

Return a list of Stand instances for each antenna, sorted by digitizer number.

class lsl.common.stations.Antenna(id, arx=0, board=0, digitizer=0, stand=None, pol=0, theta=0.0, phi=0.0, fee=None, feePort=1, cable=None, status=0)
Object to store the information about an antenna. Stores antenna:
  • ID number (id)
  • DP1 board number (board)
  • DP1 digitizer number (digiziter)
  • Stand instance the antenna is part of (stand)
  • Polarization (0 == N-S; pol)
  • Antenna vertial mis-alignment in degrees (theta)
  • Antenna rotation mis-alignment in degrees (phi)
  • Fee instance the antenna is attached to (fee)
  • Port of the FEE used for the antenna (feePort)
  • Cable instance used to connect the antenna (cable)
  • Status of the antenna (status)
Status codes are:
  • 0 == Not installed
  • 1 == Bad
  • 2 == Suspect, possibly bad
  • 3 == OK
getStatus()

Return the combined antenna + FEE status as a two digit number with the first digit representing the antenna status and the second the FEE status.

class lsl.common.stations.Stand(id, x, y, z)

Object to store the information (location and ID) about a stand. Stores stand:

  • ID number (id)
  • Position relative to the center stake in meters (x,y,z)
class lsl.common.stations.FEE(id, idNumber, gain1=0, gain2=0, status=0)
Object to store the information about a FEE. Stores FEE:
  • ID name (id)
  • ID number (idNumber)
  • Gain of port 1 (gain1)
  • Gain of part 2 (gain2)
  • Status (status)
Status codes are:
  • 0 == Not installed
  • 1 == Bad
  • 2 == Suspect, possibly bad
  • 3 == OK
class lsl.common.stations.Cable(id, length, vf=0, dd=0, a0=0.00428, a1=0.0, aFreq=10000000.0, stretch=1.0)
Object to store information about a cable. Stores cable:
  • ID name (id)
  • Length in meters (length)
  • Velocity factor (fractional, vf)
  • Dispersive delay (seconds, dd)
  • Gain term that goes as the square root of frequency (a0)
  • Gain term that goes as frequency (a1)
  • Gain term reference frequency (Hz, aFreq)
  • Cable length stretch factor (stretch)
  • Clock offset (seconds, clockOffset)

The object also as a functional attribute named ‘delay’ that computes the cable delay for a particular frequency or collection of frequencies in Hz.

attenuation(frequency=49000000.0)

Get the multiplicative factor needed to correct for the cable loss for a specific frequency (in Hz). If attenuations for more than one frequency are needed, the frequencies can be passed in as a numpy array.

clearClockOffset()

Clear the clock offset of the cable model.

delay(frequency=49000000.0, ns=False)

Get the delay associated with the cable in second (or nanoseconds if the ‘ns’ keyword is set to True) for a particular frequency or collection of frequencies in Hz.

gain(frequency=49000000.0)

Get the cable gain (“inverse loss”) for a specific frequency (in Hz). If gains for more than one frequency are needed, the frequencies can be passed in as a numpy array.

setClockOffset(offset)

Add a clock offset (in seconds) to the cable model.

class lsl.common.stations.ARX(id, channel=0, aspChannel=0)
Object to store information about a ARX board/channel combination. Stores ARX:
  • ID name (id)
  • Channel number (channel; 1-16)
  • ASP channel number (aspChannel; 1-520)

The object also as a functional attribute named ‘delay’ that computes the cable delay for a particular frequency or collection of frequencies in Hz.

response(filter='full')

Return a two-element tuple (freq in Hz, S21 magnitude in dB) for the ARX response for the current board/channel.

Filter options are:
  • 1 or ‘full’
  • 2 or ‘reduced’
  • 3 or ‘split’
lsl.common.stations.parseSSMIF(filename)

Given a SSMIF file, return a fully-filled LWAStation instance. This function supports both human-readable files (filenames with ‘.txt’ extensions) or binary packed files (filenames with ‘.dat’ extensions).

class lsl.common.stations.PrototypeStation(base)

LWAStation class to provide backward compatiability to the 20-stand prototype system.

getAntennas(date)

Return the list of Antenna instances for the station, sorted by digitizer number, for a given DateTime instance.

getCables(date)

Return a list of Cable instances for each antenna, sorted by digitizer number, for a given DateTime instance.

getPols(date)

Return a list of polarization (0 == N-S; 1 == E-W) for each antenna, sorted by digitizer number, for a given DateTime instance.

getStands(date)

Return a list of Stand instances for each antenna, sorted by digitizer number, for a given DateTime instance.

Station Dynamic MIB Data

Module for reading in an interpreting binary-packed Station Dynamic MIB (SDM) files (as defined in MCS0031, v5).

class lsl.common.sdm.SubSystemStatus(name, summary=6, info='UNK', time=0)

Python object that holds the status for a particular subsystem in a SDM file.

class lsl.common.sdm.SubSubSystemStatus(fee=None, rpd=None, sep=None, arb=None, dp1=None, dp2=None, dr=None)

Python object that holds the status for the sub-subsystems in a SDM file.

class lsl.common.sdm.SDM(station=None, shl=None, asp=None, dp=None, dr=None, status=None, antStatus=None, dpoStatus=None, settings=None)

Python object that holds the various bits of information in a binary-packed Station Dynamic MIB file (SDM file).

updateAntennas(antennas)

Given a list of lsl.common.stations.Antenna instances, return a new list of Antenna instances with updated antenna status codes.

lsl.common.sdm.parseSDM(filename)

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

Stand-Level Data

This module stores various functions that are needed for computing UV coverage and time delays. The functions in the module:

  • compute the u, v, and w coordinates of all baselines defined by an array of stands
  • compute the track through the uv-plane of a collection of baselines as the Earth rotates.

Changed in version 0.4.0: Removed function for dealing with meta-data (position, cable length, etc.) for individual stands since these are wrapped in the new lsl.common.stations module.

Exceptions

exception lsl.correlator.uvUtils.uvUtilsError(strerror)

Base exception class for this module

Table Of Contents

Previous topic

Defining Observations and Observation Metadata

Next topic

Session and Observation Specification

This Page