Run and Scan Specification for the LWA Swarm

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

Class to hold information about an observer.

class lsl.common.idf.ProjectOffice(project=None, runs=None, scans=None)

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

class lsl.common.idf.Project(observer, name, id, runs=None, comments=None, projectOffice=None)

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

append(newRun)

Add a new run to the list of runs.

generateSDFs(starting_session_id=1, run=0, verbose=False)

Convert the ID file into a collection of lsl.common.sdfADP.Project instances that can be used to write SD files.

render(run=0, verbose=False)

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

update()

Update the various runs that are part of this project.

validate(verbose=False)

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

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

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

class lsl.common.idf.Run(name, id, scans=None, dataReturnMethod='DRSU', comments=None, corr_channels=256, corr_inttime=1.0, corr_basis='linear', stations=[<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>, <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 scans in an interferometer run.

append(newScan)

Add a new Scan to the list of scans.

setCorrelatorBasis(value)

Set the correlator output polarization basis.

setCorrelatorChannels(value)

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

setCorrelatorInttime(value)

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

setDataReturnMethod(method)

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

setStations(stations)

Update the stations used by the project for source computations.

setUCFUsername(username)

Set the username to use for UCF data copies.

update()

Update the various scans in the run.

validate(verbose=False)

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

class lsl.common.idf.Scan(target, intent, start, duration, mode, ra, dec, frequency1, frequency2, filter, gain=-1, pm=[0.0, 0.0], comments=None)

Class to hold the specifics of a scans. It currently handles TRK_RADEC, TRK_SOL, and TRK_JOV.

addAltPhaseCenter(target_or_apc, intent=None, ra=None, dec=None, pm=None)

Add an alternate phase center to the scan.

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 scan period.

estimateBytes()

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

bytes = duration * sampleRate / 4096 * 4128 bytes * 2 tunings * 2 pols.
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 scan is pointed. None if the scan 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.

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.

setDuration(duration)

Set the scan duration.

setFrequency1(frequency1)

Set the frequency in Hz corresponding to tuning 1.

setFrequency2(frequency2)

Set the frequency in Hz correpsonding to tuning 2.

setStart(start)

Set the scan start time.

update()

Update the computed parameters from the string values.

validate(station, verbose=False)

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

class lsl.common.idf.DRX(target, intent, start, duration, ra, dec, frequency1, frequency2, filter, gain=-1, pm=[0.0, 0.0], comments=None)
Required Arguments:
  • scan target
  • scan intent
  • scan start date/time (UTC YYYY/MM/DD HH:MM:SS.SSS string or timezone- aware datetime instance)
  • scan duration (HH:MM:SS.SSS string or timedelta instance)
  • scan RA in hours, J2000.0 or ephem.hours instance
  • scan Dec in degrees, J2000.0 or ephem.hours instance
  • scan tuning frequency 1 (Hz)
  • scan tuning frequency 1 (Hz)
  • integer filter code
Optional Keywords:
  • comments - comments about the scan
setDec(dec)

Set the pointing Dec.

setPM(ra_dec)

Set the proper motion of the target in mas/yr.

setRA(ra)

Set the pointing RA.

class lsl.common.idf.Solar(target, intent, start, duration, frequency1, frequency2, filter, gain=-1, comments=None)

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

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

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

class lsl.common.idf.Jovian(target, intent, start, duration, frequency1, frequency2, filter, gain=-1, comments=None)

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

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

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

lsl.common.idf.parseIDF(filename, verbose=False)

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

lsl.common.idf.getScanStartStop(obs)

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

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

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

Previous topic

Session and Observation Specification for a Single LWA Station

Next topic

Data Readers

This Page