Changeset 668 in Sophya for trunk/SophyaLib/SkyT/easyTest.cc
- Timestamp:
- Nov 29, 1999, 3:16:10 PM (26 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/SophyaLib/SkyT/easyTest.cc
r601 r668 4 4 #include "specrespvector.h" 5 5 #include "tvector.h" 6 // #include "szsource.h"7 6 #include "squarefilt.h" 8 7 #include "trianglefilt.h" 8 9 #include "iobjspecresp.cc" 10 9 11 int 10 12 main() 11 13 { 14 // PInPersist in("out"); 15 // SR_ReadSelf(in); 16 // cout << " " << endl; 17 18 PInPersist in2("outTF"); 19 SR_ReadSelf(in2); 20 cout << " " << endl; 21 12 22 cout << "BlackBody!" << endl; 13 BlackBody myBB ;14 double freqmin = 10.;15 double freqmax = 100;23 BlackBody myBB(2.73); 24 double freqmin = 230.; 25 double freqmax = 500; 16 26 double logIF = myBB.logIntegratedFlux(freqmin,freqmax); 17 27 double IF = myBB.integratedFlux(freqmin,freqmax); … … 19 29 cout << "nolog " << IF << endl; 20 30 cout << "min et max " << myBB.minFreq() << " :: " << myBB.maxFreq() << endl; 21 cout << "full integration no log " << myBB.integratedFlux() << endl; 22 cout << "full integration log " << myBB.logIntegratedFlux() << endl; 31 cout << "full integration no log " << myBB.integratedFlux(freqmin,freqmax) << endl; 32 cout << "full integration log " << myBB.logIntegratedFlux(freqmin,freqmax) << endl; 33 cout << "full integration no log nolimit " << myBB.integratedFlux() << endl; 34 cout << "full integration log nolimit " << myBB.logIntegratedFlux() << endl; 23 35 24 /*25 cout << "SZSource " << endl;26 SzSource mySZ(1);27 double logSZ = mySZ.logIntegratedFlux(freqmin,freqmax);28 double SZ = mySZ.integratedFlux(freqmin,freqmax);29 cout << "log " << logSZ << endl;30 cout << "nolog " << SZ << endl;31 cout << "min et max " << mySZ.minFreq() << " :: " << mySZ.maxFreq() << endl;32 cout << "full integration no log " << mySZ.integratedFlux() << endl;33 cout << "full integration log " << mySZ.logIntegratedFlux() << endl;34 */35 36 cout << "squareFilter " << endl; 36 SquareFilter mySF( 0,200);37 SquareFilter mySF(200,600); 37 38 double logSF = mySF.logIntegratedSpect(freqmin,freqmax); 38 39 double SF = mySF.IntegratedSpect(freqmin,freqmax); … … 40 41 cout << "nolog " << SF << endl; 41 42 cout << "min et max " << mySF.minFreq() << " :: " << mySF.maxFreq() << endl; 42 cout << "full integration no log " << mySF.IntegratedSpect() << endl; 43 cout << "full integration log " << mySF.logIntegratedSpect() << endl; 43 cout << "full integration no log " << mySF.IntegratedSpect(200,700) << endl; 44 cout << "full integration log " << mySF.logIntegratedSpect(200,700) << endl; 45 cout << "full integration no log nolimit " << mySF.IntegratedSpect() << endl; 46 cout << "full integration log nolimit " << mySF.logIntegratedSpect() << endl; 47 44 48 45 49 cout << "triangleFilter" << endl; 46 TriangleFilter myTF( 10,200,20,40);50 TriangleFilter myTF(200,500,120,40); 47 51 double logTF = myTF.logIntegratedSpect(10.,freqmax); 48 52 double TF = myTF.IntegratedSpect(10.,freqmax); … … 59 63 for (int i=0; i<maxVal; i++) 60 64 { 61 vecOfNu(i) = (double)i+ 30.;65 vecOfNu(i) = (double)i+230.; 62 66 vecOfFDeNu(i) = 1.; //*(double)i+1; 63 67 cout << "entry values " << vecOfNu(i) << " " << vecOfFDeNu(i) << endl; 64 68 } 65 freqmin = 10.;66 freqmax = 19.;69 freqmin = 200.; 70 freqmax = 259.; 67 71 RadSpectraVec myRSV(vecOfNu, vecOfFDeNu); 68 72 double RSV = myRSV.integratedFlux(freqmin,freqmax); … … 81 85 for (int i=0; i<SRVmaxVal; i++) 82 86 { 83 vecOfNuRSV(i) = (double)i+ 30.;87 vecOfNuRSV(i) = (double)i+130.; 84 88 vecOfFDeNuRSV(i) = 10*(double)i+1; 85 89 // cout << "entry values " << vecOfNuRSV(i) << " " << vecOfFDeNuRSV(i) << endl; … … 99 103 cout << "...Testing filter and integrate !" << endl; 100 104 101 cout << " BBSF nolog " << myBB.filteredIntegratedFlux(mySF, 30.,100.) << endl;102 cout << " BBSF log " << myBB.filteredLogIntFlux(mySF, 30.,100.) << endl;103 cout << "full integration no log " << myBB.integratedFlux( 30.,100.) << endl;104 cout << "full integration log " << myBB.logIntegratedFlux( 30.,100.) << endl;105 cout << " BBSF nolog " << myBB.filteredIntegratedFlux(mySF,200.,400.) << endl; 106 cout << " BBSF log " << myBB.filteredLogIntFlux(mySF,200.,400.) << endl; 107 cout << "full integration no log " << myBB.integratedFlux(200.,400.) << endl; 108 cout << "full integration log " << myBB.logIntegratedFlux(200.,400.) << endl; 105 109 cout << "SF" << endl; 106 cout << "full integration no log " << mySF.IntegratedSpect( 30.,100.) << endl;107 cout << "full integration log " << mySF.logIntegratedSpect( 30.,100.) << endl;110 cout << "full integration no log " << mySF.IntegratedSpect(200.,400.) << endl; 111 cout << "full integration log " << mySF.logIntegratedSpect(200.,400.) << endl; 108 112 109 cout << " BBTF nolog " << myBB.filteredIntegratedFlux(myTF, 30.,100.) << endl;110 cout << " BBTF log " << myBB.filteredLogIntFlux(myTF, 30.,100.) << endl;113 cout << " BBTF nolog " << myBB.filteredIntegratedFlux(myTF,200.,400.) << endl; 114 cout << " BBTF log " << myBB.filteredLogIntFlux(myTF,200.,400.) << endl; 111 115 cout << "TF" << endl; 112 cout << "full integration no log " << myTF.IntegratedSpect( 30.,100.) << endl;113 cout << "full integration log " << myTF.logIntegratedSpect( 30.,100.) << endl;116 cout << "full integration no log " << myTF.IntegratedSpect(200.,400.) << endl; 117 cout << "full integration log " << myTF.logIntegratedSpect(200.,400.) << endl; 114 118 115 119 /* … … 123 127 */ 124 128 cout << "********" << endl; 125 cout << " RSVSF nolog " << myRSV.filteredIntegratedFlux(mySF,30.,100.) << endl; 126 cout << " RSVSF log " << myRSV.filteredLogIntFlux(mySF,30.,100.) << endl; 127 cout << "full integration no log " << myRSV.integratedFlux(30.,100.) << endl; 128 cout << "full integration log " << myRSV.logIntegratedFlux(30.,100.) << endl; 129 double min, max; 130 min=232; 131 max=235; 129 132 130 cout << " RSVTF nolog " << myRSV.filteredIntegratedFlux(myTF,30.,100.) << endl; 131 cout << " RSVTF log " << myRSV.filteredLogIntFlux(myTF,30.,100.) << endl; 133 cout << " RSVSF nolog " << myRSV.filteredIntegratedFlux(mySF,min,max) << endl; 134 cout << " RSVSF log " << myRSV.filteredLogIntFlux(mySF,min,max) << endl; 135 cout << "full integration no log " << myRSV.integratedFlux(230.,500.) << endl; 136 cout << "full integration log " << myRSV.logIntegratedFlux(230.,500.) << endl; 137 cout << "full integration no log min max " << myRSV.integratedFlux(min,max) << endl; 138 cout << "full integration log min max " << myRSV.logIntegratedFlux(min,max) << endl; 139 140 cout << " RSVTF nolog " << myRSV.filteredIntegratedFlux(myTF,230.,500.) << endl; 141 cout << " RSVTF log " << myRSV.filteredLogIntFlux(myTF,230.,500.) << endl; 142 143 // cout << "New TESTS USING IOBJS!" << endl; 144 // POutPersist out("out"); 145 // TriangleFilter* myTF2 = new TriangleFilter(10,200,20,40); 146 // SR_WriteSelf(myTF2,out); 147 148 // POutPersist outV("outV"); 149 // cout << "check before anything" << vecOfNu.NElts()<< endl; 150 // SpecRespVec* mySRV2 = new SpecRespVec(vecOfNu, vecOfFDeNu); 151 // SR_WriteSelf(mySRV2,outV); 152 153 // Vector myVec(10); 154 // myVec.ReSize(10); 155 // cout << myVec.NElts(); 156 // return 1; 157 158 cout << "read and write things in file...ppersist!" << endl; 159 TriangleFilter myTF2(10,200,20,40); 160 POutPersist outTF("outTF"); 161 myTF2.WriteSelf(outTF); 162 // PInPersist inTF("outTF"); 163 // myTF2.ReadSelf(inTF); 132 164 133 165 134 return 1;135 166 }
Note:
See TracChangeset
for help on using the changeset viewer.