compareTMCDB

Return to directory of Todd's CASA extensions

Gets the current pad and antenna position values from the TMCDB, then compares them to what is in the ASDM xml tables for your observation. For each antenna, if its observed pad matches what is in TMCDB, it compares the positions of both. If they differ, it prints the gencal command that you need to run to fix your ASDM to the current positions in TMCDB. See also ReadTMCDBVersionPadHistory and ReadTMCDBVersionAntennaHistory.

Usage:

au.compareTMCDB(asdm, xmlfile=None, threshold=0.0, verbose=False, searchPriorPads=True, updates=3)
Inputs:
  • asdm: name of ASDM (does not need the bulk data, so you can use asdmExport -m to save time/space)
  • xmlfile: optional, a file exported by ExportPositionModel.py, if not given, it will be executed
  • threshold: value in mm, don't include antenna in gencal command if total change<value
  • searchPriorPads: if True, then if an antenna is no longer on the pad it had in the ASDM, then extract the final position it had on that pad during the duration it was on the pad that includes the date of ASDM.
  • verbose: if True, then show complete information
  • updates: in verbose mode, this is the number of recent updates to show for non-position-matching pads and antennas

Notes: Currently, this function must be run on osf-red, because that is the only place that a generic user account can run the ExportPositionModel.py command, and which has the ASDM python bindings. In principle, it can also be run on the Santiago scops cluster, but not on the casa cluster since it lacks the ASDM python bindings. However, I have not yet succeeded in setting my path correctly to make the ExportPositionModel.py script work. I have submitted APO-1287 to resolve this problem.

Examples:

  1. Here is an example where only one antenna has a newer position since the observation.
CASA <17>: au.compareTMCDB('uid___A002_X91bdc6_Xe9b',xmlfile='../All_PositionModel_1414795718.xml',verbose=False)
ASDM observed on  ('2014-10-29 07:04:09 UT', 4921283049.240001)
### You are running on an analysis machine "osf-red.aiv.alma.cl" ###
#### Reading antennaMoves.txt... #### 
*** Pad position for DV25 in ASDM does not match TMCDB!

gencal(vis = 'uid___A002_X91bdc6_Xe9b.ms'),
  caltable = 'uid___A002_X91bdc6_Xe9b.ms.antpos,
  caltype = 'antpos',
  parameter = [+0.0017620, -0.001139, -0.002488], # DV25 on A005 change=3.255mm
  antenna = 'DV25')
  1. Here is the same example, but with verbose reporting of the numerical values enabled.
CASA <18>: au.compareTMCDB('uid___A002_X91bdc6_Xe9b',xmlfile='../All_PositionModel_1414795718.xml',verbose=True)
ASDM observed on  ('2014-10-29 07:04:09 UT', 4921283049.240001)
### You are running on an analysis machine "osf-red.aiv.alma.cl" ###
#### Reading antennaMoves.txt... #### 
*** Pad position for DV25 in ASDM does not match TMCDB!
   ASDM: [2225117.507509, -5440026.937622, -2481703.370386]   TMCDB: (2225117.509271, -5440026.938761, -2481703.372874)
   difference =  [ 0.001762 -0.001139 -0.002488]

gencal(vis = 'uid___A002_X91bdc6_Xe9b.ms'),
  caltable = 'uid___A002_X91bdc6_Xe9b.ms.antpos,
  caltype = 'antpos',
  parameter = [+0.0017620, -0.001139, -0.002488], # DV25 on A005 change=3.255mm
  antenna = 'DV25')
  1. Here is an example where several antennas have been moved since the observation. Because the function only examines the current TMCDB value rather than a historical value, no correction is attempted.
