Changeset 3297
- Timestamp:
- 01/26/12 21:07:25 (4 months ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
branches/mcxtrace-1.0/xlib/sources/Source_gaussian.comp
r3296 r3297 103 103 prms.pmul=1.0/(double)mcget_ncount(); 104 104 } 105 if (dist!=1){ 106 fprintf(stderr,"Source_gaussian (%s): parameter dist is superfluous and is ignored. It will be removed in future releases of McXtrace - please update your instrument file.\n"); 107 } 108 105 109 %} 106 110 … … 147 151 148 152 // Beam's footprint at a dist calculation 149 spX=sqrt(sig_x*sig_x+sigPr_x*sigPr_x *dist*dist);150 spY=sqrt(sig_y*sig_y+sigPr_y*sigPr_y *dist*dist);153 spX=sqrt(sig_x*sig_x+sigPr_x*sigPr_x); 154 spY=sqrt(sig_y*sig_y+sigPr_y*sigPr_y); 151 155 152 156 // targeted area calculation 153 157 x1=randnorm()*spX; 154 158 y1=randnorm()*spY; 155 z1= dist;159 z1=1; 156 160 157 161 dx=x1-x; 158 162 dy=y1-y; 159 dz=sqrt(dx*dx+dy*dy+ dist*dist);163 dz=sqrt(dx*dx+dy*dy+1); 160 164 161 165 kx=(k*dx)/dz; 162 166 ky=(k*dy)/dz; 163 kz=(k *dist)/dz;167 kz=(k)/dz; 164 168 165 169 // Guassian distribution at a distance
