Changeset 3330 in Sophya for trunk/Cosmo/SimLSS/cmvobserv3d.cc


Ignore:
Timestamp:
Oct 1, 2007, 7:10:50 PM (18 years ago)
Author:
cmv
Message:

intro ComputeSpectrum avec soustraction de bruit et deconvolution par la fct de transfert du pixel cmv 01/10/2007

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Cosmo/SimLSS/cmvobserv3d.cc

    r3329 r3330  
    419419
    420420   cout<<"\n--- Checking realization spectra after pixel shape convol."<<endl;
    421    HistoErr hpkgenf(0.,knyqmax,nherr);
    422    hpkgenf.ReCenterBin(); hpkgenf.Zero();
    423    hpkgenf.Show();
    424    fluct3d.ComputeSpectrum(hpkgenf);
     421   HistoErr hpkgenfb(0.,knyqmax,nherr);
     422   hpkgenfb.ReCenterBin(); hpkgenfb.Zero();
     423   hpkgenfb.Show();
     424   fluct3d.ComputeSpectrum(hpkgenfb);
     425   {
     426   tagobs = "hpkgenfb"; posobs.PutObject(hpkgenfb,tagobs);
     427   }
     428   PrtTim(">>>> End Checking realization spectra");
     429
     430   cout<<"\n--- Checking realization spectra after pixel shape convol. with pixel correc."<<endl;
     431   HistoErr hpkgenf(hpkgenfb); hpkgenf.Zero();
     432   fluct3d.ComputeSpectrum(hpkgenf,0.,filter_by_pixel);
    425433   {
    426434   tagobs = "hpkgenf"; posobs.PutObject(hpkgenf,tagobs);
    427435   }
    428    PrtTim(">>>> End Checking realization spectra");
     436   PrtTim(">>>> End Checking realization spectra with pixel correc.");
    429437
    430438   if(comp2dspec) {
    431439     cout<<"\n--- Checking realization 2D spectra after pixel shape convol."<<endl;
    432      Histo2DErr hpkgenf2(0.,ktnyqmax,nherrt,0.,kznyqmax,nherrz);
    433      hpkgenf2.ReCenterBin(); hpkgenf2.Zero();
    434      hpkgenf2.Show();
    435      fluct3d.ComputeSpectrum2D(hpkgenf2);
     440     Histo2DErr hpkgenfb2(0.,ktnyqmax,nherrt,0.,kznyqmax,nherrz);
     441     hpkgenfb2.ReCenterBin(); hpkgenfb2.Zero();
     442     hpkgenfb2.Show();
     443     fluct3d.ComputeSpectrum2D(hpkgenfb2);
     444     {
     445     tagobs = "hpkgenfb2"; posobs.PutObject(hpkgenfb2,tagobs);
     446     }
     447     PrtTim(">>>> End Checking realization 2D spectra");
     448
     449     cout<<"\n--- Checking realization 2D spectra after pixel shape convol. with pixel correc."<<endl;
     450     Histo2DErr hpkgenf2(hpkgenfb2); hpkgenf2.Zero();
     451     fluct3d.ComputeSpectrum2D(hpkgenf2,0.,filter_by_pixel);
    436452     {
    437453     tagobs = "hpkgenf2"; posobs.PutObject(hpkgenf2,tagobs);
    438454     }
    439      PrtTim(">>>> End Checking realization 2D spectra");
     455     PrtTim(">>>> End Checking realization 2D spectra with pixel correc.");
    440456   }
    441457 }
     
    589605
    590606 //-----------------------------------------------------------------
     607 double snoisesave = 0.;
    591608 if(snoise>0.) {
    592609   cout<<"\n--- Add noise to HI Flux snoise="<<snoise<<", evolution="<<isnoise_evol<<endl;
    593610   fluct3d.AddNoise2Real(snoise,(isnoise_evol>0? true:false));
     611   snoisesave = snoise;
    594612     nm = fluct3d.MeanSigma2(rm,rs2);
    595613   PrtTim(">>>> End Add noise");
     
    603621   }
    604622   cout<<"...scale="<<scalecube<<" offset="<<offsetcube<<endl;
    605    if(scalecube>0.) fluct3d.ScaleOffset(scalecube,offsetcube);
     623   if(scalecube>0.) {
     624     fluct3d.ScaleOffset(scalecube,offsetcube);
     625     snoisesave *= scalecube;
     626   }
    606627   PrtTim(">>>> End Scale cube");
    607628 }
     
    637658
    638659 cout<<endl<<"\n--- Computing final spectrum"<<endl;
    639  HistoErr hpkrec(0.,knyqmax,nherr);
    640  hpkrec.ReCenterBin();
    641  hpkrec.Show();
    642  fluct3d.ComputeSpectrum(hpkrec);
     660 HistoErr hpkrecb(0.,knyqmax,nherr); hpkrecb.Zero();
     661 hpkrecb.ReCenterBin();
     662 hpkrecb.Show();
     663 fluct3d.ComputeSpectrum(hpkrecb);
     664 {
     665 tagobs = "hpkrecb"; posobs.PutObject(hpkrecb,tagobs);
     666 }
     667 PrtTim(">>>> End Computing final spectrum");
     668
     669 cout<<endl<<"\n--- Computing final spectrum with pixel deconv."<<endl;
     670 HistoErr hpkrec(hpkrecb); hpkrec.Zero();
     671 fluct3d.ComputeSpectrum(hpkrec,snoisesave,filter_by_pixel);
     672 {
    643673 tagobs = "hpkrec"; posobs.PutObject(hpkrec,tagobs);
    644  PrtTim(">>>> End Computing final spectrum");
     674 }
     675 PrtTim(">>>> End Computing final spectrum with pixel deconv.");
    645676
    646677 if(comp2dspec) {
    647678   cout<<"\n--- Computing final 2D spectrum"<<endl;
    648    Histo2DErr hpkrec2(0.,ktnyqmax,nherrt,0.,kznyqmax,nherrz);
    649    hpkrec2.ReCenterBin(); hpkrec2.Zero();
    650    hpkrec2.Show();
    651    fluct3d.ComputeSpectrum2D(hpkrec2);
     679   Histo2DErr hpkrecb2(0.,ktnyqmax,nherrt,0.,kznyqmax,nherrz);
     680   hpkrecb2.ReCenterBin(); hpkrecb2.Zero();
     681   hpkrecb2.Show();
     682   fluct3d.ComputeSpectrum2D(hpkrecb2);
     683   {
     684   tagobs = "hpkrecb2"; posobs.PutObject(hpkrecb2,tagobs);
     685   }
     686   PrtTim(">>>> End Computing final 2D spectrum");
     687
     688   cout<<"\n--- Computing final 2D spectrum with pixel deconv."<<endl;
     689   Histo2DErr hpkrec2(hpkrecb2); hpkrec2.Zero();
     690   fluct3d.ComputeSpectrum2D(hpkrec2,snoisesave,filter_by_pixel);
    652691   {
    653692   tagobs = "hpkrec2"; posobs.PutObject(hpkrec2,tagobs);
    654693   }
    655    PrtTim(">>>> End Computing final 2D spectrum");
     694   PrtTim(">>>> End Computing final 2D spectrum with pixel deconv.");
     695
    656696 }
    657697
Note: See TracChangeset for help on using the changeset viewer.