Documentation of functions in toddTools.py

Return to directory of CASA extensions in analysisUtils.py

The toddTools package is an extension of over 400 simple python tasks for radio/millimeter/submillimeter astronomy and star formation studies mean to run inside the monolithic CASA environment. It can also be imported into plain python, but tasks that require CASA tasks or tools will not function in that environment. Some of the tasks are reliant upon functions in the analysisUtils package of ALMA. While toddTools is not (yet) publicly-available, subsets of the code will be made available upon reasonable request to the author.

A broken link here simply means that the command exists and works, but I have not yet written the help page for that command. But there is always python inline help available.

                   A
  1. accretionEnergy -- Computes gravitational potential energy of a piece of gas falling onto an object
  2. accretionLuminosity -- Computes gravitational potential luminosity of a piece of gas falling toward an object
  3. accretionRadius -- Computes radius required to achieve given accretion rate, central mass, and accretion luminosity
  4. accretionRate -- Computes accretion rate required to achieve accretion luminosity given central mass and radius
  5. addLineToScripts -- Adds a line to the bottom of a script, or list of scripts
  6. addLinks -- Adds soft links to a directory based on existing subdirectory names
  7. adjustDivergingLut -- Removes the middle N values of a diverging RGB color lookup table and stretches the remainder together (to make better outflow palettes)
  8. amcDoublerFilterProfile -- Plot the inferred profile of the filter in the AMC of the ALMA Band 6v1 LO
  9. angularSeparationOfImagePeaks -- Finds the peak in two images and computes the angular separation in arcsec, and fractional beams
  10. antennaCombinations -- Computes the number of N-antenna subsets of the specified array size
  11. antennaVelocityDifference -- Computes maximum differential velocity of Earth rotation for a given east-west baseline and latitude
  12. aperturePhotometry -- Uses rg.wpolygon to approximate (up to) two circles of different radii, and subtracts the flux of one from the other (works for continuum and cubes)
  13. appendParameterToScript -- Takes a script of N lines containing a call of the same task and appends an additional parameter to the end of each one.
  14. applyRadecOffsetToFile -- Applies an RA/Dec offset to an ASCII table of positions
  15. argmedian -- Returns a list of indices of an array corresponding to the value(s) equal to or closest to the median
  1. atacCombinations -- Computes the fraction of 4-antenna combinations possible in the ATAC.HILSE if each fully-populated AVCC can select 1 of its 4 attached antennas
  2. atmosphericVariation -- Computes the percentage variation in transmission and Tsky across an image cube's spectral axis
  3. auToRsun -- converts au to solar radii
  4. averageOverIspecs -- Computes the average of two (or more) spectra created by tt.ispec
  5. avgOverCube -- Computes the average spectrum across a multi-dimensional array that has been read from a cube
    B
  6. backgroundSources -- Computes the expected number of background radio point sources in a field
  7. bandpassLatency -- Compute the np.diff of timestamps for a single antenna/spw/scan
  8. beamAreaRatio -- Computes the ratio of the synthesized beam area between two images
  9. bindingEnergy -- Computes the binding energy of a (uniform density) star of given mass and radius
  10. binge -- Copy a file into multiple other filenames, incrementing a number in the name
  11. blondinEta -- Computes eta parameter from ratio of jet velocity to bowshock velocity
  12. boxToRadians -- Convert a casa region file "box" string to a pair of Ra/Dec's
  13. brightness -- Convert flux density, frequency and beamsize to brightness temperature (and on to dust and gas mass)
  14. brightnesses -- Runs brightness on a list of images
  15. brightnessImage -- Converts an image in flux density units into brightness temperature units
  16. buildAplpyPolygons -- Takes a list of RA/Dec centers and widths/heights/rotations and returns list for show_polygons
  17. buildAplpyRectangles -- Takes a list of RA/Dec centers and widths/heights and returns parameters for show_rectangles
  18. buildBoxRegion -- Builds a casa box region string from the specified blc and trc coordinates (specified in radians)
  19. buildDecimatedCubes -- Decimates in RA and Dec the findcont .residual and .psf cubes from a directory of pipeline runs
  20. buildFilterConvolutions -- Add new filters to Robitaille's sedfitter module
  21. buildRobustWeightingGrid -- Run image simulations of all ALMA cycle 5 configurations
  22. buildMomDiff -- builds the images that findContinuum makes: mom0fc, mom8fc, mom0fcScaled and momDiff
    C
  23. calibratorImageFluxes -- Finds the calibrator images of a pipeline runs and reports their fitted flux and noise
  24. calibratorImagePeaks -- Finds the calibrator images of a pipeline runs and reports their peak intesntiy and noise
  25. callenWeltonNoise -- Computes Equation 6 of ALMA memo 161
  26. cardinalShiftRegion -- Reads a polygon region from a CRTF file, shifts it in each of the 4 cardinal directions and writes 4 new CRTF files (up, down, left, right)
  27. carpenterIonizingPhotonRate -- Computes photons/sec for fluxDensity, frequency, distance
  28. cas7210 -- Makes plots for CAS-7210
  29. checkAlternateRefant -- Searches a casa log for appearances of an alternate refant being used in a gain solution
  30. checkBandpassEqualsFlux -- Checks a list of pipeline runs to see if any EB has separate BP and Flux calibrator
  31. checkCalibratorImageFluxes -- Runs au.calibratorImageFluxes on a list of pipeline runs and builds a histogram
  32. checkCompareCparamFromCaltables -- runs compareCparamFromCaltables for a list of pipeline runs
  33. checkCompareTimesFromCaltables -- runs compareTimesFromCaltables for a list of pipeline runs
  34. checkComparePipelineTaskExecutionTimes -- runs comparePipelineTaskExecutionTimes for a list of pipeline runs
  35. checkCorrectMyAntennaPositions -- runs correctMyAntennaPositions for a list of pipeline runs
  36. checkCycleTime -- runs cycleTime for the first EB of each pipeline run in a directory of pipeline runs
  37. checkDurationOfBandpassScans -- runs computeDurationOfScans for first EB of each pipeline run in a directory of pipeline runs
  38. checkFluxcsv -- runs compareFluxcsv on the flux.csv files from a list of pipeline run pairs
  39. checkForMissingPointingEntries -- Checks a group of pipeline runs for any EB with an antenna with missing pointing table values
  40. checkForMissingPointingSolutions -- Checks a group of pipeline runs for any EB with an antenna with missing pointing calibration solutions
  41. checkForMultipleSolutionTimes -- Checks a collection of pipeline runs for any lowgainflag caltables that contain more than 1 solution time
  42. checkLargeCubeSize -- Computes size in MB of the largest cube per pipeline run of a list of pipeline runs
  43. checkLowgainflag -- Checks a directory of pipeline runs for entries in the text flag tables in the lowgainflag stage
  44. checkLowSNRPositions -- Checks a directory of pipeline runs for low SNR positions rejected by correctMyAntennaPositions
  45. checkLowTransmission -- Looks for low transmission on a per-scan, per-vis basis of a list of pipeline runs
  46. checkLSRKRanges -- runs lsrkRangeForSpw on a list of pipeline runs
  47. checkMosaicTimeGapBetweenFields -- runs mosaicTimeGapBetweenFields for the first EB of each pipeline run in a directory of pipeline runs
  48. checkMultiUserRuns -- Calls checkruns for each specified user in succession
  49. checkNallcontCubes -- Runs findPipelineAllcontCubes on a directory of pipeline runs
  50. checkNantennas -- Compiles dictionary of number of antennas in first EB of a directory of pipeline runs
  51. checkNumberOfPhaseCalibrators -- Calls getPhaseCalibrators for a list of pipeline runs
  52. checkNumchan -- Compiles dictionary of number of channels in science spws in a list of pipeline runs
  53. checkOnlineChannelAveraging -- Compiles dictionary of online channel averaging factor in science spws in a list of pipeline runs
  54. checkPads -- Compiles a list of all unique pad names used by a series of pipeline runs
  55. checkPBAtImageCenter -- Calls imageCenter for all continuum images in a series of pipeline runs
  56. checkPipelineBDFlags -- Calls pipelineBDFlags for a list of pipeline runs
  57. checkPipelineChanchunks -- Compiles list of chanchunk values used for mfs and cube imaging in a list of pipeline runs
  58. checkPipelineChecksource -- Checks if a checksource is included in the first EB of each pipeline run in a list of pipeline runs in a directory
  59. checkPipelineFieldnames -- Checks if any pipeline image cube names contain integer field names and returns a dictionary of them
  60. checkPipelineIntegrationTimes -- Returns a dictionary keyed by intent with values being the integration time in the first vis, and a Boolean on whether they differ
  61. checkPipelinePhasecalSolint -- Runs pipelinePhasecalSolint on a list of pipeline runs
  62. checkPipelinePlotmsMPIFraction -- Returns a dictionary keyed by project_MOUS, with 3 values: parallel, total, fraction
  63. checkPipelinePlotmsMPIFractionHistogram -- Builds a histogram from the results of checkPipelinePlotmsMPIFraction
  64. checkPipelineRepBWCube -- Searches pipeline working directories for presence of .repBW. cubes
  65. checkPipelineRobust -- Runs pipelineRobust on a set of pipeline runs
  66. checkPipelineSevere -- Runs pipelineSevere on all CASA logs in a set of pipeline runs
  67. checkPipelineSingleEBMOUS -- Returns a list of strings of format 'projectCode,MOUS,workingdir' for pipeline runs that contain only a single EB
  68. checkPipelineSpwBandwidths -- finds the bandwidths of the science spws of a list of pipeline runs
  69. checkPipelineSpwInfo -- runs pipelineSpwInfo for a list of pipeline runs
  70. checkPlotmsMemory -- Runs plotmsMemory on all CASA logs in a set of pipeline runs
  71. checkPlotSpectraFromMask -- Runs plotSpectrumFromMask for all cubes in a set of pipeline runs
  72. checkruns -- Finds the working directory of each pipeline run on the specified root directory
  73. checkStrongTsysLines -- Checks a directory of pipeline runs for the presence of strong features in the Tsys spectra
  74. checkSurmiseConfiguration -- Runs surmiseConfiguration on all ASDMs of a set of pipeline runs
  75. checkTimePipelineImaging -- Builds a dictionary of tclean run times
  76. checkTsysFlags -- Runs pipelineTsysFlag on a set of pipeline runs
  77. checkUVspectra -- Takes output of checkPipelineSingleEBMOUS (a list of vis from pipeline runs with only 1 EB) and runs au.uvspectrum on each one
  78. checkVersions -- Runs versionsFromWeblog on a list of pipeline runs to compile the CASA and pipeline version info for those project code / MOUS
  79. checkZeroPixels -- Builds a histogram of percentage of pixels equal to zero from a specific 2D image from a series of pipeline runs
  80. clearMask -- clears the mask in a CASA image
  81. clusterCentroid -- Computes the centroid of a set of sky positions, optionally weighted by intensity
  82. clusterMatches -- Computes the nearest neighbor star in list 2 for each star in list 1
  83. clusterStatistics -- Computes statistics of a set of X,Y points or sky positions
  84. collectPipelineSpectra -- Finds all spectra pngs from pipeline images created in a specific pipeline stage
  85. combinationsOf4 -- Computes the percentage of 4-antenna subsets that have independent fiber optic transceiver colors
  86. combineMeasurements -- Computes weighted average and standard deviation of several measurements with uncertainties
  87. combineSNRs -- Computes new SNR when combining datasets of a specified SNR
  88. combineUncertainties -- Computes expected new uncertainty when combining datasets
  89. compareFluxcsv -- Compares two flux.csv files
  90. compareFluxcsvs -- Compares a list of pairs of flux.csv files in a directory
  91. compareImfitResultsToEstimates -- Computes the separation (in units of pixels) between the imfit estimated position(s) and the fittes position(s)
  92. compareL80 -- Compares the achieved beamsize in a pipeline reduced dataset with the L80 formula and the im.fitpsf prediction
  93. compareL80list -- Calls compareL80 on a list of pipeline reductions and produces a summary table
  94. compareStats -- Compares two dictionaries from visstat stored in plain text files (for PIPE-1776)
  95. composite -- Takes a base png image, and overlays one or two other images on it at a specified offset location and scale size.
  96. computeDelayRate -- computes delay rate in ns/sec for a specified rate in units of sidereal rate
  97. computeMeanSeparation -- Compute the mean separation of a set of points
  98. computeMom0peakOverMad -- Computes the ratio of the imstat 'max' over 'medabsdevmed' of a specified image
  99. computeRcluster -- Compute the radius and mean position of a sehttpdrt://science.nrao.edu/facilities/alma/science_sustainability/na-alma-develpment-fy2023-call-for-study-proposalst of points.
  100. computeSignedStd -- Compute asymmetric 1-sigma errors of a list
  101. concatSMAdataset -- Uses offsetScanNumbers to concatenate several measurement sets exported from MIR/IDL using autofits and previously filled to ms using MIRSFITStoCASA
  102. constellation -- Calls astropy's get_constellation for a specified RA/Dec
  103. convertBenchmarkScript -- Converts a regression script of findContinuum to a new ALMA cycle
  104. convertChannelListIntoSelection -- Converts a list of channels into a CASA selection string syntax, with optional trimming
  105. convertChannelSelectionIntoBandwidthForCube -- Converts a channel list selection for a cube into aggregate bandwidth
  106. convertChannelSelectionIntoChannelSelection -- convert channel selection from one cube into another cube (with a different channelization)
  107. convertChannelSelectionIntoFrequencySelectionForCube -- Converts a channel list selection for a cube into frequency list selection
  108. convertChannelSelectionIntoFrequencySelectionForSpw -- Converts a channel list selection for an spw into frequency list selection
  109. convertColonDelimitersToPeriods -- Converts Ra Dec string with colons in the Dec to one with periods in the Dec
  110. convertSainiCSVFilesToFEICsquintFormat -- Converts per-Band .csv files dumped from per-Band .xls files created by Christopher at CDL (for Saini) into a single multi-Band csv file compatible with the original NA FEIC csv file
  111. convertSelectionIntoChannelList -- Converts a CASA channel selection string into an array of channels.
  112. convolveChannel -- convolves a sinc function with the Hann window, and normalizes the resulting spectrum to unity
  113. convolveChannelAveraging -- convolves a sinc function with the Hann window, then convolves with 2,4,8, or 16 delta functions and normalizes the resulting spectrum to unity
  114. convolveChannelAveragingPlot -- calls convolveChannelAveraging, then plots the result
  115. convolveChannelAveragingPlots -- calls convolveChannelAveragingPlot for each value of 1,2,4,8,16 and builds a montage
  116. convolveChannelPlot -- calls convolveChannel, then plots the result
  117. convolveImfitComponent -- Takes the deconvolved size of an imfit component and convolves it with a different beam
  118. convolveTwoEllipses -- Convolves a gaussian source with the beam of a specified image
  119. cornersMaskedButEdgesNotMasked -- returns True if the 4 corner pixels are masked but the 4 edge pixels are not
  120. correctionsForRandomGauss --Computes corrections for the median and MAD of a population as judged by a sample from one end of the percentile distribution (developed for findContinuum)
  121. correlateRuns -- Compares execution times of two sets of pipeline run pairs
  122. correlateVisstatDifferences -- Computes fractional difference of per-scan/per-spw visibility statistics between two pipeline runs
  123. countLinesPythonCode -- Counts lines of code in *.py files in specified directory tree
  124. crtfMaskSolidAngle -- Computes solid angle of a mask image (such as that built from a crtf file using the CASA task makemask)
  125. crtfSolidAngle -- Computes solid angle of a crtf region
  126. crtfToMask -- Converts a CASA CRTF region file to a mask for a specified image
  127. crtfToPixelList -- Converts a CASA CRTF region file containing 'symbol' shapes to a list of pixels in a specified image
  128. cryostatTemperaturePlot -- Reads a file downloaded from TMCDB with au.getCryostatTemperaturesFromTMCDB and generates a histogram
  129. cryostatTemperaturePlots -- Runs cryostatTemperaturePlot for a list of bands and sensors and builds a PDF of the resulting histograms.
  130. cubeDerivative -- Compute the derivative along the spectral axis of a cube
  131. cubeLSRKRangesToTopo -- Converts an LSRK channel selection string to TOPO frequency ranges and TOPO channel ranges in a specific ms
  132. cumulativeMaserVersusContinuum -- Plots the fraction of maser intensity and spots that are located outside a fractional continuum level in an image
    D
  133. deflection -- Computes the gravitational bending of light for a star at a specified angle for a given distance and mass of a central body
  134. deflectionDifferential -- Computes the differential deflection between two fields in a measurement set
  135. deflectionPlot -- Plots the bending of light vs. angle from the Sun
  136. deflectionPlotJupiter -- Plots the bending of light vs. angle from the Jupiter
  137. deflectionPlotSaturn -- Plots the bending of light vs. angle from the Saturn
  138. deflectionPlotUranus -- Plots the bending of light vs. angle from the Uranus
  139. deflectionPlotNeptune -- Plots the bending of light vs. angle from the Neptune
  140. delayLoss -- Compute loss of SNR due to an rms delay error
  141. delaySlope -- Computes change in phase across spw bandwidth for a given delay error
  142. digitizerJitterRequirement -- Computes required jitter for a SNR
  143. digitizerSNR -- Computes SNR for a digitizer with specified number of bits
  144. digitizerSNRjitter -- Computes SNR for a digitizer with specified amount of jitter
  145. digitizeSignal -- Converts a real-valued signal into a discrete level signal
  146. dirtyDR -- makes a plot of the dynamic range modifier vs. dynamic range used by the ALMA imaging pipeline
  147. ds9regionToList -- Converts the markers in a ds9 region file from sexagesimal RA, Dec into lists of RA and Dec in degrees
  148. dustLuminosity -- Computes the area under the curve of flux density vs. frequency
  149. dustSublimationRadius -- Computes radius where a power-law temperature profile reaches a specified temperature
  150. dustyProfiles -- Plots radial profiles output by the radiative transfer code DUSTY
  151. dynamicalTime -- Computes dynamical time for an outflow
    E
  152. earthRotationSpeed -- Computes rotation speed at surface of earth for a given latitude
  153. eddingtonLuminosity -- Computes Eddington limit luminosity for a given mass
  154. editComponentList -- Edits the frequency column in a component list
  155. elevationForTsky -- Computes the elevation that produces a specified Tsky for a specific PWV
  156. equivalentAntennas -- Converts sensitivity improvement to equivalent number of antennas added
  157. expandRegion -- Expands a polygonal CASA region file in all directions
  158. exponentialDecayFit -- Fits the logarithm of y vs. linear x (in years), computing e-folding time (in days)
  159. exportfits -- Runs exportfits on an image or list of images, automatically appending '.fits'
  160. extractcal -- Extracts all the applycal and gaincal calls from a CASA log and wraps them
  161. extractImagenamesFromScript -- Reads a file of tclean commands and returns a list of the imagename arguments
  162. extractPageFromPDF -- extracts one page from a PDF file
    F
  163. fiberLengthHistogram -- plots a histogram of the 192 antenna pad to AOS TB fiber lengths
  164. fillFitResults -- Convert output file from Robitaille's sedfitter into easier to read format
  165. filterScriptFor7m -- Filters a list of commands that contain measurement sets, passing only those where the first ms has a majority of 7m antennas"
  166. filterSources -- Extracts a subset of sources within a specified RA/Dec box from a larger list
  167. filterTable -- Filter a list of sources in an ASCII table to those within a specified radius of a specified direction
  168. filtwav -- Extracts the wavelength from a filter defining FITS file in the Robitaille SED fitter package
  169. findChannelRanges -- takes a spectrum and determines a string list of all channel ranges below a threshold
  170. findContinuumCycle8 -- findContinuum for pipeline Cycle 8 (PL2021)
  171. findContinuumForPixel -- Examines the intensity histogram of a spectrum and returns the channels that are close to the continuum level as located by the rolloff point
  172. findContinuumHistogram -- Takes a cube and list of pixels, builds a histogram of flux density to identify continuum level, then finds the best continuum channels (calls findContinuumForPixel or findContinuumForPixelSCL)
  173. findFrequencyForTau -- compute frequency for a specific dust opacity and value of beta
  174. findGreyBodyFluxRatio -- computed the required tau to produce the observed flux ratio between two frequencies
  175. findIntersection -- Finds the intersection point for 2 lines, each defined by a pair of points
  176. findOuterAnnulusForPBCube -- Finds the scaled up values of a size mitigated cube that correspond to 0.2-0.3
  177. findPipelineMeasurementSets -- Finds list of ms in a pipeline run
  178. findSpectralAxis -- finds the spectral axis number of a CASA cube
  179. findTargetFlagVisAndSpw -- finds vislist and spwlist for each vis that contains flags from hifa_targetflag
  180. fitForDustTemp -- Fit for dust temperature, using a measured brightness temperature, source size, and beta
  181. fitForDustTempWithFree -- Fit for free-free component plus a dust temperature, using a measured brightness temperature, source size, and beta
  182. fixEps -- Modifies an eps file with a negative blc bounding box to make it non-negative
  183. fixRestFreq -- Uses imhead to change the restfreq in the header of a cube
  184. flagNonScanTimeRanges -- Flags data by timerange that are outside of the scans of a specified intent
  185. flipEstimatesFiles -- For 2-component imfit estimates files, exchange the spread of RA and Dec
  186. fluxBrightness -- Computes flux density that corresponds to specified brightness temperature
  187. fringeRate -- Computes maximum fringe rate for a specified declination, E-W baseline and frequency
  188. fusOffset -- Applies a frequency shift to an ASCII file spectrum written in the column format expected by CASSIS
  189. fusPlot -- Plots an ASCII file spectrum written in the column format expected by CASSIS
    G
  190. g358bayandinaBrogan -- converts Table 4 of Bayandina, Brogan, et al. 2022 into aplpy-friendly files
  191. g358ellipse --
  192. g358pcygni -- runs ispecPlot overlay of 3 spectra
  193. g358sed --
  194. gatherCubeSpectra -- makes a montage of ALMA pipeline cube spectra
  195. gaussianPercentile -- Computes the statistics of a Gaussian distribution restricted to the specified lower percentile
  196. gaussianPercentilePlot -- Plots the statistics of a Gaussian distribution restricted to the specified lower percentile vs. that percentile
  197. getFreqType -- Returns the frequency frame of the specified image
  198. getIntensityForPixel -- Gets the intensity at a specific pixel
  199. getTransitionFrequencies -- Reads a Leiden LAMDA file for a molecule and returns all frequencies
  200. getTransitionInfo -- Reads a Leiden LAMDA file for a molecule and returns 4 lists of info
  201. greybodyFluxDensity -- Computes flux density of a greybody using a dictionary of lmfit parameters
  202. greybodyFluxDensityJy -- Computes flux density of a greybody from temperature, tau, solid angle and frequency
  203. greybodyFluxRatio -- Computes the ratio of flux densities of a greybody at two frequencies
  204. greybodyIntensity -- Computes the intensity of a greybody
    H
  205. help -- prints a list of all the functions defined at the top level of toddTools.py
    I
  206. ifSwingVoltage -- Computes IF swing rms voltage for a specified bandwidth, load resistor, conversion gain and ambient temperature
  207. imageBiweightMean -- Computes the biweight_mean scale of a CASA image using the algorithm in IDLASTRO
  208. imageCompareStats -- Computes the classic and various robust estimators of the rms of a CASA image
  209. imageDynamicRange -- Encodes equation of Perley 1999 / Braun 2013
  210. imageFromFits -- creates a CASA image from a FITS image that has no RA/Dec coordinates using a template CASA image of the same region
  211. imageFromFORCAST -- creates a CASA image for a SOFIA FORCAST FITS image with 3 planes in the 3rd dimension, using just the first plane
  212. imageRegisterByDither -- finds the optimal shift between two images by minimizing an imstat statistic over a specified matrix of pixel offsets
  213. imageRobustSigma -- Computes the robust sigma of a CASA image using the algorithm in IDLASTRO
  214. imageSimulationToReality -- Copies a radMC3D simulation cube into the subimage of a cube of the sky
  215. imageSize -- returns size of image in arcseconds or primary beamwidths
  216. imageSizeBytes -- computes the size of all files in a directory tree
  217. imageSpectralIndex -- Computes a spectral index image from two images
  218. imcombine -- Combines non-frequency-overlapping subcubes with the same frequency grid and spatial dimension into a single cube.
  219. imfitBrightnessTemperature -- Reads a list of files of format imfitparseCLB and finds the one with peak intensity, then uses its fitted flux density and fitted size
  220. imfitCube -- Runs imfit on all, or a list of channels in a CASA cube, generating a plot with errorbars
  221. imfitEstimateChanges -- Computes the percentage change in the parameters between two files of imfit estimates
  222. imfitIterate -- Runs imfit successively with the new estimates produced from the previous iteration until the result stops changing
  223. imfitResultsToLatex -- Takes a list of imfit results and produces a Latex table
  224. immoments4panel -- Builds moment images 0,1,2,8 of a CASA cube, then plots them on a 4-panel page
  225. importfitshdu -- imports multiple HDUs from a single FITS image into multiple casa images
  226. importsma -- imports one or more SMA UVFITS files that have been processed by uti_to_topo in MIR IDL
  227. imstatBackground -- run imstat on the specified box region, then on the 4 adjacent boxes to determine the lowest rms in all 5 boxes
  228. imstatCube -- compute the rms and standard deviation of chunks of a CASA image cube, and plots the result
  229. imstatparse -- converts a dictionary returned by imstat into a formatted string
  230. imsubimageRadec -- runs imsubimage centered on a specified RA Dec
  231. imviewOverlayEllipse -- Overlay an ellipse using CASA imview -- obsoleted by au.imviewField(ellipse)
  232. inclinationError -- computes the uncertainty on the inclination of a circular disk based on the apparent major and minor axes of its elliptical projection
  233. insertBookmarks -- insert bookmarks into a PDF
  234. intensityProfile -- extracts and plots intensity profile from a single plane image (2D, 3D, or 4D) or the on-the-fly-channel-average of a cube
  235. intensityWeightedOffsetToRadec -- combine LL and RR fitted masers into intensity weighted positions nd velocities
  236. interpolateEpsilon -- interpolates the optimal level spacing for non-power-of-2 quantization levels
  237. invertChannelRanges -- a wrapper function to findChannelRanges which takes just a string and total number of channels (or vis and spw)
  238. ionizingPhotonFlux -- computes equation 1 of Kurtz, Churchwell, Wood (1994)
  239. ionizingPhotonRate -- computes Eq 6 of Turner & Matthews 1984
  240. ionizingPhotonRateFromFluxDensity -- adjusts size of UCHII region until model flux density matches observed
  241. isFitInMask -- Checks if imfit fitted positions are within the masked regions of a mask image (cube)
  242. ispec -- Emulates the AIPS task ISPEC to write an ASCII spectrum from one spatial pixel in a cube
  243. ispecOverlay -- Overlay spectrum of a pixel from various cubes
  244. ispecs -- Runs ispec on a list of images
  245. isPixelInMask -- Checks if pixel is within the masked region of a mask
    J
  246. JanskyToFLambda -- Converts flux density to F_lambda in erg cm-2 s-1 um-1
  247. JanskyToLambdaFLambda -- Converts flux density to lambda*F_lambda in erg cm-2 s-1
  248. janskyToKelvinFile -- Converts an ASCII spectrum given in frequency and jansky/beam into frequency and brightness temperature K
  249. kelvinHelmholtzTimescale -- compute this timescale for a specified mass, radius and luminosity
  250. kelvinPerJansky -- computes the Kelvin per Jansky conversion factor for a FITS or CASA interferometric image
  251. keplerianRadius -- given a period and mass (and inclination), returns the radius
  252. keplerianRotation -- given a velocity and radius (and inclination), returns the mass
  253. keplerianVelocity -- given a mass and radius (and inclination), returns the tangential velocity
  254. kurtzIonizingPhotonRate -- Computes photons/sec for electron density, electron temperature and radius
    L
  255. lambdaFLambdaToJansky -- Inverse of janskyToLambdaFLambda (pass an array to get an array)
  256. LbolFromLH2O -- Computes bolometric luminosity from water maser luminosity using Urquhart et al. 2001 Eq 9
  257. loOffsetSuppression -- Computes suppression in dB according to Peter Napier's 2007 memo Appendix Eq 5
  258. lsrkRangeForSpw -- Computes the LSRK frequencies of the first and last channel of the same spw in a list of measurement sets
    M
  259. magjy -- Converts between magnitudes and Janskys for optical through mid-infrared wavelengths
  260. makeFlagTimeRanges -- Builds an array of period timerange strings suitable for use in flagdata on simulated measurement sets
  261. makemaskForNewLine -- Copies the clean mask from one line cube to another
  262. makeMaskFromEstimatesFiles -- Builds an aggregate 2D mask from a list of imfit estimates files using circular apertures
  263. makemaskImage -- Builds a mask image from an existing image and a mask lattice expression
  264. makeNoiseImage -- Takes an image as a template and creates a noise image over the same area
  265. makeNoiseSpectrum -- Makes an array of random numbers of a specified std and mean
  266. makePolygonAnnulusRegionMask -- Builds an image of an annulus at a specified location with specified inner and outer radii
  267. makeRobust1cubes -- Builds a script to run tclean to recreate pipeline image cubes with a different robust value
  268. masercloud -- Makes a 3D plot of a sequence of maser spot files
  269. maserLuminosity -- Computes luminosity for a spectral line
  270. maserUpperLimit -- Computes lower limit to the maser increase factor when only upper limits are available from one epoch
  271. maskChannel -- Mask a channel or range of channels in a CASA image cube
  272. matchImfitEstimates -- Copies imfit estimates files for a prior cube that match in velocity to a new cube
  273. meanEpoch -- Uses au.yearFraction to compute mean epoch of a list of dates
  274. meanPosition -- Takes two sexagesimal directions and computes the mean of both axes to produce a new direction
  275. measuredProperMotion -- Takes a measured shift in RA seconds and Dec arcseconds between 2 epochs, and computes proper motion and extrapolates for a third epoch
  276. memo407 -- Reimplementation of the analysis of ALMA Memo 417 in numpy/scipy (for WSU SRR https://jira.alma.cl/browse/RID-2270)
  277. mergebib -- Takes a .tex and .bbl file and puts the latter into the former, for submission to the ApJL word count tool
  278. minimumMassSolarNebula -- computes mass in Msun for specified surface density, inner and outer radii using a 1/r^2 density profile
  279. minimumSpanningTree -- Computes the minimum spanning tree of a graph
  280. modifySpectrumInCube -- Stuffs a new spectrum of values into a spatial pixel of a CASA image cube
  281. mom0mom8scaleFactor -- Compute factor by which to scale a mom0 image prior to subtracting from a mom8 image
  282. montageUVspectraWithFindcont -- Compiles pipeline calibrated uv spectra alongside corresponding findContinuum spectra
  283. monteCarloAddition -- Computes the joint uncertainty of a sum of measurements with individual uncertainties
  284. monteCarloRatio -- Computes the uncertainty of a measurement scaled by an uncertain scale factor
    N
  285. nanmean -- Returns scipy.stats.nanmean if numpy is earlier than 1.81, otherwise returns np.nanmean
  286. nanmedian -- Returns scipy.stats.nanmedian if numpy is earlier than 1.81, otherwise returns np.nanmedian
  287. nearestSourceInFitsTable -- Finds the nearest source in a FITS table to a specified direction
  288. nextPowerOfTwo -- Computes the next power of 2 greater than or equal to the specified integer
  289. ngVLAmotorCurrents -- Plots elevation motor current values vs. elevation
  290. noiseFigure -- Compute noise figure from noise temperature
  291. ALMA.NoiseTemperatureFromNoiseFigure -- Compute noise temperature from noise figure
  292. nonScanTimeRanges -- Returns a list of date/time ranges outside of the scans of a specified intent
  293. northalign -- Uses the montage python wrapper to align a FITS image to north up
    O
  294. offsetScanNumbers -- Adds a constant to the SCAN_NUMBER column of a measurement set
  295. olnon -- Computes free-free spectral energy distribution from the models of Olnon 1975
  296. oneEvent -- For a given population size, compute the sigma that gives just one event
  297. optimalLevelSpacing -- Returns optimal level spacing from Table 1 of Thompson, Emerson and Schwab (2007)
  298. optimalVoltageBinThresholds -- Determines the voltage bin thresholds for the spacing returned by tt.optimalLevelSpacing()
  299. outburstEnergy -- Computes Joules in a protostellar outburst from luminosity and years
  300. outermosaic -- Computes the border points of a mosaic pointing pattern
    P
  301. phaseScreenCorrupt -- Corrupts a measurement set using the sm.settrop method.
  302. photonStep -- Compute photon step for a specified frequency
  303. pipelineBandpassTimeSolint -- Searches CASA log for longest time solint on bandpass calibartor
  304. pipelineBeamRadius -- Emulates the calculation in imageparams_base.py
  305. pipelineMeanVisibility -- Extracted code from gcorfluxscale.py
  306. pipelineNantennas -- Returns number of antennas in first EB of a pipeline run
  307. pipelinePhasecalSolint -- Checks for solint specified gaincal as a value in 's'econds, rather than 'int' or 'inf'
  308. pipelinePlotmsMPIFraction -- Searches a pipeline casa log file, counts number of lines with "Executing plotms" and counts again for lines also containing "MPI" earlier on the line
  309. pipelinePlottingTimes -- Computes time spent in making sky plots in hif_makeimages
  310. pipelineSpwphaseupSpwmap -- finds the spwmap used by the pipeline in spwhpaseup
  311. pipelineSpwBandwidths -- finds the bandwidths of the science spws of a pipeline run's MOUS
  312. pipelineSpwInfo -- Reports a dictionary of science spws for a pipelien run with values of nChannels and bandwidth
  313. pipelineSpwNChannels -- Reports number of channels per science spw in a pipeline run
  314. pipe337beforeAfter -- Makes before/after plots for the hifa_targetflag flags
  315. planckIntensity -- Computes the intensity of the Planck function
  316. plotAplpyLines -- Plots a list of line segments from an ASCII file onto an aplpy figure
  317. plotAplpyPositionAngle -- Plots a line along a position angle on an aplpy FitsFigure
  318. plotATAC -- Plots frequency slices across the sidebands
  319. plotATACB2B -- Calls plotATAC twice and stacks the plots into one png
  320. plotATACBand2 -- Plots frequency slices across the sidebands of Band 2
  321. plotATACBand8 -- Plots frequency slices across the sidebands of Band 8
  322. plotCalibratorImagePeaks -- Plots an SED of the image peaks of the per-spw calibrator continuum images
  323. plotCheckDurationOfBandpassScans -- Plots the dictionary returned by checkDurationOfBandpassScans
  324. plotCompareFluxcsvs -- Plots age of spectral index vs. separationWindow, from several runs of compareFluxcsvs
  325. plotCompareL80 -- Plots the results from compareL80list
  326. plotElevationForTsky -- plots elevation vs PWV thta gives Tsky=30
  327. plotFluxMaxAge -- Plots the SSR-generated file used by the OT in ICT-13764
  328. plotHartRAO -- Plots maser spectra ascii files from HartRAO
  329. plotHartRAODifference -- Plots the difference between two maser spectra ascii files from HartRAO
  330. plotLinesOfCodeVsTime -- Plots the lines of code vs. cvs version number and vs. time
  331. plotMaxHoldSpectrum -- Plots the maximum of a uv spectrum output by plotms text file tool
  332. plotmsSWARM -- overlays the spws from many measurement sets into one plotms spectrum
  333. plotNoiseCorrectionFactor -- plots the noise correction factor applied by the pipeline as defined in Todd's 13/Jul/2016 comment in CAS-8534 for the Hann window used by the ALMA baseline correlator (used for Fig 15 in the ALMA pipeline heuristics paper in PASP 2023)
  334. plotRegionSpectrum -- computes and plots the spectrum from the unmasked pixels in a CASA region file
  335. plotRobustGrid -- Plots the results file from buildRobustWeightingGrid
  336. plotSMAEngineeringData -- plots data files downloaded from http://sma1.sma.hawaii.edu/internal/plot/customplots.html
  337. plotSpwsVsTime -- Plots the science spws that appear in scans vs. time (or scan ID)
  338. plotTimePipelineImaging -- Makes histograms from a dictionary created by checkTimePipelineImaging
  339. plotTLEazel -- plots a satellite azimuth, elevation file produce by SxP4Test
  340. polarizationUncertainty -- computes polarization percentage and its uncertainty from I, Q, U flux densities and image rms
  341. properMotion -- computes proper motion in mas/year and beams/year for a specified distance, velocity and antenna configuration
  342. propertiesForIonizingPhotonRateDiazMiller -- determine interpolated ZAMS stellar properties for the specified value of Lyman continuum photon rate
  343. propertiesForSpectralTypeHanson -- determine interpolated ZAMS stellar properties for the specified spectral type
  344. pruneMask -- Calls Tak's prune algorithm used by tclean autoboxing
    Q
  345. quantizationCorrection -- Formulas 8.67 and 8.68 of TMS using optimal values of level separation (epsilon) from Thompson, Emerson and Schwab (2007)
  346. quantizationEfficiencySlope -- Reads 5 files written by tt.memo407() for a given digitizer type and overlays them
  347. quantumLimit -- Computes quantum limited Trx values for a given frequency
    R
  348. radecListToOffsets -- Converts a list of sexagesimal RA/Dec values into relative coordinates in arcsec (relative to first position in the list)
  349. randomGauss -- Return an array of n random numbers with the specified mean and standard deviation
  350. readCommonVelocities -- Determines velocities shared by fits to two maser lines in G358
  351. readPolygonRegion -- Reads a polygon shape from a CRTF file
  352. readVisstatDict -- Reads a dictionary returned by the CASA task visstat that was stored in a plain text file.
  353. regionSpectrum -- Computes the spectrum from a specified region of a CASA image
  354. regionToEstimates -- Converts a CASA region file of positions to a imfit estimates file
  355. relativeEfficiencySlope -- Reads 5 files written by tt.memo407() for a given digitizer type and overlays them
  356. relaxationTime -- Computes relaxation time of a stellar cluster
  357. removeNaNs -- remove (or replace) the NaNs from an array
  358. removeLastLineOfFile -- removes the final line of an ASCII file, or list of files
  359. removeLines -- removes all lines of an ASCII file that contain a specified string (used for culling AQUA/QA0 bugs in flag command txt files)
  360. replaceMaskedPixels -- replaces masked pixels in a CASA image with a specified value
  361. replaceSpacesInFilenames -- replaces spaces with blanks or another character in a filename (or list thereof)
  362. replaceStringInFiles -- replaces a string with another string in a list of files
  363. rippleSum -- Computes the quadrature sum of RF voltages representing the peak-to-peak ripple on IF spectra
  364. rippleSimulation -- Simulates the sum of 3 ripple components in WSU signal chain
  365. rmsJitterSeconds -- Converts points measured on an Allan variance curve of dBc/Hz vs. Hz into rms jitter in seconds
  366. robitailleLuminosity -- integrates the lambda*F_lambda SED of a Robitaille model to compute apparment luminosity
  367. robitailleStefanBoltzmann -- reads a text file of best fitting Robitaille models and computes luminosity of protostar from Teff and radius
  368. rotationPhase -- determines the rotational phase of an observation relative to a zero point in the past
    S
  369. roundMeasurementToAsymmetricString -- converts a value and uncertainty to a latex string with different + and - error bars
  370. roundMeasurementToAsymmetricScientificString -- converts a value and uncertainty to a latex string in scientific notation with different + and - error bars
  371. roundMeasurementToScientificString -- converts a value and uncertainty to a latex string in scientific notation
  372. roundMeasurementToString -- converts a value and uncertainty to a string
  373. scaleFluxcsv -- Scales the flux densities in an ALMA pipeline's flux.csv file
  374. scaleImage -- Scales the intensity in one or more rectangular boxes in a CASA image by a scale factor
  375. scaleImageSize -- Takes a string like '100x60' and scales each number by a specified factor
  376. scanTimeRanges -- Returns a list of date/time ranges for all the scans of a specified intent
  377. shadowedArea -- Computes percentage of antenna area shadowed for a given linear overlap
  378. shiftDecString -- Takes a sexagesimal format Dec Value and shifts it by a specified value of arcseconds
  379. shiftPolygonRegion -- Reads a polygon region from a CRTF file, shifts it a specified amount and writes a new CRTF file
  380. shiftRAString -- Takes a sexagesimal format RA value and shifts it by a specified value of arcseconds
  381. shortenCasalog -- Removes all messages from CASA tasks (helpful when debugging non-tasks)
  382. show_circles_intersecting -- Implements aplpy's show_circles but prevents drawing portions that overlap other circles.
  383. sigmaEvent -- compute the probability of an N-sigma event
  384. sisLOPowerRequirement -- Compute LO power required for a specified frequency, junction resistance and coupling factor
  385. sisOptimalImpedance -- Compute optimal impedance for an SIS mixer tuning circuit
  386. specfitPlot -- Plots the fit result from the CASA task specfit
  387. spectralTypeFloatToStringTo -- converts 0.95 to 'O9.5' for use after interpolating tables
  388. spectralTypeSternberg -- returns spectral type and luminosity for Q value for class V stars
  389. spectralTypeStringToFloat -- converts 'O9.5' to 0.95 for use in interpolating tables
  390. spectralTypeToTemperature -- uses Pecaut & Mamajek 2013 to convert spectral type to surface temperature
  391. spectraOverlay -- Reads and plots a spectral profile ASCII file created by the CASA viewer
  392. splitSedResults -- Split an sed_results file into N files to prepare it for Robitaille's fitter
  393. spurs -- Computes the locations of interleaving spurs and offset spurs created by interleaved ADC cores
  394. squintScatterPlot -- Compares the on telescope measurements with FEIC measurements
  395. stefanBoltzmannLuminosity -- convert radius, distance and temperature to luminosity
  396. stefanBoltzmannRadius -- convert luminosity and temperature to radius
  397. stefanBoltzmannTemperature -- convert luminosity and radius to temperature
  398. stringToURL -- convert a text string to an encoded version suitable for use in a URL
    T
  399. tauFromBrightness -- Inverts the equation Tb = T*(1-exp(-tau))
  400. temperatureToSpectralType -- interpolates Table 5 of Pecaut & Mamajek 2013
  401. testDigitizeSignal -- Runs tt.digitizeSignal() and plots the results overlaid with the input signal.
  402. timegaincalInterval -- Reads the bandpass/flux phase-only solint from the timegaincal weblog table
  403. tms832 -- Equation 8.32 of TMS
  404. tms835 -- Equation 8.35 of TMS
  405. ALMA.TmsTable71ampSlope -- Equation for SNR degradation due to amplitude slope across a single correlator channel from Table 7.1 row 1 of TMS
  406. toneStrength -- Computes strength of line in K and Jy that contributes a specified percentage of the subband total power
  407. topoFreqToChannel -- Converts a list of topo frequencies to topo channels in a measurement set
  408. topoFreqRangeListToChannel -- Converts a semicolon-delimit list of frequency ranges to topo channel ranges
  409. toutZAMS -- Computes radius, luminosity and temperature for a ZAMS star as a function of mass and metallicity
  410. truncatedJDToDatestring -- converts truncated JD to date string
  411. tskyGridPlot -- makes a grid of plots of Tsky vs. frequency from a list of measurement sets and maxAltitudes
    V
  412. uncertaintyOfSummedValues -- computes uncertainty of a sum of measurements
    V
  413. vacuumWindowLoss -- computes loss through a material of specified thickness, index and tan delta
  414. velocityChannelWidth -- Returns the width of cube channels in velocity units
  415. version -- returns the CVS version number of toddTools.py
  416. visibleSky -- compute the fraction of the sky ever visible from a specified latitude and horizon limit
  417. vislistFromFluxcsv -- Returns list of measurement sets contained a flux.csv file
    W
  418. widthOfMaskArcsec -- Finds the width of the smallest central square that circumscribes a mask
  419. wsuspw -- For a specified spw width (in units of FS) and desired spectral resolution, returns a dictionary keyed by nchan with values being a sub-dictionary of information for the parent setup and each CAF multiple that resultin an integer number of output channels of equal sensitivity
  420. wsuspwMatrix Produces a terminal display (space-delimited for readability) and a text file (comma-delimited for import into spreadsheets) of possible spw combinations for each element in a list of number of adjacent frequency slices.
    Z
  421. zams -- Computes luminosity and radius for a given stellar mass using Hosokawa's fits to Schaller et al. 1992
  422. zamsMassFromLuminosity -- Computes empirical relation of Demircan and Kahraman 1991
  423. zeeman -- fits Stokes I and V spectra for Zeeman effect and magnetic field
-- ToddHunter - 2014-08-13
Topic revision: r238 - 2026-07-28, 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