general/misc/
append_array.pro
Routines
top source append_array
append_array, a0, a1, index=index, new_index=new_index, done=done, fillnan=fillnan, verbose=verbose
PROCEDURE: append_array, a0, a1 PURPOSE: Append an array to another array. Can also copy an array into a subset of another. It is equivalent to : a0 = [a0,a1]; but it doesn't fail if a0 is undefined (or 0) INPUT: a0: Array to be enlarged. a1: Array (or single value) to be appended to a0. KEYWORDS: INDEX: an input variable that will VASTLY improve performance when repeatedly appending a small array onto the end of a large array. When using this keyword, the array a0 is enlarged a little bit more than needed so that subsequent appends of a1 will be written into a0 instead of creating a new array each time. The INDEX value represents the number of valid elements. If INDEX is a named variable then it will be auto incremented. If INDEX is not a named variable then the calling routine should set it using the NEW_INDEX output, After all appending is completed, make the call: append_array,a0,index=index to truncate to the proper size. NEW_INDEX: Output, size of new array. This can be used if index is NOT a named variable. Don't use if INDEX is a NAMED variable FILLNAN: Set this keyword to fill padded values with NANs. DONE: Equivalent to calling without the a1 argument. CREATED BY: Davin Larson $LastChangedBy: davin-mac $ $LastChangedDate: 2014-02-02 16:58:59 -0800 (Sun, 02 Feb 2014) $ $LastChangedRevision: 14129 $ $URL: svn+ssh://thmsvn@ambrosia.ssl.berkeley.edu/repos/spdsoft/trunk/general/misc/append_array.pro $ LAST MODIFIED: @(#)append_array.pro 1.6 98/08/13
Parameters
- a0
- a1
Keywords
- index
- new_index
- done
- fillnan
- verbose
File attributes
Modification date: | Thu Feb 13 16:43:48 2014 |
Lines: | 44 |