Changeset 2388
- Timestamp:
- 12/27/11 15:31:29 (13 years ago)
- Location:
- trunk/src
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/STGrid.cpp
r2386 r2388 67 67 nprocessed_ = 0 ; 68 68 nchunk_ = 0 ; 69 70 // initialize user input 71 nxUI_ = -1 ; 72 nyUI_ = -1 ; 73 cellxUI_ = "" ; 74 cellyUI_ = "" ; 75 centerUI_ = "" ; 69 76 } 70 77 … … 74 81 if ( infile_.compare( name ) != 0 ) { 75 82 infile_ = String( infile ) ; 76 tab_ = Table( infile_ ) ;77 83 } 78 84 } … … 100 106 string scenter ) 101 107 { 102 ROArrayColumn<Double> dirCol( tab_, "DIRECTION" ) ; 103 Matrix<Double> direction = dirCol.getColumn() ; 104 Double rmax, rmin, dmax, dmin ; 105 minMax( rmin, rmax, direction.row( 0 ) ) ; 106 minMax( dmin, dmax, direction.row( 1 ) ) ; 107 108 Int npx = (Int)nx ; 109 Int npy = (Int)ny ; 110 String cellx( scellx ) ; 111 String celly( scelly ) ; 112 String center( scenter ) ; 113 setupGrid( npx, npy, 114 cellx, celly, 115 rmin, rmax, 116 dmin, dmax, 117 center ) ; 108 nxUI_ = (Int)nx ; 109 nyUI_ = (Int)ny ; 110 cellxUI_ = String( scellx ) ; 111 cellyUI_ = String( scelly ) ; 112 centerUI_ = String( scenter ) ; 118 113 } 119 114 … … 255 250 os << "selectData: elapsed time is " << t1-t0 << " sec." << LogIO::POST ; 256 251 252 setupGrid() ; 257 253 setupArray() ; 258 254 … … 592 588 } 593 589 590 void STGrid::setupGrid() 591 { 592 Double xmin,xmax,ymin,ymax ; 593 mapExtent( xmin, xmax, ymin, ymax ) ; 594 595 setupGrid( nxUI_, nyUI_, cellxUI_, cellyUI_, 596 xmin, xmax, ymin, ymax, centerUI_ ) ; 597 } 598 594 599 void STGrid::setupGrid( Int &nx, 595 600 Int &ny, … … 708 713 ny_ = Int( ceil( wy/celly_ ) ) ; 709 714 } 715 } 716 717 void STGrid::mapExtent( Double &xmin, Double &xmax, 718 Double &ymin, Double &ymax ) 719 { 720 //LogIO os( LogOrigin("STGrid","mapExtent",WHERE) ) ; 721 ROArrayColumn<Double> dirCol( tab_, "DIRECTION" ) ; 722 Matrix<Double> direction = dirCol.getColumn() ; 723 //os << "dirCol.nrow() = " << dirCol.nrow() << LogIO::POST ; 724 minMax( xmin, xmax, direction.row( 0 ) ) ; 725 minMax( ymin, ymax, direction.row( 1 ) ) ; 726 //os << "(xmin,xmax)=(" << xmin << "," << xmax << ")" << LogIO::POST ; 727 //os << "(ymin,ymax)=(" << ymin << "," << ymax << ")" << LogIO::POST ; 710 728 } 711 729 -
trunk/src/STGrid.h
r2386 r2388 72 72 void gridPerPol() ; 73 73 74 void setupGrid() ; 74 75 void setupGrid( Int &nx, 75 76 Int &ny, … … 81 82 Double &ymax, 82 83 String ¢er ) ; 84 void mapExtent( Double &xmin, Double &xmax, 85 Double &ymin, Double &ymax ) ; 83 86 84 87 void setData( Array<Complex> &gdata, … … 156 159 157 160 161 // user input 162 Int nxUI_ ; 163 Int nyUI_ ; 164 String cellxUI_ ; 165 String cellyUI_ ; 166 String centerUI_ ; 167 158 168 String infile_ ; 159 169 Int ifno_ ;
Note:
See TracChangeset
for help on using the changeset viewer.