ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/JSOC/proj/sharp/apps/sharp.c
(Generate patch)

Comparing proj/sharp/apps/sharp.c (file contents):
Revision 1.6 by xudong, Tue Dec 18 22:17:25 2012 UTC vs.
Revision 1.7 by xudong, Thu Jan 3 03:53:18 2013 UTC

# Line 19 | Line 19
19   *      Version:
20   *              v0.0    Jul 02 2012
21   *              v0.1    Jul 23 2012
22 < *    v0.2  Sep 04 2012
22 > *              v0.2    Sep 04 2012
23   *              v0.3    Dec 18 2012    
24 + *              v0.4    Jan 02 2013
25   *
26   *      Notes:
27   *              v0.0
# Line 36 | Line 37
37   *              Added other keywords: HEADER (populated by cvs build version), DATE_B
38   *              v0.3
39   *              Fixed memory leakage of 0.15G per rec; denoted with "Dec 18"
40 + *              v0.4
41 + *              Took out convert_inplace(). Was causing all the images to be int
42 +
43   *
44   *      Example:
45   *      sharp "mharp=hmi.Mharp_720s[1404][2012.02.20_10:00]" \
# Line 736 | Line 740 | int mapScaler(DRMS_Record_t *sharpRec, D
740          outSeg = drms_segment_lookup(sharpRec, segName);
741          if (!outSeg) return 1;
742          
743 <        DRMS_Type_t arrayType = outSeg->info->type;
743 > //      DRMS_Type_t arrayType = outSeg->info->type;
744          DRMS_Array_t *outArray = drms_array_create(DRMS_TYPE_FLOAT, 2, dims, map, &status);
745          if (status) {if (inArray) drms_free_array(inArray); free(map); return 1;}
746          
747          // convert to needed data type
748          
749 <        drms_array_convert_inplace(outSeg->info->type, 0, 1, outArray);
749 > //      drms_array_convert_inplace(outSeg->info->type, 0, 1, outArray);         // Jan 02 2013
750          
751          outSeg->axis[0] = outArray->axis[0]; outSeg->axis[1] = outArray->axis[1];
752          outArray->parent_segment = outSeg;
753 <        outArray->israw = 0;            // always compressed
753 > //      outArray->israw = 0;            // always compressed
754          outArray->bzero = outSeg->bzero;
755          outArray->bscale = outSeg->bscale;
756          
# Line 822 | Line 826 | int mapVectorB(DRMS_Record_t *sharpRec,
826                  outArray = drms_array_create(DRMS_TYPE_FLOAT, 2, dims, data_prt[iSeg], &status);
827                  outSeg->axis[0] = outArray->axis[0]; outSeg->axis[1] = outArray->axis[1];
828                  outArray->parent_segment = outSeg;
829 <                outArray->israw = 0;
829 > //              outArray->israw = 0;
830                  outArray->bzero = outSeg->bzero;
831                  outArray->bscale = outSeg->bscale;
832                  status = drms_segment_write(outSeg, outArray, 0);
# Line 874 | Line 878 | int mapVectorBErr(DRMS_Record_t *sharpRe
878                  outArray = drms_array_create(DRMS_TYPE_FLOAT, 2, dims, data_prt[iSeg], &status);
879                  outSeg->axis[0] = outArray->axis[0]; outSeg->axis[1] = outArray->axis[1];
880                  outArray->parent_segment = outSeg;
881 <                outArray->israw = 0;
881 > //              outArray->israw = 0;
882                  outArray->bzero = outSeg->bzero;
883                  outArray->bscale = outSeg->bscale;
884                  status = drms_segment_write(outSeg, outArray, 0);
# Line 1621 | Line 1625 | int writeCutout(DRMS_Record_t *outRec, D
1625          
1626          outSeg = drms_segment_lookup(outRec, SegName);
1627          if (!outSeg) return 1;
1628 <        drms_array_convert_inplace(outSeg->info->type, 0, 1, cutoutArray);
1628 > //      drms_array_convert_inplace(outSeg->info->type, 0, 1, cutoutArray);      // Jan 02 2013
1629          outSeg->axis[0] = cutoutArray->axis[0];
1630          outSeg->axis[1] = cutoutArray->axis[1];
1631          cutoutArray->parent_segment = outSeg;
1632 <        cutoutArray->israw = 0;         // always compressed
1632 > //      cutoutArray->israw = 0;         // always compressed
1633      cutoutArray->bzero = outSeg->bzero;
1634      cutoutArray->bscale = outSeg->bscale;               // Same as inArray's
1635          status = drms_segment_write(outSeg, cutoutArray, 0);

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines