Ignore:
Timestamp:
May 28, 2002, 7:30:45 PM (23 years ago)
Author:
ansari
Message:

Amelioration de calcul d'offset (possibilite de coupure sur coordonnees
galactique)
Nouveau processeur nettoyeur (SimpleCleaner)
Ajout programme de traitement aksj02.cc , donnees Archeops KS1/KS3

Reza 28/5/2002

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/ArchTOIPipe/TestPipes/simofftst.cc

    r2008 r2014  
    33//                               Christophe Magneville
    44//                               Reza Ansari
    5 // $Id: simofftst.cc,v 1.2 2002-05-16 13:13:00 ansari Exp $
     5// $Id: simofftst.cc,v 1.3 2002-05-28 17:30:45 ansari Exp $
    66
    77/*   Test de processeurs ds simtoipr.cc   - Reza Avril 2001
     
    1111            -intoi boloMuV_26 -wtoi 8192 -wdegli 1024 \
    1212            inputbolo.fits filt.fits xx.ppf
    13 # Avec Filtre de Fourier
     13# Avec Filtre
    1414csh> simofftst -start 104385384 -end 104399964 -range -500,500 \
    1515            -intoi boloMuV_26 -wtoi 8192 -wdegli 1024 \
    16             -wfft 4096 -keepfft 5 -killfreq 15,4,2.5 \
    1716            inputbolo.fits filtfft.fits spectre.ppf
    18 # Autre exemple b545k02
    19 cool> ./simofftst -start 104389122 -end 104649122 -range -1000.,1000. -intoi boloMu
    20 V_23 -wtoi 8192 -wdegli 1024 -wfft 4096 -keepfft 5 -killfreq 15,4,2.5 Cmv/b545k02
    21 2_16.00_16.49.fits b545.fits b545.ppf
     17csh> $exedir/simofftst -start $sn0 -end $sn1  -intoi $cleanname \
     18            -wtoi 8192 -wdegli 1024 -degli 3.,2.,3,2,0 \
     19            -soff 128,9,3 -gfilt 16,2.5 -prstat \
     20            -soffnt $outppf -bgalcut -20.,20. -bgal $glat \
     21            -bgalfile $point $cleanfile $outfile
    2222
    2323*/
     
    3838#include "timing.h"
    3939#include "histinit.h"
     40#include "psighand.h"
    4041#include <stdexcept>
    4142
     
    5253         << "         [-degli ns,ns2,mxpt,mnpt,wrec] [-soff wsz,nptfit,degpol] \n"
    5354         << "         [-soffnt PPFName] [-gfilt wsz,sigma] \n"
     55         << "         [-bgalcut bmin,bmax] [-bgal toiname] [-bgalfile pointFitsName] \n"
    5456         << "         [-nooutflg] [-nowrtms] [-nowrticd] [-prstat] [-useseqbuff] \n"
    5557         << "         inFitsName outFitsName \n"
     
    7779         << endl;
    7880  }
     81  if (fgerr) exit(1);
    7982}
    8083
     
    124127  double gfilt_sigma = 2.;
    125128
     129  // Coordinate file for galactic cut
     130  string pointfile = "pointgal.fits";
     131  double bmin = -20;
     132  double bmax = 20.;
     133  string bgaltoi = "bgal";
     134  bool bgalcut = false;
     135
    126136  // File names
    127137  string infile;
     
    183193      ia++;
    184194    }   
     195    else if (strcmp(arg[ia],"-bgalcut") == 0) {
     196      if (ia == narg-1) Usage(true);
     197      sscanf(arg[ia+1],"%lf,%lf", &bmin, &bmax);
     198      bgalcut = true;
     199      ia++;
     200    }
     201    else if (strcmp(arg[ia],"-bgalfile") == 0) {
     202      if (ia == narg-1) Usage(true);
     203      pointfile = arg[ia+1];
     204      ia++;
     205    }
     206    else if (strcmp(arg[ia],"-bgal") == 0) {
     207      if (ia == narg-1) Usage(true);
     208      bgaltoi = arg[ia+1];
     209      ia++;
     210    }
    185211    else if (strcmp(arg[ia],"-wfft") == 0) {
    186212      if (ia == narg-1) Usage(true); 
     
    226252  cout << " Initializing SOPHYA ... " << endl;
    227253  SophyaInit();
     254  SophyaConfigureSignalhandling(true);
     255
    228256  InitTim();
    229257
     
    263291    double G_a = 1./(G_sigma*sqrt(M_PI*2.));
    264292    SimpleFilter filt(gfilt_wsz, SimpleFilter::GaussFilter, G_a, G_sigma);
    265    
     293
     294         
     295    FITSTOIReader* rbgal = NULL;
     296    if (bgalcut) {  // if Galactic cut
     297      cout << "> Creating bgal FITSTOIReader object - InFile=" << pointfile
     298           << " bgaltoiname= " << bgaltoi << endl;
     299      cout << "  offes.SetBGalCut( " << bmin << "," << bmax << ")" << endl;
     300      rbgal = new FITSTOIReader(pointfile);
     301      offes.SetBGalCut(bmin, bmax);     
     302    }
     303
    266304    cout << "> Creating FITSTOIWriter OutFitsName= " << outfile << endl;
    267305    FITSTOIWriter w(outfile);
     
    281319      plombier.Connect(offes, "out", w, "degoff", "", 0, fg_wrtflag);
    282320     
     321    if (bgalcut) {
     322      inname = "bgal";
     323      plombier.Connect(*rbgal, bgaltoi, offes, inname);     
     324    }
    283325
    284326    if (fg_wrticd) {
     
    315357    mgr->joinAll();
    316358    PrtTim("End threads");
     359    if (bgalcut)  delete rbgal;
    317360
    318361  }
Note: See TracChangeset for help on using the changeset viewer.