Ignore:
Timestamp:
Sep 19, 2000, 2:28:59 PM (25 years ago)
Author:
ansari
Message:

cleaned up for maching LevelS upgrade ongoing

D.Y.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/SigPredictor/lightptsrclevsinband.cc

    r1151 r1191  
    2828        while (HFI)
    2929        {       // Data in file in radian and Jansky
     30        //      cout<<compteur<<'\t'<<HFI.fail()<<'\n'<<endl;;
    3031                HFI>>theta;
    3132                HFI>>phi;
     
    4445                {       HFI.clear();
    4546                        HFI.getline(Line, 199);
    46                         if(HFI.eof())
     47                        if(HFI.eof())           // Fin de lecture du fichier
    4748                        {       cerr<< "Fin de lecture du fichier: "<<PtSrcfile<<endl;
    4849                                cerr<< "Point source number : "<<MapOfPtSrc.size()<<endl;
     50                                HFI.close();
    4951                                break;
    5052                        }
     
    6769                        UneSource.flux857G=f857*1.e-26;
    6870                       
    69                         const pair<const UnitVector, LevSPtSrcData> UneValeur=make_pair(UnCoord, UneSource);
     71                        const pair<const UnitVector,LevSPtSrcData>UneValeur=make_pair(UnCoord, UneSource);
    7072                       
    7173                        MapOfPtSrc.insert(MapOfPtSrc.end(),UneValeur);
     
    7678        return;
    7779}
     80
     81#include "fitsspherehealpix.h"
     82
     83void LightPtSrcLevSInBand::DumpMap(LevSPanckBand band)
     84{       // Write a Mollweide projection of the Point Sources Sky
     85        // power in the LevSPanckBand band
     86        SphereHEALPix <r_4> Sphere(128);
     87
     88        multimap <UnitVector,LevSPtSrcData,LevSPtSrcCmpUnitVec>::iterator iter;
     89        multimap <UnitVector,LevSPtSrcData,LevSPtSrcCmpUnitVec>::iterator iterBegin=MapOfPtSrc.begin();
     90        multimap <UnitVector,LevSPtSrcData,LevSPtSrcCmpUnitVec>::iterator iterEnd=MapOfPtSrc.end();
     91       
     92        long indexSphere;
     93        double theta;
     94        double phi;
     95        double power;
     96       
     97        for(iter=iterBegin; !(iter==iterEnd); iter++)
     98        {       theta=(*iter).first.Theta();
     99                phi=(*iter).first.Phi();
     100                power=(*iter).second.getPower(band);
     101               
     102                indexSphere=Sphere.PixIndexSph(theta,phi);
     103                Sphere(indexSphere) += power;
     104        }
     105       
     106        FITS_SphereHEALPix <r_4> FSphere(Sphere);
     107        FSphere.Mollweide_picture_projection("SkyOfPtSrcInBandMollweide.fits");
     108
     109        return;
     110}
Note: See TracChangeset for help on using the changeset viewer.