Changeset 3991 in Sophya


Ignore:
Timestamp:
May 9, 2011, 12:10:57 PM (13 years ago)
Author:
ansari
Message:

encore debug/correction de Four2DRespRatio, Reza 08/05/2011

Location:
trunk/Cosmo/RadioBeam
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/Cosmo/RadioBeam/applobe.cc

    r3989 r3991  
    9090    else fgoptarg=false;
    9191  }
    92   if (narg < 3) {
     92  if (narg < 4) {
    9393    cout << " applobe/error arguments , applobe -h for help " << endl;
    9494    return 2;
  • trunk/Cosmo/RadioBeam/mdish.cc

    r3990 r3991  
    168168//---------------------------------------------------------------
    169169Four2DRespRatio::Four2DRespRatio(Four2DResponse& a, Four2DResponse& b, double maxratio)
    170   : Four2DResponse(0, a.D(), a.D()), a_(a), b_(b), maxratio_(maxratio)
     170  : Four2DResponse(0, a.D(), a.D()), a_(a), b_(b), maxratio_(maxratio), zerothr_(.5/maxratio)
    171171{
    172172}
     
    176176  double ra = a_.Value(kx,ky);
    177177  double rb = b_.Value(kx,ky);
    178   if (ra<rb) {
    179     if (rb>1.e-19)  return(ra/rb); 
    180     else return 0.;
    181   }
    182   double rval=maxratio_;
    183   if (rb>1.e-19) rval=ra/rb;
     178  if ((ra<zerothr_)||(rb<zerothr_))  return 0.;
     179  double rval=ra/rb;
    184180  if (rval<maxratio_) return rval;
    185181  return maxratio_;
  • trunk/Cosmo/RadioBeam/mdish.h

    r3988 r3991  
    9595  Four2DResponse& a_;
    9696  Four2DResponse& b_;
    97   double maxratio_;
     97  double maxratio_, zerothr_;
    9898};
    9999
Note: See TracChangeset for help on using the changeset viewer.