# angularSeparationOfFieldsFromSource

Computes the angular separation of all fields associated with a source ID, from the source position. See also angularSeparationOfTwoFields.

### Usage:

```au.angularSeparationOfFieldsFromSource(vis, source='', field='', returnComponents=False, verbose=False, smallAngleError=False)
```
Inputs:
• source: the ID or name of the source position to use (from SOURCE table)
• field: the field ID (integer or string) to use, or '' for all.
• returnComponents: if True, also return the RA, Dec components of separation
• smallAngleError: if True, then also compute the error that would have been caused by using the small angle (1/cos(dec)) approximation instead of the complete Euler angle formula (see ICT-6099, SACM-211)

### Example:

```CASA <4>: au.angularSeparationOfFieldsFromSource('uid___A002_X99c183_X25b6.ms',source=4)
Source direction =  12:01:35.90000, -065:08:49.222000
Field 0 = J1107-4449: 21.667474 deg = 78002.907 arcsec
Field 1 = J0854+2006: 92.365043 deg = 332514.154 arcsec
Field 2 = Ganymede: 85.645096 deg = 308322.344 arcsec
Field 3 = J1229-6003: 6.003889 deg = 21613.999 arcsec
Field 4 = BHR71_C18O: 0.000000 deg = 0.000 arcsec
Field 5 = BHR71_C18O: 0.007468 deg = 26.886 arcsec
Field 6 = BHR71_C18O: 0.005239 deg = 18.861 arcsec
Field 7 = BHR71_C18O: 0.005239 deg = 18.861 arcsec
Field 8 = BHR71_C18O: 0.007468 deg = 26.886 arcsec
Field 9 = BHR71_C18O: 0.004102 deg = 14.766 arcsec
Field 10 = BHR71_C18O: 0.001630 deg = 5.867 arcsec
Field 11 = BHR71_C18O: 0.004102 deg = 14.766 arcsec
Field 12 = BHR71_C18O: 0.005877 deg = 21.156 arcsec
Field 13 = BHR71_C18O: 0.002490 deg = 8.963 arcsec
Field 14 = BHR71_C18O: 0.002490 deg = 8.963 arcsec
Field 15 = BHR71_C18O: 0.005877 deg = 21.156 arcsec
Field 16 = BHR71_C18O: 0.006171 deg = 22.214 arcsec
Field 17 = BHR71_C18O: 0.004889 deg = 17.602 arcsec
Field 18 = BHR71_C18O: 0.006171 deg = 22.214 arcsec
Out[4]:
{'BHR71_C18O': 0.00617063985070345,
'Ganymede': 85.64509558891775,
'J0854+2006': 92.3650427275318,
'J1107-4449': 21.6674741039405,
'J1229-6003': 6.003888747956931}
```

-- ToddHunter - 2016-02-12
Topic revision: r1 - 2016-02-12, ToddHunter

Copyright © 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