Changeset 3792 in Sophya for trunk/Cosmo/RadioBeam/mdish.cc


Ignore:
Timestamp:
Jun 28, 2010, 6:06:00 PM (15 years ago)
Author:
ansari
Message:

Ajout du programme de calcul et sauvegarde reponse interfero, Reza 28/06/2010

File:
1 edited

Legend:

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

    r3789 r3792  
    5959// -- Four2DRespTable : Reponse tabulee instrumentale ds le plan k_x,k_y (angles theta,phi)
    6060//---------------------------------------------------------------
    61 Four2DRespTable::Four2DRespTable(Histo2D const & hrep, double d)
    62   : Four2DResponse(0,d,d) , hrep_(hrep)
     61Four2DRespTable::Four2DRespTable()
     62  : Four2DResponse(0,1.,1.)
     63{
     64}
     65
     66Four2DRespTable::Four2DRespTable(Histo2D const & hrep, double d, double lambda)
     67  : Four2DResponse(0,d,d,lambda) , hrep_(hrep)
    6368{
    6469}
     
    7580}
    7681
     82void Four2DRespTable::writeToPPF(string flnm)
     83{
     84  DVList dvinfo;
     85  dvinfo["DoL"] = dx_;
     86  dvinfo["LambdaRef"] = lambdaref_;
     87  dvinfo["Lambda"] = lambda_;
     88  POutPersist po(flnm);
     89  po << hrep_;
     90  po << dvinfo;
     91}
     92
     93void Four2DRespTable::readFromPPF(string flnm)
     94{
     95  PInPersist pin(flnm);
     96  DVList dvinfo;
     97  pin >> hrep_;
     98  pin >> dvinfo;
     99  dx_ = dy_ = dvinfo["DoL"];
     100  setLambdaRef((double)dvinfo["LambdaRef"]);
     101  setLambda((double)dvinfo["Lambda"]);
     102}
     103
     104
     105
    77106//---------------------------------------------------------------
    78107// -- Four2DRespRatio : rapport de la reponse entre deux objets Four2DResponse
     
    87116  double ra = a_.Value(kx,ky);
    88117  double rb = b_.Value(kx,ky);
    89   if (rb<divzthr_) {
    90     if (ra<rb)  return 0.;
    91     else rb=divzthr_;
    92   }
     118  if (ra<rb) {
     119    if (rb>1.e-39)  return(ra/rb); 
     120    else return 0.;
     121  }
     122  if (rb<divzthr_)  rb=divzthr_;
    93123  return (ra/rb);
    94124}
Note: See TracChangeset for help on using the changeset viewer.