Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members

spidutil.h

Go to the documentation of this file.
00001 /*
00002  * Author: Steven Ludtke, 04/10/2003 (sludtke@bcm.edu)
00003  * Copyright (c) 2000-2006 Baylor College of Medicine
00004  *
00005  * This software is issued under a joint BSD/GNU license. You may use the
00006  * source code in this file under either license. However, note that the
00007  * complete EMAN2 and SPARX software packages have some GPL dependencies,
00008  * so you are responsible for compliance with the licenses of these packages
00009  * if you opt to use BSD licensing. The warranty disclaimer below holds
00010  * in either instance.
00011  *
00012  * This complete copyright notice must be included in any revised version of the
00013  * source code. Additional authorship citations may be added, but existing
00014  * author citations must be preserved.
00015  *
00016  * This program is free software; you can redistribute it and/or modify
00017  * it under the terms of the GNU General Public License as published by
00018  * the Free Software Foundation; either version 2 of the License, or
00019  * (at your option) any later version.
00020  *
00021  * This program is distributed in the hope that it will be useful,
00022  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00023  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00024  * GNU General Public License for more details.
00025  *
00026  * You should have received a copy of the GNU General Public License
00027  * along with this program; if not, write to the Free Software
00028  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00029  *
00030  */
00031 
00032 #define  angles(i,j)     angles [((j)-1)*3 + (i)-1]
00033 #define  newangles(i,j)  newangles [((j)-1)*3 + (i)-1]
00034 #define  angrefs(i,j)    angrefs [((j)-1)*3 + (i)-1]
00035 #define  angexps(i,j)    angexps [((j)-1)*3 + (i)-1]
00036 #define  shifts(i,j)     shifts[((j)-1)*2 + (i)-1]
00037 #define  fangles(i,j)    fangles [((j)-1)*3 + (i)-1]
00038 #define  numr(i,j)       numr   [((j)-1)*3 + (i)-1]
00039 #define  imgcirc(i)      imgcirc[(i)-1]
00040 #define  wr(i)           wr     [(i)-1]
00041 #define  sqimg(i,j)      sqimg  [((j)-1)*nsam + (i)-1]
00042 #define  xim(i,j)        xim    [((j)-1)*nsam + (i)-1]
00043 #define  fdata(i,j)      fdata  [((j)-1)*nxdata + (i)-1] 
00044 #define  min0(a, b)      ((a) >= (b) ? (b) : (a))
00045 #define  min(a, b)       ((a) >= (b) ? (b) : (a))
00046 #define  max(a, b)       ((a) <= (b) ? (b) : (a))
00047 #define  tab1(i)         tab1   [(i)-1]
00048 #define  xcmplx(i,j)     xcmplx [((j)-1)*2 + (i)-1]
00049 #define  br(i)           br     [(i)-1]
00050 #define  bi(i)           bi     [(i)-1]
00051 #define  circ(i)         circ   [(i)-1]
00052 #define  circ1(i)        circ1  [(i)-1]
00053 #define  circ2(i)        circ2  [(i)-1]
00054 #define  t(i)            t      [(i)-1]
00055 #define  q(i)            q      [(i)-1]
00056 #define  b(i)            b      [(i)-1]
00057 #define  t7(i)           t7     [(i)-1]
00058 #define  imgfrom(i,j)    imgfrom[((j)-1)*lsam + (i)-1]
00059 #define  imgto(i,j)      imgto  [((j)-1)*nsam + (i)-1]
00060 #define  imgstk(i,j,k)   imgstk[((k)-1)*nsam*nrow + ((j)-1)*nsam + (i)-1]
00061 #define  refcstk(i,j)    refcstk[((j)-1)*lcirc + (i) - 1]
00062 #define  imgwindow(i,j)  imgwindow [((j)-1)*nwsam + (i)-1]
00063 #define  totmin(i)       totmin[(i)-1]
00064 #define  totmir(i)       totmir[(i)-1]
00065 #define  tot(i)          tot[(i)-1]
00066 #define  tmt(i)          tmt[(i)-1]
00067 #define  dlist(i,j)      dlist[((j)-1)*ldd + (i)-1]
00068 #define  expdir(i)       expdir[(i)-1]
00069 #define  expdirs(i,j)    expdirs[((j)-1)*3 + (i)-1]
00070 #define  refdirs(i,j)    refdirs[((j)-1)*3 + (i)-1]
00071 #define  refdir(i)       refdir[(i)-1]
00072 #define  lcg(i)          lcg[(i)-1]
00073 #define  bfc(i,j)        bfc[((j)-1)*lcirc + (i) - 1]
00074 #define  fitp(i,j)       fitp[ ((j)+1)*3 + (i) + 1]
00075 #define  fit(i,j)        fit[((j)+istep)*(2*istep+1) + (i) + istep]
00076 #define  rotmp(i,j)      rotmp[((j)+istep)*(2*istep+1) + (i) + istep]
00077 #define  z33(i,j)        z33[((j)-1)*3 + (i)-1]
00078 
00079 struct APMQopt {
00080     int nr;      // first ring 
00081     int mr;      // last  ring
00082     int shrange; // shift search range
00083     int istep;   // shift search stepsize
00084     char mode;  
00085     float range; // angular search range
00086     float *angexps; // previously determined Euler angles
00087     float *angrefs; // reference angles for restricted angular search;
00088 }; 
00089 
00090 struct APMDopt {
00091     int nr;      // first ring
00092     int mr;      // last ring
00093     int iskip; 
00094     char mode;
00095     float range;
00096 }; 
00097 
00098 int  aprings(int nimg, int nring, float *imgstk, int nsam, 
00099              int nrow, int *numr, float *refcstk,int lcirc, 
00100              char mode);
00101 int   apring1(float *sqimg, int  nsam, int  nrow, float *imgcirc, int lcirc, 
00102               int nring   , char mode, int *numr, float *wr);
00103 float quadri(float xx, float yy, int nxdata, int nydata, float *fdata);
00104 void  ringwe(float *wr, int *numr, int nring);
00105 int   alprbs(int *numr, int nring, int *lcirc, char mode);
00106 int   setnring(int mr, int nr, int iskip);
00107 void  numrinit(int mr, int nr, int iskip, int *numr);
00108 void  normass(float *sqimg, int nsam, int ns1, int ns2, int nr1, int nr2, 
00109               int ir1, int ir2);
00110 void  normas(float *sqimg, int nsam, int ns1, int ns2, int nr1, int nr2,
00111              int ir1, int ir2);
00112 void  frngs(float *circ, int *numr, int nring);
00113 void  fftr_q(float *xcmplx, int nv);
00114 void  fftc_q(float *br, float *bi, int ln, int ks);
00115 int   applyws(float *circ, int lcirc, int *numr, float *wr,
00116               int nring);
00117 void  alrq(float *xim,  int nsam , int nrow , int *numr,
00118            float *circ, int lcirc, int nring, char mode);
00119 void  alrq_ms(float *xim, int    nsam, int  nrow, float cns2, float cnr2,
00120               int  *numr, float *circ, int lcirc, int  nring, char  mode);
00121 int   crosrng_ms(float *circ1, float *circ2, int  lcirc, int   nring,
00122                  int   maxrin, int   *numr, double *qn, double *tot,
00123                  double   *qm, double *tmt);
00124 void  prb1d(double *b, int npoint, float *pos);
00125 void  apmaster_1(char mode, float *divas, int nr, int *numth,
00126                  int  lsam, int lrow, int *nsam, int *nrow);
00127 void  win_resize(float *imgfrom, float *imgto, int lsam, int lrow, 
00128                  int nsam, int nrow, int lr1, int lr2, int ls1, int ls2);
00129 int   apmd(EMData *refprj, Dict refparam, EMData *expimg, APMDopt options,
00130            float *fangle);
00131 float ang_n(float rkk, char mode, int maxrin);
00132 void parabld(double *z33, float *xsh, float *ysh, double *peakv);
00133 void crosrng_e(float *circ1, float *circ2, int lcirc,
00134                int    nring, int   maxrin, int *numr,
00135                double *qn, float *tot, int neg);
00136 
00137 int apmq(EMData *refprj, Dict refparams, EMData *expimg, APMQopt options,
00138          float *angles, float *shifts);
00139 
00140 int aprq2d(float  *sqimg, float     *bfc, int     *numr, int      nsam, 
00141            int      nrow, int   ishrange, int     istep, int       nsb, 
00142            int       nse, int        nrb, int       nre, int     lcirc, 
00143            int     nring, int     maxrin, int      nima, char     mode, 
00144            float *refdir, float  *expdir, float   range, float  *diref, 
00145            float  *ccrot, float *rangnew, float *xshsum, float *yshsum, 
00146            int  *nimalcg, int   ckmirror, int limitrange);

Generated on Tue Jun 11 13:46:19 2013 for EMAN2 by  doxygen 1.3.9.1