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


Ignore:
Timestamp:
Apr 3, 2007, 4:06:50 PM (18 years ago)
Author:
cmv
Message:

les AGN selon C.Jackson, une premiere approche simplifiee, recodage from Jim Rich. cmv 03/04/2007

File:
1 edited

Legend:

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

    r3193 r3196  
    1515#include "schechter.h"
    1616#include "geneutils.h"
    17 #include "integfunc.h"
    1817#include "genefluct3d.h"
    1918
     
    3231     <<" -2 : compute 2D spectrum"<<endl
    3332     <<" -M schmin,schmax,nsch : min,max mass and nb points for schechter HI"<<endl
     33     <<" -A <log10(S_agn en Msol)>,sigma : distribution des AGN par pixel"<<endl
    3434     <<" -W : write cube in FITS format"<<endl
    3535     <<" -P : write cube in PPF format"<<endl
     
    7777 double snoise= 0.;   // en equivalent MSol
    7878
     79 // *** AGN
     80 bool do_agn = false;
     81 double lmsol_agn=-99., lsigma_agn=0.;   // en equivalent MSol
     82
    7983 // *** type de generation
    8084 bool computefourier0=false;
     
    9195
    9296 char c;
    93  while((c = getopt(narg,arg,"ha0PWV2Gx:y:z:s:Z:M:")) != -1) {
     97 while((c = getopt(narg,arg,"ha0PWV2Gx:y:z:s:Z:M:A:")) != -1) {
    9498  switch (c) {
    9599  case 'a' :
     
    122126  case 'M' :
    123127    sscanf(optarg,"%lf,%lf,%d",&schmin,&schmax,&schnpt);
     128    break;
     129  case 'A' :
     130    do_agn = true;
     131    sscanf(optarg,"%lf,%lf",&lmsol_agn,&lsigma_agn);
    124132    break;
    125133  case 'V' :
     
    153161     <<", schnpt="<<schnpt<<endl;
    154162 cout<<"snoise="<<snoise<<" equivalent Msol"<<endl;
     163 if(do_agn) cout<<"AGN: <log10(Msol)>="<<lmsol_agn<<" , sigma="<<lsigma_agn<<endl;
    155164
    156165 //-----------------------------------------------------------------
     
    476485 }
    477486
     487 if(do_agn) {
     488   cout<<"\n--- Add AGN: <mass>="<<lmsol_agn<<" , sigma="<<lsigma_agn<<endl;
     489   fluct3d.AddAGN(lmsol_agn,lsigma_agn);
     490   nm = fluct3d.MeanSigma2(rm,rs2);
     491   cout<<"HI mass with AGN: ("<<nm<<") Mean = "<<rm<<", Sigma^2 = "
     492       <<rs2<<" -> "<<sqrt(rs2)<<endl;
     493   PrtTim(">>>> End Add AGN");
     494 }
     495
    478496 if(snoise>0.) {
    479497   cout<<"\n--- Add noise to HI Flux snoise="<<snoise<<endl;
Note: See TracChangeset for help on using the changeset viewer.