Module that contains all of the relevant class to build up a representation of a session definition file as defined in MCS0030v5. The hierarchy of classes is:
Project - class that holds all of the information about the project (including the observer) and one or more sessions. Technically, a SD file has only one session but this approach allows for the generation of multiple SD files from on Project object.
Observer - class that hold the observer’s name and numeric ID
Session - class that holds all of the observations associated with a particular DP output.
Observations - class that hold information about a particular observation. It includes a variety of attributes that are used to convert human-readable inputs to SDF data values. The observation class is further subclasses into: - TBW - class for TBW observations - TBN - class for TBN observations - DRX - class for general DRX observation, with sub-classes:
- Solar - class for solar tracking
- Jovian - class for Jovian tracking
- Stepped - class for stepped observations
BeamStep - class that holds the information about a particular step in a Stepped Observation
All of the classes, except for Stepped and BeamStep, are complete and functional. In addition, most class contain ‘validate’ attribute functions that can be used to determine if the project/session/observation are valid or not given the constraints of the DP system.
In addition to providing the means for creating session definition files from scratch, this module also includes a simple parser for SD files.
Changed in version 1.0.0: Added the getObservationStartStop() function. Renamed parseTimeString() to parseTime() parseTime() can now accept dates/times as timezone-aware datetime instances Observations can now be initialized with durations as timedelta instances Observations can now be initialized with RA/dec/az/alt as ephem.hours and ephem.degrees instances
Class to hold information about an observer.
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 to hold all the information about a specific session for a project/proposal.
Add a new Session to the list of sessions.
Create a session definition file that corresponds to the specified session. Returns the SD file’s contents as a string.
Update the various sessions that are part of this project.
Examine all of the sessions and all of their observations to check for validity. If everything is valid, return True. Otherwise, return False.
Class to hold all of the observations in a session.
Add a new Observation to the list of observations.
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.
Set the beam to use in the range of 1 to 4 or -1 to let MCS decide.
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.
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.
Set the number of spectrometer channels to generate, 0 to disable.
Set the number of spectrometer FFT integrations to use, 0 to disable.
Set the spectrometer metatag, ‘’ to disable.
Update the various observations in the session.
Examine all of the observations associated with the session to check for validity. If everything is valid, return True. Otherwise, return False.
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
Place holder for functions that return the fractional visibility of the target during the observation period.
Place holder for functions that return the estimate size of the data set being defined by the observation.
Return a valid value for beam type based on whether maximum S/N beam forming has been requested.
Parse the self.duration string with the format of HH:MM:SS.SSS to return the number of milliseconds in that period.
Place holder for functions that return ephem.Body objects (or None) that define the pointing center of the observation.
Return the number of “tuning words” corresponding to the first frequency.
Return the number of “tuning words” corresponding to the second frequency.
Return the modified Julian Date corresponding to the date/time of the self.start string.
Return the number of milliseconds between the date/time specified in the self.start string and the previous UT midnight.
Set the observation start time.
Update the computed parameters from the string values.
Place holder for functions that evaluate the observation and return True if it is valid, False otherwise.
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
Estimate the data volume for the specified type and duration of observations. For TBW:
bytes = samples / samplesPerFrame * 1224 bytes * 260 stands
Update the computed parameters from the string values.
Evaluate the observation and return True if it is valid, False otherwise.
Sub-class of Observation specifically for TBN observations. It features a reduced number of parameters needed to setup the observation.
Estimate the data volume for the specified type and duration of observations. For TBN:
bytes = duration * sampleRate / 512 * 1048 bytes * 260 stands * 2 pols.
Set the observation duration.
Set the frequency in Hz corresponding to tuning 1.
Evaluate the observation and return True if it is valid, False otherwise.
Set the pointing Dec.
Set the pointing RA.
Sub-class of DRX specifically for Solar DRX observations. It features a reduced number of parameters needed to setup the observation.
Return an ephem.Body object corresponding to where the observation is pointed. None if the observation mode is either TBN or TBW.
Sub-class of DRX specifically for Jovian DRX observations. It features a reduced number of parameters needed to setup the observation.
Return an ephem.Body object corresponding to where the observation is pointed. None if the observation mode is either TBN or TBW.
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.
Add a new BeamStep step to the list of steps.
Return the fractional visibility of the target during the observation period.
Estimate the data volume for the specified type and duration of observations. For DRX:
bytes = duration * sampleRate / 4096 * 4128 bytes * 2 tunings * 2 pols.
Parse the list of BeamStep objects to get the total observation duration as the number of milliseconds in that period.
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’.
default: 0.04; range: 0.0 to 1.0
default: 1.0; range: 0.0 to 1.0
pol - Polarization to record default: “X”
default: lsl.common.stations.lwa1
Update the computed parameters from the string values.
Evaluate the observation and return True if it is valid, False otherwise.
Class for holding all of the information (pointing center, tuning frequencies, etc.)associated with a particular step.
Note
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
Return a valid value for beam type based on whether maximum S/N beam forming has been requested.
Parse the self.duration string with the format of HH:MM:SS.SSS to return the number of milliseconds in that period.
Return an ephem.Body object corresponding to where the observation is pointed. None if the observation mode is either TBN or TBW.
Return the number of “tuning words” corresponding to the first frequency.
Return the number of “tuning words” corresponding to the second frequency.
Set the pointing c1.
Set the pointing c2
Set the observation duration.
Set the frequency in Hz corresponding to tuning 1.
Set the frequency in Hz correpsonding to tuning 2.
Update the settings.
Evaluate the step and return True if it is valid, False otherwise.
Given a filename, read the file’s contents into the SDM instance and return that instance.
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.