Commits

Takahiro Tsutsumi authored e35dd9870d2
Added a check if the channel frequencies shifted in the source frame

contains NaN and in that caise, raise an exception.

casa5/code/synthesis/ImagerObjects/SynthesisUtilMethods.cc

Modified
2671 2671 }
2672 2672 Double refPix;
2673 2673 Vector<Double> chanFreq;
2674 2674 Vector<Double> chanFreqStep;
2675 2675 String specmode;
2676 2676
2677 2677 if(mode=="cubesource"){
2678 2678 MDoppler mdop(sysvelvalue, MDoppler::RELATIVISTIC);
2679 2679 dataChanFreq=mdop.shiftFrequency(dataChanFreq);
2680 2680 dataChanWidth=mdop.shiftFrequency(dataChanWidth);
2681 + if (std::isnan(dataChanFreq[0]) || std::isnan(dataChanWidth[0])) {
2682 + throw(AipsError("Doppler shifting of the data channel frequencies resulted in 'NaN' using the radial velocity = "+
2683 + String::toString(sysvelvalue)+". Typically this indicates a problem in the ephemeris data being used."));
2684 + }
2681 2685 }
2682 2686
2683 2687 if (!getImFreq(chanFreq, chanFreqStep, refPix, specmode, obsEpoch,
2684 2688 obsPosition, dataChanFreq, dataChanWidth, dataFrame, qrestfreq, freqmin, freqmax,
2685 2689 phaseCenterToUse))
2686 2690 throw(AipsError("Failed to determine channelization parameters"));
2687 2691
2688 2692 Bool nonLinearFreq(false);
2689 2693 String veltype_p=veltype;
2690 2694 veltype_p.upcase();

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

Add shortcut