Changeset 189 in Sophya for trunk/SophyaPI/PIext
- Timestamp:
- Jan 18, 1999, 7:33:42 PM (27 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/SophyaPI/PIext/piacmd.cc
r186 r189 575 575 else if (kw == "aper" ) { 576 576 if (tokens.size() < 1) { 577 cout << "PIACmd::Do() Usage: aper fond_typ [opt ions_calcul]" << endl;577 cout << "PIACmd::Do() Usage: aper fond_typ [opt_calcul opt_disp]" << endl; 578 578 return(0); 579 579 } … … 876 876 //| : faa.bbb = fond fixe a aa.bbb 877 877 //| defaut : "b" 878 //| tokens[1] = options pour le fit ex: l1 .0878 //| tokens[1] = options pour le fit ex: l1 879 879 //| : ra = "a" rayon minimal de scan (def=0) 880 880 //| : ga = "a" taille de la fenetre glissante pour les extrapolations (def=4) 881 881 //| : la = "a" niveau de print 882 //| : c = la surface pour la photometrie est un carre (defaut=cercle) 882 883 //| tokens[2] = options graphiques 883 884 //| Return: 0 si Ok, <0 sinon. … … 887 888 int typ_fond=1, rmin=0, rmax, npt_gliss=4, lp=0; 888 889 float fondimpos=0., fondbord=0., fondautre; 890 bool cercle = true; 889 891 string opt=""; 890 892 string dummy; string dum; … … 896 898 size_t p = dummy.find(",r"); size_t q = dummy.find_first_of(',',p+1); 897 899 dum = dummy.substr(p,q-p); 898 if(dum.length()>2) sscanf(dum.c_str(),",r%d",& lp);900 if(dum.length()>2) sscanf(dum.c_str(),",r%d",&rmin); 899 901 } 900 902 if(strstr(dummy.c_str(),",g")) { … … 907 909 dum = dummy.substr(p,q-p); 908 910 if(dum.length()>2) sscanf(dum.c_str(),",l%d",&lp); 911 } 912 if(strstr(dummy.c_str(),",c")) { 913 cercle = false; 909 914 } 910 915 } … … 958 963 // Print 959 964 if(lp>1) 960 cout<<"photom_ouv[typ="<<typ_fond<<"]: pav["<<dx<<","<<dy<<" ("<<dxym 965 cout<<"photom_ouv[cercle="<<cercle<<",typ="<<typ_fond<<"]: pav[" 966 <<dx<<","<<dy<<" ("<<dxym 961 967 <<"] xc,yc="<<xc<<","<<yc<<"] ic,jc="<<ic<<","<<jc<<endl 962 968 <<"] (fond="<<fondimpos<<") pxmil="<<(*pav)(ic,ic) … … 985 991 double sum=0.; int ns=0, nf=0; 986 992 for(int i=0;i<dxym;i++) for(int j=0;j<dxym;j++) { 987 if(ic-r<=i && i<=ic+r && jc-r<=j && j<=jc+r ) {sum += (*pav)(i,j); ns++;} 993 double ray2 = (i-ic)*(i-ic)+(j-jc)*(j-jc)-0.1; 994 if( (cercle && ray2<=r*r) || 995 (!cercle && ic-r<=i && i<=ic+r && jc-r<=j && j<=jc+r) ) 996 {sum += (*pav)(i,j); ns++;} 988 997 else {p[nf] = (*pav)(i,j); nf++;} 989 998 }
Note:
See TracChangeset
for help on using the changeset viewer.