Changeset 1530 in Sophya for trunk/ArchTOIPipe/TestPipes/tsttoi2map.cc
- Timestamp:
- Jun 14, 2001, 7:53:29 PM (24 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/ArchTOIPipe/TestPipes/tsttoi2map.cc
r1520 r1530 20 20 <<" [-a label_coord1] [-d label_coord2] [-b label_bolomuv]"<<endl 21 21 <<" [-n nlat] [-i c,h] [-o c,h]"<<endl 22 <<" [-m vmin] [-M vmax] [-f flag]"<<endl 22 23 <<" fitsin_point fitsin_bolo fitsphout [fitsphwout]"<<endl 23 24 <<" -p lp : print level (def=0)"<<endl … … 29 30 <<" -b label_bolomuv : label fits for bolo value (def=boloMuV)"<<endl 30 31 <<" -n nlat : nlat for Healpix sphere (def=128)"<<endl 31 <<" -i c,h : coordIn caracteristics (c=G/E h=H/D ) (def=G,D)"<<endl32 <<" -i c,h : coordIn caracteristics (c=G/E h=H/D/R) (def=G,D)"<<endl 32 33 <<" -o c,h : idem -i for coordOut"<<endl 34 <<" -m vmin : samples are good if sample value >= vmin"<<endl 35 <<" -M vmax : samples are good if sample value <= vmax"<<endl 36 <<" -f flag : samples are bad if match flag"<<endl 33 37 <<" fitsin_point : fits file for pointing"<<endl 34 38 <<" fitsin_bolo : fits file for bolo values"<<endl … … 40 44 unsigned long typecoord(char typc,char hd) 41 45 // typc : G=galactiques, E=equatoriales, autres=galactiques 42 // hd : H=heure, D=degre, autres=(heure si typc==E, degre si typc==G)46 // hd : H=heure, D=degre, R=radian, autres=(heure si typc==E, degre si typc==G) 43 47 { 44 48 if(typc!='G' && typc!='E') typc='G'; 45 if(hd!='H' && hd!='D' ) {if(typc=='E') hd='H'; else hd='D';}49 if(hd!='H' && hd!='D' && hd!='R') {if(typc=='E') hd='H'; else hd='D';} 46 50 unsigned long rc=TypCoordUndef; 47 51 if(typc=='G') rc |= TypCoordGal; 48 52 else rc |= TypCoordEq; 49 if(hd=='D') rc |= TypCoordDD; 50 else rc |= TypCoordHD; 53 if(hd=='D') rc |= TypCoordDD; 54 else if(hd=='R') rc |= TypCoordRR; 55 else rc |= TypCoordHD; 51 56 return rc; 52 57 } … … 60 65 int lp = 0, width = 8192; 61 66 int nlat = 128; // npixel = 12 * nlat^2 62 char *label_coord1 = "coord1", *label_coord2 = "coord2", *label_bolomuv = "boloMuV"; 67 bool tflg=false, tmin=false, tmax=false; 68 r_8 vmin=-1.e30, vmax=1.e30; int_8 badflg=0; 69 char *label_coord1 = "coord1", *label_coord2 = "coord2" 70 , *label_bolomuv = "boloMuV"; 63 71 long sdeb,sfin; 64 72 string fitsphwout = ""; 65 73 unsigned long tcoorin=typecoord(), tcoorout=typecoord(); 66 74 int c; char t=' ',h=' '; 67 while((c = getopt(narg,arg,"hp:s:w:a:d:b:n:i:o: ")) != -1) {75 while((c = getopt(narg,arg,"hp:s:w:a:d:b:n:i:o:m:M:f:")) != -1) { 68 76 switch (c) { 69 77 case 's' : … … 103 111 tcoorout=typecoord(t,h); 104 112 break; 113 case 'm' : 114 sscanf(optarg,"%lf",&vmin); 115 tmin = true; 116 break; 117 case 'M' : 118 sscanf(optarg,"%lf",&vmax); 119 tmax = true; 120 break; 121 case 'f' : 122 sscanf(optarg,"%ld",&badflg); 123 tflg = true; 124 break; 105 125 case 'h' : 106 126 default: … … 116 136 if(optind+3<narg) fitsphwout = arg[optind+3]; 117 137 118 {119 unsigned long tg,te,hd,dd;120 138 cout<<">>>> tsttoi2map:"<<endl 121 139 <<"Pipe Window Size "<<width<<endl 122 140 <<"Fits Infile Bolo "<<fitsin_bolo<<endl 123 141 <<" ...label_bolomuv "<<label_bolomuv<<endl; 124 tg = tcoorin&TypCoordGal; te = tcoorin&TypCoordEq;125 hd = tcoorin&TypCoordHD; dd = tcoorin&TypCoordDD;126 142 cout<<"Fits Infile Pointing "<<fitsin_point<<endl 127 143 <<" ...label_coord1 "<<label_coord1<<endl 128 <<" ...label_coord2 "<<label_coord2<<endl 129 <<" ...... Gal="<<tg<<" Eq="<<te<<" hour="<<hd<<" deg="<<dd<<endl; 130 tg = tcoorout&TypCoordGal; te = tcoorout&TypCoordEq; 131 hd = tcoorout&TypCoordHD; dd = tcoorout&TypCoordDD; 144 <<" ...label_coord2 "<<label_coord2<<endl; 132 145 cout<<"Fits Healpix Sphere "<<fitsphout<<endl 133 <<" ...nlat "<<nlat<<endl 134 <<" ...... Gal="<<tg<<" Eq="<<te<<" hour="<<hd<<" deg="<<dd<<endl; 146 <<" ...nlat "<<nlat<<endl; 135 147 cout<<"Fits Healpix Weight Sphere "<<fitsphwout<<endl; 136 }137 148 138 149 SophyaInit(); … … 157 168 SphereHEALPix<r_8>* sph = new SphereHEALPix<r_8>(nlat); 158 169 cout<<"SphereHEALPix: Type de map : "<<sph->TypeOfMap()<<endl 159 <<" Nombre de pixels : "<<sph->NbPixels()<<endl; 170 <<" Nombre de pixels : "<<sph->NbPixels()<<endl 171 <<" Nlat : "<<sph->SizeIndex()<<endl; 160 172 161 173 // Creation de la sphere de poids Healpix … … 163 175 if(fitsphwout.size()>0) { 164 176 wsph = new SphereHEALPix<r_8>; 165 cout<<"SphereHEALPix Weight: Type de map : "<<wsph->TypeOfMap()<<endl 166 <<" Nombre de pixels : "<<wsph->NbPixels()<<endl; 177 cout<<"SphereHEALPix Weight Created"<<endl; 167 178 } 168 179 … … 173 184 toi2m.SetCoorIn((TypAstroCoord) tcoorin); 174 185 toi2m.SetCoorOut((TypAstroCoord) tcoorout); 186 toi2m.SetTestFlag(tflg,badflg); 187 toi2m.SetTestMin(tmin,vmin); 188 toi2m.SetTestMax(tmax,vmax); 189 toi2m.Print(cout); 175 190 176 191 // Definition des tuyaux
Note:
See TracChangeset
for help on using the changeset viewer.