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.

lsl.common.stations.ecef2geo(x, y, z)

Convert earth-centered, earth-fixed coordinates to (rad), longitude (rad), elevation (m) using Bowring’s method.

class lsl.common.stations.LWAStation(name, lat, long, elev, id='', antennas=None, interface=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, long) * Elevation in meters (elev) * List of Antenna instances (antennas)

LWAStation 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

  • getECITransform: Return a 3x3 transformation matrix to convert antenna

    positions to ECI coordinates

  • getECIInverseTransform: Return a 3x3 transformation matrix to convert antenna

    positions from ECI coordinates

  • getENZOffset: Return the east, north, and vertical offsets to a point on

    the surface of the Earth

  • getPointingAndDistance: Return the pointing direction and distance to

    another location on the surface of the Earth

LWAStation also provides several functional attributes for dealing with the station’s antennas. These include: * getAntennas: Return a list of antennas * getStands: Return a list of stands * getPols: Return a list of polarizations * getCables: Return a list of cables

Changed in version 1.2.0: Added a new ‘interface’ attribute which provides referenves to various modules to help interface with the station.

Changed in version 1.0.0: Converted LWAStation to be an instance of LWAStationBase and ephem.Observer to make it easier to work with ephem.Body objects.

Added additional functions for dealing with other locations.

Changed getECEFTransform() to getECITransform() to make the function name consistent with its purpose.

compute(body)

Update the provided ephem.Body instance with the current location as viewed from the site.

New in version 1.0.0.

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.

getECIInverseTransform()

Return a 3x3 transformation matrix that converts a baseline in earth-centered inertial coordinates [x, y, z] to [east, north, elevation] for that baseline.

getECITransform()

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

getENZOffset(locTo)

Given another location on the surface of the Earth, either as a LWAStation instance or a three-element tuple of latitude (deg.), longitude (deg.), and elevation (m), return the topocentric offset in meter along the east, north, and vertical directions.

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.

getPointingAndDistance(locTo)

Given another location on the surface of the Earth, either as a LWAStation instance or a three-element tuple of latitude (deg.), longitude (deg.), and elevation (m), return the bearing azimuth/ elevation in radians and distance in meters to the location.

Changed in version 1.0.1: Renamed from getPointingAndDirection to getPointingAndDistance

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=None, board=0, digitizer=0, input='', 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) * ARX instance the antenna is attached to (arx) * DP1/ROACH board number (board) * DP1/ROACH digitizer number (digitizer) * DP/ADP rack input connector (input) * Stand instance the antenna is part of (stand) * Polarization (0 == N-S; pol) * Antenna vertical 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

Changed in version 1.0.0: Added an attribute to hold the DP rack input connector label.

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.

response(dB=False)

Return a two-element tuple (freq in Hz, mis-match efficiency) for a model LWA1 antenna from Hicks et al. (2012, PASP, 124, 1090).

New in version 1.0.0.

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)

The x, y, and z positions can also be accessed through subscripts: Stand[0] = x Stand[1] = y Stand[2] = z

Changed in version 1.0.0: Added the option to get the positions via subscripts.

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

response(dB=False)

Return a two-element tuple (freq in Hz, gain) for the frequency- dependent gain for a v1.7 FEE from LWA Memo #190, FEE0010, Figure 3.

New in version 1.0.1.

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, dB=False)

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.

Changed in version 1.0.0: Added the `dB’ keyword to allow dB to be returned.

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, dB=False)

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.

Changed in version 1.0.0: Added the `dB’ keyword to allow dB to be returned.

response(dB=False)

Return a two-element tuple (freq in Hz, attenuation) for the cable using the model from LWA Memo #170.

New in version 1.0.1.

setClockOffset(offset)

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

class lsl.common.stations.ARX(id, channel=0, aspChannel=0, input='', output='')

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) * ASP rack input connector label (input) * ASP rack output connector label (output)

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

Changed in version 1.0.0: Added attributes to hold the ASP rack input and output connector labels.

response(filter='split', dB=True)

Return a two-element tuple (freq in Hz, S21 magnitude in dB) for the ARX response for the current board/channel from the “ARX0026” memo on the “LWA Engineering Documents” wiki. For ARX boards at LWA-SV, data from the production tests are used.

Filter options are:

Note

If 'split@3MHz‘ or 'full@3MHz‘ are requested for LWA1, the values for ‘split’ and ‘full’ are returned instead.

Changed in version 1.2.1: Switched the filter numbers over to match what ASP uses at LWA1 and LWA-SV. Also, changed the default filter to ‘split’ to match the default value for observations.

Changed in version 1.0.0: Add an option to specify whether the magnitude should be returned in dB or not.

class lsl.common.stations.LSLInterface(backend=None, mcs=None, sdf=None, metabundle=None, sdm=None)

Object to store information about how to work with the station in LSL. This includes names for the: * Backend module to use (backend) * MCS module to use (mcs) * SDF module to use (sdf) * Metadata module to use (metabundle) * SDM module to use (sdm)

New in version 1.2.0.

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).

lsl.common.stations.getFullStations()

Function to return a list of full stations.

New in version 1.2.0.

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

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.

binaryRead(fh)

Given an open file handle, interpret it in the context of a subsystem_status_struct C structure and update the Python instance accordingly.

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.

binaryRead(fh)

Given an open file handle, interpret it in the context of a subsubsystem_status_struct C structure and update the Python instance accordingly.

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

Exceptions

exception lsl.correlator.uvUtils.uvUtilsError(strerror, *args, **kwds)

Base exception class for this module

Table Of Contents

Previous topic

LWA Swarm Observations

Next topic

Session and Observation Specification for a Single LWA Station

This Page