Documentation of tasks in analysisUtils (including some from analyzemscal and analyzemsimage)

The analysisUtils python package provides numerous analysis utilities written in python that are useful for ALMA (and in many cases VLA) data reduction. All the commands listed below exist in the current package, and there are links for pages that contain help and (sometimes) example usage. If the link is not found, it simply means that I have not created a help page yet. The commands are simply shown alphabetically, though they should really be sorted into categories at some point. Commands preceded by amc are inside analyzemscal, while commands preceded by ami are inside analyzemsimage. The rest are in analysisUtils.py. A subset of these commands is included at the CASA guide for analysis utilities, but the information below will be the most up-to-date. As a quick mental reminder, a list of a superset of these commands can be obtained at any time by typing au.help(). Also, to find all functions containing a specified string in the name, use the au.help command. For, example: au.help('asdm'). The argument is case-insensitive. There is a companion python file that contains more generic, non-ALMA-specific code, called toddTools, which is not yet publicly available.

Jump to letter: A B C D E F G H I J K L M N O P Q R S T U V W X Y

          A
  1. accumulateImfitResults -- Appends the results from a multi-component imfit result into a dictionary list
  2. addAxesToImage -- Adds a Stokes and (optionally) a frequency axis to an existing CASA image
  3. addDateToPlot -- Adds the current date/time to the bottom right of a plot
  4. addDoubleQuotesToFieldList -- Converts ['src0','src1'] or 'src0,src1' into '"src0","src1"', which is needed for the field parameter of pipeline PPRs
  5. addFrequencyAxisAbove -- Adds an upper x-axis label in frequency units
  6. addGaussianToFITSImage -- Adds a source with a 2D Gaussian profile to a 2D FITS image
  7. addGaussianToImage -- Adds a source with a 2D Gaussian profile to a 2D CASA image
  8. addLabelToPng -- Adds a text label to the top of a png.
  9. addToStateTable -- Adds a row to the STATE table of a measurement set
  10. airmassToElevation -- Convert an airmass to elevation in degrees
  11. alignFunctions -- Takes any two functions and returns spline-fit versions sampled onto a common grid
  12. almaAntennaDiameter -- Converts an ALMA antenna name to a diameter (in meters)
  13. almaAntennaDiameters -- Converts a list of ALMA antenna names to a list of diameters (in meters)
  14. almaCycles -- Converts a date to ALMA observing cycle
  15. almaPadnameToObservatoryName -- Returns ALMAOSF if padname begins with 'TF' (for test facility pad)
  16. almaPrimaryBeamCorrection -- Computes the ratio of the current CASA primary beam correction scheme (10.7m Airy disk) to the current best ALMA Gaussian primary beam model
  17. almaToGeo -- Convert the local (horizontal) coordinates for ALMA pads into geocentric coordinates
  18. analyzecontsub -- Compares line-free cubes generated in two ways: imsub and uvcontsub
  19. amc.analyzemscal -- Generates the Cycle 0 QA2 plots for a pipeline-reduction and displays on a webpage side-by-side with the manual reduction
  20. ami.analyzemsimage -- Compares images created by the pipeline with their manually-generated counterparts
  21. angleToSun -- Compute the angle between the Sun and another object at a specified time (default=now) or within a measurement set
  22. angularOffsetUncertainty -- Computes the uncertainty in the angular separation of two positions
  23. angularScaleBaseline -- Computes the baseline length corresponding to the specified angular scale at the specified frequency.
  24. angularSeparation -- Computes the angular separation of two RA/Dec coordinates entered as four decimal values in degrees
  25. angularSeparationOfAllPlanetsFromSun -- Computes the angular separation of all major planets from the sun
  26. angularSeparationOfDirections -- Accepts two direction dictionaries and returns the separation in radians.
  27. angularSeparationOfDirectionsArcsec -- Accepts two direction dictionaries and returns the separation in arc seconds.
  28. angularSeparationOfFields -- Computes the angular separation of all (or specified) fields in an ms
  29. angularSeparationOfFieldsFromASDM -- Computes angular separation of the first source of two intents
  30. angularSeparationOfFieldsFromSource -- Computes the angular separation of all fields associated with a source ID from the source positions
  31. angularSeparationOfPB -- Computes the angular separation between the peak of the primary beam image and the phase center of the specified field name
  32. angularSeparationOfPlanets -- Computes the current separation of two planets or a planet and a fixed target, at the specified date/time, or at the time of a particular scan in an ms
  33. angularSeparationOfScans -- Computes the slew angle (both on-the-sky, and in each antenna axis) between scans of a measurement set
  34. angularSeparationOfStrings -- Computes the angular separation of two RA/Dec coordinates entered as single strings
  35. angularSeparationOfStringsFromFile -- Computes the angular separation of a list of RA/Dec coordinate pairs in a file
  36. angularSeparationRadians -- Computes the angular separation of two RA/Dec coordinates entered as four decimal values in radians
  37. angularSeparationRadiansTuples -- Computes the angular separation of two RA/Dec coordinates entered as two tuples in units of radians
  38. angularSeparationOfTwoFields -- Computes the angular separation of two field IDs of a measurement set
  39. antennaEfficiency -- Computes efficiency equation from page 114 of the ALMA technical handbook
  40. antennaEllipsoidalHeight -- Returns the height above the Earth ellipsoid model in meters of the pad of an antenna in a specific measurement set
  41. antennaEllipsoidalHeightFromASDM -- Returns the height above the Earth ellipsoid model in meters of the pad of an antenna in a specific ASDM
  42. antposcorrmm -- Converts a list of antenna position corrections for gencal into human-readable millimeters
  43. applyProperMotion -- Subtracts the proper motion of a source in a measurement set to infer its position in the J2000 epoch
  44. applyQA0FlagsToCaltable -- Creates a list of flag commands from the FLAG_CMD column of a measurement set and applies them to a caltable
  45. applySetjyToPipelineRestoration -- Applies the setjy commands from a casa_commands.log to a pipeline measurement set
  46. approximateBarycentricCoordinatesOfEarth -- computes approximate coordinates of Earth for the specified date
  47. asdmbits -- Computes the percentage of data in an ASDM that is 16 bits vs. 32 bits
  48. asdmbitsHistogram -- Plots a histogram from the dictionary created by asdmbits
  49. asdmExport -- Sets up the correct bash path and runs asdmExportLight on an NRAO CV Lustre node on one (or more) ASDMs
  50. asdmExportFromPPR -- Reads all ASDMs from a PPR and exports them from the archive using asdmExport
  51. asdmExportImport -- Sets up the correct bash path and runs asdmExportLight followed by importasdm and listobs on an NRAO CV Lustre node for one (or more) ASDMs
  52. asdmspwmap -- Generate a list that maps the spw number in an MS to the corresponding value in the ASDM xml files
  53. Atmcal -- A class that examines the atmospheric calibration scans and can re-compute Trx and Tsys
  54. atmcalScansFromASDM -- Gets list of scans with CALIBRATE_ATMOSPHERE intent
  55. availableMasks -- Returns the list of values in the masks keyword of a CASA image header
  56. averageAntPosResults -- Takes multiple results from tc_antpos and generates a new XML file with weighted mean corrections
  57. averageTheRepeatedValues -- Accepts paired lists and averages the entries that have the same x value
  58. azelSeparation -- Computes azimuth and elevation separation between scans of different intents
    B
  59. baarsTaperFactor -- Converts a taper in dB to the constant X in the formula FWHM=X*lambda/D for a parabolic illumination pattern.
  60. bandforspw -- Determines the ALMA receiver band for a specified spw of a measurement set (or msmd instance)
  61. bandpasscalScansFromASDM -- Gets list of scans with CALIBRATE_BANDPASS intent
  62. bandpassPreAverage -- Computes the recommended frequency solint for bandpass calibration
  63. bandToFreqRange -- Converts ALMA band number to frequency range (in integer GHz)
  64. bandwidthsForField -- Returns the bandwidths of all spws used to observe the specified field
  65. beamCorrectionFactor -- Equation 14 and 15 of Gordon, Baars and Cocke
  66. beamSolidAngle -- Computes the effective solid angle of a Gaussian beam.
  67. blcTrcToLineSegments -- converts a BLC and TRC pixel to a list of line segments that outline the rectangle sides
  68. build_amc_exec_list -- Builds a list of analyzemscal commands corresponding to a list of ms's in a pipeline test results area
  69. build_ms_list -- Builds a list of ms's in a pipeline test results area for use in scripting additional casa commands
  70. buildConfigurationFile -- Creates a .cfg file of antenna pad positions (useful for simobserve) for the specified ALMA or VLA ms.
  71. buildMinorPlanetPlot -- queries JPL Horizons (or CASA) for the position of a list of solar system bodies and creates a Gildas ASTRO script to plot their elevation vs. LST at ALMA, EVLA, GBT, CARMA or Mauna Kea
  72. buildPdfFromPngs -- takes a list of .png files and concatenates them into a multi-page PDF
  73. buildtarfile -- builds a tar file of the minimum number of files needed to distribute analysisUtils for use in casa
    C
  74. calibratorService -- Accesses the prototype JAO calibrator flux density server
  75. casaEphemeris -- Reads information about an specified ephemeris table in the CASA data repository
  76. casaVersionFromCaltable -- Reads the CASA version string from the keywords of a caltable
  77. casaVersionFromLogfile -- Reads the CASA version string from the top of a CASA log file
  78. celsiusToKelvin -- Adds 273.15 to the value
  79. centralObstructionFactor -- Computes the scale factor of an Airy pattern as a function of the central obscuration of an antenna
  80. channelAverageChannels -- Computes the channels used by ALMA to define the channel-average spws
  81. channelSelectionRangesToIndexArray -- Converts a CASA channel selection range into a list of channels
  82. channelsForPreBandpass -- Compute the channel range corresponding to the central bandwidth of an spw
  83. checkALMALogs -- Downloads and searches the ALMA computing logs over a specified time range or dataset execution
  84. checkAntennaPositionFiles -- Shows the most recent entries in the antennaMoves.txt and almaAntPos.txt
  85. checkDelays -- Checks for delay jumps and large delays on an integration-by-integration basis by running gaincal('K')
  86. checkFieldTable -- Checks whether any fields in the FIELD table are associated with multiple source IDs
  87. checkGeodetic -- Checks the final date in the Earth Rotation Service files stored in CASA
  88. checkLogsForDelayJumps -- Runs checkALMALogs in search of late-arriving delay commands
  89. checkLogsForSubarrays -- Runs checkALMALogs in search of Array creation events
  90. checkOrder -- Takes two lists, and if the first list is in decreasing order, then it inverts both lists
  91. checkSamplers -- Compares channel 0 to adjacent channels in the TDM spectral windows and reports large ratios
  92. checkScienceSpwIFRanges -- Compares spw edges to baseband edges and returns dictionary of those within a threshold
  93. checkScienceSpws -- Compares science spw ID numbers between multiple measurement sets and reports if any differ
  94. checkScienceSpwSamplerRanges -- Returns a dictionary of all spws that lie within 30 MHz of the 2 or 4 GHz edge of the baseband
  95. checkScienceSpwsFromASDM -- Compares science spw ID numbers between multiple ASDMs and reports if any differ
  96. checksourceOffset -- Examines an ALMA pipeline working directory for check source images and draws their offset vectors on an RA/Dec plot centered on science target
  97. checksourceOffsetUncertainty -- Computes uncertainty in the position offset of the check source (or any point source whose image has been fit)
  98. checksourcePresent -- Returns True or False depending on presence of checksource observation in a dataset
  99. checkVirtualSpwsNeeded -- returns a list of pipeline runs in specified directory that require virtual spw mechanism in at least one EB
  100. check_for_time_gaps -- Checks for time gaps in the ALMA TMC database for a specified monitor point on a specified date
  101. clearPointingTable -- Removes all rows from the POINTING table of a measurement set.
  102. clearSpwFlags -- Clears channel-based flags in a specified spw and field ID
  103. clearTable -- Removes all rows from the specified table of a measurement set.
  104. columnStatistics -- Computes basic statistics on one column from an ASCII file
  105. commonAntennas -- Find the antenna names common to two (or more) measurement sets
  106. compareAntennaPositionCorrections -- computes the difference between two sets of antenna position corrections meant for gencal
  107. compareAntPosResults -- compiles results from a bunch of baseline runs onto per-antenna plots
  108. comparedASDMSizeToCalibratedMS -- computes the size ratio of *.ms to ASDMs in a pipeline run
  109. compareFlagFiles -- Prints differences between two files
  110. compareFlags -- Compares the count of flags in two similar measurement sets
  111. compareHanning -- Compares online-Hann window weighting in correlator with offline hanningsmooth function
  112. compareHeaders -- Compares two dictionaries, key by key
  113. comparePdfs -- Compares each individual pair of pages of two multi-page PDFs using the ImageMagick compare command
  114. comparePipelineTaskExecutionTimes -- Compares the task split time and running elapsed time of two pipeline runs
  115. comparePipeRuns -- Compare information about pipeline runs pickled with picklePipeRun (R. Indebetouw)
  116. comparePngs -- Compares two pngs images using the ImageMagick compare command.
  117. compareTables -- Compares two CASA tables, column-by-column and reporting if they differ
  118. compareTimesFromAnnotationTableToBandpassPreAverage -- Computes change in SNR if SSR determined times were to be used
  119. compareTimesFromCaltables -- Checks number of rows in two caltables and if equal, does statistics on the time differences
  120. compareTMCDB -- Gets current pad and antenna position values from the TMCDB, compares to what is in the ASDM and compute gencal command
  121. compareTsysSpectralWindowTableChanFreqsWithMS -- Compares the frequency grid in a Tsys table to its parent ms spectral_window table
  122. compareWeights -- Compares the weights between two measurement sets.
  123. complexToAmplitude -- converts a complex image into its amplitude
  124. complexToImaginary -- converts a complex image into its imaginary component
  125. complexToReal -- converts a complex image into its real component
  126. complexToSquare -- converts a complex image into its square (amplitude**2)
  127. computeAggregateBandwidth -- Computes the aggregate bandwidth for a specific list of spws of a measurement set.
  128. computeAvgchannel -- Computes the avgchannel values to use (e.g. in plotms) to display multiple spws smoothed to a common sensitivity bandwidth
  129. computeAzElFromRADecHourAngle -- Computes the Az/El for a specified Declination, hour angle, and observatory
  130. computeAzElFromRADecLST -- Computes the Az/El for a specified J2000 RA/Dec, LST, and observatory
  131. computeAzElFromRADecMJD -- Computes the az/el for a specified J2000 RA/Dec, MJD and observatory
  132. computeAzElForMS -- Computes the min/max/mean or median az/el for the aggregate of scans of a measurement set (optionally ignoring certain calibration scans)
  133. computeClockTimeOfMS -- computes the elapsed time from the first through last scan
  134. computeDurationOfScan -- computes the number of subscans in a particular scan and their duration
  135. computeExpectedFWHM -- given a Gaussian beam and the diameter of a uniform disk, computes the expected observed FWHM
  136. computeIntervalBetweenTwoDays -- computes number of days between two YYYY-MM-DD strings
  137. computeITRFCorrection -- Computes the corrections to make to absolute geocentric coordinates XYZ (i.e. pad position) from an offset position given in local coordinates (i.e. antenna position).
  138. ComputeJulianDayFromUnixTime -- converts a unix time (in seconds) to Julian date
  139. ComputeLST -- Computes the LST time in hours for a specified MJD seconds and longitude
  140. computeLSTForElevation -- Computes the LST that an object passes the specified elevation
  141. ComputeLSTDay -- Computes the LST day, time, Julian day and time for a specified date/time and longitude
  142. computePercentiles -- Computes the requested percentiles for an array and returns a dictionary
  143. computeRADecFromAzElMJD -- computes the J2000 ra/dec for a specified az/el, MJD and observatory
  144. computeRADecFromAzElUnixtime -- Reads an ASCII file with unixtime, azimuth and elevation and produces a new file with UT, RA, Dec, HA
  145. ComputeSolarAzEl -- Computes the azimuth and elevation of the sun for the specified time and observatory
  146. ComputeSolarRADec -- Computes the RA, Dec of the sun (in units of hours and degrees)
  147. ComputeSolarRADecRadians -- Computes the RA, Dec of the sun (in units of radians)
  148. computeStdDevMonteCarlo -- Computes Y and its uncertainty given uncertainties on a fitted slope and intercept, and a value of X
  149. computeTskyForSpw -- computes the sky temperature for the specified spw of a measurement set, using its PWV value.
  150. computeUTForElevation -- Computes the UT times that a specified source passes the specified elevation at your observatory
  151. computeUVThreshold -- Runs getCorrectedData and computes median and mad in uv bins
  152. computeYLimitsForXLimits -- Computes the Y-axis limits to autorange over the specified x-axis range
  153. computeYStatsForXLimits -- Computes the Y-axis statistics (mean, std, median, min, max) over the specified x-axis range, rather than over the whole range
  154. concatenateFiles -- Concatenates a list of text files and (optionally) deletes them
  155. configs -- List the .cfg files in the data/alma/simmos CASA directory
  156. configurationNearestNeighbors -- Finds the nearest neighbor antenna and distance for each antenna in a configuration file
  157. convertAntennaDictionaryToPad -- Converts a dictionary keyed by antenna name to one keyed by pad name
  158. convertColonDelimitersToHMSDMS -- Converts HH:MM:SS.SSS, +DD:MM:SS.SSS to HHhMMmSS.SSSs,+DDdMMmSS.SSSs
  159. convertPadDictionaryToAntenna -- Converts a dictionary keyed by pad name to one keyed by pad antenna
  160. convertImageToDirectionType -- Converts a CASA image with Linear coordinate system type (e.g. ALMA astroholography) to Direction type
  161. convertTimeStamp -- converts a makeTimeStamp string to Julian day number
  162. convertTimeStamps -- converts a list of makeTimeStamp strings to a list of Julian day numbers
  163. copyflags -- Copies the flag and flag_row columns from one dataset to another
  164. copyTsys -- copies some or all of the Tsys values in a Tsys caltable from one antenna to another
  165. copyweights -- Copies the weights from the WEIGHT column (scalar) to the WEIGHT_SPECTRUM column (vector)
  166. countChannels -- Counts the number of channels in a CASA channel selection string
  167. countChannelsInRanges - Counts the number of channels in each subrange of a single spw selection string
  168. countflags -- count the percentage of flagged data in an MS
  169. countMaskedPixels -- returns the number of pixels in a CASA image that are masked
  170. countUnmaskedPixels -- returns the number of pixels in a CASA image that are not masked
  171. countrows -- count the number of rows associated with each spectral window in an MS
  172. countPagesInPDF -- counts the number of pages in a PDF
  173. countVisibilities -- counts the number of visibilities in a measurement set
  174. createTsysTable -- Creates a blank Tsys table using the cb tool
  175. crossCaiSelection -- Finds baseline names that cross the CAI=32 boundary for a specified measurement set (see also lowCaiSelection)
  176. cycleTime -- Computes median time between visits to a specified intent (default: PHASE)
    D
  177. dataratesForASDM -- Computes data rates for an ASDM
  178. dateFromDoy -- computes the date (time) string from a year and a day-of-year
  179. datasetsForMOUS -- gets the EBs for an MOUS, filtering by array type
  180. datasetsForProjectCode -- gets the EBs for a project code, filtering by array type
  181. dateStringListToMJDSecList -- converts a list of date strings ("yyyy/mm/dd hh:mm:ss") to a list of MJD seconds
  182. dateStringListToPlotDate -- converts a list of date strings ("yyyy/mm/dd hh:mm:ss") to a list of datetime structures suitable for pylab.plot_date
  183. dateStringDifference -- computes the number of minutes between two datestrings, as from a CASA log
  184. dateStringToMJD -- converts "yyyy/mm/dd hh:mm:ss" to MJD
  185. dateStringToMJDSec -- converts yyyy/mm/dd hh:mm:ss to MJD seconds, which is needed to specify plotrange for time in plotms
  186. dateStringToUnixTime -- converts a UT date/time string to unixtime in seconds
  187. dateTimeListToMJDSeconds -- converts a list of datetime structures to a list of MJD seconds (inverse of mjdSecondsListToDateTime)
  188. decimate3DArrayByMean -- reduces the length of one axis of a 3D array
  189. deconvolveDiskFromBeam -- the inverse function of computeExpectedFWHM
  190. decrad2dms -- Convert radians of declination to sexagesimal DD:MM:SS
  191. defaultSBGainsForBand -- Returns the default sideband gains for the signal and image bands used by TelCal
  192. deg2radec -- Convert a single RA/Dec position from degrees to a sexagesimal string
  193. degfile2radec -- Convert a list of RA/Dec positions in a file from degrees to sexagesimal strings
  194. detectNegativeTrx -- searches the SYSCAL table of the ms for negative receiver temperatures and reports them
  195. detectNegativeTsys -- searches the SYSCAL table of the ms for negative system temperatures and reports them
  196. differencePhaseSolutions -- takes the phase difference between two CASA gaincal tables
  197. directionList2radecDegrees -- convert a list of CASA direction dictionaries into a list of RA, Dec values in degrees
  198. direction2rad -- extracts the direction as a radian list from a CASA direction dictionary
  199. direction2radec -- converts a CASA direction dictionary to RA, Dec string in sexagesimal format
  200. direction2radecForSimobserve -- converts a direction dictionary to RA, Dec string in sexagesimal format that simobserve expects
  201. directorySize -- computes the size of a directory tree in bytes
  202. dminfo -- prints the contents of tb.getdminfo into a text file
  203. doyFromDate -- gets the day of year from the specified date time string
  204. DrawAntennaLegend -- writes colorized antenna names just outside the right side y-axis edge of a plot
  205. dutyCycle -- computes duty cycle of observing the science target in ALMA measurement set (ignoring subscan latency)
    E
  206. editFieldname -- Change a field name in a measurement set (FIELD and SOURCE tables)
  207. editFieldnameASDM -- Change the field name in the ASDM (in all 4 xml files where it appears)
  208. editIntents -- change the intents for a specified field in an ms (based on John Lightfoot's pipeline script)
  209. editIntentscsv -- change the intents in a list of measurement sets based on a csv-text file
  210. effectiveAntennas -- converts a number of baselines into the equivalent number of antennas for sensitivity purposes
  211. effectiveBandwidth -- Reads the effective bandwidth of a channel of an spw from a measurement set
  212. effectiveBandwidthASDM -- Reads the effective bandwidth of a channel of an spw from an ASDM
  213. effectiveResolution -- Reads the effective resolution of a channel of an spw from a measurement set
  214. effectiveResolutionASDM -- Reads the effective resolution of a channel of an spw from an ASDM
  215. effectiveTaper -- Converts an observed value of the constant X in the formula FWHM=X*lambda/D into an edge taper in dB
  216. elevaitonSeparationOfFields -- computes global or per-scan mean elevation separation between all combinations of fields in a dataset
  217. elevationSeparationPhaseScience -- computes mean separation in elevation between first phase calibrator and each science target
  218. elevationToAirmass -- Converts an elevation in degrees to airmass
  219. emulateLowGainFlag -- Computes antenna/spw combinations that will be flagged by hif_lowgainflag
  220. equivalentDiskDiameter -- Computes size of top-hat disk that would reproduced the measured size of a marginally-resolved object in an image
  221. estimateMRS -- Computes the MRS=LAS for a specified measurement set
  222. estimateMRSForConfig -- reads an antenna config file and computes the expected maximum recoverable scale for a specified frequency
  223. estimateOpacity -- converts a value of PWV and frequency to opacity as a function of observatory site
  224. estimateSynthesizedBeam -- reads a measurement set and computes expected beamsize
  225. estimateSynthesizedBeamForConfig -- reads an antenna config file and computes the expected beamsize for a specified frequency
  226. estimateSynthesizedBeamFromASDM -- read the max baseline and representative frequency from an ASDM and compute beamsize
  227. everOccupied -- determines if a specific ALMA pad has ever been occupied (as indicated by antennaMoves.txt)
  228. examineContext -- prints the science goal values from a pipeline context file
  229. exportAndGetWeatherStationPositionFromASDM -- exports ASDM if necessary, then returns the position of the first weather station containing the specified string
  230. extractAzimuthalAverageFromImage -- uses azimuthalAverage to compute and write out the radial profile of 1..3 images
  231. extractCutFromImage -- extra a single row or column from a CASA image, and optionally run a Gaussian fit on it
  232. extractPipelineStage -- extracts the pipeline stage number from a pipeline-generated file
  233. extractPngListFromCSVFile -- extracts all the png filenames from a CSV-format file
  234. extractSetJyCommandsFromCasaCommandsLog -- extracts all setjy calls from a casa_commands.log
  235. extractSpatialAxisValues -- extracts the array of RA or Dec values from a CASA or FITS image
    F
  236. extractTcleanCommands -- extracts the tclean commands for a specified intent from a pipeline CASA log
  237. extractTcleanCommandsAndModify -- extracts the tclean commands for a specified intent from a pipeline CASA log, modifies them and writes them into a script
  238. farfieldDistance -- Computes the Fraunhofer distance for a specified observation or combination of baseline length and frequency
  239. fieldsfornames -- Extends the msmd method fieldsforname to a list of names
  240. fillAsdmList -- Takes a list of ASDMs from the same array/night and fills in the missing leading characters where missing
  241. fillZerosInDate -- Add leading zeros to month and day in a date string
  242. filterAndDecimate -- Runs a low-pass filter and decimates a signal by an even factor
  243. filterAndDecimateFromFile -- Reads a 2-column ascii file and runs filterAndDecimate on the signal it contains
  244. filterDictionary -- Filters a dictionary so that it only has keys that are present in a second dictionary
  245. filterOutLines -- Removes all lines from a file that match a string
  246. findChannel -- Finds the channel in a cube that is nearest in frequency to a specified channel in a different cube
  247. findConfigurationFile -- Searches for an antenna configuration file in the current directory, then the CASA repository
  248. findDaytime -- Finds the range of date values corresponding to daylight hours suitable for marking a pylab.plot_date plot
  249. findFindcontPlot -- Finds the findContinuum png in an ALMA imaging pipeline weblog for the specified science target cube
  250. findFindcontResidualCubes -- Finds the list of findcont cubes from a pipeline run
  251. findFindcontResidualJointMasks -- Finds the list of findcont joint masks from a pipeline run
  252. findFindcontStageDir -- Finds the html/stage26,28 directory for the hif_findcont stage of an ALMA imaging pipeline weblog
  253. findFindcontStageNumber -- Returns the stage number for the hif_findcont stage of an ALMA imaging pipeline run using its weblog
  254. findFWHM -- Finds the full-width at a specified fraction of the maximum from two lists (x,y)
  255. findImageSpwsFromCasalog -- Examines a pipeline CASA log file and finds the spws images on the science target
  256. findLineNumber -- Finds the line number of the first occurrence of a string in a file
  257. findLineNumberAndTimestamp -- Finds the line number and timestamp of the first occurrence of a string in a CASA log file
  258. findNearestField -- Find the entry in a list of RA,Dec's nearest to a specified RA,Dec
  259. findNearestFieldInVis -- Find the field in a measurement set nearest to a specified RA,Dec
  260. findNearestPadToXYZ -- Finds the nearest ALMA pad to a specified ITRF position
  261. findNearestVLBISources -- Searches the Petrov catalog around a specified direction
  262. findNull -- Find the baseline length corresponding to a specified fractional peak amplitude of a uniform disk source
  263. findOffsetAxis -- Find which axis (or the length thereof) of a CASA image contains the name 'Offset' (as created by impv)
  264. findPipelineAmpCalTable -- Finds the name of the timegaincal amplitude table
  265. findPipelineCalibratorTcleanCommand -- Extracts the tclean command from casa_commands.log for specified calibrator intent
  266. findPipelineCalTable -- Finds a file matching a specified wildcard string
  267. findPipelineCasaCommandsLog -- returns the path to the casa_commands.log in a pipeline run
  268. amc.findPipelineCasaLogfile -- searches the specified directory tree for the newest casa log file, optionally containing an applycal call on a specified ASDM
  269. findPipelineCubes -- finds a list of all cleaned cubes in a pipeline working directory
  270. findPipelineImage -- finds the name of the image file in a pipeline working directory corresponding to the specified field and spw
  271. findPipelineRunCasaLogs -- Searches a pipeline execution directory and returns a list of casa log files, optionally containing a call to one of a list of tasks
  272. findPipelineTaskExecutionTimes -- Assembles a list of time intervals from a CASA log of a pipeline run
  273. findPipelineTsysCalTable -- Finds the path of the tsys caltable
  274. findPipelineTsysCalTablePlot -- Finds the path of the weblog plot for the tsys caltable for a specified spw and antenna
  275. findPixel -- Takes an image and converts a pixel to an RA,Dec and (optionally) the separation from a reference position
  276. findPixels -- Takes an image and converts a list of pixels to a list of RA,Decs and (optionally) the separation from a reference position
  277. findRADec -- Takes an image and converts an RA, Dec value to pixel value
  278. findSpectralAxis -- Finds the number of the spectral axis of an image cube
  279. findStokesAxis -- Finds the number of the Stokes axis of an image cube
  280. fitFitsBeam -- Fits a PSF image, which is useful if the header contains no beam
  281. fitLapseRate -- fits the temperature lapse rate measured by the oxygen sounder
  282. fitLapseRateAndScaleHeightASDM -- fits the lapse rate and scale height measured by the oxygen sounder for the start time of an ASDM
  283. fitLapseRateAndScaleHeightASDMs -- fits the lapse rate and scale height measured by the oxygen sounder for the start time of a list of ASDMs
  284. fitScaleHeight -- fits the water vapor density scale height measured by the oxygen sounder
  285. fixASDM -- Restores the missing newline character at the end of every .xml file of an ASDM
  286. fixBandwidthsInASDM -- Fixes the effective resolution and effective bandwidth of pre-Cycle-3 ASDMs
  287. fixBandwidthsInMOUS -- Fixes the effective resolution and effective bandwidth of a list of pre-Cycle-3 ASDMs
  288. fixConcatSigmaSpectrum -- Fix for CAS-9238 (concat not copying the sigma_spectrum column for subsequent ms)
  289. fixFeedTableTimes -- Copies the time in the first row of the FEED table to all rows
  290. fixMyDelays -- read the Delay solutions from the ASDM, and compute a caltable to correct them
  291. fixpointing -- converts the MS POINTING table from commanded positions to encoder positions (from CSV-2878)
  292. FixPosition -- a class with various methods to fix problems with the direction of sources in an ms
  293. fixReceptorAngles -- Changes the value of the receptor angle in the FEED table of a measurement set
  294. fixScanNumbers -- Detects times when the field name changes, and increments the scan number (for SMA data read with sma2casa).
  295. fixuvw -- Runs calcuvw of the imtool toolkit to recalculate the UVW coordinates of a measurement set
  296. fixvisPermissions -- Runs chmod on all subdirectories of a specified directory
  297. flagcmdplot -- Runs flagcmd(action='plot') for each reason code, one at a time, and builds a multi-page PDF
  298. flagDurations -- Computes the durations of all flag commands in the FLAG_CMD table of a measurement set
  299. amc.flagMatrix -- Runs the agent flagger on each baseline and generates a display of baselines that are fully (or mostly) flagged
  300. flagReasons -- Returns a unique list of flag reasons from an ASCII flag commands file
  301. flagReasonStats -- Returns a dictionary of the percentage of data flagged by online flags for each reason
  302. flagTsysFeature -- Flags the SYSCAL table for a specified antenna, field, spw, which can be done at the pipeline pause after import
  303. flagTsysTable -- Flags a Tsys cal table by antenna, spw or time
  304. flattenMask -- Builds a 2D image mask from a 3D cube mask
  305. flipSignDeclination -- Flips the sign of declination for a source ID in the FIELD and/or SOURCE tables of a measurement set
  306. flipSignDeclinationSourcexml -- Flips the sign of declination for a source ID in the Source.xml file of an ASDM
  307. fluxCalibrationAccuracy -- Prints the percent accuracy per band claimed in the ALMA Cycle 6 technical handbook
  308. fluxcalScansFromASDM -- Gets list of scans with CALIBRATE_FLUX intent
  309. fluxscaleMean -- Compute the uncertainty-weighted mean of the flux density measurements in a fluxscale dictionary
  310. fluxscaleLogMean -- Compute the mean and standard deviations of flux densities reported in a sequence of fluxscale log outputs
  311. fluxscaleParseLog -- Extract the spectral index fit parameters from the ASCII file produced by the casa task fluxscale as needed by setjy.
  312. frames -- convert an optical velocity into different optical and radio frames (LSRK, TOPO)
    G
  313. gaincalMosaic -- Computes a list of field IDs that have a fraction of solutions above a threshold SNR
  314. gaincalSNR -- Computes the per-antenna SNR expected for gaincal(solint='inf') on a per-spw basis
  315. gaussianBeamOffset -- Computes the radius at which the response of a Gaussian beam drops to the specified level
  316. gaussianBeamResponse -- Computes the gain at a radial offset from the center of a Gaussian beam
  317. genImageName -- Generates an image name that follows the ALMA archive convention; used by NA manual imaging script template
  318. geoToAlma -- convert geocentric coordinates into local (horizontal ones)
  319. getALMAFlux -- contacts ALMA calibrator catalog, computes the spectral index between Bands 3 & 7 and interpolates/extrapolates
  320. getALMAFluxcsv -- reads the initial pipeline-produced flux.csv file (and measurement set) and updates the flux densities into a new flux.csv file
  321. getALMAFluxForMS -- runs getALMAFlux for all fields in a measurement set
  322. getALMAFluxSMA -- Compare a list of SMA calibrator flux densities with the ALMA catalog and compute the statistics of the ratio.
  323. getALMASpectralIndex -- looks through history of calibrator catalog, computing spectral index for the closest Band 3/7 measurement(s)
  324. getALMASpectralIndexCycle6 -- looks through history of calibrator catalog, computing spectral index for the closest (with settable tolerance) Band 3/7 measurement(s)
  325. getAntennaIdsFromCaltable -- gets a list of unique antenna IDs that have solutions in a caltable
  326. getAntennaNames -- Returns the list of antenna names in the ANTENNA table of a dataset
  327. getAntennaNamesForObsID -- Returns the list of antenna names in a particular obsid of a dataset
  328. getAntennaNamesFromCaltable -- Returns the list of unique antenna names from a caltable
  329. getAntennaPadXYZ -- Gets the geocentric position of the pad holding the specified antenna ID in the specified measurement set
  330. getAntennaStationsFromCaltable -- Returns the list of unique antenna stations from a caltable
  331. getAntennaPads -- Returns a list of antenna station names from a measurement set
  332. getAntennaPadsForObsID -- Returns list or dictionary of pads for one portion of a concatenated measurement set
  333. getAntennaPadsFromASDM -- returns a dictionary of antenna/pad association for the specified ASDM
  334. getApexWeather -- retrieves weather for a whole day from the APEX telescope station
  335. getArrayIDs -- gets the list of ARRAY_ID for a measurement set
  336. getAtmcalStateIDsFromASDM -- reads the State.xml file of an ASDM and returns a dictionary
  337. getBand -- Converts a frequency in Hz to the ALMA band number (ambiguity in bands 2/3 overlap)
  338. getBandwidthFromCaltable -- Reports the bandwidth of an spw from the SPECTRAL_WINDOW table of a caltable
  339. getBasebandNumber -- Obsoleted by msmd.baseband
  340. getBasebandNumberFromASDM -- Gets the baseband number for an spw in an ASDM
  341. getBasebandNumbers -- Gets an array containing the baseband number of each spw in a measurement set
  342. getBaselineLength -- compute the baseline length between 2 antennas in an ms and its percentile for the configuration
  343. getBaselineLengthForStations -- compute the baseline length between 2 stations in an antenna config file
  344. getBaselineLengths -- returns a list of the baseline lengths in your ms, by default sorted by length, with option to create a histogram
  345. getBaselineLengthsMultiVis -- returns an aggregated list of the baseline lengths in a list of ms, by default sorted by length, with option to create a histogram
  346. getBaselineLengthsMultiVisMultiOUS -- runs getBaselineLengthsMultiVis for a list of pipeline runs in a directory
  347. getAllBaselineLengthsFromASDM -- returns a list of the baseline lengths in an ASDM, by default sorted by length, with option to create a histogram
  348. getBaselinesInMainTable -- returns an array of tuples containing the antenna IDs of each baseline contained in the main visibility table
  349. getBaselineStats -- Compute statistics on the baseline lengths of the specified ms.
  350. getBaselineStatsFromASDM -- Compute statistics on the baseline lengths of the specified ASDM.
  351. getCalibrationIntents -- Returns a list of calibration intents for a specified measurement set and field ID
  352. getCalibratorFromASDM -- Returns the name of the calibrator(s) observed for a specified intent from an ASDM
  353. getCalibratorFromASDMs -- Returns a dictionary of the calibrator(s) observed for a specified intent from a list of ASDMs
  354. getCalibrators -- Returns a list of calibrator names or source IDs from a measurement set.
  355. getChanFreqFromCaltable -- Returns the frequency of the specified channel in the specified spw of a caltable
  356. getChannelAveragedScienceSpws -- Returns a list of channel averaged spws corresponding to the science spws
  357. getChannelAveragedSpw -- Finds the channel-averaged spw corresponding to a specified full resolution spw
  358. getChanWidths -- Return the channel widths of a specified ms and spw
  359. getChanwidthASDM -- Returns the physical channel width in Hz for an spw in an ASDM
  360. getChanWidthFromCaltable -- gets the width of a channel from one or all spws in a caltable
  361. getCOFA -- returns the center of the array for the specified ms, in XYZ and in longitude/latitude
  362. getCOFAForASDM -- returns the center of the array for the specified ASDM, in XYZ and in longitude/latitude
  363. getCOFAForObservatory -- returns the center of the array for the specified observatory name, in XYZ and in longitude/latitude
  364. getConfig -- Reads the configName value from the ASDM_EXECBLOCK table of an ms
  365. getConfigFromASDM -- Reads the configName value from the ExecBlock.xml file of an ASDM
  366. getCorrectedData -- Reads uvdist and corrected amplitudes
  367. getCorrelatorName -- reads the correlator name from the CorrelatorMode.xml file of an ASDM
  368. getCorrelatorNameFromMS -- reads the correlator name for the ASDM_CORRELATORMODE table, if it was imported
  369. getCurrentDate -- gets the current date in local time in the format 'YYYY/MM/DD'
  370. getCurrentMJDSec -- gets the current MJD in seconds
  371. getCurrentUnixTime -- gets current unix time from the system clock
  372. getDataColumnName -- gets the name of the data column of a measurement set
  373. getDiameterForObservatory -- convert an observatory name to an antenna diameter
  374. getDistanceFromMedianPadLOCFromASDM -- gets the distance of each antenna from the median of all the pad locations in an ASDM
  375. getElevationStatsForIntentFromASDM -- gets the min/median/max elevation observed for a specified intent in an ASDM
  376. getEphemeris -- reads the ephemeris from the ASDM_EPHEMERIS table of a measurement set
  377. getEphemerisFields -- gets a list of ephemeris field names in a measurement set
  378. getEphemerisFieldsFromASDM -- gets a dictionary of ephemeris fields and their initial direction from an ASDM
  379. getEquinoxForField -- Gets the reference frame name for specified field in an ms (i.e. 'J2000' or 'ICRS')
  380. getExtremeBaselinePerAntenna -- computes min, mean, median, or max baseline length per antenna on an ASDM
  381. getExtremeSpws -- returns the spw ID for the spw containing the minimum and maximum frequency for the specified intent
  382. getFeedTableTimes -- Gets the unique values of the TIME column of the FEED table
  383. getFieldIDsForEphemerisID -- Returns a list of all field IDs that correspond to one ephemeris ID
  384. getFieldnameFromPipelineImageName -- Gets field name from an ALMA pipeline image name
  385. getFieldTime -- Gets the TIME for one cell of the FIELD table of an ms
  386. getFieldTimes -- Gets the TIME column of the FIELD table of an ms
  387. getFieldsFromASDM -- gets field IDs and names from an ASDM, as two dictionaries
  388. getFieldsFromCaltable -- gets a list of unique field IDs (of fields that have a solution) from a caltable
  389. getFitsBeam -- Extract the beam information from a FITS or CASA image.
  390. getFitsBeams -- Runs getFitsBeam for a list of images and prints a wiki table
  391. getFitsDate -- Extract the date information from a FITS or CASA image.
  392. getFlagdict -- Extract flagging dictionary using the af tool
  393. getFlagsFromCaltable -- Extract the number of flags from a caltable, or a dictionary of them
  394. amc.getFlagStatistics -- Uses the af tool to compute percentage of flagged data
  395. getFluxesFromAquaReport -- Used by plotGfluxscale to read derived and catalog flux from pipeline-generated aquareport.xml
  396. getFreqType -- Returns string TOPO or LSRK, etc. for a CASA image
  397. getFrequenciesFromASDM -- Get a list of the frequencies of each spw in the ASDM (extraneous WVR spws are skipped)
  398. getfwhm -- Directly estimate the actual FWHM of the CASA image provided, with no assumption about shape (Brian Mason)
  399. getfwhm2 -- An alternative to getfwhm which solves for radially-averaged zero crossing of (data-halfmax)
  400. getgain -- extract gain curve coefficients for a specified VLA antenna and band and make a plot vs. elevation
  401. getImfitEstimatesFixedString -- Reads the fixed parameter from each line of an imfit estimates file
  402. getIntegrationTime -- use the ms and msmd tools to get the integration time in a measurement set
  403. getIntegrationTimeFromASDM -- reads the Main.xml file to find the longest integration time
  404. getIntensityForPixel -- Gets the intensity at a single pixel of a CASA image.
  405. getIntentsForFieldID -- gets all the intents for which a field was observed
  406. getIntentsFromASDM -- Makes a dictionary with field name as key and intents as the value.
  407. getLineFromFile -- Returns the contents of the specified line number from the specified text file
  408. getListOfFilesFromFile -- Reads a list of ASDM or measurement set names from a text file and returns a list of names
  409. getLO1 -- Returns the LO1 frequency in Hz for first science spw of a measurement set
  410. getLOs -- returns a list of four lists containing the LO information from the ASDM_RECEIVER table of a measurement set
  411. getLOsFromASDM -- Returns a dictionary of the LO values for every spw in the specified ASDM
  412. getLoadTemperatures -- Reads the load temperatures from the ASDM_CALDEVICE table (if present).
  413. getLongestProjectedBaselineInMainTable -- Reads the UVW column from main table and computes largest value of specified coordinate combination
  414. getMajorIntentsForFieldID -- gets all the major intents for which a field was observed
  415. getMaxBaselineInUnitsOfL80 -- Returns dictionary of max baseline in units of L80 for specified measurement set(s)
  416. getMaxBaselineInUnitsOfL80FromASDM -- Returns dictionary of max baseline in units of L80 for specified ASDM
  417. getMeanFreqFromASDM -- gets the number and mean frequency of the spws for each sideband
  418. getMeanFreqOfSpwlist -- gets the mean of the mean frequency of a list of spws
  419. getMeanFreqOfSpwSelection -- gets the mean frequency of an arbitrary spw/channel selection string
  420. getMeanPosition -- computes the mean RA and mean Dec of a list of positions
  421. getMeanPositionFromOTPointings -- gets the mean RA and Dec direction of a list of pointings output by the Cycle 4 OT
  422. getMeanScienceFreqOfSidebands -- computes the bandwidth-weighted mean of the spws in each sideband
  423. getMeanWeights -- gets the mean of the WEIGHT column from a measurement set
  424. getMeanWeightsPerAntenna -- gets the mean of the WEIGHT column from a measurement set on a per-antenna basis
  425. getMeasFreqRef -- reads the MEAS_FREQ_REF column of a SPECTRAL_WINDOW table of an ms, which encodes whether the frequency frame is TOPO or LSRK, etc.
  426. getMeasurementSetFromCaltable -- get the name of the measurement set associated with a caltable
  427. getMedianBaselinePerAntenna -- computes median baseline length per antenna on an ASDM
  428. getMedianPadLOCFromASDM -- gets the median location (in ENU coordinates) of all the pads in an ASDM
  429. getMedianPWV -- computes median and standard deviation of PWV for the specified ms (or the CalWVR.xml file in the pwd)
  430. getMedianTsys -- gets the median Tsys from one or more datasets
  431. getMedianTsysForChannel -- Computes the median over all antennas of a single Tsys channel in one spw in one ASDM
  432. getMedianTsysPerSpw -- Computes the median Tsys value per spw in a measurement set
  433. getMedianWeatherFromAIV -- Computes the median weather from weather.aiv.alma.cl for a specific time range
  434. getMedianWeatherFromAIVForASDM -- Computes the median/Mad of weather values from weather.aiv.alma.cl per scan of an ASDM
  435. getMedianWeatherFromTMCDB -- Computes the median weather from the TMCDB for a specific time range or ASDM
  436. getMemorySize -- gets the total memory of the current machine
  437. getMJD -- computes the current MJD
  438. getMJDSec -- computes the current MJD in units of seconds
  439. getMJDSecFromCaltable -- computes the mean MJD in units of seconds of the solutions in a caltable
  440. getMostRecentMove -- searches the antennaMoves.txt file for the most recent move for a specified antenna
  441. getNChanFromCaltable -- gets the number of channels from one or all spws in a caltable
  442. getNominalObservatoryPressure -- computes the nominal barometric pressure for the tabulated height of a specified observatory
  443. getNonScienceTimeRanges -- Gets a list of time ranges of the scans NOT of a specified field or intent
  444. getNumChanFromASDM -- gets the number of channels for each spw
  445. getObservationDateRangeFromASDM -- gets the start and stop date and time of an ASDM
  446. getObservationEndDateFromASDM -- Reads the stop time of the observation from an ASDM and report it in date + UT time and MJD seconds
  447. getObservationIDs -- gets a list of the unique observation IDs from a measurement set
  448. getObservationLength -- gets length of measurement set observations in minutes
  449. getObservationLengthFromASDM -- gets length of ASDM observation in minutes
  450. getObservationMJDSecRange -- gets beginning and end time of an ms in MJD seconds
  451. getObservationMJDSecRangeFromASDM -- gets beginning and end time of an ASDM in MJD seconds
  452. getObservationStart -- Read the start time of the observation from an ms and report it in MJD seconds.
  453. getObservationStartDate -- Read the start time of the observation from an ms and report it in date and UT time.
  454. getObservationStartDates -- Read the start time of the observation from a list of measurement sets and report a list of dates and UT times.
  455. getObservationStartDateFromASDM -- Read the start time of the observation from an ASDM and report it in date + UT time and MJD seconds.
  456. getObservationStartDateFromASDMs -- Runs getObservationStartDateFromASDM on a list of ASDMs and writes a text file
  457. getObservationStartDay -- Read the start time of the observation from an ms and report only the UT date (YYYY-MM-DD).
  458. getObservationStop -- Read the stop time of the observation from an ms and report it in MJD seconds
  459. getObservationStopDate -- Read the stop time of the observation from an ms and report it in date and UT time
  460. getObservationSummaryFromASDM -- gets the start and stop date and time, and a list of antennas from an ASDM (or a list of them)
  461. getObservatoryFromConfig -- reads the telescope name from an antenna configuration file
  462. getObservatoryLatLong -- reads the latitude and longitude of an observatory from the CASA repository
  463. getObservatoryName -- reads the observatory name from the OBSERVATION table of an ms
  464. getObservatoryNameFromASDM -- reads the observatory name from the ExecBlock.xml file of an ASDM
  465. getOUS -- read the OUS for an ASDM from the ExecBlock.xml file (note: it is not possible to get the project code from an ASDM)
  466. getOUSForUID -- retrieves the OUS name for an ASDM or measurement set without requiring that file
  467. getPadHeight -- gets the geocentric distance for one or all pads in a measurement set
  468. getPadHeightFromASDM -- gets the geocentric distance for one or all pads in an ASDM
  469. getPadLOC -- reads the local tangent plane coordinates for the specified pad name from the file AOS_Pads_XYZ_ENU.txt
  470. getPadLOCsFromASDM -- reads the pad position in ENU coordinates from an ASDM
  471. getPadPosition -- Gets a measures.position instance for the specified ALMA pad name
  472. getPadPositions -- reads the pad positions in geocentric XYZ coordinates from an ms
  473. getPadPositionsFromASDM -- Reads the pad positions in geocentric XYZ coordinates from an ASDM
  474. getPadsForConfig -- gets a list of pad names for the specified antenna configuration file
  475. getPadXYZ -- computes the XYZ geocentric coordinates any specified ALMA pad name in the file AOS_Pads_XYZ_ENU.txt
  476. getPadXYZFromASDM -- reads the XYZ geocentric coordinates for the specified ALMA pad name from the ASDM
  477. getPhaseCalibrators -- gets the field IDs of the phase calibrators in a measurement set
  478. getPhaseCenterForField -- calls getRADecForField and returns result in form amenable to tclean phasecenter parameter
  479. ami.getPipelinePBAndMask -- given the name of a pipeline image, determines the expected name for the corresponding pb and mask, returns them, and prints a warning if either one does not exist
  480. getPointingScans -- Gets a list of scans with pointing intent
  481. getPolarizationsFromASDM -- Reads the Polarization.xml file and reports the polarization products in each ID
  482. getPrimaryIntent -- Given a list of intents, return the fundamental intent
  483. getProjectMOUSFromDir -- Gets the project name and MOUS from a pipeline execution directory path
  484. getRADecForField -- Returns the RA,Dec in radians for the specified field in the measurement set
  485. getRADecForFieldFromASDM -- Returns the RA,Dec in radians for the specified field ID in an ASDM
  486. getRADecForSource -- Returns the RA,Dec in sexagesimal for the specified source in the measurement set
  487. getRadialVelocityAtStart -- Reads RadVel from ephemeris attached to measurement set and returns entry nearest to start of measurement set
  488. getReceiverId -- Reads the ASDM_RECEIVER table of a measurement set and returns a single integer ID or list of IDs present
  489. getResampledWeatherFromDatabase -- Gathers and resamples weather values onto a common time series
  490. getSB -- Gets the UID of the schedule block for a measurement set
  491. getSBGain -- read the sideband ratio gains from the SYSCAL table of a measurement set
  492. getScanNumbersFromASDM -- Returns a list of scan numbers in an ASDM that have the specified intent
  493. getScansFromCaltable -- Gets the list of unique scan numbers from a caltable
  494. getScienceBasebandFrequencies -- Gets the center frequencies of the science basebands of an ALMA dataset (via the SQLD spws)
  495. getScienceBasebandIFRanges -- Gets the IF range of the science basebands of an ALMA dataset (via the SQLD spws)
  496. getScienceBasebandRFRanges -- Gets the RF range of the science basebands of an ALMA dataset (via the SQLD spws)
  497. getScienceBasebandSamplerRanges -- Gets the location of the science basebands in the sampler range (should always return 2-4 GHz if metadata are correct)
  498. getScienceChannelsInSameBaseband -- Returns the total number of channels in science spws in the same baseband as the specified spw
  499. getScienceFrequencies -- Gets a list of the central frequencies of science spws in a measurement set
  500. getScienceScans -- Gets a list of scans with specified intent
  501. getScienceSpwBasebands -- Gets a dictionary keyed by spw with values equal to their respective basebands numbers (1..4)
  502. getScienceSpwIFRanges -- Gets the IF ranges of the science spws in an ALMA measurement set
  503. getScienceSpws -- Uses msmd to get a list of (full-resolution) science spws in a measurement set
  504. getScienceSpwSamplerRanges -- gets the location in the sampler range of 2-4 GHz of all science spws
  505. getScienceSpwTypes -- returns dictionary with number of 'FDM' and 'TDM' science spws
  506. getScienceSpwsForFrequency -- Gets a list of spws whose channels contain a specified frequency
  507. getScienceSpwsFromASDM -- Gets a list of spws that observed the science target (i.e. those with a velocity reference code)
  508. getScienceSpwSidebands -- Gets a dictionary keyed by science spws with values of 'LSB' or 'USB'
  509. getScienceSpwsInSameBaseband -- Gets a list of science spws that occupy the same baseband as the specified spw
  510. getScienceSpwsInSameBasebandFromASDM -- Gets a list of science spws that occupy the same baseband as the specified spw
  511. getScienceSpwTransitionsFromASDM -- Gets a dictionary of spectral line transition names for the science spws of an ASDM
  512. getScienceTargetFieldIDsFromASDM -- Returns a list of science field IDs for the nth science source of an ASDM
  513. getScienceTargetRADecsFromASDM -- Returns a list or dictionary of RA, Decs for the science fields of an ASDM
  514. getScienceTargetsFromASDM -- Gets an array of science targets from an ASDM
  515. getScienceTimeRanges -- Gets a list of time ranges of the scans of a specified field or intent
  516. ami.getSourceNameFromPipelineImageName -- Parses the source name from an ALMA pipeline image name
  517. getSpwFromPipelineImageName -- Gets single spw ID from a single-spw ALMA pipeline image name
  518. getSpwImageSidebandFrequencyRange -- Computes the image sideband frequency range of a specified spw
  519. getSpwMeanFreqFromCaltable -- Gets the mean frequency for an spw from a caltable using its SPECTRAL_WINDOW subtable
  520. getSpwsForBaseband -- gets the spws associated with a specific baseband number
  521. getSpwsForBasebandFromASDM -- gets the spws associated with a specific baseband number
  522. getSpwsFromCaltable -- gets a list of the unique spws from a caltable
  523. getSpwsFromASDM -- Returns a dictionary of the spw information for an ASDM
  524. getSpwsFromSysCal -- gets a list of the unique spws in a SYSCAL table of a measurement set
  525. getStandardTemperature -- computes the 1976 U.S. Standard atmosphere barometric pressure for a specified height
  526. getStandardTemperature -- computes the 1976 U.S. Standard atmosphere temperature for a specified height
  527. getStartTimeForFieldFromASDM -- gets a list of start times (in MJD) for a specified field name in an ASDM
  528. getSubscanTimesFromASDM - reads the subscan information from the ASDM and returns a dictionary including integration time, and computes latency
  529. getTargetsForIntent -- gets the target names observed for a specified intent in a measurement set (using msmd)
  530. getTargetsForIntentFromASDM -- gets the target names observed for a specified intent in an ASDM
  531. getTelescopeNameFromCaltable -- reads the observatory name from the caltable's OBSERVATORY subtable
  532. getTimesFromCaltable -- gets a list of the unique timestamps from a caltable
  533. getTPSampling - computes the spatial sampling of a single dish measurement set containing a total power raster map
  534. getTsysFromCaltable -- returns an array of Tsys spectra
  535. getTsysFromSysCal -- reads the Tsys values from a SysCal.xml table into a dictionary
  536. getTsysScans -- gets the list of unique scans contained in a caltable
  537. getTsysSpws -- gets a list of spws that measured Tsys
  538. getUnflaggedAntennas -- Uses the af tool to determine the list of unflagged antennas in a measurement set
  539. getUnflaggedScans -- Uses the af tool to determine list of unflagged scans for a specific spw and field
  540. getUT -- gets the current Universal Time in hours
  541. getuvrange -- returns the minimum uv spacing, maximum uv spacing and number of visibility points in the specified ms
  542. getvisdensity -- returns the average density of visibility points for the specified ms
  543. getxyFromFile -- Gets two columns of data from an ASCII file, as numpy arrays
  544. getWeather -- Gets weather information from a measurement set
  545. getWeatherFromAIV -- Retrieves weather values from weather.aiv.alma.cl
  546. getWeatherFromASDM -- Extracts weather values from an ASDM
  547. getWeatherFromTMCDB -- Extracts weather values from the TMCDB
  548. getWeatherStationNames -- Gets the weather station names from a measurement set
  549. getWeatherStationNamesFromASDM -- Gets the ALMA weather station names from an ASDM
  550. getWeatherStationPositions -- Gets the weather station positions from a measurement set
  551. getWeatherStationPositionsFromASDM -- Gets the weather station positions from an ASDM
  552. getWeightedMeanScienceFrequency -- Computes the weighted mean science spw frequency for a list of measurement sets, weighted by data weights on a per-spw, per-vis basis
  553. gjincBeam -- compute the effective restoring beam obtained from the casa command sd_imaging using the GJinc gridding function
  554. goldsmithTaperFactor -- Converts a taper in dB to the constant X in the formula FWHM=X*lambda/D for a Gaussian illumination pattern
  555. grep -- Runs grep on a file in a subprocess 1 getExtremeBaselinePerAntenna -- computes min, mean, median, or max baseline length per antenna on an ASDM
  556. grepAntennaMoves -- Runs grep for a specific antenna on the antennaMoves.txt file distributed with analysisUtils
  557. gridSourceReport -- Builds a report of the age of the most recent measurement of the grid sources in each band
    H
  558. headerToArcsec -- Convert any CASA angle quantity to arc seconds
  559. headerToDegree -- Convert any CASA angle quantity to degrees
  560. headerToRadian -- Convert any CASA angle quantity to radians
  561. help -- prints a list of all the functions defined at the top level of analysisUtils.py
  562. hmsToDegrees -- Converts string of "HH", "HH:MM" or "HH:MM:SS" into floating point degrees
  563. hmsToHours -- Converts string of "HH", "HH:MM" or "HH:MM:SS" into floating point hours
  564. hmsToInterval -- Converts string of "00d01h02m03s" to integer (or floating point) number of seconds
  565. hourAngleForField -- Computes the range and mean hour angle for a field in a measurement set
  566. hoursToHMS -- converts decimal hours to HH:MM:SS string
  567. hours2radec -- converts decimal RA hours and decimal Declination degrees to a sexagesimal string
    I
  568. ICRSToJ2000 -- Converts an ICRS direction to J2000
  569. imageAntennaDiameter -- Attempt to infer antenna diameter for an image from its header
  570. imageAreaAbovePB -- Computes area of pixels above a specified level of an image
  571. imageBandwidth -- Reports total bandwidth in GHz for an image cube
  572. imageCenter -- returns the RA/Dec center of an image
  573. imageCenterVsFieldCenter -- Computes angular separation of phase center pixel from field direction in measurement set
  574. imageCentroid -- Computes statistics and centroid of a CASA image
  575. imageCentroids -- Runs imageCentroid for a list of images
  576. imageChannel -- Finds the channel in a cube that corresponds to a specified velocity
  577. imageChannelVelocity -- Finds the velocity of a specified channel in a cube
  578. imageChannelVelocityWidth -- Finds the velocity width of the first channel in a cube
  579. imageChannelFrequency -- Uses the ia tool to get the frequency of a specified channel of a cube
  580. imageChannelFrequencyWidth -- Finds the frequency width of the first channel in a cube
  581. imageClip -- Clip an image at a specified intensity level
  582. imageClipAndRemove -- Clip and image at a specified intensity level and remove the result from the image
  583. imageCRValues -- Gets the axis reference values from a CASA image
  584. imageDate -- Reads the observation date of an image from its header
  585. imageEquniox -- Reads the equinox (ICRS/ J2000) from a CASA image
  586. imageFitFluxAtPhaseCenter -- fits a Gaussian to the central 30 pixels of an image and reports flux density and uncertainty
  587. imageFrequencyChannel -- determines the nearest channel to the specified frequency for a cube, with findcont ceil/floor option
  588. imageGaussianFilter -- Smooth an image by a circular Gaussian kernel
  589. imageHeaderToICRS -- Uses CASA imhead to set the equinox in a CASA image to ICRS
  590. imageHeaderToJ2000 -- Uses CASA imhead to set the equinox in a CASA image to J2000
  591. imageHistogram -- Plots a histogram of a CASA image
  592. imageHistory -- Prints the history records of a CASA or FITS image
  593. imageImstat -- Runs the CASA imstat command on an image/region and returns the specified keyword from the dictionary
  594. imageImstats - Runs imageImstat on a list of images and returns a list of values
  595. imageMaxBaseline -- Infers the maximum baseline based on the resolution and frequency of an image
  596. imageMedian -- Uses imstat to compute median of an image
  597. imageMin -- Returns the minimum pixel value of a CASA image
  598. imageModelResidual -- Given an image and a model image, compute the residual and plot all three side-by-side
  599. imageObservatory -- Attempt to read the observatory name from the header of an image
  600. imagePeak -- Returns the peak pixel value of a CASA image
  601. imagePeakPerChannel -- Returns an array of the peak pixel in each channel of a CASA cube
  602. imagePeaks -- Runs imagePeak on a list of images
  603. imagePercentile -- Computes pixel value corresponding to a specified pixel value
  604. ami.imagePixelsInMask -- counts number of pixels that are masked in an image
  605. imagePrimaryBeam -- Attemp to infer the primary beam size for an image from the telescope name in its header
  606. imageRegister -- Runs imfit on a list of position in two images of the same field and finds the median pixel shift to bring them into alignment
  607. imageRegisterImfitDictionaries -- same as imageRegister but accepts a user-supplied pair of imfit dictionaries
  608. imageRestFrequency -- Reads the rest frequency stored in a CASA or FITS image header
  609. imageRotate -- Runs ia.rotate on a CASA image
  610. imageShape -- Returns an array of the shape of a CASA image
  611. imageSmooth -- Runs imsmooth on a list of images
  612. imageSnr -- Measures the peak signal to noise ratio in a CASA image
  613. imageSnrs -- Measures the peak signal to noise ratio in each image in a list of CASA images
  614. imageSource -- Gets the name of the source from a CASA image
  615. imageStd -- Measures the standard deviation (or MAD) in a CASA image
  616. imageStdPerChannel -- Measures and plots the standard deviation, rms, MAD, min and max in a list of channels in a CASA image
  617. imageStds -- Measures the standard deviation in each image in a list of CASA images
  618. imageStdsPerChannel -- Measures and plots the standard deviation, rms, MAD, min and max in a list of channels for each image in a list of CASA images
  619. imageStdVariation -- Measures how the image standard deviation varies across the image
  620. imageStokes -- Reads which Stokes parameters are contained in a CASA image
  621. imageSum -- Sums a list of CASA images into a new image using immath
  622. imfitparseDict -- Simplifies an imfit dictionary for a specified component to have just 6 keys
  623. imfitparse -- converts a dictionary returned by imfit into a formatted string (for a single component)
  624. imfitparseCLB -- alternative version of imfitparse
  625. imfitparseCLBs -- Runs imfitparseCLB on all the components that were fit
  626. imfitplot -- Calls the casa task imfit, then plots the model and residual images side-by-side on the same intensity scale.
  627. imheadlist -- Emulates imhead(mode='list') but is faster because it avoids looking through binary data for the min/max/minpos/maxpos values
  628. importandlist -- Calls the casa task importasdm followed by listobs on one ASDM, or a list of ASDMs.
  629. importasdm2 -- Runs importasdm but only for scans that match a specified intent
  630. insertBracketsIntoFlaglist -- Inserts square brackets around all the timerange entries in a file containing flag statements
  631. imshift -- Shifts a CASA image header in RA/Dec
  632. imstatCompare -- Runs imstat on 2 images and compares all the result for equality
  633. imstat_cas6745 -- Runs imstat using a work-around for CAS-6745
  634. imsubimageOnePlane -- Takes one plane from a 3-axis image, even if the type of the 3rd axis is undefined, as in SOFIA FORCAST images
  635. imviewField -- Plots a square portion of a CASA image specified in arcseconds using imview
  636. imviewFieldCubeEdges -- builds a multi-panel png of the edge channels of a cube
  637. imviewFields -- Calls imviewField for a list of images and builds a multi-page PDF
  638. imviewGaussianModels -- Overlay the 50% contour of one or more Gaussian models overtop an image
  639. intentsforfield -- Workaround for the bug in msmd.intentsforfield (CAS-12164)
  640. interpolateSpectrum -- Interpolates a spectrum onto a finer grid of frequencies.
  641. interpolateTable -- Performs a spline interpolation of any two columns in an ASCII data table
  642. interpretLOs -- returns the LO1 (and optionally LO2) information for each spw (assuming the ASDM_RECEIVER table is present)
  643. intervalToHMS -- converts a number of seconds into a string interval of format 00h00m00s
  644. inverseTsysspwmapWithNoTable -- Determines a list of science spws that use a specified Tsys spw
  645. invertChannelRanges -- Inverts a CASA channel selection string (i.e. from line-free to line-full)
  646. isMosaic -- Determines if any science target was observed with multiple fields with science intent
  647. isSingleContinuum -- Checks if an spw in an ALMA measurement set was defined as Single Continuum in the OT by looking at the transition name for the first science spw
  648. isSingleContinuumASDM -- Checks if an ASDM contains a tuning that was defined as Single Continuum in the OT (by looking at Source.xml file)
  649. isSpectralScan -- Checks if a measurement set was defined as spectral scan in the OT, by looking at the transition name for the first science spw
  650. isSpectralScanASDM -- Checks if an ASDM contains a tuning that was defined as spectral scan in the OT (by looking at the Source.xml file)
    J
  651. J2000ToICRS -- Convert a J2000 direction to ICRS
  652. J2000ToICRSgrid -- Runs J2000ToICRS for a grid of positions on the celestial sphere and computes statistics
  653. janskyPerKelvin -- Computes the theoretical Jy/K for an ALMA single dish image based on its measured beamsize
  654. jdToMJD -- converts JD to MJD
    K
  655. kelvinToCelsius -- Adds 273.15 to the value
    L
  656. lineSeparation -- computes IF location for simultaneous observations of a line in LSB and another line in USB
  657. linfit -- Uses scipy.optimize.leastsq to perform a linear fit to data accounting for measurement uncertainties in the dependent variable
  658. linfitFromFile -- A wrapper for linfit which will read column data from a text file and then fit it
  659. listazel -- Extracts the mean azimuth and elevation for the specified scan of an ms
  660. listBlankChannelsInImage -- Returns an array of channels of a cube whose min==max
  661. listconditions -- lists average weather, PWV and opacity (tau) during your ms
  662. listConditionsFromASDM -- lists average weather during your asdm
  663. listflagsSlow -- list all row numbers in an ms that have flagged data, and report statistics (slow!!)
  664. es.listobs2 -- ALMA qa2 function that produces a more readable listobs and antenna configuration plot
  665. listobsasdm -- Performs casa-like listobs on an ASDM
  666. listobslist -- Runs listobs on a list of measurement sets, which can be alternately be specified by a string containing wildcard characters
  667. listPhaseSolutions -- list phase solutions by antenna, sorted by absolute value (useful for examining selfcal solutions)
  668. listscans -- lists the summary (time and intents) of each scan in an ASDM and the total time on each source
  669. long2xyz -- Wrapper for simutil.long2xyz to convert a longitude,latitude,elevation to an ITRF position
  670. longs2xyz -- Converts a list of longitude,latitude,elevation to a list of ITRF positions
  671. ami.lookForFile -- Accepts a file path with wildcards and returns the newest file
  672. ami.lookForNewestFileContainingStrings -- Accepts a file path with wildcards and a list of strings and finds the newest matching file
  673. lowCaiSelection -- Finds baseline names that reside below the CAI=32 boundary for a specified measurement set (see also crossCaiSelection)
  674. lstrange -- lists the range of LST, UT, MJD for the whole ms, and for scans with ON_SOURCE intent (including the elevation range)
  675. lstToUT -- converts LST and date to UT
    M
  676. MAD -- compute the median absolute deviation of a list
  677. MADoutliers -- finds outlier values and their locations in a list or array
  678. makeDirtyCube -- picks an appropriate cell and image size and makes a dirty cube
  679. makeFixEphem -- makes a fixEphem.py script for a multi-execution ephemeris observation
  680. visbilityOutliers.makeFlagTemplates -- The development version of hifa_bandpassflag and hifa_gfluxscaleflag
  681. makeGaussianForImage -- Take a CASA image as a template, and build an image with a single 2D Gaussian component at the specified location
  682. makeGaussiansForImage -- Take a CASA image as a template and a dictionary from imfit, and build images of each of the 2D Gaussian components and their sum
  683. makePSF -- uses imagehelper toolkit to determine PSF for 1 or a group of measurement sets (to emulate hifa_imageprecheck)
  684. makePtgfile -- Builds a pointing file from a measurement set suitable for use in simobserve
  685. makeSimulatedImage -- use simobserve/simanalyze to generate a simulated image of a point source or uniform disk in a specified direction and with a specified flux density
  686. makeTimeStamp -- builds a current timestamp string like '2017-05-06T17:15:37'
  687. maskBlankChannelsInImage -- Sets the mask for all channels of a cube whose min==max
  688. maskChannel -- Masks the specified channel(s) in a cube
  689. maxBandwidthWithoutSmearing -- Computes widest bandwidth for averaging that will not cause smearing
  690. maxBaselineForRequestedResolutionFromASDM -- computes the maximum baseline required to achieve the requested resolution of the science targets in an ASDM, accounting for elevation projection
  691. maxTimeWithoutSmearing -- Computes longest time averaging that will not cause smearing
  692. meanAirmassForSource -- Computes mean airmass that a source was observed at in a measurement set
  693. meandate -- Computes mean day of a list of YYYYMMDD's
  694. meanepoch -- Computes mean epoch floating point value of a list of YYYYMMDD's
  695. meanObliquity -- compute the mean obliquity for the specified date
  696. medianFrequencyOfIntent -- Returns the median of the mean frequencies (in Hz) of the spws observed with the specified intent (default = OBSERVE_TARGET#ON_SOURCE)
  697. medianTsysForFieldFromTsysCaltable -- computes median Tsys spectrum a Tsys caltable
  698. medianTsysForFieldFromSyscalTable -- computes median Tsys spectrum from measurement set
  699. medianTsysForRestFrequency -- Returns the median Tsys for the spw that contains the label for the specified rest frequency
  700. mjdListToDateTime -- Takes a list of MJD values and converts it to a list of python datetime structures.
  701. mjdNanosecondsToMJDandUT -- convert MJD in nanoseconds to MJD in days and the UT date and time string
  702. mjdSecondsToMJDUT -- converts MJD in seconds to MJD in days and a UT date/time string
  703. mjdSecondsListToDateTime -- Takes a list of MJD seconds and converts it to a list of python datetime structures.
  704. mjdsecToDate -- Converts MJD seconds to the date string that contains it (YYYY-MM-DD)
  705. mjdsecToDateString -- Converts MJD seconds to the equivalent date/time string that appears in a CASA log
  706. mjdsecToDDMonthYYYY -- Converts MJD seconds to DD-MonthName-YYYY
  707. mjdsecToTimerange -- Converts two value of MJD seconds into a UT date/time string suitable for the plotms timerange argument
  708. mjdsecToTimerangeComponent -- Converts a value of MJD seconds into a UT date/time string suitable for one component of the plotms timerange argument
  709. mjdsecToUT -- converts MJD in seconds to a string of format "YYYY-MM-DD HH:MM:SS UT"
  710. mjdsecToUTHM -- converts MJD in seconds to a string of format "HH:MM"
  711. mjdsecToUTHMS -- converts MJD in seconds to a string of format "HH:MM:SS"
  712. mjdToChileTime -- converts MJD to a datetime structure in Chile/Continental timezone (ALMA)
  713. mjdToDate -- Converts MJD to the date string that contains it (YYYY-MM-DD)
  714. mjdToDatestring -- Converts MJD to a date and time string
  715. mjdToEasternTime -- converts MJD to a datetime structure in Eastern time
  716. mjdToJD -- converts MJD in day to JD in days
  717. mjdToLocalTime -- converts MJD to a datetime structure in any specified timezone
  718. mjdToMountainTime -- converts MJD to a datetime structure in US/Mountain timezone (VLA)
  719. mjdToPredictcomp -- Converts an MJD into a string suitable for the epoch parameter of predictcomp
  720. mjdToUnixtime -- Converts an MJD into unix time in seconds
  721. mjdToUT -- converts MJD to date and UT
  722. mjdToYear -- converts MJD to floating point year
  723. modifyAntennaDiameter -- Change the dish diameter column in the ANTENNA table of a measurement set
  724. modifyImfitEstimates -- Modifies a line in an existing imfit estimates text file
  725. modifyIntents -- replace all appearances of one intent in the STATE table of an ms with another
  726. modifyPPR -- modifies a pipeline processing request xml file (PPR) in a variety of ways
  727. modifyReferenceFrequency -- Modifies the REF_FREQUENCY column of the SPECTRAL_WINDOW table of a caltable
  728. montage -- runs the ImageMagick command montage on a list of images
  729. montagePngs -- takes 2, 3 or 4 pngs (or other single-page image types) and puts them onto one page as a new png
  730. montageTwoPdfs -- takes two multi-page PDFs and places their corresponding page numbers onto the same page
  731. montageTwoPngLists -- take two lists of png files (or other single-page image types) and pair them side-by-side, on successive pages
  732. mosaicFieldOrder -- Returns the mosaic target field IDs in time order of first OBSERVE_TARGET observation
  733. mosaicSensitivity -- computes the sensitivity at the center of a hexagonal mosaic relative to a single pointing
  734. mosaicOverlapFactor -- computes the peak sensitivity of a arbitrary pattern mosaic relative to a single pointing
  735. mostRecentMoves -- checks the antennaMoves.txt file for the most recent move of each antenna in an ms
  736. mostRecentPipelineParentDirectory -- finds the parent directory of the most recent pipeline run of a NA user
  737. mostRecentPipelineWorkingDirectory -- finds the working directory of the most recent pipeline run of a NA user
  738. multiTaskExecutionTimes -- calls taskExecutionTimes for a list of tasks and returns a dictionary
  739. multiTaskExecutionTimesGlob -- calls multTaskExecutionTimes for all the directories in a pipeline execution area
    N
  740. nameforspw -- Reads the spw name from the spectral window table (obsoleted by msmd.namesforspws in casa>4.2.2)
  741. nearestCalibratorToScienceTargets -- Computes the nearest calibrator to each science target in a measurement set
  742. nearestCalScanForTime -- Determines the calibrator scan which has the nearest central time to the specified time
  743. nearestScanForTime -- Determines the scan which has the nearest start or end time to the specified time
  744. nextHighestIntegerEvenlyDivisible -- Finds a number of channels that is evenly divisible into the total number of channels in an spw
  745. nodeFromLogfile -- Reads the Lustre node name used by a pipeline run from its CASA log file
  746. nonzeroPixels -- Counts the number of non-zero pixels in a CASA image
  747. normalizeImage -- normalize the intensity scale of a CASA image to a specified value
  748. numberOfChannelsInCube -- returns the number of channels in a CASA image cube
  749. numberOfPolarizationsInSyscalTable -- returns the number of polarizations in the first row of the SYSCAL table
  750. numberOfPolarizationsInSyscalXML -- returns the number of polarizations in the first antenna, spw, scan combination in the SysCal.xml file
    O
  751. observatories -- Returns a list of all observatory names in the CASA repository
  752. obslist -- prints the antenna station coordinates in local offsets from the Center of Array, and computes longest/shortest baselines
  753. onlineChannelAveraging -- infers the channel averaging factor for ALMA data from Cycle 3 and beyond
  754. orthogonalDistanceRegression -- perform linear fit accounting for uncertainties in both axes
  755. outlierChannelsInPSF -- Returns a list of channels in a cube that are outliers in beam area or axial ratio
  756. overlayCuts -- Extract a single row or column from two CASA images and overlay them.
  757. overlayHolographyCuts -- Extract a single row through the peak of a list of images and overlay them
  758. overlayTrx -- Overlay the Trx spectra from two different datasets for the same antenna/spw/pol
  759. overlayTsys -- Overlay the Tsys spectra from two different datasets for the same antenna/spw/pol
  760. o2sounder -- Loads a CSV file from the O2 sounder and generates profiles, plot or movie
    P
  761. padEllipsoidalHeightFromASDM -- Returns the height above the Earth ellipsoid model in meters of the pad in a specific ASDM
  762. padHeightRange -- finds the range of pad heights in the local tangent plane for a measurement set or configuration file
  763. padPlotLimits -- Expands the current pylab plot limits by specified fraction on each edge
  764. parallacticAngle -- Compute the instantaneous parallactic angle for a source
  765. parallacticAngleForField -- Compute the range and mean parallactic angle for a field in a measurement set
  766. parseAntenna -- given an antenna argument and a measurement set, returns a list of selected antenna IDs
  767. parseAntennaArgument -- called by parseAntenna
  768. parseAntennaASDM -- given an antenna argument and an ASDM, returns a list of selected antenna IDs
  769. parseBasebandArgument -- takes a scalar, integer list or string list of baseband IDs and returns an integer list
  770. parseCalibratorServiceWarning -- translate warning code from calibrator web service into readable text
  771. parseFieldArgument -- Takes a field specification, converts to names, then find all field IDs associated with those names.
  772. parseFitpsf -- Parses the beamsize from the tuple returned by imager.fitpsf
  773. parseFrequencyArgument -- converts a frequency string with units into floating point value in Hz
  774. parseFrequencyArgumentToMHz -- converts a frequency string with units into floating point value in MHz
  775. parseFrequencyArgumentToGHz -- converts a frequency string with units into floating point value in GHz
  776. parseGencalAntpos -- reads a text file, locates the first gencal antpos command, and returns the values of the antenna and parameter
  777. parseImadvise -- Parses the cell size from the tuple returned by imager.advise
  778. parseImfitShape -- returns 6 values from a 'shape' dictionary returned by imfit
  779. parseSpw -- Parses the spw argument (integer or string or list) and returns an integer list of spw IDs
  780. parseTimerangeArgument -- Converts 'HH:MM HH:MM' to [MJDsec1, MJDsec2] for a measurement set
  781. parseUvrange -- converts a uvrange string (in meters or klambda) into min and max baseline length (in meters)
  782. peakJanskyPerPixel -- finds the peak intensity of an image in Jy/beam and converts to Jy/pixel (for simobserve)
  783. pickCellSize -- Computes the recommended image cell size (and total size) for a dataset's science spws
  784. pickDishDiameter -- Returns a statistical value of the dish diameter in a measurement set (min, max, median)
  785. picklePipeRun -- Save information about a pipeline run (R. Indebetouw)
  786. pickPixelSize -- Returns the best pixel size to use with the specified convsupport parameter for the SF option of sdimaging
  787. pickTicraImage -- Picks the TICRA model image to use for a specified frequency and antenna type
  788. pipelineAntpos -- Counts number of positions corrections in a pipeline run's antennapos.csv file
  789. pipelineBandpassSolint -- Finds the frequency solint used per spw per ms in a pipeline MOUS
  790. pipelineCheckCaltable -- Checks for presence of reference and target fields for fluxscale
  791. pipelineCubeRMS -- Emulates the rms calculation shown in the pipeline weblog
  792. amc.pipelineDuration -- Computes the duration based on the calibPipeIF*.log file
  793. pipelineEBs -- Returns list of EBs from a weblog main page
  794. pipelineFindIndexHtml -- Finds the index.html file in a pipeline weblog
  795. amc.pipelineHostname -- Pulls the hostname from the casa log (available in casa 5.1p1 and beyond)
  796. pipelineImageTheFluxCalibrator -- Attempts to image the flux calibrator in a pipeline working directory
  797. pipelineImview -- Generates png of CASA image in the same color palette and layout as the ALMA pipeline
  798. pipelineIsMosaicAndTimePerPointing -- parses weblog for whether an MOUS contains mosaics, computes observing time per pointing, and number of pointings
  799. pipelineMakeRequest -- Sets up the correct bash path and runs pipelineMakeRequest on an NRAO CV Lustre node
  800. pipelinePointingsFromHtml -- Returns number of science target pointings from a weblog
  801. pipelineRobust -- Pulls the robust value from the CASA log as written by hifa_imageprecheck
  802. pipelineScienceBand -- Extracts the receiver band number from a pipeline weblog
  803. pipelineSevere -- Checks a casalog for a specified string and returns matching lines
  804. pipelineSpwTypes -- Returns dictionary keyed by spw ID with values of 'TDM' or 'FDM'
  805. pipelineTaskExecutionTimes -- Assembles and prints a list of time intervals from a CASA log of a pipeline run
  806. pipelineTimeOnSource -- Returns observing time on source from a pipeline weblog
  807. pipelineTsysFlags -- Parses casa log for number of flags found for a specified hifa_tsysflag metric
  808. pipelineVersionFromLogfile -- Reads the pipeline version used by a pipeline run from its CASA log file
  809. pixelsPerBeam -- Computes the number of pixel areas per resolution beam area of an image
  810. planet -- queries the JPL Horizons telnet server (or CASA) for the position, rate and angular diameter of a solar system body, with an option to run predictcomp
  811. planetFlux -- calls Bryan Butler's solar_system_setjy module to compute flux density vs. time or frequency
  812. planetPlots -- generates plots of uv amplitude vs. uv distance for a grid of ALMA configurations and frequencies for each planetary body
  813. planetTemperature -- Estimates the expected antenna temperature of a planet based on its model in casa
  814. plotAntennaAmbientTemperatures -- retrieves antenna temperatures from TMCDB and plots them vs. time and height
  815. es.plotAntennas -- plots the ALMA antenna configuration of a measurement set, including pad names
  816. plotantsFromASDM -- plots the ALMA antenna configuration of an ASDM (and optionally the weather stations) in linear and/or logarithmic fashion
  817. plotantsLogarithmic -- plots the antenna configuration of a measurement set in a logarithmic polar fashion
  818. plotantsTwoPanel -- Creates a 2-panel plot of the antenna configuration, with a zoom to the central array
  819. plotApexPWV -- retrieve and plot PWV measured at APEX
  820. plotAtmosphere -- plots the model atmospheric transmission, opacity or sky temperature vs. frequency for specific observatory and/or weather condition
  821. plotAzimuth -- plot the azimuth vs. time for a specific antenna in a dataset
  822. plotbandpass -- faster version of plotcal for bandpass tables, with useful overlay capabilities
  823. plotbandpassStats -- runs plotbandpass(channeldiff=5) several times and plots the MAD vs. channel averaging factor
  824. plotBaselinesOneScan -- makes multi-panel plotms plots of all requested spws on a per-baseline basis
  825. plotBaselinesPerScan -- makes multi-panel plotms plots of all baselines with specific antenna(s)
  826. plotBaselinesSorted -- makes single-panel plotms plots of all baselines, sorts them by baseline length and builds a big PDF
  827. plotcalCompare -- places two sequences of plotcal plots side-by-side onto each page of a multi-page PDF
  828. plotCalibratedData -- a wrapper for plotms that plots calibrated data
  829. plotCalibratedDatasets -- a wrapper for plotCalibratedData that runs it for multiple measurement sets in succession
  830. plotCalibratedSpectrum -- a wrapper for plotms that plots the calibrated uv spectrum of the bandpass calibrator (or other intent)
  831. plotconfig -- plot any standard telescope configuration of observatories known to casa
  832. plotDailyWeather -- runs plotWeatherFromDatabase on a series of days and generates a movie and multi-page PDF
  833. plotDecorrelation -- plot the decorrelation vs. baseline length from the CalPhase.xml file of an ASDM
  834. plotElevation -- plot the elevation vs. time for a specific antenna in a dataset
  835. plotElevationSummary -- uses plotms to create a field-color-coded summary of elevation vs. time for a measurement set
  836. plotExtremeBaselinePerAntenna -- plots the extreme (min, mean, median, or max) baseline length per antenna on an ASDM or config file
  837. plotFluxcsv -- plots the contents of a pipeline-generated flux.csv file
  838. plotGfluxscale -- Reads a pipeline-generated aquareport.xml and plots the derived flux densities and assumed catalog values for first derived calibrator
  839. plotLowGains -- Plots GainAmp vs. antenna name on a per-spw basis
  840. plotMedianTsysForFieldFromTsysCaltable -- computes and plots the median Tsys spectrum of a Tsys caltable
  841. plotmosaic -- shows relative location of pointings in an .ms
  842. plotmosaics -- runs plotmosaic on a list of datasets
  843. plotmsGrid -- plots values on a per-antenna average basis in a grid
  844. plotmsPhaseAmplitude -- uses plotms to make a 2-panel plot of amplitude and phase (or any 2 quantities)
  845. plotmsSpwOverlay -- uses plotms to overlay multiple spws, optionally smoothed to a common channel width
  846. plotmsTwoColumnsVsTime -- uses plotms to make a multi-panel plot
  847. plotObservatories -- plots the IRTF X,Y coordinates on a polar projection of all observatories in the CASA repository table
  848. plotOxygenSounder -- gathers and plots the level zero products from the oxygen sounder by querying weather.aiv.alma.cl
  849. plotParallacticAngle -- Plot the parallactic angle vs. time across the sky for an radec
  850. plotParallacticAngleSummary -- Plot the parallactic angle vs. time for all sources in a measurement set
  851. plotParallacticAngleSummarys -- Plot the parallactic angle vs. time for all sources in a list of measurement sets
  852. plotPhaseCheckTargetOnSky -- plots the relative positions of the phasecal, check source, and first science target of an ASDM
  853. plotPhaseSolutions -- plot a series of selfcal solutions to explore phase vs angular separation of target and calibrator
  854. plotPointingResults -- plot the pointing results written by TelCal to the ASDM_CALPOINTING table
  855. plotPointingResultsFromASDM -- plot the pointing results written by TelCal to the CalPointing.xml table
  856. plotPointingTable -- plots the azimuth and elevation vs. timestamp for one antenna from the MS POINTING table
  857. plotPointingTableAngleVsAngle -- plots a map of the DIRECTION or TARGET column of the MS POINTING table
  858. plotPWV -- plot PWV vs. time for your ms (from each antenna's WVR)
  859. plotPWVFromADSM -- plot PWV vs. time for your ASDM (median of all antennas over specified time interval)
  860. plotPWVFromASDMs -- plot PWV/medianPWV vs. pad height for a list of ASDMs
  861. plotPWVHistogram -- plots a histogram of the antenna-based PWV measurements for an ALMA dataset
  862. plotRefantScore -- plots a histogram of the refant total score from the CASA log of a pipeline run
  863. plotResampledWeatherFromTMCDB -- gets and plots weather from the TMCDB from specified range of days
  864. plotSamplersWithTsys -- plot autocorrelation of ATM Cal sky subscan and corresponding Tsys vs. channel on a per-antenna, per spw basis
  865. plotSBGain -- plot the sideband gain ratios from the SYSCAL table of a measurement set.
  866. plotSBGainFromASDM -- plot the sideband gain ratios for your ASDM
  867. plotSensitivityImprovement -- plots a grid of results from sensitivityImprovement
  868. plotspws -- Makes a plot summarizing the location of the non-channel-averaged TDM and FDM spws in an ALMA dataset.
  869. plotSunDuringTrack -- plot the solar location during the specified dataset
  870. plotTcal -- plot the Tsys, Tsky or Trx columns of the SYSCAL table of an ALMA ms
  871. plotTrx -- plot the Trx column of the SYSCAL table of an ALMA ms (wrapper for plotTcal)
  872. plotTsky -- plot the Tsky column of the SYSCAL table of an ALMA ms (wrapper for plotTcal)
  873. plotTsys -- plot the Tsys column of the SYSCAL table of an ALMA ms (wrapper for plotTcal)
  874. plotWeather -- plot weather conditions vs. time for your ms
  875. plotWeatherFromASDM -- plot weather conditions vs. time for your asdm
  876. plotWeatherFromDatabase -- gathers and plots weather conditions from weather.aiv.alma.cl or from the TMCDB
  877. plotWeightsPerAntenna -- generates per-antenna plots of data weights
  878. plotWVRSolutions -- plot WVR caltable phase solutions on a baseline basis for a specified spw
  879. pngWidthHeight -- Gets the width and height of a png image (in pixels)
  880. pointingTableMedian -- Computes the median value of a tuple column in the POINTING table
  881. primaryBeamArcsec -- compute the primary beam in arcseconds from an ms and spw, or by specifying frequency or wavelength
  882. primaryIntentLetter -- translate a single scan intent into a single character
  883. printBaselineAngularScale -- converts a baseline length into an angular scale at the specified frequency
  884. printBaselineUVDistance -- converts a baseline length into a uv distance at the specified frequency
  885. printFluxesFromASDM -- calls readFluxesFromASDM and prints the results in a table
  886. printLOs -- print the values of LO1, LO2 and YIG for each spw in an ms
  887. printLOsFromASDM -- print the values of LO1 and LO2 frequencies and compute TFB LO and YIG frequency for each spw in an ASDM, and show the window function used for each spw (i.e. Hanning vs. uniform)
  888. printPngListFromCSVFile -- prints all png files whose names are present in a CSV-format file
  889. printSwVersionFromASDM -- Reads and prints the contents of the ASDM's Annotation.xml table
  890. printTsysFlags -- prints the flags found in a Tsys table (ignoring the N edge channels)
  891. projectCodeForMOUS -- looks up the project code for an MOUS
  892. projectCodeFromSB -- looks up the project code, MOUS, EB, and ALMA region from an SB uid
  893. projectCodeFromDataset -- looks up the project code, SB name and ALMA region from an ASDM or measurement set name
  894. ami.projectCodeFromWorkingDir -- extracts the project code and pipeline start time from a pipeline working directory
  895. properMotion -- reads the proper motion from the SOURCE table of a measurement set
  896. properMotionASDM -- reads the proper motion from the Source.xml of an ASDM
    Q
  897. properMotionConversion -- converts between arcsec/yr and rad/s
  898. psfDynamicRange -- computes ratio of peak to highest sidelobe in central channel of cube
  899. qa0flags -- Summarize the QA0 flags in the FLAG_CMD table of a measurement set
    R
  900. radecOffsetFileToRadec -- converts an absolute position and a file of relative offsets into a file of absolute positions
  901. radecOffsetToRadec -- converts an absolute position and offset into a new absolute position
  902. radecToEcliptic -- uses CASA measures tool to convert from equatorial to ecliptic coordinates
  903. radec2deg -- converts an RA, Dec string in sexagesimal format to degrees
  904. radec2direction -- converts an RA, Dec string in sexagesimal format to a casa direction dictionary
  905. radec2ra -- convert an RA/Dec string in sexagesimal format to just the RA part
  906. radec2rad -- convert an RA/Dec string in sexagesimal format to radians
  907. radialVelocity -- reads the SYSVEL column of the SOURCE table for the specified source and spw
  908. rad2direction -- converts an RA, Dec from a radians tuple or list into a casa direction dictionary
  909. rad2radec -- convert an RA/Dec (or component0 from an imfit dictionary) from radians to sexagesimal
  910. rads2radec -- convert a list of RA/Dec from radians to sexagesimal
  911. rarad2hms -- Convert radians of right ascension to sexagesimal HH:MM:SS
  912. ratioImageStdPerChannel -- runs imageStdPerChannel for two cubes and plots the spectral ratio of the selected imstat statistic
  913. readAntennaPositionFromASDM -- returns a dictionary of antenna positions read from an ASDM
  914. readAntennasFromASDM -- returns a list of antenna names (and optionally their stations) in the Antenna.xml file of an ASDM
  915. readAntennasFromCalPosition -- returns a list of antenna names from a CalPosition.xml file as written by tc_antpos
  916. readCalData -- Provides the mapping from cal data ID to scan number by reading the ASDM_CALDATA table of a measurement set
  917. readCalDataFromASDM -- Builds a dictionary relating the calDataId to the scan number of an ASDM.
  918. readNonStandardHeader -- Reads the pixel information from a CASA image that does not have a spectral axis (workaround for CAS-5901)
  919. readpwv -- assembles the dictionary returned by readwvr into arrays containing the PWV measurements
  920. readSeeingFromASDM -- returns a dictionary containing information from the Seeing.xml file
  921. readwvr -- reads the CalWVR.xml table from the ASDM and returns a dictionary
  922. readFitsMultiBeamTable -- reads the CASA beam table from a FITS cube and computes the median shape and position angle
  923. readFluxCSV -- reads the flux.csv file of a pipeline run and returns a dictionary
  924. readFluxesFromASDM -- Read the flux densities from the Source.xml file of an ASDM.
  925. readPipelineContDat -- Reads a cont.dat file and returns a dictionary keyed by spw ID
  926. readPointingModelFromASDM -- Reads the pointing model for one (or all) antennas of an ASDM
  927. readStationFromASDM -- Reads one or all stations from the ASDM, dictionary keyed by station number
  928. readStationsFromASDM -- Reads one or all stations from the ASDM, dictionary keyed by station name
  929. readStationFromASDMKeyedByAntennaName -- Reads one or all stations from the ASDM, dictionary keyed by antenna name
  930. readSysCal -- Reads the SysCal.xml file of an ASDM searching for duplicate entries
  931. readTcal -- Read the Tcal, Trx, or Tsys spectrum from the ASDM for a specific antenna, spw, and time
  932. readTimesFromAnnotationTable -- Reads the parameter optimization entries for integration time from ASDM Annotation.xml
  933. readTMCDBVersionAntennaHistory -- Reads the history of updates for an antenna
  934. readTMCDBVersionPadHistory -- Reads the history of updates for a pad
  935. rebuildWeblog -- Regenerates the weblog from a pipeline execution
  936. receiverTrxSpec -- Returns the Trx specification for the specified ALMA band
  937. receiverTrxOT -- Returns the Trx used by the OT for the specified ALMA band
  938. recenterOTPointings -- takes a Cycle 4 format OT pointings file and recenters it on a new direction
  939. receptorAngles -- Prints the receptor angles associated with each antenna in the FIELD table of a measurement set.
  940. recoverImfitEstimates -- Extracts estimates used by imfit from the CASA log into a text file (in case you changed it in the meantime)
  941. refraction -- Computes the refraction angle for the specified elevation and weather
  942. removeLines -- Removes all lines of an ASCII file that contain a specific string
  943. removeAntennaFromCaltable -- Removes all rows in a caltable associated with an antenna
  944. removeFieldFromTsysTable -- Removes all rows in a Tsys table associated with a specific field ID or field name
  945. removeImageIfPresent -- Removes a file or directory if it is present
  946. removePhasecalsFromSyscalTable -- Removes the rows from a SYSCAL table associated with phase calibrators (or other specified intent)
  947. removePhasecalsFromTsysTable -- Removes the rows from a Tsys table associated with the phase calibrators
  948. removeScanFromCaltable -- Removes all rows from a caltable associated with a specified scan number
  949. removeTsysSpike -- interpolate a Tsys table across a spike or other unwanted feature
  950. removeWhiteSpace -- removes spaces, tabs and newlines from a string
  951. renameAntennas -- renames all, or a list of, antennas in a measurement set (helpful for simulations)
  952. renameMsInCalTable -- Change the name of the MSName keyword in the header of a caltable
  953. repairAtmcalStateIDs -- Repairs the stateId entries in the Main.xml file of an ASDM for all the AtmCal scans
  954. repairSidebandRatio -- prepares an ASDM for running casapy-telcal's tc_sidebandratio() command to recompute SB gains and then runs it
  955. repairSysCal -- prepares an ASDM for running casapy-telcal's tc_atmosphere() command to recompute Trx/Tsys and then runs it
  956. replaceFinalAppearanceOfSubstringInString -- replace the final appearance of a substring with a different string
  957. replaceMonth -- Replaces a 3-character month string with its 2-character integer string
  958. replacePipelineStage - replaces the stage number string in a pipeline-generated filename
  959. replaceTsys -- copy a scaled version of the Tsys values for one antenna, one spw, one polarization, to another
  960. replaceTsysScan -- copy the Tsys values for one antenna, one spw, one polarization, one scan to a different scan
  961. replaceTsysScanFromSQLD -- replaces existing Tsys values in a caltable with those from the SQLDs (located in an ASDM SysCal.xml table)
  962. representativeFrequency -- gets the representative frequency for an ALMA measurement set
  963. representativeFrequencyFromASDM -- gets the representative frequency for an ALMA ASDM
  964. representativeSpw -- gets the spw that contains (and whose center frequency is closest to) to the representative frequency of a measurement set
  965. requestedResolution -- gets the min/max acceptable angular resolution from a measurement set
  966. requestedResolutionFromASDM -- gets the min/max acceptable angular resolution from an ASDM
  967. resetVisibilities -- Sets the visibilities (data column) of a measurement set to a single user-supplied value
  968. resetweights -- Set the data weights in a measurement set to a user-supplied factor
  969. restFrequencies -- Returns a dictionary of spw rest frequencies for an ms
  970. restFrequenciesASDM -- Returns a dictionary of spw rest frequencies for an ASDM
  971. restFrequency -- read the spectral line rest frequency for the source and spw (originating in the OT)
  972. visibilityOutliers.restoreCorrectedAmpFlagStage -- Prints commands to prepare a pipeline calibrated ms for testing with vo.makeFlagTemplates
  973. restToLSRK -- convert rest frequency to LSRK frequency
  974. roundFigures -- Rounds a value to N significant digits and outputs a float
  975. roundFiguresToString -- Rounds a value to N significant digits and outputs a string
  976. roundMeasurementToString -- Rounds two values to the same number of significant figures and generates a string
  977. roundRadec -- Rounds a sexagesimal RA, Dec string to a specified precision (number of digits after the seconds decimal)
  978. ami.runImstat -- Runs imstat with simultaneous mask and annulus options
  979. runPipeline -- Generates a small script to run the pipeline from PPR, pausing and running correctMyAntennaPositions and getALMAFluxcsv before restarting
  980. runPredictcomp -- A convenient wrapper for running the casa task predictcomp
  981. ruzeEfficiency -- Computes Ruze efficiency for wavelength, surface rms
    S
  982. sbnameForMOUS -- Looks up the SB name for a science MOUS
  983. scaleChanwidth -- Scales the channel width of an spw in a measurement set
  984. scaleEffectiveBandwidth -- Scales the effective bandwidth of an spw in a measurement set
  985. scaleEffectiveBandwidthASDM -- Scales the effective bandwidth of an spw in an ASDM
  986. scaleEffectiveResolution -- Scales the effective resolution of an spw in a measurement set
  987. scaleEffectiveResolutionASDM -- Scales the effective resolution of an spw in a measurement set
  988. scaleweights -- Scale the data weights in the WEIGHT column in a measurement set by a factor
  989. scaleWeightSpectrum -- Scales the data weights in the WEIGHT_SPECTRUM column in a measurement set by a factor
  990. scaleWeightsPerAntenna -- Scales the data weights individually on each antenna in a measurement set by an individual factor
  991. scansForIntent -- Returns a list of scans for a specific intent in a measurement set
  992. searchFlux -- Search the ALMA calibrator catalog for a specific source to get its measured flux densities
  993. searchFluxForMS -- Search the ALMA calibrator catalog for all non-science targets in a measurement set
  994. searchFluxPolarization -- Search the ALMA calibrator catalog for recent observations of polarization calibrators
  995. sensitivity -- Calculate sensitivity of various telescopes (this is a wrapper for simutil's calculator which matches the ALMA OT)
  996. sensitivityAdjustment -- Computes the formula from CAS-8534
  997. sensitivityImprovement -- Computes the expected improvement in sensitivity from making ALMA images with combined channels
  998. setBeam -- Set the restoring beam in the header of a CASA image
  999. setFieldTime -- Sets a cell in the TIME column of the FIELD table of an ms
  1000. setImageUnits -- Sets the units of the first two axes of an image to the specified angular unit using imhead 'put'
  1001. setMeasFreqRef -- modifies the MEAS_FREQ_REF column of a SPECTRAL_WINDOW table of an ms, which encodes whether the frequency frame is TOPO or LSRK, etc.
  1002. setObject -- Sets the OBJECT (and FIELD) keywords in a FITS image
  1003. sevenMeterAntennasMajority -- returns True if the majority of antennas are <= 7m diameter
  1004. sevenMeterAntennasOnly -- Checks for 'CM' in antenna names, and returns False if at least one is not
  1005. sevenMeterAntennasMajorityASDM -- returns True if the majority of antennas in an ASDM are <= 7m diameter
  1006. sevenMeterAntennasOnlyASDM -- Checks the antenna diameters in an ASDM and returns True if all are less than 8m
  1007. sfBeam -- compute the effective restoring beam obtained from the casa command sd_imaging using the SF gridding function
  1008. shiftChannelSelection -- shifts a CASA channel selection string by a specified number of channels
  1009. sidebandToNetSideband -- convert from the [-1,+1] convention to the measurement set convention [+1,+2]
  1010. sidebandToString -- converts -1, +1 to 'LSB', 'USB'
  1011. singleDishSpectrum -- computes calibrated spectra from a single dish measurement set in a variety of ways
  1012. smooth -- smooth data using a specified window and size
  1013. smoothbandpass -- smooths an existing bandpass table with options for window length and type (Ed Fomalont)
  1014. smoothSpectralWindowTable -- resamples the vector columns of a spectral window table by taking means
  1015. smoothTsys -- filters and decimates all spws in a Tsys caltable to emulate lower resolution measurements
  1016. smoothTsysSpw -- filters and decimates a single spw in a Tsys caltable to emulate lower resolution measurements
  1017. snrFromCaltable -- builds a dictionary of statistics of the SNR in a caltable
  1018. snrToPhaseRmsDegrees -- converts the S/N of a visibility into rms phase in degrees
  1019. sortByObservationDate -- sorts a list of measurement sets by their observation start date/time
  1020. spectralindex -- performs least-squares fit to the output from fluxscale, computes uncertainties, and produces a plot
  1021. splitListIntoContiguousLists -- Converts [1,2,3,5,6,7] into [[1,2,3],[5,6,7]], etc., and (optionally) trim and recombine
  1022. splitListIntoHomogeneousLists -- Converts [1,1,1,2,2,3] into [[1,1,1],[2,2],[3]], etc.
  1023. spwForRestFrequency -- Finds the spw that contains the defined rest frequency closest to a specified value
  1024. spwsForFields -- calls msmd.spwsforfield for each field in a list and returns the union
  1025. spwsForNames -- returns a list of spw IDs corresponding to a list of spw names
  1026. spwsForScan -- returns a dictionary keyed by scan number, with values equal to the non-chanavg, non-WVR, non-SQLD spws
  1027. spwToLSRK -- converts TOPO frequencies in a measurement set to LSRK for a specified field
  1028. spwType -- Determines the type of ALMA spw based on the number of channels
  1029. SQLD -- a class to read the baseband total power detector coefficients from the computing logs web interface and apply them to a measurement set to convert from counts to dBm
  1030. strDate2MJD -- converts date in string format (YYYYMMDD or YYYY-MM-dd) to MJD
  1031. strongTsysLines -- returns dictionary containing number of strong features in each Tsys spw
  1032. strongTsysLinesInSpw -- returns number of strong features in the specified Tsys spw
  1033. subtractDays -- subtract a specified number of days from a date string
  1034. subtractGaussianFromImage -- Subtract a 2D Gaussian from an image
  1035. analyzemsimage.summarizeFindcont -- builds a multi-panel png for the findcont joint masks and mean spectra from a pipeline run, or pair of serial/parallel pipeline runs
  1036. analyzemsimage.summarizeFindconts -- runs summarizeFindcont for a list of pairs of pipeline runs
  1037. summarizeImfitResults -- Computes the median and MAD of a dictionary list of imfit fit results
  1038. sun -- computes the azimuth and elevation of the Sun at a specified time (or "now"), for any observatory known to CASA
  1039. sunrise -- computes the sunrise and sunset in mjd seconds for the specified date and observatory
  1040. surmiseConfiguration -- determine the most closely matching ALMA configuration from a measurement set (also works for VLA and other interferometers)
  1041. surmiseConfigurationFromASDM -- determine the most closely matching ALMA configuration from an ASDM (also works for VLA)
  1042. surmiseConfigurationFromImage -- determines nominal ALMA configuration that would produce the beam of the specified image
  1043. surmiseCycle -- determine the ALMA cycle from the date of a measurement set
  1044. surmiseCycleFromASDM -- determine the ALMA cycle from the date of an ASDM
  1045. surmiseCycleFromImage -- determine the ALMA cycle from the date of an image
  1046. surmiseEffectiveResolution -- determine the effective resolution of a channel in an ALMA measurement set
  1047. surmiseOnlineChannelAveraging -- determine the level of channel averaging in an spw of an ALMA measurement set
  1048. swapPhasecalChecksourceIntents -- swaps all appearances of CALIBRATE_PHASE with OBSERVE_CHECK_SOURCE
    T
  1049. amc.tailCalibPipeLogfile -- searches the specified directory tree for the newest calibPipeIF.*log file and runs "tail -f" on it
  1050. amc.tailPipelineCasaLogfile -- searches the specified directory tree for the newest casa log file, optionally containing an applycal call on a specified ASDM, and runs "tail -f" on it
  1051. taskExecutionTimes -- computes the time taken to execute a task in a casa log file
  1052. tcleanMemoryFromLogfile -- computes the median value of Available memory in a casa log containing tclean commands
  1053. tcleanMemoryFromLogfiles -- computes the median value of Available memory in several casa logs
  1054. testFlagRowColumn -- Tests whether the FLAG_ROW column is consistent with the FLAG column
  1055. timeDifference -- compute the time difference between two observations (two .ms)
  1056. timeDifferenceASDM -- compute the time difference between two ASDMs
  1057. timeOnSource -- compute the total time spent integrating on-source for each specified field
  1058. timeOnSourceSD -- compute the total time spent integrating on-source and off-source on the science target in a single dish dataset
  1059. timeTclean -- Times the various parts of tclean autoboxing for Major Cycle 2 from a CASA log file
  1060. topoChannelToLSRK -- convert a visibility channel TOPO frequency to LSRK frequency
  1061. topoToLSRK -- convert topocentric frequency to LSRK frequency
  1062. topoToRest -- convert topocentric frequency to rest frequency
  1063. transferWeights -- transfers the weights from one measurement set to another
  1064. transferWeightsWithinMS -- transfers the weights from one spw to one or more other spws (in the same measurement set)
  1065. transition -- read the spectral line transition name for the source and spw (originating in the OT)
  1066. transitions -- returns a dictionary of spectral line transitions keyed by spw of the science spws of a specified ms
  1067. transitTime -- Compute the time of transit on a certain date for an RA, or a field from a measurement set
  1068. transitTimeUnix -- Compute the unix time in seconds of transit on a certain date for an RA, or a field from a measurement set
  1069. es.tsysAverage -- computes and plots the average (per-spw) Tsys spectrum for an ALMA Tsys caltable
  1070. tsysFromListobs -- Returns the number of Tsys scans on phasecal and science targets from a listobs text file
  1071. tsysFromMOUSListobs -- Returns the number of Tsys scans on phasecal and science targets in each EB of a pipeline-reduced MOUS
  1072. tsysspwmapWithNoTable -- finds the Tsys spw corresponding to a specfied spw without the need for a tsys caltable
  1073. tunnel -- open an ssh tunnel to a server in Chile, e.g. for accessing the calibrator catalog
  1074. twoSourceDataset -- modifies the intents of a two-source measurement set so that it can be run through the script generator
    U
  1075. uidToUnderscores -- converts a colon/slash delimited uid to underscore-delimited, preserving any initial path
  1076. unifyFieldTimes -- Copies the time for a field in the FIELD table from one ms to a list of others
  1077. uniqueValuesInASCIIFileColumn -- reads in a list of ASCII files, parses 1 or 2 columns and returns a dictionary of the unique values in those columns
  1078. unixTimeToDateString -- converts a unix time (in seconds) to "YYYY-MM-DD HH:MM:SS UT"
  1079. unixtimeToSiderealTime -- converts a unix time in seconds to sidereal time at specified observatory
  1080. unpackWeblogs -- unpacks the tarball weblogs contained in a list of directories
  1081. unwrapCasaCommandLog -- Takes an ASCII file and unwraps the long lines (without breaking words)
  1082. updateImfitEstimates -- Reads logfile produced by imfit and updates an estimates file for peak intensity and x and y
  1083. updateSBSummary -- Changes values in the ASDM_SBSUMMARY table of a measurement set
  1084. updateSBSummaryASDM -- Change values in the SBSummary.xml file of an ASDM
  1085. updateSBSummaryMOUS -- Change values in the ASDM_SBSUMMARY table of a list of measurement sets according to a text file
  1086. uvcontfitCaltable -- Examine values in a caltable generated by uvcontfit
  1087. uvplot -- Makes a uv plot with points mirrored about the origin (similar but inferior to plotuv in casa)
  1088. uvplotHeterogeneous -- Makes a 4-panel Vwave vs. Uwave plot of heterogenous ALMA dataset
  1089. uvplotMultiEB -- Overlays the uv coverage of multiple EBs by calling plotms repeatedly
  1090. upsampleSpectralAxis -- Resample's the spectral axis of a cube by a specified factor (using imregrid)
  1091. uvtaperProtection -- Preliminary algorithm for tapering the effect of outlier antennas in an ms
  1092. uvtaperProtectionASDM -- Preliminary algorithm for tapering the effect of outlier antennas in an ASDM
  1093. uvwDifference -- compute the difference in uvw's between two (nearly) identical ms's
    V
  1094. validCalibration -- checks if all science spws were also observed with the specified calibration intent
  1095. velocityRange -- computes LSRK velocity range of the visibility data of an spw
  1096. velocityResolution -- computes the velocity resolution of spw(s) of a measurement set
  1097. version -- returns the CVS version number of analysisUtils.py
  1098. virtualSpwsNeeded -- returns the number of EBs that require virtual spw mechanism for a specified pipeline working directory
  1099. visHistory -- returns and/or searches the history of a measurement set
  1100. visstatBinnedUVSpectrum -- calls visstat N times to build up an N-channel spectrum
  1101. visstatParse -- Computes mean timestamp of data selected by visstat
  1102. visstat2uvrange -- computes the global min/max uvrange over all spws from a dictionary returned by visstat2(axis='uvrange')
    W
  1103. waterPartialPressure -- converts relative humidity and temperature into partial pressure of water vapor
  1104. waterVaporPressure -- computes vapor pressure of water at a particular temperature using the Antoine equation
  1105. waveNumberPerAtmosphereToMHzPerMillibar -- converts air broadening coefficient to different units
  1106. waveNumberToFrequency -- converts wave number to frequency in GHz
  1107. weatherCorrelation -- plots one ALMA weather station quantity vs. another for one station.
  1108. weatherCorrelationMontage -- calls weatherCorrelation for all ALMA stations and assembles result into relative location on Chajnantor
  1109. amc.weblogDuration -- returns the duration string shown in the pipeline weblog main page
  1110. widestChanwidth -- returns the widest channel width for the specified list of spws in a measurement set
  1111. windowFunction -- returns the FWHM or effective bandwidth (in channels) for the chosen ALMA correlator window function
  1112. wvrAmplitudes -- returns the median and maximum values of each WVR channel per antenna, for a specified field
  1113. wvrCorrelation -- computes the covariance between the WVR data channels and the astronomical autocorrelation, scaled to the variance of the WVR data
  1114. wvrdata -- Looks in CalPhase.xml of an ASDM to determine if it contains WVR-corrected data or not
  1115. wvrgcalStats -- runs wvrgcal once for each source ID with --statsource set and generates a table of RMS and discrepancy statistics
  1116. es.wvr_stat_all -- runs es.wvr_stat once for each spw/pol combination, and assembles all the plots into a PDF
    X
  1117. xyz2long -- A convenient wrapper for simutil.xyz2long to convert the specified ITRF location to degrees of latitude and longitude
    Y
  1118. yearFraction -- computes the epoch (e.g. 2016.02344) for a specified date time string
  1119. yigHarmonic -- returns the YIG harmonic used in the WCA of the specified ALMA band
  1120. yigRange -- returns the required tuning range in Hz of YIG in the WCA of the specified ALMA band
  1121. ymdhmsToMJD -- converts the date and time specified via 3 to 6 integers into MJD

Additions from others

  • InterpolateTsys -- Stuartt Corder
    • related CASA recipes:
      • tsysspwmap
        • from recipes.almahelpers import tsysspwmap
        • tsysspwmap(vis='', tsystable='')
      • fixsyscaltimes
        • from recipes.almahelpers import fixsyscaltimes
        • fixsyscaltimes(vis='blah.ms')
  • stuffForScienceDataReduction -- a class containing methods to correct antenna positions, etc. (Eric Villard)
    • generateReducScript -- generate a script to reduce ALMA data
    • generateQA2Report -- generate a QA2 report for ALMA Cycle 0 or Cycle 1 data
    • correctMyAntennaPositions -- print out the exact gencal command you need to run to apply the most recent position offsets applicable to your array configuration
    • wvr_stat -- QA2 function to determine the phase rms before and after application of wvr
  • ValueMapping -- A class which provides details on the mapping of various parameters of an ms to each other, which is used by many of the functions above (Stuartt Corder)

Other utilities for EVLA, etc.

Easy access in Charlottesville or Socorro

  • create a file in your home area: ~/.casa/init.py which contains:
import sys
sys.path.append("/users/thunter/AIV/science/analysis_scripts/")
import analysisUtils as au
  • start casa
  • Now you can access all functions, for example: au.plotbandpass()

Easy access for users outside of NRAO

  • download the tar file analysis_scripts.tar
  • unpack it in a designated area, such as your home directory -- it will make a subdirectory called analysis_scripts
  • edit your file ~/.casa/init.py to contain the following lines:
import sys
sys.path.append("/your_parent_directory/analysis_scripts/")
import analysisUtils as au
  • start casa
  • Now you can access all functions, for example: au.plotbandpass()

-- ToddHunter - 2011-10-07

  • analysisUtils.py_history.png: generated by tt.plotLinesOfCodeVsTime(filename='analysisUtils.py')
    analysisUtils.py history.png
Topic attachments
I Attachment Action Size Date Who Comment
analysisUtils.py_history.pngpng analysisUtils.py_history.png manage 61 K 2018-05-18 - 14:59 ToddHunter  
runspecfit.py.txttxt runspecfit.py.txt manage 5 K 2012-10-19 - 16:10 ToddHunter Example script using specfit to fit multiple Gaussians to multiple pixels in a cube
Topic revision: r804 - 2019-11-04, ToddHunter
This site is powered by FoswikiCopyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding NRAO Public Wiki? Send feedback