Changeset 2869 for trunk


Ignore:
Timestamp:
12/02/13 13:31:34 (10 years ago)
Author:
Takeshi Nakazato
Message:

New Development: No

JIRA Issue: Yes CAS-5841

Ready for Test: Yes

Interface Changes: No

What Interface Changed: Please list interface changes

Test Programs: test_sdsave, test_importasdm_sd, all sd regressions

Put in Release Notes: Yes

Module(s): sd

Description: Describe your changes here...

Filler/writer are changed so that SCANNO is consistent with
SCAN_NUMBER in MS and scanNumber in ASDM.

It affects several regressions and unit tests so that tests
are necessary to be updated. This change should be verified
by the updated unit tests/regression tests.


Location:
trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/external-alma/asdm2ASAP/ASDMFiller.cc

    r2754 r2869  
    325325
    326326            // fill SCANNO, CYCLENO, IFNO, POLNO, and BEAMNO
    327             setIndex( (uInt)scanno-1, (uInt)cycleno[scanno], ifno, ipol, beamno ) ;
     327            // CAS-5841: SCANNO should be consistent with ASDM scanNumber
     328            setIndex( (uInt)scanno, (uInt)cycleno[scanno], ifno, ipol, beamno ) ;
    328329
    329330            // fill SPECTRA, FLAGTRA, TSYS
  • trunk/src/MSFiller.cpp

    r2844 r2869  
    1 
    21//
    32// C++ Interface: MSFiller
     
    495494    //printf("%u: ScanNo: %d\n", recordNo, columnValue);
    496495    // put value
    497     // scan number is 1-based in MS while 0-based in Scantable
    498     *scanNoRF = (uInt)columnValue - 1 ;
     496    // CAS-5841: SCANNO should be consistent with MS SCAN_NUMBER
     497    *scanNoRF = (uInt)columnValue ;
    499498  }
    500499  virtual void leaveScanNo(const uInt /*recordNo*/, Int /*columnValue*/) {
  • trunk/src/MSWriter.cpp

    r2863 r2869  
    756756    //printf("%u: ScanNo: %u\n", recordNo, columnValue);
    757757
    758     // put value 
    759     // SCAN_NUMBER is 0-based in Scantable while 1-based in MS
    760     *scanNumberRF = (Int)columnValue + 1 ;
     758    // put value
     759    // CAS-5841: SCANNO should be consistent with MS SCAN_NUMBER
     760    *scanNumberRF = (Int)columnValue ;
    761761  }
    762762  virtual void leaveScanNo(const uInt /*recordNo*/, uInt /*columnValue*/) {
  • trunk/src/Scantable.cpp

    r2846 r2869  
    17291729    int nscan = scanlist.size();
    17301730    for (int i = 0; i < nscan; i++) {
    1731       Table subt = t( t.col("SCAN") == scanlist[i]+1 );
     1731      Table subt = t( t.col("SCAN") == scanlist[i] );
    17321732      if (subt.nrow()==0) {
    17331733        //cerr <<"Scan "<<scanlist[i]<<" cannot be found in the scantable."<<endl;
     
    17431743      if ( rec.asuInt("PROCSIZE")==2 ) {
    17441744        if ( i < nscan-1 ) {
    1745           Table subt2 = t( t.col("SCAN") == scanlist[i+1]+1 );
     1745          Table subt2 = t( t.col("SCAN") == scanlist[i+1] );
    17461746          if ( subt2.nrow() == 0) {
    17471747            LogIO os( LogOrigin( "Scantable", "checkScanInfo()", WHERE ) ) ;
Note: See TracChangeset for help on using the changeset viewer.