angularSeparationOfStringsFromFile

Return to directory of Todd's CASA extensions

Reads a text file and sends each line to angularSeparationOfStrings after stripping off the leading source name.

Usage:

au.angularSeparationOfStringsFromFile(filename, verbose=True, arcsec=False)
  • filename: Required format of lines: "sourcename RA1 Dec1 RA2 Dec2 optional_comments" where the sexagesimal components of RA/Dec can be either colon-delimited or space-delimited.
  • Returns: an array of the separations in degrees, unless arcsec==True, in which case they will be in arcsec.

Example:

CASA <3>: au.angularSeparationOfStringsFromFile('ispec.positions',arcsec=True)
Separation: radian = 1.23765e-06, degrees = 0.000071, arcsec = 0.255284
Separation: radian = 4.879e-07, degrees = 0.000028, arcsec = 0.100637
Separation: radian = 7.87613e-08, degrees = 0.000005, arcsec = 0.016246
Separation: radian = 1.28249e-07, degrees = 0.000007, arcsec = 0.026453
Separation: radian = 6.14905e-07, degrees = 0.000035, arcsec = 0.126833
Separation: radian = 1.96997e-07, degrees = 0.000011, arcsec = 0.040634
Separation: radian = 1.87991e-07, degrees = 0.000011, arcsec = 0.038776
  Out[3]:
array([ 0.25528358,  0.10063668,  0.01624567,  0.0264533 ,  0.12683326,
        0.04063363,  0.03877594])

-- ToddHunter - 2014-01-23
Topic revision: r2 - 2014-01-31, 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