[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Working with Preexisting Data Set
William Baird wrote:
>
> Okay. HEre's my problem. I am grovelling before you guys for a bit of
> help, cuz I'm stuck and I'm, unfortunately, what passes for an expert around
> here. :/
>
> Ideally I would like to concatinate some data structures. Or more specifically,
> the data in the array of ints in the DATA structure below.
>
> ** Structure $10, 11 tags, 6510928 length:
> NAME STRING '**********'
> MISSION STRING '**********'
> LOCATION STRING '**********'
> RECORDING STRING '**********'
> STREAMNAME STRING '**********'
> TITLE STRING '**********'
> LABEL STRING '**********'
> SAMPLERATE FLOAT xxxxxx.
> EPOCH STRING 'xxxx:xxx:xx:xx:xx.xxxxxx'
> TIME STRUCT -> $7 Array(1)
> DATA STRUCT -> $9 Array(1)
>
> ** Structure $9, 3 tags, 6510816 length:
> UNITS STRING 'COUNTS'
> DATA INT Array(3255400)
> LABEL STRING ''
>
> I have tried the following:
>
> e=a
> e.(10).(1)=[a.(10).(1),b.(10).(1),c.(10).(1),d.(10).(1)]
>
> but it complains:
> % Conflicting data structures: <INT Array(12943700)>,MISSING.
> % Execution halted at $MAIN$ .
>
A structure member which is a named array (such as in your DATA field above) can
only have arrays of the same size put into it. Once the structure is defined,
you're stuck to the array size you've specified.
E.g.:
a={TEST1,a:fltarr(3)}
a.a=fltarr(4)
% Conflicting data structures: structure tag,<FLOAT Array[4]>.
% Execution halted at: $MAIN$
You can't fit the new data in. This is your problem. Using pointers solves it.
JD
--
J.D. Smith |*| WORK: (607) 255-5842
Cornell University Dept. of Astronomy |*| (607) 255-6263
304 Space Sciences Bldg. |*| FAX: (607) 255-5875
Ithaca, NY 14853 |*|