Commits

Takahiro Tsutsumi authored 3ef88ee1bb5
Re-worded the location of JPL-Horzions table in the task's docstring.

Removed casa5-related code. Updated the docstring for MIME format test to reflect the current behavior. Removed the old casadoc URL in the task xml.

casatasks/src/private/task_fixplanets.py

Modified
1 -from __future__ import absolute_import
2 1 import shutil
3 2 import os
4 3 import string
5 4
6 -# get is_CASA6 and is_python3
7 -from casatasks.private.casa_transition import *
8 -if is_CASA6:
9 - from .parallel.parallel_task_helper import ParallelTaskHelper
10 - from casatools import ms as mstool
11 - from casatools import table as tbtool
12 - from casatools import imager as imtool
13 - from casatools import measures, quanta
14 - from casatasks import casalog
15 - from .mstools import write_history
16 - _qa = quanta( )
17 - _me = measures( )
18 -else:
19 - from taskinit import *
20 - from mstools import write_history
21 - from parallel.parallel_task_helper import ParallelTaskHelper
22 - # not really local copies
23 - _qa = qa
24 - _me = me
5 +from .parallel.parallel_task_helper import ParallelTaskHelper
6 +from casatools import ms as mstool
7 +from casatools import table as tbtool
8 +from casatools import imager as imtool
9 +from casatools import measures, quanta
10 +from casatasks import casalog
11 +from .mstools import write_history
12 +_qa = quanta( )
13 +_me = measures( )
25 14
26 15 def _checkinternalephemtab(vis, field):
27 16 """
28 17 This function checks if there is an ephemeris table attached in the MS for
29 18 the field selected. It will returned table names found under FIELD table.
30 19
31 20 """
32 21 import glob
33 22 from casatools import table, ms
34 23 _tb = table()
58 47 Input Parameters
59 48 vis -- Name of the input visibility set
60 49
61 50 field -- field selection string
62 51
63 52 fixuvw -- recalc uvw coordinates? (default: False)
64 53
65 54 direction -- if set, don't use pointing table but set direction to this value.
66 55 The direction can either be given explicitly or as the path
67 56 to a JPL Horizons ephemeris (for an example of the format,
68 - see directory data/ephemerides/JPL-Horizons/).
57 + ephemerides/JPL-Horizons/ in the local data directory or "External Data" section
58 + of the current CASADocs).
69 59 Alternatively, the ephemeris table can also be obtained using
70 60 getephemtable task.
71 61
72 62 example: 'J2000 19h30m00 -40d00m00', default= '' (use pointing table)
73 63
74 64 refant -- if using pointing table information, use it from this antenna
75 65 default: 0 (antenna id 0)
76 66 examples: 'DV06' (antenna with name DV06)
77 67 3 (antenna id 3)
78 68
484 474 ParallelTaskHelper.restoreSubtableAgreement(vis)
485 475
486 476 finally:
487 477 mst = None
488 478 tbt = None
489 479 imt = None
490 480
491 481 # Write history to MS
492 482 try:
493 483 param_names = fixplanets.__code__.co_varnames[:fixplanets.__code__.co_argcount]
494 - if is_python3:
495 - vars = locals()
496 - param_vals = [vars[p] for p in param_names]
497 - else:
498 - param_vals = [eval(p) for p in param_names]
484 + vars = locals()
485 + param_vals = [vars[p] for p in param_names]
499 486 write_history(mstool(), vis, 'fixplanets', param_names,
500 487 param_vals, casalog)
501 488 except Exception as instance:
502 489 casalog.post("*** Error \'%s\' updating HISTORY" % (instance),
503 490 'WARN')
504 491
505 492 mst = None
506 493 tbt = None

Everything looks good. We'll let you know here if there's anything you should know about.

Add shortcut