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 |
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]" \ |
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 |
|
|
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); |
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); |
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); |