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

Diff for /JSOC/proj/sharp/apps/sharp.c between version 1.36 and 1.38

version 1.36, 2015/03/04 04:45:25 version 1.38, 2015/03/18 00:28:26
Line 110 
Line 110 
 // Nyqvist rate at disk center is 0.03 degree. Oversample above 0.015 degree // Nyqvist rate at disk center is 0.03 degree. Oversample above 0.015 degree
 #define NYQVIST         (0.015) #define NYQVIST         (0.015)
  
   // Maximum variation of LONDTMAX-LONDTMIN
   #define MAXLONDIFF      (1.2e-4)
   
 // Some other things // Some other things
 #ifndef MIN #ifndef MIN
 #define MIN(a,b) (((a)<(b)) ? (a) : (b)) #define MIN(a,b) (((a)<(b)) ? (a) : (b))
Line 1086  int findPosition(DRMS_Record_t *inRec, s
Line 1089  int findPosition(DRMS_Record_t *inRec, s
  
         /* Size */         /* Size */
     // Rounded to 1.d3 precision first. Jun 16 2014 XS     // Rounded to 1.d3 precision first. Jun 16 2014 XS
       // The previous fix does not work. LONDTMAX-LONDTMIN varies from frame to frame
       // Need to find out the maximum possible difference, MAXLONDIFF (1.2e-4)
       // Now, ncol = (maxlon-minlon)/xscale, if the decimal part is outside 0.5 \pm (MAXLONDIFF/xscale)
       // proceed as it is. else, all use floor on ncol
   
           float dpix = (MAXLONDIFF / mInfo->xscale) * 1.5;                // "danger zone"
           float ncol = (maxlon - minlon) / mInfo->xscale;
           float d_ncol = fabs(ncol - floor(ncol) - 0.5);                  // distance to 0.5
           if (d_ncol < dpix) {
                   mInfo->ncol = floor(ncol);
           } else {
                   mInfo->ncol = round(ncol);
           }
   
           mInfo->nrow = round((maxlat - minlat) / mInfo->yscale);
  
         mInfo->ncol = round(round((maxlon - minlon) * 1.e3) / 1.e3 / mInfo->xscale);          printf("xcol=%f, ncol=%d, nrow=%d\n", ncol, mInfo->ncol, mInfo->nrow);
         mInfo->nrow = round(round((maxlat - minlat) * 1.e3) / 1.e3 / mInfo->yscale);  
  
         return 0;         return 0;
  
Line 2149  void computeSWIndex(struct swIndex *swKe
Line 2166  void computeSWIndex(struct swIndex *swKe
         free(bt_err); free(bh_err);  free(jz_err);         free(bt_err); free(bh_err);  free(jz_err);
         free(jz_err_squared); free(jz_rms_err);         free(jz_err_squared); free(jz_rms_err);
         free(jz_err_squared_smooth);         free(jz_err_squared_smooth);
         free(jz_smooth);  
  
         // free the arrays that are related to the numerical derivatives         // free the arrays that are related to the numerical derivatives
         free(err_term2);         free(err_term2);


Legend:
Removed from v.1.36  
changed lines
  Added in v.1.38

Karen Tian
Powered by
ViewCVS 0.9.4