Changeset 668 in Sophya for trunk/SophyaLib/SkyT/radspec.cc
- Timestamp:
- Nov 29, 1999, 3:16:10 PM (26 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/SophyaLib/SkyT/radspec.cc
r607 r668 1 1 //-------------------------------------------------------------------------- 2 2 // File and Version Information: 3 // $Id: radspec.cc,v 1. 2 1999-11-20 21:00:50ansari Exp $3 // $Id: radspec.cc,v 1.3 1999-11-29 14:16:06 ansari Exp $ 4 4 // 5 5 // Description: … … 104 104 RadSpectra::integratedFlux(double f1, double f2) const 105 105 { 106 _raypourfinteg = const_cast<RadSpectra *>(this); 107 TrpzInteg I(RadSpectra_fluxFunction , f1, f2); 108 double val = (double)I; 109 _raypourfinteg = NULL; // On ne peut pas faire ca avant la destruction de I 110 return(val); 106 // cout << endl; 107 // cout << this->minFreq() << " = " << this->maxFreq() << endl; 108 // cout << f1 << " = " << f2 << endl; 109 if(f1 < this->minFreq()) f1 = this->minFreq(); 110 if(f2 > this->maxFreq()) f2 = this->maxFreq(); 111 _raypourfinteg = const_cast<RadSpectra *>(this); 112 TrpzInteg I(RadSpectra_fluxFunction , f1, f2); 113 double val = (double)I; 114 _raypourfinteg = NULL; // On ne peut pas faire ca avant la destruction de I 115 return(val); 111 116 } 112 117 double 113 118 RadSpectra::integratedFlux() const 114 119 { 115 return integratedFlux( _numin, _numax);120 return integratedFlux(this->minFreq(),this->maxFreq()); 116 121 } 117 122 … … 129 134 RadSpectra::logIntegratedFlux(double f1, double f2) const 130 135 { 136 if(f1 < this->minFreq()) f1 = this->minFreq(); 137 if(f2 > this->maxFreq()) f2 = this->maxFreq(); 138 131 139 double f1Log = log10(f1); 132 140 double f2Log = log10(f2); … … 161 169 _raypourfinteg = const_cast<RadSpectra *>(this); 162 170 _filter = const_cast<SpectralResponse *>(&filter); 171 if(f1 < this->minFreq()) f1 = this->minFreq(); 172 if(f2 > this->maxFreq()) f2 = this->maxFreq(); 173 163 174 TrpzInteg I(RadSpectra_filteredFlux,f1,f2); 164 175 double val = (double)I; … … 185 196 double nu = pow(10,tau); 186 197 double flux = _raypourfinteg->flux(nu)*nu; 187 return(flux * _filter->transmission(nu)); 198 double result = flux * _filter->transmission(nu); 199 return(result); 188 200 } 189 201 … … 192 204 RadSpectra::filteredLogIntFlux(SpectralResponse const& filter, double f1, double f2) const 193 205 { 194 195 // double f1Log = log10(f1);196 // double f2Log = log10(f2);197 // if(f1Log < -1.e99) f1Log = -1.e99;198 // if(f2Log > 1.e99) f2Log = 1.e99;199 // _rayIntLog = const_cast<RadSpectra *>(this);200 // TrpzInteg I(RadSpectra_logFluxFunction,f1Log,f2Log);201 // double value = (double)I * log(10.);202 // return(value);203 // _rayIntLog = NULL;204 206 205 207 _raypourfinteg = NULL; 206 208 _filter = NULL; 209 if(f1 < this->minFreq()) f1 = this->minFreq(); 210 if(f2 > this->maxFreq()) f2 = this->maxFreq(); 211 207 212 double f1Log = log10(f1); 208 213 double f2Log = log10(f2); … … 226 231 227 232 233 228 234 void 229 235 RadSpectra::Print(ostream& os) const
Note:
See TracChangeset
for help on using the changeset viewer.