e-merlin / eMERLIN_CASA_pipeline

This is CASA eMERLIN pipeline to calibrate data from the e-MERLIN array. Please fork the repository before making any changes and read the Coding Practices page in the wiki. Please add issues with the pipeline in the issues tab.
GNU General Public License v3.0
14 stars 11 forks source link

Weblog fails with "list index out of range" #82

Closed varenius closed 6 years ago

varenius commented 6 years ago

I wanted to experiment with phase transfer for a dataset. I moved one of my two phase calibrators from the list of phase cals to a target, so that I have one phase cal and two targets. I also updated the pipeline to latest version. Not sure which of these (or both) is the cause, but now the first weblog step fails as: CASA 5.1.0-74 -- Common Astronomy Software Applications --> CrashReporter initialized. 2017-11-12 22:18:45 | INFO | Starting pipeline 2017-11-12 22:18:45 | INFO | Running pipeline from: pipeline/ 2017-11-12 22:18:45 | INFO | Pipeline version: v0.6.6 2017-11-12 22:18:45 | INFO | Using github branch: master 2017-11-12 22:18:45 | INFO | github last commit: 7db6156 2017-11-12 22:18:45 | INFO | This log uses UTC times 2017-11-12 22:18:45 | INFO | Inputs from file: inputs.txt 2017-11-12 22:18:45 | INFO | Parameters in inputs file: 2017-11-12 22:18:45 | INFO | fits_path : ./fitsidi/ 2017-11-12 22:18:45 | INFO | inbase : TSARP220_C_20171013 2017-11-12 22:18:45 | INFO | targets : 1534+2330,1516+1932 2017-11-12 22:18:45 | INFO | phscals : 1532+2344 2017-11-12 22:18:45 | INFO | fluxcal : 1331+305 2017-11-12 22:18:45 | INFO | bpcal : 1407+284 2017-11-12 22:18:45 | INFO | ptcal : 0319+415 2017-11-12 22:18:45 | INFO | refant : Mk2 2017-11-12 22:18:45 | INFO | Lo_dropout_scans: 2017-11-12 22:18:45 | INFO | manual_flags_a : ./inputfg_a.flags 2017-11-12 22:18:45 | INFO | manual_flags_b : ./inputfg_b_avg.flags 2017-11-12 22:18:45 | INFO | run_importfits : 0 2017-11-12 22:18:45 | INFO | summary_weblog : 1 2017-11-12 22:18:45 | INFO | hanning : 0 2017-11-12 22:18:45 | INFO | ms2mms : 0 2017-11-12 22:18:45 | INFO | flag_0_aoflagger: 0 2017-11-12 22:18:45 | INFO | flag_1_apriori : 1 2017-11-12 22:18:45 | INFO | flag_2a_manual : 1 2017-11-12 22:18:45 | INFO | average_1 : 1 2017-11-12 22:18:45 | INFO | plot_data : 1 2017-11-12 22:18:45 | INFO | save_flags : 1 2017-11-12 22:18:45 | INFO | restore_flags : 0 2017-11-12 22:18:45 | INFO | flag_2b_manual : 1 2017-11-12 22:18:45 | INFO | init_models : 1 2017-11-12 22:18:45 | INFO | bandpass_0 : 1 2017-11-12 22:18:45 | INFO | flag_3_tfcropBP : 0 2017-11-12 22:18:45 | INFO | delay : 1 2017-11-12 22:18:45 | INFO | gain_0_p_ap : 1 2017-11-12 22:18:45 | INFO | fluxscale : 1 2017-11-12 22:18:45 | INFO | bandpass_1_sp : 1 2017-11-12 22:18:45 | INFO | gain_1_amp_sp : 1 2017-11-12 22:18:45 | INFO | applycal_all : 1 2017-11-12 22:18:45 | INFO | flag_4_rflag : 0 2017-11-12 22:18:45 | INFO | plot_corrected : 1 2017-11-12 22:18:45 | INFO | first_images : 1 2017-11-12 22:18:45 | INFO | weblog : 1 2017-11-12 22:18:45 | INFO | Generating empty flags list 2017-11-12 22:18:45 | INFO | Using MS file: TSARP220_C_20171013.ms 2017-11-12 22:18:45 | INFO | Starting summary weblog 2017-11-12 22:18:45 | INFO | Reading ms file information for MS: TSARP220_C_20171013.ms 2017-11-12 22:18:45 | INFO | Targets: 1534+2330,1516+1932 2017-11-12 22:18:45 | INFO | Phasecals: 1532+2344 2017-11-12 22:18:45 | INFO | Fluxcal: 1331+305 2017-11-12 22:18:45 | INFO | Bandpass: 1407+284 2017-11-12 22:18:45 | INFO | Pointcal: 0319+415 2017-11-12 22:18:45 | INFO | Sources in MS TSARP220_C_20171013.ms: 1516+1932,1407+284,0319+415,1532+2344,1331+305,1534+2330 2017-11-12 22:18:46 | INFO | Antennas in MS TSARP220_C_20171013.ms: ['Mk2', 'Pi', 'Da', 'Kn', 'De', 'Cm'] 2017-11-12 22:18:49 | INFO | Refant: Mk2 2017-11-12 22:18:49 | INFO | Plotting elevation to: ./plots/plots_observation/TSARP220_C_20171013_elevation.png 2017-11-12 22:19:17 | INFO | Plotting uv-coverage for all sources 2017-11-12 22:19:18 | INFO | Plotting uvcov for 1516+1932: ./plots/plots_observation/TSARP220_C_20171013_uvcov_1516+1932.png 2017-11-12 22:19:22 | INFO | Plotting uvcov for 1407+284: ./plots/plots_observation/TSARP220_C_20171013_uvcov_1407+284.png 2017-11-12 22:19:25 | INFO | Plotting uvcov for 0319+415: ./plots/plots_observation/TSARP220_C_20171013_uvcov_0319+415.png 2017-11-12 22:19:27 | INFO | Plotting uvcov for 1532+2344: ./plots/plots_observation/TSARP220_C_20171013_uvcov_1532+2344.png 2017-11-12 22:19:32 | INFO | Plotting uvcov for 1331+305: ./plots/plots_observation/TSARP220_C_20171013_uvcov_1331+305.png 2017-11-12 22:19:35 | INFO | Plotting uvcov for 1534+2330: ./plots/plots_observation/TSARP220_C_20171013_uvcov_1534+2330.png 2017-11-12 22:19:46 | INFO | Saving information of MS TSARP220_C_20171013.ms in: TSARP220_C_20171013.ms.pkl 2017-11-12 22:19:46 | INFO | Start weblog Traceback (most recent call last): File "/opt/packages/casainst/casa-release-5.1.0-74.el7/lib/python2.7/init_welcome.py", line 24, in execfile(__candidates[0]) File "pipeline/eMERLIN_CASA_pipeline.py", line 407, in run_pipeline(inputs=inputs) File "pipeline/eMERLIN_CASA_pipeline.py", line 128, in run_pipeline emwlog.start_weblog(msinfo) File "pipeline/functions/weblog.py", line 280, in start_weblog weblog_images(msinfo) File "pipeline/functions/weblog.py", line 233, in weblog_images show_image(msinfo, wlog, i) File "pipeline/functions/weblog.py", line 241, in show_image phscal = msinfo['sources']['phscals'].split(',')[i] IndexError: list index out of range

jmoldon commented 6 years ago

The problem is how your sources are specified. When there are more than one target/phasecal pairs, you need to keep the 1:1 sequence, always 1 target and 1 calibrator. So you need to use:

targets = 'trg1,trg2' phscals= 'phs1,phs2'

even if phs1==phs2 is the same source. Otherwise it would be difficult to keep track of which solutions need to be aplied to each source.

varenius commented 6 years ago

Aaaaaaaaha! Makes sense, thanks! The documentation says " If more than one target is selected, the corresponding phase calibrator has to keep the same order." but I did not understand this properly. Thanks for the clarification.