Changeset 3297

Show
Ignore:
Timestamp:
01/26/12 21:07:25 (4 months ago)
Author:
erkn
Message:

added a warning when dist!=1

dist is not used anymore. It will be removed in upcoming releases.
for the time being a warning is issued if dist != 1

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • branches/mcxtrace-1.0/xlib/sources/Source_gaussian.comp

    r3296 r3297  
    103103    prms.pmul=1.0/(double)mcget_ncount(); 
    104104  } 
     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 
    105109%} 
    106110 
     
    147151 
    148152  // 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); 
    151155   
    152156  // targeted area calculation 
    153157  x1=randnorm()*spX; 
    154158  y1=randnorm()*spY; 
    155   z1=dist; 
     159  z1=1; 
    156160   
    157161  dx=x1-x; 
    158162  dy=y1-y; 
    159   dz=sqrt(dx*dx+dy*dy+dist*dist); 
     163  dz=sqrt(dx*dx+dy*dy+1); 
    160164   
    161165  kx=(k*dx)/dz; 
    162166  ky=(k*dy)/dz; 
    163   kz=(k*dist)/dz; 
     167  kz=(k)/dz; 
    164168   
    165169  // Guassian distribution at a distance