[3115] | 1 | #include "sopnamsp.h"
|
---|
| 2 | #include "machdefs.h"
|
---|
| 3 | #include <iostream>
|
---|
| 4 | #include <stdlib.h>
|
---|
| 5 | #include <stdio.h>
|
---|
| 6 | #include <string.h>
|
---|
| 7 | #include <math.h>
|
---|
| 8 | #include <unistd.h>
|
---|
| 9 | #include "timing.h"
|
---|
| 10 | #include "ntuple.h"
|
---|
| 11 |
|
---|
| 12 | #include "luc.h"
|
---|
| 13 |
|
---|
| 14 | void usage(void);
|
---|
| 15 | void usage(void)
|
---|
| 16 | {
|
---|
| 17 | cout<<"cmvtuniv z1,z2,dz"<<endl;
|
---|
| 18 | }
|
---|
| 19 |
|
---|
| 20 | int main(int narg,char *arg[])
|
---|
| 21 | {
|
---|
| 22 | // -- WMAP
|
---|
| 23 | double h100=0.71, om0=0.267804, or0=7.9e-05, ol0=0.73,w0=-1., ob0=0.045, oph0=5e-5;
|
---|
| 24 | // -- ouvert matter only
|
---|
| 25 | //double h100=0.71, om0=0.3, or0=0., ol0=0.,w0=-1., ob0=0.045, oph0=5e-5;
|
---|
| 26 | // -- plat matter only
|
---|
| 27 | //double h100=0.71, om0=1., or0=0., ol0=0.,w0=-1., ob0=0.045, oph0=5e-5;
|
---|
| 28 |
|
---|
| 29 | double z1=0., z2=10., dz=1.;
|
---|
| 30 | if(narg>1) sscanf(arg[1],"%lf,%lf,%lf",&z1,&z2,&dz);
|
---|
| 31 |
|
---|
| 32 | SimpleUniverse univ;
|
---|
| 33 | univ.SetPrtDbgLevel(1);
|
---|
| 34 |
|
---|
| 35 | univ.Seth(h100);
|
---|
| 36 | univ.SetOmegaMatter(om0);
|
---|
| 37 | univ.SetOmegaLambda(ol0);
|
---|
| 38 | //univ.SetDarkEnergy(ol0,w0);
|
---|
| 39 | univ.SetOmegaRadiation(or0);
|
---|
| 40 | univ.SetOmegaBaryon(ob0);
|
---|
| 41 | univ.SetOmegaPhoton(oph0);
|
---|
| 42 |
|
---|
| 43 | //univ.SetFlatUniverse_OmegaMatter();
|
---|
| 44 | //univ.SetFlatUniverse_OmegaLambda();
|
---|
| 45 |
|
---|
| 46 | /*
|
---|
| 47 | for(double z=z1;z<z2+dz/2.;z+=dz) {
|
---|
| 48 | univ.SetEmissionRedShift(z,0.001);
|
---|
| 49 | cout<<endl;
|
---|
| 50 | univ.Print();
|
---|
| 51 | }
|
---|
| 52 | */
|
---|
| 53 |
|
---|
| 54 | /**/
|
---|
| 55 | double norm = univ.HubbleLengthMpc(); // 1.;
|
---|
| 56 | double norm3 = pow(norm,3.);
|
---|
| 57 | const int n = 11;
|
---|
[3572] | 58 | const char *vname[n] = {
|
---|
[3115] | 59 | "z","hz","om","or","ol","ok","ot",
|
---|
| 60 | "da","dl","dvc","vc0"
|
---|
| 61 | };
|
---|
| 62 | NTuple nt(n,vname);
|
---|
| 63 | double xnt[n];
|
---|
| 64 | for(double z=z1;z<z2+dz/2.;z+=dz) {
|
---|
| 65 | univ.SetEmissionRedShift(z,0.001);
|
---|
| 66 | xnt[0] = univ.ZE();
|
---|
| 67 | xnt[1] = univ.HZE();
|
---|
| 68 | xnt[2] = univ.OmegaMatterZE();
|
---|
| 69 | xnt[3] = univ.OmegaRadiationZE();
|
---|
| 70 | xnt[4] = 0.; //univ.OmegaLambdaZE()+univ.OmegaDarkZE();
|
---|
| 71 | xnt[5] = univ.OmegaCurvZE();
|
---|
| 72 | xnt[6] = 0.; //univ.OmegaTotalZE();
|
---|
| 73 | xnt[7] = univ.AngularDiameterDistanceMpc()/norm;
|
---|
| 74 | xnt[8] = univ.LuminosityDistanceMpc()/norm;
|
---|
| 75 | if(xnt[8]<0.) cout<<xnt[8]<<endl;
|
---|
| 76 | xnt[9] = 0.; //univ.dVolZE()/norm3;
|
---|
| 77 | xnt[10] = 0.; //univ.Vol4PiZE()/norm3;
|
---|
| 78 | nt.Fill(xnt);
|
---|
| 79 | }
|
---|
| 80 | cout<<">>>> Ecriture"<<endl;
|
---|
| 81 | string tag = "cmvtluc.ppf";
|
---|
| 82 | POutPersist pos(tag);
|
---|
| 83 | tag = "nt"; pos.PutObject(nt,tag);
|
---|
| 84 | /**/
|
---|
| 85 |
|
---|
| 86 | return 0;
|
---|
| 87 | }
|
---|
| 88 |
|
---|
| 89 |
|
---|
| 90 | /*
|
---|
| 91 | openppf cmvtluc.ppf
|
---|
| 92 |
|
---|
| 93 | set cut 1
|
---|
| 94 | set cut z<100.
|
---|
| 95 |
|
---|
| 96 | zone
|
---|
| 97 | n/plot nt.hz%z $cut ! "nsta"
|
---|
| 98 |
|
---|
| 99 | zone
|
---|
| 100 | n/plot nt.dl%z $cut ! "nsta"
|
---|
| 101 | n/plot nt.da%z $cut ! "nsta same red"
|
---|
| 102 |
|
---|
| 103 | */
|
---|