Changeset 2424 for trunk/src


Ignore:
Timestamp:
03/05/12 01:09:27 (13 years ago)
Author:
Takeshi Nakazato
Message:

New Development: No

JIRA Issue: Yes CAS-2816

Ready for Test: Yes

Interface Changes: No

What Interface Changed: Please list interface changes

Test Programs: List test programs

Put in Release Notes: Yes/No

Module(s): Module Names change impacts.

Description: Describe your changes here...

Fill main columns: SCANNO, SRCNAME, SRCTYPE, FIELDNAME, OPACITY,

TCAL_ID, FIT_ID, FOCUS_ID, WEATHER_ID,
SRCVELOCITY, SRCPROPERMOTION, SRCDIRECTION,
SCANRATE


File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/STGrid.cpp

    r2422 r2424  
    2929
    3030#include <MathUtils.h>
     31#include <atnf/PKSIO/SrcType.h>
    3132
    3233#include "STGrid.h"
     
    16851686  const TableRecord &rec = row.record() ;
    16861687  uInt freqId = rec.asuInt( "FREQ_ID" ) ;
     1688  uInt molId = rec.asuInt( "MOLECULE_ID" ) ;
     1689  uInt tcalId = rec.asuInt( "TCAL_ID" ) ;
     1690  uInt focusId = rec.asuInt( "FOCUS_ID" ) ;
     1691  uInt weatherId = rec.asuInt( "WEATHER_ID" ) ;
     1692  String srcname = rec.asString( "SRCNAME" ) ;
     1693  String fieldname = rec.asString( "FIELDNAME" ) ;
    16871694  Vector<Float> defaultTsys( 1, 1.0 ) ;
    16881695  // @todo how to set flagtra for gridded spectra?
    16891696  Vector<uChar> flagtra = rec.asArrayuChar( "FLAGTRA" ) ;
    16901697  flagtra = (uChar)0 ;
     1698  Float opacity = rec.asFloat( "OPACITY" ) ;
     1699  Double srcvel = rec.asDouble( "SRCVELOCITY" ) ;
     1700  Vector<Double> srcpm = rec.asArrayDouble( "SRCPROPERMOTION" ) ;
     1701  Vector<Double> srcdir = rec.asArrayDouble( "SRCDIRECTION" ) ;
     1702  Vector<Double> scanrate = rec.asArrayDouble( "SCANRATE" ) ;
    16911703
    16921704  // fill columns
    16931705  Int nrow = tab.nrow() ;
     1706  ScalarColumn<uInt> scannoCol( tab, "SCANNO" ) ;
    16941707  ScalarColumn<uInt> ifnoCol( tab, "IFNO" ) ;
    16951708  ScalarColumn<uInt> freqIdCol( tab, "FREQ_ID" ) ;
     1709  ScalarColumn<uInt> molIdCol( tab, "MOLECULE_ID" ) ;
     1710  ScalarColumn<uInt> tcalidCol( tab, "TCAL_ID" ) ;
     1711  ScalarColumn<Int> fitidCol( tab, "FIT_ID" ) ;
     1712  ScalarColumn<uInt> focusidCol( tab, "FOCUS_ID" ) ;
     1713  ScalarColumn<uInt> weatheridCol( tab, "WEATHER_ID" ) ;
    16961714  ArrayColumn<uChar> flagtraCol( tab, "FLAGTRA" ) ;
     1715  ScalarColumn<uInt> rflagCol( tab, "FLAGROW" ) ;
    16971716  ArrayColumn<Float> tsysCol( tab, "TSYS" ) ;
     1717  ScalarColumn<String> srcnameCol( tab, "SRCNAME" ) ;
     1718  ScalarColumn<String> fieldnameCol( tab, "FIELDNAME" ) ;
     1719  ScalarColumn<Int> srctypeCol( tab, "SRCTYPE" ) ;
     1720  ScalarColumn<Float> opacityCol( tab, "OPACITY" ) ;
     1721  ScalarColumn<Double> srcvelCol( tab, "SRCVELOCITY" ) ;
     1722  ArrayColumn<Double> srcpmCol( tab, "SRCPROPERMOTION" ) ;
     1723  ArrayColumn<Double> srcdirCol( tab, "SRCDIRECTION" ) ;
     1724  ArrayColumn<Double> scanrateCol( tab, "SCANRATE" ) ;
    16981725  for ( Int i = 0 ; i < nrow ; i++ ) {
     1726    scannoCol.put( i, (uInt)i ) ;
    16991727    ifnoCol.put( i, (uInt)ifno_ ) ;
    17001728    freqIdCol.put( i, freqId ) ;
     1729    molIdCol.put( i, molId ) ;
     1730    tcalidCol.put( i, tcalId ) ;
     1731    fitidCol.put( i, -1 ) ;
     1732    focusidCol.put( i, focusId ) ;
     1733    weatheridCol.put( i, weatherId ) ;
    17011734    flagtraCol.put( i, flagtra ) ;
     1735    rflagCol.put( i, 0 ) ;
    17021736    tsysCol.put( i, defaultTsys ) ;
    1703   }
    1704 }
    1705 
    1706 }
     1737    srcnameCol.put( i, srcname ) ;
     1738    fieldnameCol.put( i, fieldname ) ;
     1739    srctypeCol.put( i, (Int)SrcType::PSON ) ;
     1740    opacityCol.put( i, opacity ) ;
     1741    srcvelCol.put( i, srcvel ) ;
     1742    srcpmCol.put( i, srcpm ) ;
     1743    srcdirCol.put( i, srcdir ) ;
     1744    scanrateCol.put( i, scanrate ) ;
     1745  }
     1746}
     1747
     1748}
Note: See TracChangeset for help on using the changeset viewer.