set receiver frec if (frec.eq.2).and.(do_external) then set phase external else set phase internal endif mask shadow /ant all set band 'cal_band[frec]' set sub all ! @ x_flux_find if (invalid_list.eq..true.) then return endif ! list /source if n_source.le.0 then say "No calibrators" return endif ! ! Fix some source fluxes ! let nfix 0 /new integer FOR I 1 TO N_cals symb sss "fl_"'i' let fix_flux[i,frec] fix_'sss' let in_flux[i,frec] in_'sss' if fix_'sss' then set flux 'cal_source[i]' in_'sss' frghz[frec] let nfix nfix+1 else set flux 'cal_source[i]' * endif del /symb sss NEXT ! if nfix.eq.0 then say "Please fix the flux of one of the sources !" return endif solve flux ! ! Un-fix all source fluxes ! FOR I 1 TO N_cals symb sss "fl_"'i' if fix_'sss' then set flux 'cal_source[i]' * endif del /symb sss NEXT ! mask shadow /ant all /reset if .not.exist(f_solved) then return endif ! for i 1 to n_cals for j 1 to n_solved if (solved[j].eq.cal_source[i]) then let cal_flux[i,frec] max(0,0.001*nint(1000*f_solved[j])) let cal_fl_'i' 'cal_flux[i,frec]' endif next next ! let jypk[frec] 0.01*nint(100.*jy_per_k) for i 1 to nant let ceff[i,frec] 0.01*NINT(100*JY_TO_KEL[i]|JY_PER_K[i]) next if nant.eq.5 then let jypkflux 'jypk[1,frec]' 'jypk[2,frec]' 'jypk[3,frec]' 'jypk[4,frec]' - 'jypk[5,frec]' else if nant.eq.4 then let jypkflux 'jypk[1,frec]' 'jypk[2,frec]' 'jypk[3,frec]' 'jypk[4,frec]' else if nant.eq.3 then let jypkflux 'jypk[1,frec]' 'jypk[2,frec]' 'jypk[3,frec]' else if nant.eq.2 then let jypkflux 'jypk[1,frec]' 'jypk[2,frec]' endif