Ignore:
Timestamp:
Dec 3, 2001, 9:38:03 PM (24 years ago)
Author:
cmv
Message:
  • map2toi et toi2map avec nouvelle interface sys coor et unites.
  • les modifs map2toi (LocalMap) de EA sont introduites + certains bugs corriges.

cmv 3/12/01

File:
1 edited

Legend:

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

    r1760 r1809  
    3737     <<" -b label_bolomuv : label fits for bolo value (def=boloMuV)"<<endl
    3838     <<" -n nlat : nlat for Healpix sphere (def=128)"<<endl
    39      <<" -i c,h : coordIn caracteristics (c=G/E h=H/D/R) (def=G,D)"<<endl
    40      <<" -o c,h : idem -i for coordOut"<<endl
     39     <<" -i cin : coordIn caracteristics (def=\"gdcdl\")"<<endl
     40     <<" -o cmap : idem -i for coordMap (def=\"g\")"<<endl
     41     <<" -e equi : equinoxe en annee (def=2000.)"<<endl
    4142     <<" -m vmin : samples are good if sample value >= vmin"<<endl
    4243     <<" -M vmax : samples are good if sample value <= vmax"<<endl
     
    4849}
    4950
    50 unsigned long typecoord(char typc=' ',char hd=' ');
    51 unsigned long typecoord(char typc,char hd)
    52 // typc : G=galactiques, E=equatoriales, autres=galactiques
    53 // hd : H=heure, D=degre, R=radian, autres=(heure si typc==E, degre si typc==G)
    54 {
    55   if(typc!='G' && typc!='E') typc='G';
    56   if(hd!='H' && hd!='D' && hd!='R') {if(typc=='E') hd='H'; else hd='D';}
    57  unsigned long rc=TypCoordUndef;
    58   if(typc=='G') rc |= TypCoordGal;
    59     else        rc |= TypCoordEq;
    60   if(hd=='D')        rc |= TypCoordDD;
    61     else if(hd=='R') rc |= TypCoordRR;
    62       else           rc |= TypCoordHD;
    63   return rc;
    64 }
    65 
    6651////////////////////////////////////////////////////////////////
    6752int main(int narg, char** arg) {
     
    7661char *label_coord1 = "coord1", *label_coord2 = "coord2"
    7762   , *label_bolomuv = "boloMuV";
     63double equi=2000.;
     64char *tcoorin="gdcdl", *tcoormap="g";
     65string fitsphwout = "";
    7866long sdeb,sfin;
    79 string fitsphwout = "";
    80 unsigned long tcoorin=typecoord(), tcoorout=typecoord();
    81 int c; char t=' ',h=' ';
    82 while((c = getopt(narg,arg,"hp:s:w:a:d:b:n:i:o:m:M:f:")) != -1) {
     67int c;
     68while((c = getopt(narg,arg,"hp:s:w:a:d:b:n:i:o:m:M:f:e:")) != -1) {
    8369  switch (c) {
    8470  case 's' :
     
    11197    break;
    11298  case 'i' :
    113     sscanf(optarg,"%c,%c",&t,&h);
    114     tcoorin=typecoord(t,h);
     99    tcoorin=optarg;
    115100    break;
    116101  case 'o' :
    117     sscanf(optarg,"%c,%c",&t,&h);
    118     tcoorout=typecoord(t,h);
     102    tcoormap=optarg;
     103    break;
     104  case 'e' :
     105    sscanf(optarg,"%lf",&equi);
    119106    break;
    120107  case 'm' :
     
    149136cout<<"Fits Infile Pointing "<<fitsin_point<<endl
    150137    <<"  ...label_coord1 "<<label_coord1<<endl
    151     <<"  ...label_coord2 "<<label_coord2<<endl;
     138    <<"  ...label_coord2 "<<label_coord2<<endl
     139    <<"  ...... ctype="<<tcoorin<<endl;
    152140cout<<"Fits Healpix Sphere "<<fitsphout<<endl
    153141    <<"  ...nlat "<<nlat<<endl;
    154 cout<<"Fits Healpix Weight Sphere "<<fitsphwout<<endl;
     142cout<<"Fits Healpix Weight Sphere "<<fitsphwout<<endl
     143    <<"  ...... ctype="<<tcoormap<<endl;
     144cout<<"Equinoxe "<<equi<<" years"<<endl;
    155145
    156146SophyaInit();
     
    189179 TOI2Map toi2m(sph,wsph);
    190180 cout<<"TOI2Map created"<<endl;
    191  toi2m.SetEquinox(2000.);
    192  toi2m.SetCoorIn((TypAstroCoord) tcoorin);
    193  toi2m.SetCoorOut((TypAstroCoord) tcoorout);
     181 toi2m.SetEquinox(equi);
     182 toi2m.SetCoorIn(tcoorin);
     183 toi2m.SetCoorMap(tcoormap);
    194184 toi2m.SetTestFlag(tflg,badflg);
    195185 toi2m.SetTestMin(tmin,vmin);
Note: See TracChangeset for help on using the changeset viewer.