diff --git a/src/das2c_data.c b/src/das2c_data.c index 9ba77ac..42ac09c 100644 --- a/src/das2c_data.c +++ b/src/das2c_data.c @@ -304,7 +304,7 @@ static IDL_VPTR das2c_api_data(int argc, IDL_VPTR* argv) */ size_t I = 0; - size_t uSlowestBytes = 0; + size_t uFastestBytes = 0; if(nDsRank == nVarRank){ memcpy(pDest, pSrc, uBytes); @@ -325,12 +325,12 @@ static IDL_VPTR das2c_api_data(int argc, IDL_VPTR* argv) if(aVarShape[0] != aDsShape[0]) das2c_IdlMsgExit("Logic error 3 in das2c_data()"); - uSlowestBytes = aDsShape[0] * uValSz; + uFastestBytes = aDsShape[1] * uValSz; /* for each I, fill with a single I value J times */ for(I = 0; I < aDsShape[0]; ++I) das2c_memset( - (byte*)(pDest + (I*uSlowestBytes)), pSrc + I*uValSz, uValSz, aDsShape[1] + (byte*)(pDest + (I*uFastestBytes)), pSrc + I*uValSz, uValSz, aDsShape[1] ); } diff --git a/test/das2c_test.pro b/test/das2c_test.pro index 6a25adc..774d49d 100644 --- a/test/das2c_test.pro +++ b/test/das2c_test.pro @@ -24,6 +24,13 @@ v_freq v_amp = das2c_vars(pd_amp, 'center') v_amp +;aTimes = das2c_data(v_time, {i:0, j:'*'} ) ; TODO +aTimes = das2c_data(v_time) +;aFreqs = das2c_data(v_freq, {i:'*', j:0 } ) ; TODO +aFreqs = das2c_data(v_freq) + +aAmp = das2c_data(v_amp) + das2c_props(ds, 'title') das2c_props(pd_time, 'label') @@ -36,11 +43,6 @@ das2c_props(pd_amp) das2c_free(query) exit -aTimes = das2c_data(v_time, {i:0, j:'*'} ) -aFreqs = das2c_data(v_freq, {i:'*', j:0 } ) -aAmp = das2c_data(v_amp) - - ; Next interation, for waveforms exit v_start = das2c_vars(pd_time, 'reference')