Commits

Muzychenko Inna authored 5bfd6c494b0
Changes according to the NAOJ code review Refs #2720

casatools/src/code/singledish/SingleDish/SingleDishMS.cc

Modified
3393 3393 && (0 != masklist_mtx2(ipol, 2 * imasklist)
3394 3394 && 0 != masklist_mtx2(ipol, 2 * imasklist + 1))) {
3395 3395 ofs_csv << ";[" << masklist_mtx2(ipol, 2 * imasklist) << ';'
3396 3396 << masklist_mtx2(ipol, 2 * imasklist + 1) << ']';
3397 3397 }
3398 3398 }
3399 3399
3400 3400 ofs_csv << ']' << ',';
3401 3401 Matrix<uInt> bltype_mtx2 = bltype_mtx[0][ipol];
3402 3402 string bltype_name;
3403 - if (bltype_mtx2(0, 0) == (uInt)0) {
3403 + uInt bltype_idx = bltype_mtx2(0, 0);
3404 + if (bltype_idx == (uInt)0) {
3404 3405 bltype_name = "poly";
3405 - } else if (bltype_mtx2(0, 0) == (uInt)1) {
3406 + } else if (bltype_idx == (uInt)1) {
3406 3407 bltype_name = "chebyshev";
3407 - } else if (bltype_mtx2(0, 0) == (uInt)2) {
3408 + } else if (bltype_idx == (uInt)2) {
3408 3409 bltype_name = "cspline";
3409 - } else if (bltype_mtx2(0, 0) == (uInt)3) {
3410 + } else if (bltype_idx== (uInt)3) {
3410 3411 bltype_name = "sinusoid";
3411 3412 }
3412 3413
3413 3414 Matrix<Int> fpar_mtx2 = fpar_mtx;
3414 3415 Matrix<Float> coeff_mtx2 = coeff_mtx;
3415 - if (bltype_mtx2(0, 0) == (uInt)3) {
3416 + if (bltype_idx == (uInt)3) {
3416 3417 size_t nwave_size = fpar_mtx2.ncolumn();
3417 3418 ofs_csv << bltype_name.c_str() << ',' << fpar_mtx2(ipol, 0);
3418 3419 for (size_t i = 0; i < nwave_size; ++i) {
3419 3420 ofs_csv << ';' << fpar_mtx2(ipol, i);
3420 3421 }
3421 3422 ofs_csv << ',';
3422 3423 }
3423 3424 else {
3424 3425 ofs_csv << bltype_name.c_str() << ',' << fpar_mtx2(ipol, 0)
3425 3426 << ',';

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

Add shortcut