CASA <11>: au.compareTMCDB('uid___A002_X8f3a3b_X87a/',xmlfile='../All_PositionModel_1414795521.xml',verbose=False)
ASDM observed on  ('2014-10-08 05:08:27 UT', 4919461706.739)
### You are running on an analysis machine "osf-red.aiv.alma.cl" ###
#### Reading antennaMoves.txt... #### 
*** Pad position for DA41 in ASDM does not match TMCDB!
Antenna position for DA41 in ASDM does not match TMCDB!
Antenna DA42 is no longer on pad A081. It is on A006. No correction possible with this method!
*** Pad position for DA43 in ASDM does not match TMCDB!
Antenna position for DA43 in ASDM does not match TMCDB!
Antenna position for DA45 in ASDM does not match TMCDB!
*** Pad position for DA46 in ASDM does not match TMCDB!
*** Pad position for DA48 in ASDM does not match TMCDB!
Antenna position for DA48 in ASDM does not match TMCDB!
*** Pad position for DA50 in ASDM does not match TMCDB!
Antenna position for DA50 in ASDM does not match TMCDB!
Antenna position for DA51 in ASDM does not match TMCDB!
*** Pad position for DA52 in ASDM does not match TMCDB!
Antenna position for DA54 in ASDM does not match TMCDB!
Antenna DA55 is no longer on pad A080. It is on S309. No correction possible with this method!
*** Pad position for DA60 in ASDM does not match TMCDB!
*** Pad position for DA62 in ASDM does not match TMCDB!
Antenna position for DA62 in ASDM does not match TMCDB!
*** Pad position for DA63 in ASDM does not match TMCDB!
Antenna position for DA63 in ASDM does not match TMCDB!
*** Pad position for DA64 in ASDM does not match TMCDB!
Antenna position for DA64 in ASDM does not match TMCDB!
Antenna position for DV04 in ASDM does not match TMCDB!
Antenna DV06 is no longer on pad A084. It is on A014. No correction possible with this method!
Antenna position for DV08 in ASDM does not match TMCDB!
Antenna position for DV09 in ASDM does not match TMCDB!
Antenna position for DV11 in ASDM does not match TMCDB!
Antenna position for DV12 in ASDM does not match TMCDB!
*** Pad position for DV13 in ASDM does not match TMCDB!
*** Pad position for DV14 in ASDM does not match TMCDB!
Antenna position for DV14 in ASDM does not match TMCDB!
*** Pad position for DV15 in ASDM does not match TMCDB!
Antenna position for DV15 in ASDM does not match TMCDB!
Antenna DV16 is no longer on pad A136. It is on A002. No correction possible with this method!
*** Pad position for DV19 in ASDM does not match TMCDB!
*** Pad position for DV22 in ASDM does not match TMCDB!
Antenna position for DV22 in ASDM does not match TMCDB!

gencal(vis = 'uid___A002_X8f3a3b_X87a.ms'),
  caltable = 'uid___A002_X8f3a3b_X87a.ms.antpos,
  caltype = 'antpos',
  parameter = [+0.0007746, -0.000567, -0.001839, # DA41 on S301 change=2.074mm
               +0.0010454, -0.002783, -0.003035, # DA43 on S306 change=4.248mm
               +0.0017165, -0.000557, -0.000892, # DA48 on W207 change=2.013mm
               +0.0017668, -0.000824, -0.000829, # DA50 on W204 change=2.118mm
               -0.0001640, -0.002818, -0.001868, # DA52 on A035 change=3.385mm
               +0.0014030, -0.001241, -0.000856, # DA60 on P404 change=2.059mm
               +0.0014386, -0.001075, -0.000685, # DA62 on W206 change=1.922mm
               +0.0002243, +0.000706, +0.000854, # DA63 on A132 change=1.131mm
               +0.0012463, -0.002913, -0.002595, # DA64 on P402 change=4.096mm
               -0.0010730, -0.005285, -0.002077, # DV13 on S303 change=5.779mm
               +0.0016047, -0.002176, -0.002472, # DV14 on P405 change=3.664mm
               +0.0011923, -0.001034, -0.001125, # DV15 on A118 change=1.938mm
               +0.0007410, -0.003444, -0.002637, # DV19 on P410 change=4.400mm
               +0.0011232, -0.001311, -0.000008], # DV22 on A011 change=1.726mm
  antenna = 'DA41,DA43,DA48,DA50,DA52,DA60,DA62,DA63,DA64,DV13,DV14,DV15,DV19,DV22')
-- ToddHunter - 2014-10-31
Topic revision: r4 - 2015-06-15, 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