ratt-ru / tigger-lsm

Python libraries and command-line tools for manipulating Tigger LSMs
2 stars 8 forks source link

Issue getting PA from MS file #44

Open MikaNaidoo opened 3 months ago

MikaNaidoo commented 3 months ago

Hi when running the following command:

tigger-convert --force --type Gaul --append-type auto --int-to-app --primary-beam         
/home/mika/ladumaredux/pipeline/input/dummy_$(xy)_$(reim).fits --fits-l-axis px --fits-m-axis py --beam-clip 0.001 --pa-from-ms /home/mika/ladumaredux/pipeline/msdir1/1602964865_sdp_l0.8k-J03323_28075-corr.ms --linear-pol
/home/mika/ladumaredux/pipeline/input/vlamodel.gaul vlamodel.lsm.html

I get the following error:

# 2024-06-05 15:06:06   WARN    MeasIERS::findTab (file /code/measures/Measures/MeasIERS.cc, line 389)
Requested data table IERSeop97 cannot be found in the searched directories:                           
# 2024-06-05 15:06:06   WARN    MeasIERS::findTab (file /code/measures/Measures/MeasIERS.cc, line     
389)+ /usr/share/casacore/data/ephemerides/                                                           
# 2024-06-05 15:06:06   WARN    MeasIERS::findTab (file /code/measures/Measures/MeasIERS.cc, line     
389)+ /usr/share/casacore/data/geodetic/                                                              
# 2024-06-05 15:06:06   WARN    MeasIERS::findTab (file /code/measures/Measures/MeasIERS.cc, line 389)
Requested data table IERSpredict cannot be found in the searched directories:                         
# 2024-06-05 15:06:06   WARN    MeasIERS::findTab (file /code/measures/Measures/MeasIERS.cc, line     
389)+ /usr/share/casacore/data/ephemerides/                                                           
# 2024-06-05 15:06:06   WARN    MeasIERS::findTab (file /code/measures/Measures/MeasIERS.cc, line     
389)+ /usr/share/casacore/data/geodetic/                                                              
# 2024-06-05 15:06:06   INFO    MeasIERS::fillMeas(MeasIERS::Files, Double)     Requested JD 59139.8  
is outside the range of the IERS (Earth axis data) table.                                             
# 2024-06-05 15:06:06   INFO    MeasIERS::fillMeas(MeasIERS::Files, Double) +   Calculations will     
proceed with less precision                                                                           
# 2024-06-05 15:06:06   WARN    MeasIERS::findTab (file /code/measures/Measures/MeasIERS.cc, line 389)
Requested data table TAI_UTC cannot be found in the searched directories:                             
# 2024-06-05 15:06:06   WARN    MeasIERS::findTab (file /code/measures/Measures/MeasIERS.cc, line     
389)+ /usr/share/casacore/data/ephemerides/                                                           
# 2024-06-05 15:06:06   WARN    MeasIERS::findTab (file /code/measures/Measures/MeasIERS.cc, line     
389)+ /usr/share/casacore/data/geodetic/                                                              
# 2024-06-05 15:06:06   SEVERE  MeasTable::dUTC(Double) (file /code/measures/Measures/MeasTable.cc,   
line 4283)  Cannot read leap second table TAI_UTC                                                     
# Reading /home/mika/ladumaredux/pipeline/input/vlamodel.gaul (PyBDSM .gaul/.srl file)                
# Model contains 9 sources                                                                            
# Converting intrinsic fluxes to apparent                                                             
# importing InterpolatedBeams in standalone mode, ignoring MeqTrees-related stuff                     
# Loading FITS Beams /home/mika/ladumaredux/pipeline/input/dummy_xx_re.fits                           
/home/mika/ladumaredux/pipeline/input/dummy_xx_im.fits                                                
#   omitting xy beam due to --beam-diag                                                               
#   omitting yx beam due to --beam-diag                                                               
# Loading FITS Beams /home/mika/ladumaredux/pipeline/input/dummy_yy_re.fits                           
/home/mika/ladumaredux/pipeline/input/dummy_yy_im.fits                                                
# Using FITS beams with reference frequency 1519.500000 MHz                                           
# Getting PA range from MS                                                                            
/home/mika/ladumaredux/pipeline/msdir1/1602964865_sdp_l0.8k-J03323_28075-corr.ms, field 0             
# Successful readonly open of default-locked table                                                    
/home/mika/ladumaredux/pipeline/msdir1/1602964865_sdp_l0.8k-J03323_28075-corr.ms: 28 columns, 5114179 
rows                                                                                                  
# Successful readonly open of default-locked table                                                    
/home/mika/ladumaredux/pipeline/msdir1/1602964865_sdp_l0.8k-J03323_28075-corr.ms/ANTENNA: 8 columns,  
59 rows                                                                                               
# Successful readonly open of default-locked table                                                    
/home/mika/ladumaredux/pipeline/msdir1/1602964865_sdp_l0.8k-J03323_28075-corr.ms/FIELD: 9 columns, 1  
rows                                                                                                  
# Traceback (most recent call last):                                                                  
#   File "/home/mika/.quarticalenv/bin/tigger-convert", line 780, in <module>                         
#     pa1 = [(dm.do_frame(dm.epoch("UTC", dq.quantity(t, "s"))) and dm.posangle(fld,                  
#   File "/home/mika/.quarticalenv/bin/tigger-convert", line 780, in <listcomp>                       
#     pa1 = [(dm.do_frame(dm.epoch("UTC", dq.quantity(t, "s"))) and dm.posangle(fld,                  
#   File "/home/mika/.quarticalenv/lib/python3.10/site-packages/casacore/measures/__init__.py", line  
945, in posangle                                                                                      
#     return _measures.posangle(self, m0, m1)                                                         
# RuntimeError: 2024-06-05 15:06:06     SEVERE  MeasTable::dUTC(Double) (file                         
/code/measures/Measures/MeasTable.cc, line 4283)  Cannot read leap second table TAI_UTC 
o-smirnov commented 3 months ago

You need to pip install casacore-data. If that doesn't help, next step is to edit your ~/.casarc to point to it.

JSKenyon commented 3 months ago

The instructions in https://github.com/ratt-ru/QuartiCal/issues/330 may be helpful if the above fails.