Changeset 2424
- Timestamp:
- 03/05/12 01:09:27 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/STGrid.cpp
r2422 r2424 29 29 30 30 #include <MathUtils.h> 31 #include <atnf/PKSIO/SrcType.h> 31 32 32 33 #include "STGrid.h" … … 1685 1686 const TableRecord &rec = row.record() ; 1686 1687 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" ) ; 1687 1694 Vector<Float> defaultTsys( 1, 1.0 ) ; 1688 1695 // @todo how to set flagtra for gridded spectra? 1689 1696 Vector<uChar> flagtra = rec.asArrayuChar( "FLAGTRA" ) ; 1690 1697 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" ) ; 1691 1703 1692 1704 // fill columns 1693 1705 Int nrow = tab.nrow() ; 1706 ScalarColumn<uInt> scannoCol( tab, "SCANNO" ) ; 1694 1707 ScalarColumn<uInt> ifnoCol( tab, "IFNO" ) ; 1695 1708 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" ) ; 1696 1714 ArrayColumn<uChar> flagtraCol( tab, "FLAGTRA" ) ; 1715 ScalarColumn<uInt> rflagCol( tab, "FLAGROW" ) ; 1697 1716 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" ) ; 1698 1725 for ( Int i = 0 ; i < nrow ; i++ ) { 1726 scannoCol.put( i, (uInt)i ) ; 1699 1727 ifnoCol.put( i, (uInt)ifno_ ) ; 1700 1728 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 ) ; 1701 1734 flagtraCol.put( i, flagtra ) ; 1735 rflagCol.put( i, 0 ) ; 1702 1736 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.