- Timestamp:
- 10/23/12 13:59:36 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/STGrid.cpp
r2675 r2678 469 469 } 470 470 else { 471 os << " support = " << convSupport_ << endl;471 os << " support = " << userSupport_ << endl; 472 472 } 473 473 os << " doclip = " << (doclip_?"True":"False") << endl ; … … 1789 1789 // determine pixel gwidth 1790 1790 // default is HWHM corresponding to b = 1.0 (Mangum et al. 2007) 1791 Double pixelGW = sqrt(log(2.0));1791 Double pixelGW; 1792 1792 Quantum<Double> q ; 1793 1793 if (!gwidth_.empty()) { … … 1800 1800 } 1801 1801 } 1802 pixelGW = (pixelGW >= 0.0) ? pixelGW : sqrt(log(2.0)); 1803 if (pixelGW < 0.0) { 1804 os << LogIO::SEVERE 1805 << "Negative width is specified for gaussian" << LogIO::EXCEPTION; 1806 } 1802 1807 // determine truncation radius 1803 1808 // default is 3 * HWHM 1804 Double truncate = 3.0 * pixelGW;1809 Double truncate; 1805 1810 if (!truncate_.empty()) { 1806 1811 readQuantity( q, truncate_ ); … … 1813 1818 } 1814 1819 //convSupport_ = (Int)(truncate+0.5); 1815 convSupport_ = (Int)(truncate); 1820 truncate = (truncate >= 0.0) ? truncate : 3.0 * pixelGW; 1821 convSupport_ = Int(truncate); 1816 1822 convSupport_ += (((truncate-(Double)convSupport_) > 0.0) ? 1 : 0); 1817 1823 Int convSize = convSampling_ * ( 2*convSupport_ + 2 ) ; … … 1827 1833 // determine pixel gwidth 1828 1834 // default is HWHM corresponding to b = 2.52 (Mangum et al. 2007) 1829 Double pixelGW = sqrt(log(2.0)) * 2.52;1835 Double pixelGW; 1830 1836 Quantum<Double> q ; 1831 1837 if (!gwidth_.empty()) { … … 1838 1844 } 1839 1845 } 1846 pixelGW = (pixelGW >= 0.0) ? pixelGW : sqrt(log(2.0)) * 2.52; 1847 if (pixelGW < 0.0) { 1848 os << LogIO::SEVERE 1849 << "Negative width is specified for gaussian" << LogIO::EXCEPTION; 1850 } 1840 1851 // determine pixel c 1841 1852 // default is c = 1.55 (Mangum et al. 2007) 1842 Double pixelJW = 1.55;1853 Double pixelJW; 1843 1854 if (!jwidth_.empty()) { 1844 1855 readQuantity( q, jwidth_ ); … … 1849 1860 pixelJW = q.getValue("rad")/celly_; 1850 1861 } 1851 } 1862 } 1863 pixelJW = (pixelJW >= 0.0) ? pixelJW : 1.55; 1864 if (pixelJW < 0.0) { 1865 os << LogIO::SEVERE 1866 << "Negative width is specified for jinc" << LogIO::EXCEPTION; 1867 } 1852 1868 // determine truncation radius 1853 1869 // default is -1.0 (truncate at first null)
Note:
See TracChangeset
for help on using the changeset viewer.