(file) Return to smarp_functions.c CVS log (file) (dir) Up to [Development] / JSOC / proj / sharp / apps

Diff for /JSOC/proj/sharp/apps/smarp_functions.c between version 1.3 and 1.4

version 1.3, 2020/06/29 22:19:51 version 1.4, 2021/05/25 01:15:39
Line 170  int computeLOSderivative(float *los, int
Line 170  int computeLOSderivative(float *los, int
         dery_los[j * nx + i] = ( (3*los[j * nx + i]) + (-4*los[(j-1) * nx + i]) - (-los[(j-2) * nx + i]) )*0.5;         dery_los[j * nx + i] = ( (3*los[j * nx + i]) + (-4*los[(j-1) * nx + i]) - (-los[(j-2) * nx + i]) )*0.5;
     }     }
  
       for (i = 1; i <= nx-2; i++)
     for (i = 0; i <= nx-1; i++)  
     {     {
         for (j = 0; j <= ny-1; j++)          for (j = 1; j <= ny-2; j++)
         {         {
             if ( bitmask[j * nx + i] < 36 ) continue;             if ( bitmask[j * nx + i] < 36 ) continue;
             if ( (derx_los[j * nx + i] + dery_los[j * nx + i]) == 0) continue;  
             if isnan(los[j * nx + i])      continue;             if isnan(los[j * nx + i])      continue;
             if isnan(los[(j+1) * nx + i])  continue;             if isnan(los[(j+1) * nx + i])  continue;
             if isnan(los[(j-1) * nx + i])  continue;             if isnan(los[(j-1) * nx + i])  continue;
Line 191  int computeLOSderivative(float *los, int
Line 189  int computeLOSderivative(float *los, int
  
     *mean_derivative_los_ptr = (sum)/(count_mask); // would be divided by ((nx-2)*(ny-2)) if shape of count_mask = shape of magnetogram     *mean_derivative_los_ptr = (sum)/(count_mask); // would be divided by ((nx-2)*(ny-2)) if shape of count_mask = shape of magnetogram
     //printf("mean_derivative_los_ptr=%f\n",*mean_derivative_los_ptr);     //printf("mean_derivative_los_ptr=%f\n",*mean_derivative_los_ptr);
       //printf("nx=%d\n",nx);
       //printf("ny=%d\n",ny);
       //printf("sum=%f\n",sum);
         return 0;         return 0;
 } }
  


Legend:
Removed from v.1.3  
changed lines
  Added in v.1.4

Karen Tian
Powered by
ViewCVS 0.9.4