(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.6 and 1.8

version 1.6, 2012/12/18 22:17:25 version 1.8, 2013/01/07 22:03:47
Line 21 
Line 21 
  *              v0.1    Jul 23 2012  *              v0.1    Jul 23 2012
  *    v0.2  Sep 04 2012  *    v0.2  Sep 04 2012
  *              v0.3    Dec 18 2012  *              v0.3    Dec 18 2012
    *              v0.4    Jan 02 2013
  *  *
  *      Notes:  *      Notes:
  *              v0.0  *              v0.0
Line 36 
Line 37 
  *              Added other keywords: HEADER (populated by cvs build version), DATE_B  *              Added other keywords: HEADER (populated by cvs build version), DATE_B
  *              v0.3  *              v0.3
  *              Fixed memory leakage of 0.15G per rec; denoted with "Dec 18"  *              Fixed memory leakage of 0.15G per rec; denoted with "Dec 18"
    *              v0.4
    *              Took out convert_inplace(). Was causing all the images to be int
   
  *  *
  *      Example:  *      Example:
  *      sharp "mharp=hmi.Mharp_720s[1404][2012.02.20_10:00]" \  *      sharp "mharp=hmi.Mharp_720s[1404][2012.02.20_10:00]" \
Line 736  int mapScaler(DRMS_Record_t *sharpRec, D
Line 740  int mapScaler(DRMS_Record_t *sharpRec, D
         outSeg = drms_segment_lookup(sharpRec, segName);         outSeg = drms_segment_lookup(sharpRec, segName);
         if (!outSeg) return 1;         if (!outSeg) return 1;
  
         DRMS_Type_t arrayType = outSeg->info->type;  //      DRMS_Type_t arrayType = outSeg->info->type;
         DRMS_Array_t *outArray = drms_array_create(DRMS_TYPE_FLOAT, 2, dims, map, &status);         DRMS_Array_t *outArray = drms_array_create(DRMS_TYPE_FLOAT, 2, dims, map, &status);
         if (status) {if (inArray) drms_free_array(inArray); free(map); return 1;}         if (status) {if (inArray) drms_free_array(inArray); free(map); return 1;}
  
         // convert to needed data type         // convert to needed data type
  
         drms_array_convert_inplace(outSeg->info->type, 0, 1, outArray);  //      drms_array_convert_inplace(outSeg->info->type, 0, 1, outArray);         // Jan 02 2013
  
         outSeg->axis[0] = outArray->axis[0]; outSeg->axis[1] = outArray->axis[1];         outSeg->axis[0] = outArray->axis[0]; outSeg->axis[1] = outArray->axis[1];
         outArray->parent_segment = outSeg;  //      outArray->parent_segment = outSeg;
         outArray->israw = 0;            // always compressed         outArray->israw = 0;            // always compressed
         outArray->bzero = outSeg->bzero;         outArray->bzero = outSeg->bzero;
         outArray->bscale = outSeg->bscale;         outArray->bscale = outSeg->bscale;
Line 821  int mapVectorB(DRMS_Record_t *sharpRec,
Line 825  int mapVectorB(DRMS_Record_t *sharpRec,
                 outSeg = drms_segment_lookup(sharpRec, segName[iSeg]);                 outSeg = drms_segment_lookup(sharpRec, segName[iSeg]);
                 outArray = drms_array_create(DRMS_TYPE_FLOAT, 2, dims, data_prt[iSeg], &status);                 outArray = drms_array_create(DRMS_TYPE_FLOAT, 2, dims, data_prt[iSeg], &status);
                 outSeg->axis[0] = outArray->axis[0]; outSeg->axis[1] = outArray->axis[1];                 outSeg->axis[0] = outArray->axis[0]; outSeg->axis[1] = outArray->axis[1];
                 outArray->parent_segment = outSeg;  //              outArray->parent_segment = outSeg;
                 outArray->israw = 0;                 outArray->israw = 0;
                 outArray->bzero = outSeg->bzero;                 outArray->bzero = outSeg->bzero;
                 outArray->bscale = outSeg->bscale;                 outArray->bscale = outSeg->bscale;
Line 873  int mapVectorBErr(DRMS_Record_t *sharpRe
Line 877  int mapVectorBErr(DRMS_Record_t *sharpRe
                 outSeg = drms_segment_lookup(sharpRec, segName[iSeg]);                 outSeg = drms_segment_lookup(sharpRec, segName[iSeg]);
                 outArray = drms_array_create(DRMS_TYPE_FLOAT, 2, dims, data_prt[iSeg], &status);                 outArray = drms_array_create(DRMS_TYPE_FLOAT, 2, dims, data_prt[iSeg], &status);
                 outSeg->axis[0] = outArray->axis[0]; outSeg->axis[1] = outArray->axis[1];                 outSeg->axis[0] = outArray->axis[0]; outSeg->axis[1] = outArray->axis[1];
                 outArray->parent_segment = outSeg;  //              outArray->parent_segment = outSeg;
                 outArray->israw = 0;                 outArray->israw = 0;
                 outArray->bzero = outSeg->bzero;                 outArray->bzero = outSeg->bzero;
                 outArray->bscale = outSeg->bscale;                 outArray->bscale = outSeg->bscale;
Line 1621  int writeCutout(DRMS_Record_t *outRec, D
Line 1625  int writeCutout(DRMS_Record_t *outRec, D
  
         outSeg = drms_segment_lookup(outRec, SegName);         outSeg = drms_segment_lookup(outRec, SegName);
         if (!outSeg) return 1;         if (!outSeg) return 1;
         drms_array_convert_inplace(outSeg->info->type, 0, 1, cutoutArray);  //      drms_array_convert_inplace(outSeg->info->type, 0, 1, cutoutArray);      // Jan 02 2013
         outSeg->axis[0] = cutoutArray->axis[0];         outSeg->axis[0] = cutoutArray->axis[0];
         outSeg->axis[1] = cutoutArray->axis[1];         outSeg->axis[1] = cutoutArray->axis[1];
         cutoutArray->parent_segment = outSeg;  //      cutoutArray->parent_segment = outSeg;
         cutoutArray->israw = 0;         // always compressed         cutoutArray->israw = 0;         // always compressed
     cutoutArray->bzero = outSeg->bzero;     cutoutArray->bzero = outSeg->bzero;
     cutoutArray->bscale = outSeg->bscale;               // Same as inArray's     cutoutArray->bscale = outSeg->bscale;               // Same as inArray's


Legend:
Removed from v.1.6  
changed lines
  Added in v.1.8

Karen Tian
Powered by
ViewCVS 0.9.4