Changeset 929 in Sophya
- Timestamp:
- Apr 14, 2000, 3:35:55 PM (25 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/SophyaProg/PMixer/extractRS.cc
r928 r929 1 #include "machdefs.h" 2 #include <stdlib.h> 3 #include <stdio.h> 4 #include <fstream.h> 5 #include <iostream.h> 6 #include <math.h> 7 8 #include <string> 9 #include <vector> 10 11 #include "tmatrix.h" 12 #include "tvector.h" 13 #include "fioarr.h" 14 #include "vector3d.h" 15 #include "srandgen.h" 16 #include "timing.h" 17 #include "sambainit.h" 18 #include "pexceptions.h" 19 #include "datacards.h" 20 #include "fitsioserver.h" 21 #include "fitsspherehealpix.h" 22 #include "radspecvector.h" 23 #include "blackbody.h" 24 #include "nupower.h" 25 26 #include "squarefilt.h" 27 #include "trianglefilt.h" 28 #include "specrespvector.h" 29 #include "gaussfilt.h" 30 #include "fitstarray.h" 31 1 #include "pmixer.h" 32 2 33 3 /*! \ingroup PMixer 34 \file extractRS.cc 35 36 \brief \b PROGRAM \b extractRS <BR> 37 Program to create a map (SphereHEALPix) with point source 38 from small map (matrix) and convolving their radiation spectrum 39 RadSpectra 40 with a given filter response SpectralResponse 41 */ 4 * \file extractRS.cc 5 * \brief \b PROGRAM \b extractRS <BR> 6 * Program to create a map (SphereHEALPix) with point source 7 * from small map (matrix) and convolving their radiation spectrum 8 * RadSpectra 9 * with a given filter response SpectralResponse 10 */ 42 11 43 12 // ----------------------------------------------------------------- … … 46 15 char * BuildFITSFileName(string const & fname); 47 16 SpectralResponse * getSpectralResponse(DataCards & dc); 48 template <class T>49 void MeanSig(NDataBlock<T> const & dbl, double& gmoy, double& gsig);50 17 float ComputeFrequency(DataCards &,string&); 51 18 … … 408 375 409 376 410 /* Nouvelle-Fonction */411 template <class T>412 void MeanSig(NDataBlock<T> const & dbl, double& gmoy, double& gsig)413 414 {415 gmoy=0.;416 gsig = 0.;417 double valok;418 for(int k=0; k<(int)dbl.Size(); k++) {419 valok = dbl(k);420 gmoy += valok; gsig += valok*valok;421 }422 gmoy /= (double)dbl.Size();423 gsig = gsig/(double)dbl.Size() - gmoy*gmoy;424 if (gsig >= 0.) gsig = sqrt(gsig);425 }426 377 427 378 /* Nouvelle-Fonction */
Note:
See TracChangeset
for help on using the changeset viewer.