Changeset 2052 in Sophya for trunk/SophyaLib/SkyMap/localmap.cc
- Timestamp:
- Jun 11, 2002, 7:13:42 PM (23 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/SophyaLib/SkyMap/localmap.cc
r2013 r2052 318 318 double xmin= -x0_-0.5; 319 319 double xmax= xmin+nSzX_; 320 if((X > xmax) || (X < xmin)) return(-1); 320 if((X > xmax) || (X < xmin)) { 321 if (exc_outofmap_) throw RangeCheckError("LocalMap<T>::PixIndexSph() - Out of Map Theta/Phi (X) "); 322 else return(-1); 323 } 321 324 double xcurrent= xmin; 322 325 for(i = 0; i < nSzX_; i++ ) … … 327 330 double ymin= -y0_-0.5; 328 331 double ymax= ymin+nSzY_; 329 if((Y > ymax) || (Y < ymin)) return(-1); 332 if((Y > ymax) || (Y < ymin)) { 333 if (exc_outofmap_) throw RangeCheckError("LocalMap<T>::PixIndexSph() - Out of Map Theta/Phi (Y) "); 334 else return(-1); 335 } 330 336 double ycurrent= ymin; 331 337 for(j = 0; j < nSzY_; j++ ) … … 467 473 if ( theta0 < 0. || theta0 > 180. || phi0 < 0. || phi0 > 360. || angle < -90. || angle > 90.) 468 474 { 469 throw "LocalMap::SetOrigin angle out of range";475 throw ParmError("LocalMap::SetOrigin angle out of range"); 470 476 } 471 477 SetCoorC(theta0,phi0); … … 574 580 if ( angleX <= 0. || angleX > 180. || angleY <= 0. || angleY > 180.) 575 581 { 576 throw "LocalMap::SetSize extension angle out of range";582 throw ParmError("LocalMap::SetSize extension angle out of range"); 577 583 } 578 584 … … 646 652 deltaPhi_ = 0.; 647 653 deltaTheta_ =0.; 654 SetThrowExceptionWhenOutofMapFlag(false); // Genere des exceptions si theta-phi out of range 648 655 } 649 656
Note:
See TracChangeset
for help on using the changeset viewer.