Changeset 1809 in Sophya for trunk/ArchTOIPipe/TestPipes/tsttoi2map.cc
- Timestamp:
- Dec 3, 2001, 9:38:03 PM (24 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/ArchTOIPipe/TestPipes/tsttoi2map.cc
r1760 r1809 37 37 <<" -b label_bolomuv : label fits for bolo value (def=boloMuV)"<<endl 38 38 <<" -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 41 42 <<" -m vmin : samples are good if sample value >= vmin"<<endl 42 43 <<" -M vmax : samples are good if sample value <= vmax"<<endl … … 48 49 } 49 50 50 unsigned long typecoord(char typc=' ',char hd=' ');51 unsigned long typecoord(char typc,char hd)52 // typc : G=galactiques, E=equatoriales, autres=galactiques53 // 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 66 51 //////////////////////////////////////////////////////////////// 67 52 int main(int narg, char** arg) { … … 76 61 char *label_coord1 = "coord1", *label_coord2 = "coord2" 77 62 , *label_bolomuv = "boloMuV"; 63 double equi=2000.; 64 char *tcoorin="gdcdl", *tcoormap="g"; 65 string fitsphwout = ""; 78 66 long 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) { 67 int c; 68 while((c = getopt(narg,arg,"hp:s:w:a:d:b:n:i:o:m:M:f:e:")) != -1) { 83 69 switch (c) { 84 70 case 's' : … … 111 97 break; 112 98 case 'i' : 113 sscanf(optarg,"%c,%c",&t,&h); 114 tcoorin=typecoord(t,h); 99 tcoorin=optarg; 115 100 break; 116 101 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); 119 106 break; 120 107 case 'm' : … … 149 136 cout<<"Fits Infile Pointing "<<fitsin_point<<endl 150 137 <<" ...label_coord1 "<<label_coord1<<endl 151 <<" ...label_coord2 "<<label_coord2<<endl; 138 <<" ...label_coord2 "<<label_coord2<<endl 139 <<" ...... ctype="<<tcoorin<<endl; 152 140 cout<<"Fits Healpix Sphere "<<fitsphout<<endl 153 141 <<" ...nlat "<<nlat<<endl; 154 cout<<"Fits Healpix Weight Sphere "<<fitsphwout<<endl; 142 cout<<"Fits Healpix Weight Sphere "<<fitsphwout<<endl 143 <<" ...... ctype="<<tcoormap<<endl; 144 cout<<"Equinoxe "<<equi<<" years"<<endl; 155 145 156 146 SophyaInit(); … … 189 179 TOI2Map toi2m(sph,wsph); 190 180 cout<<"TOI2Map created"<<endl; 191 toi2m.SetEquinox( 2000.);192 toi2m.SetCoorIn( (TypAstroCoord)tcoorin);193 toi2m.SetCoor Out((TypAstroCoord) tcoorout);181 toi2m.SetEquinox(equi); 182 toi2m.SetCoorIn(tcoorin); 183 toi2m.SetCoorMap(tcoormap); 194 184 toi2m.SetTestFlag(tflg,badflg); 195 185 toi2m.SetTestMin(tmin,vmin);
Note:
See TracChangeset
for help on using the changeset viewer.