Changeset 2191 for branches/casa-prerelease/pre-asap/src
- Timestamp:
- 06/13/11 11:41:43 (13 years ago)
- Location:
- branches/casa-prerelease/pre-asap/src
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/casa-prerelease/pre-asap/src/MSFiller.cpp
r2188 r2191 601 601 Vector< Quantum<Double> > chanFreqs = (*sharedQDArrCol)( spwId ) ; 602 602 delete sharedQDArrCol ; 603 if ( nchan > 1 && chanFreqs[0].getValue("Hz") > chanFreqs[1].getValue("Hz") )604 increment *= -1.0 ;605 603 if ( freqRef == MFrequency::LSRK ) { 606 604 if ( even ) { … … 951 949 sdh.antennaname = telescopeName + "//" + antennaName ; 952 950 } 953 if ( stationName != "" && stationName != antennaName) {951 if ( stationName != "" ) { 954 952 sdh.antennaname += "@" + stationName ; 955 953 } … … 1052 1050 else if ( tmpStr.find( "." ) != String::npos ) { 1053 1051 sep = "." ; 1054 }1055 else if ( tmpStr.find( "#" ) != String::npos ) {1056 sep = "#" ;1057 1052 } 1058 1053 //else if ( obsMode.find( "_" ) != String::npos ) { … … 1111 1106 } 1112 1107 } 1113 else if ( sep == "." || sep == "#") {1114 // sep == "." or "#"1108 else if ( sep == "." ) { 1109 // sep == "." 1115 1110 // 1116 1111 // ALMA & EVLA case (MS via ASDM) before3.1 … … 1569 1564 if ( !isSysCal_ ) { 1570 1565 os_ << "No TCAL rows" << LogIO::POST ; 1571 Block<uInt> tcalids( 4,0 ) ;1566 Block<uInt> tcalids( 0 ) ; 1572 1567 return tcalids ; 1573 1568 } … … 1577 1572 if ( !tcalrec_.isDefined( key ) ) { 1578 1573 os_ << "No TCAL rows" << LogIO::POST ; 1579 Block<uInt> tcalids( 4,0 ) ;1574 Block<uInt> tcalids( 0 ) ; 1580 1575 return tcalids ; 1581 1576 } -
branches/casa-prerelease/pre-asap/src/MSWriter.cpp
r2188 r2191 583 583 // double startSec = gettimeofday_sec() ; 584 584 // os_ << "start MSWriter::setupMS() startSec=" << startSec << LogIO::POST ; 585 586 String dunit = table_->getHeader().fluxunit ;587 585 588 586 TableDesc msDesc = MeasurementSet::requiredTableDesc() ; … … 595 593 596 594 mstable_ = new MeasurementSet( newtab ) ; 597 598 TableColumn col ;599 if ( useFloatData_ )600 col.attach( *mstable_, "FLOAT_DATA" ) ;601 else if ( useData_ )602 col.attach( *mstable_, "DATA" ) ;603 col.rwKeywordSet().define( "UNIT", dunit ) ;604 595 605 596 // create subtables … … 1284 1275 1285 1276 // RESOLUTION, CHAN_WIDTH, EFFECTIVE_BW 1286 Vector<Double> sharedDoubleArr( nchan, abs(inc)) ;1277 Vector<Double> sharedDoubleArr( nchan, inc ) ; 1287 1278 msSpwCols.resolution().put( spwid, sharedDoubleArr ) ; 1288 1279 msSpwCols.chanWidth().put( spwid, sharedDoubleArr ) ; … … 1692 1683 // OBS_MODE string of MS created by importasdm task is slightly 1693 1684 // (but critically) changed. 1694 // 2011/05/20 TN1695 // OBS_MODE string of MS created by importasdm task is changed1696 // again (separator is now "#" instead of "_"1697 String sep1="#" ;1698 String sep2="," ;1699 String target="OBSERVE_TARGET" ;1700 String atmcal="CALIBRATE_TEMPERATURE" ;1701 String onstr="ON_SOURCE" ;1702 String offstr="OFF_SOURCE" ;1703 String pswitch="POSITION_SWITCH" ;1704 String nod="NOD" ;1705 String fswitch="FREQUENCY_SWITCH" ;1706 String sigstr="SIG" ;1707 String refstr="REF" ;1708 String unspecified="UNSPECIFIED" ;1709 String ftlow="LOWER" ;1710 String fthigh="HIGHER" ;1711 1685 switch ( type ) { 1712 1686 case SrcType::PSON: 1713 //stype = "OBSERVE_TARGET_ON_SOURCE,POSITION_SWITCH" ; 1714 stype = target+sep1+onstr+sep2+pswitch ; 1687 stype = "OBSERVE_TARGET_ON_SOURCE,POSITION_SWITCH" ; 1715 1688 b = True ; 1716 1689 t = 0.0 ; … … 1718 1691 break ; 1719 1692 case SrcType::PSOFF: 1720 //stype = "OBSERVE_TARGET_OFF_SOURCE,POSITION_SWITCH" ; 1721 stype = target+sep1+offstr+sep2+pswitch ; 1693 stype = "OBSERVE_TARGET_OFF_SOURCE,POSITION_SWITCH" ; 1722 1694 b = False ; 1723 1695 t = 0.0 ; … … 1725 1697 break ; 1726 1698 case SrcType::NOD: 1727 //stype = "OBSERVE_TARGET_ON_SOURCE,NOD" ; 1728 stype = target+sep1+onstr+sep2+nod ; 1699 stype = "OBSERVE_TARGET_ON_SOURCE,NOD" ; 1729 1700 b = True ; 1730 1701 t = 0.0 ; … … 1732 1703 break ; 1733 1704 case SrcType::FSON: 1734 //stype = "OBSERVE_TARGET_ON_SOURCE,FREQUENCY_SWITCH_SIG" ; 1735 stype = target+sep1+onstr+sep2+fswitch+sep1+sigstr ; 1705 stype = "OBSERVE_TARGET_ON_SOURCE,FREQUENCY_SWITCH_SIG" ; 1736 1706 b = True ; 1737 1707 t = 0.0 ; … … 1739 1709 break ; 1740 1710 case SrcType::FSOFF: 1741 //stype = "OBSERVE_TARGET_ON_SOURCE,FREQUENCY_SWITCH_REF" ; 1742 stype = target+sep1+onstr+sep2+fswitch+sep1+refstr ; 1711 stype = "OBSERVE_TARGET_ON_SOURCE,FREQUENCY_SWITCH_REF" ; 1743 1712 b = False ; 1744 1713 t = 0.0 ; … … 1746 1715 break ; 1747 1716 case SrcType::SKY: 1748 //stype = "CALIBRATE_TEMPERATURE_OFF_SOURCE,UNSPECIFIED" ; 1749 stype = atmcal+sep1+offstr+sep2+unspecified ; 1717 stype = "CALIBRATE_TEMPERATURE_OFF_SOURCE,UNSPECIFIED" ; 1750 1718 b = False ; 1751 1719 t = 0.0 ; … … 1753 1721 break ; 1754 1722 case SrcType::HOT: 1755 //stype = "CALIBRATE_TEMPERATURE_OFF_SOURCE,UNSPECIFIED" ; 1756 stype = atmcal+sep1+offstr+sep2+unspecified ; 1723 stype = "CALIBRATE_TEMPERATURE_OFF_SOURCE,UNSPECIFIED" ; 1757 1724 b = False ; 1758 1725 t = 0.0 ; … … 1760 1727 break ; 1761 1728 case SrcType::WARM: 1762 //stype = "CALIBRATE_TEMPERATURE_OFF_SOURCE,UNSPECIFIED" ; 1763 stype = atmcal+sep1+offstr+sep2+unspecified ; 1729 stype = "CALIBRATE_TEMPERATURE_OFF_SOURCE,UNSPECIFIED" ; 1764 1730 t = 0.0 ; 1765 1731 b = False ; … … 1767 1733 break ; 1768 1734 case SrcType::COLD: 1769 //stype = "CALIBRATE_TEMPERATURE_OFF_SOURCE,UNSPECIFIED" ; 1770 stype = atmcal+sep1+offstr+sep2+unspecified ; 1735 stype = "CALIBRATE_TEMPERATURE_OFF_SOURCE,UNSPECIFIED" ; 1771 1736 b = False ; 1772 1737 t = 0.0 ; … … 1774 1739 break ; 1775 1740 case SrcType::PONCAL: 1776 //stype = "CALIBRATE_TEMPERATURE_ON_SOURCE,POSITION_SWITCH" ; 1777 stype = atmcal+sep1+onstr+sep2+pswitch ; 1741 stype = "CALIBRATE_TEMPERATURE_ON_SOURCE,POSITION_SWITCH" ; 1778 1742 b = True ; 1779 1743 t = 1.0 ; … … 1781 1745 break ; 1782 1746 case SrcType::POFFCAL: 1783 //stype = "CALIBRATE_TEMPERATURE_OFF_SOURCE,POSITION_SWITCH" ; 1784 stype = atmcal+sep1+offstr+sep2+pswitch ; 1747 stype = "CALIBRATE_TEMPERATURE_OFF_SOURCE,POSITION_SWITCH" ; 1785 1748 b = False ; 1786 1749 t = 1.0 ; … … 1788 1751 break ; 1789 1752 case SrcType::NODCAL: 1790 //stype = "CALIBRATE_TEMPERATURE_ON_SOURCE,NOD" ; 1791 stype = atmcal+sep1+onstr+sep2+nod ; 1753 stype = "CALIBRATE_TEMPERATURE_ON_SOURCE,NOD" ; 1792 1754 b = True ; 1793 1755 t = 1.0 ; … … 1795 1757 break ; 1796 1758 case SrcType::FONCAL: 1797 //stype = "CALIBRATE_TEMPERATURE_ON_SOURCE,FREQUENCY_SWITCH_SIG" ; 1798 stype = atmcal+sep1+onstr+sep2+fswitch+sep1+sigstr ; 1759 stype = "CALIBRATE_TEMPERATURE_ON_SOURCE,FREQUENCY_SWITCH_SIG" ; 1799 1760 b = True ; 1800 1761 t = 1.0 ; … … 1802 1763 break ; 1803 1764 case SrcType::FOFFCAL: 1804 //stype = "CALIBRATE_TEMPERATURE_OFF_SOURCE,FREQUENCY_SWITCH_REF" ; 1805 stype = atmcal+sep1+offstr+sep2+fswitch+sep1+refstr ; 1765 stype = "CALIBRATE_TEMPERATURE_OFF_SOURCE,FREQUENCY_SWITCH_REF" ; 1806 1766 b = False ; 1807 1767 t = 1.0 ; … … 1809 1769 break ; 1810 1770 case SrcType::FSLO: 1811 //stype = "OBSERVE_TARGET_ON_SOURCE,FREQUENCY_SWITCH_LOWER" ; 1812 stype = target+sep1+onstr+sep2+fswitch+sep1+ftlow ; 1771 stype = "OBSERVE_TARGET_ON_SOURCE,FREQUENCY_SWITCH_LOWER" ; 1813 1772 b = True ; 1814 1773 t = 0.0 ; … … 1816 1775 break ; 1817 1776 case SrcType::FLOOFF: 1818 //stype = "OBSERVE_TARGET_OFF_SOURCE,FREQUENCY_SWITCH_LOWER" ; 1819 stype = target+sep1+offstr+sep2+fswitch+sep1+ftlow ; 1777 stype = "OBSERVE_TARGET_OFF_SOURCE,FREQUENCY_SWITCH_LOWER" ; 1820 1778 b = False ; 1821 1779 t = 0.0 ; … … 1823 1781 break ; 1824 1782 case SrcType::FLOSKY: 1825 //stype = "CALIBRATE_TEMPERATURE_OFF_SOURCE,FREQUENCY_SWITCH_LOWER" ; 1826 stype = atmcal+sep1+offstr+sep2+fswitch+sep1+ftlow ; 1783 stype = "CALIBRATE_TEMPERATURE_OFF_SOURCE,FREQUENCY_SWITCH_LOWER" ; 1827 1784 b = False ; 1828 1785 t = 0.0 ; … … 1830 1787 break ; 1831 1788 case SrcType::FLOHOT: 1832 //stype = "CALIBRATE_TEMPERATURE_OFF_SOURCE,FREQUENCY_SWITCH_LOWER" ; 1833 stype = atmcal+sep1+offstr+sep2+fswitch+sep1+ftlow ; 1789 stype = "CALIBRATE_TEMPERATURE_OFF_SOURCE,FREQUENCY_SWITCH_LOWER" ; 1834 1790 b = False ; 1835 1791 t = 0.0 ; … … 1837 1793 break ; 1838 1794 case SrcType::FLOWARM: 1839 //stype = "CALIBRATE_TEMPERATURE_OFF_SOURCE,FREQUENCY_SWITCH_LOWER" ; 1840 stype = atmcal+sep1+offstr+sep2+fswitch+sep1+ftlow ; 1795 stype = "CALIBRATE_TEMPERATURE_OFF_SOURCE,FREQUENCY_SWITCH_LOWER" ; 1841 1796 b = False ; 1842 1797 t = 0.0 ; … … 1844 1799 break ; 1845 1800 case SrcType::FLOCOLD: 1846 //stype = "CALIBRATE_TEMPERATURE_OFF_SOURCE,FREQUENCY_SWITCH_LOWER" ; 1847 stype = atmcal+sep1+offstr+sep2+fswitch+sep1+ftlow ; 1801 stype = "CALIBRATE_TEMPERATURE_OFF_SOURCE,FREQUENCY_SWITCH_LOWER" ; 1848 1802 b = False ; 1849 1803 t = 0.0 ; … … 1851 1805 break ; 1852 1806 case SrcType::FSHI: 1853 //stype = "OBSERVE_TARGET_ON_SOURCE,FREQUENCY_SWITCH_HIGHER" ; 1854 stype = target+sep1+onstr+sep2+fswitch+sep1+fthigh ; 1807 stype = "OBSERVE_TARGET_ON_SOURCE,FREQUENCY_SWITCH_HIGHER" ; 1855 1808 b = True ; 1856 1809 t = 0.0 ; … … 1858 1811 break ; 1859 1812 case SrcType::FHIOFF: 1860 //stype = "CALIBRATE_TEMPERATURE_OFF_SOURCE,FREQUENCY_SWITCH_HIGHER" ; 1861 stype = target+sep1+offstr+sep2+fswitch+sep1+fthigh ; 1813 stype = "CALIBRATE_TEMPERATURE_OFF_SOURCE,FREQUENCY_SWITCH_HIGHER" ; 1862 1814 b = False ; 1863 1815 t = 0.0 ; … … 1865 1817 break ; 1866 1818 case SrcType::FHISKY: 1867 //stype = "CALIBRATE_TEMPERATURE_OFF_SOURCE,FREQUENCY_SWITCH_HIGHER" ; 1868 stype = atmcal+sep1+offstr+sep2+fswitch+sep1+fthigh ; 1819 stype = "CALIBRATE_TEMPERATURE_OFF_SOURCE,FREQUENCY_SWITCH_HIGHER" ; 1869 1820 b = False ; 1870 1821 t = 0.0 ; … … 1872 1823 break ; 1873 1824 case SrcType::FHIHOT: 1874 //stype = "CALIBRATE_TEMPERATURE_OFF_SOURCE,FREQUENCY_SWITCH_HIGHER" ; 1875 stype = atmcal+sep1+offstr+sep2+fswitch+sep1+fthigh ; 1825 stype = "CALIBRATE_TEMPERATURE_OFF_SOURCE,FREQUENCY_SWITCH_HIGHER" ; 1876 1826 b = False ; 1877 1827 t = 0.0 ; … … 1879 1829 break ; 1880 1830 case SrcType::FHIWARM: 1881 //stype = "CALIBRATE_TEMPERATURE_OFF_SOURCE,FREQUENCY_SWITCH_HIGHER" ; 1882 stype = atmcal+sep1+offstr+sep2+fswitch+sep1+fthigh ; 1831 stype = "CALIBRATE_TEMPERATURE_OFF_SOURCE,FREQUENCY_SWITCH_HIGHER" ; 1883 1832 b = False ; 1884 1833 t = 0.0 ; … … 1886 1835 break ; 1887 1836 case SrcType::FHICOLD: 1888 //stype = "CALIBRATE_TEMPERATURE_OFF_SOURCE,FREQUENCY_SWITCH_HIGHER" ; 1889 stype = atmcal+sep1+offstr+sep2+fswitch+sep1+fthigh ; 1837 stype = "CALIBRATE_TEMPERATURE_OFF_SOURCE,FREQUENCY_SWITCH_HIGHER" ; 1890 1838 b = False ; 1891 1839 t = 0.0 ; … … 1893 1841 break ; 1894 1842 case SrcType::SIG: 1895 //stype = "OBSERVE_TARGET_ON_SOURCE,UNSPECIFIED" ; 1896 stype = target+sep1+onstr+sep2+unspecified ; 1843 stype = "OBSERVE_TARGET_ON_SOURCE,UNSPECIFIED" ; 1897 1844 b = True ; 1898 1845 t = 0.0 ; … … 1900 1847 break ; 1901 1848 case SrcType::REF: 1902 //stype = "OBSERVE_TARGET_ON_SOURCE,UNSPECIFIED" ; 1903 stype = target+sep1+offstr+sep2+unspecified ; 1849 stype = "OBSERVE_TARGET_ON_SOURCE,UNSPECIFIED" ; 1904 1850 b = False ; 1905 1851 t = 0.0 ; … … 1907 1853 break ; 1908 1854 default: 1909 //stype = "UNSPECIFIED" ; 1910 stype = unspecified ; 1855 stype = "UNSPECIFIED" ; 1911 1856 b = True ; 1912 1857 t = 0.0 ;
Note:
See TracChangeset
for help on using the changeset viewer.