Produced by IDL 7.1.1
User Documentation

./toolbox
dcresize.pro

Last modification date:
Wed Sep 28 13:27:10 2016

dcresize

procedure dcresize, dc, newsize, [/zero], beginning=beginning

Change the size of an existing data container.

If new channels are added to the end of an existing data container, they are filled with the blanked value (not a number, NAN) unless the /zero flag is set (in which case they are replaced with zeros). If /beginning is set then the extra channels are added to the beginning of the data and reference_channel value is adjust accordingly.

This only works for spectrum data containers where the x-axis is linear in frequency and so the x-axis values are always well-determined when extending a spectrum data container.

Examples
    ; double the size of dc, new channels are filled with NAN
    nels = data_valid(dc)
    dcresize,dc,nels*2
    ; back to its original size
    dcresize,dc,nels
    ; add 100 channels, fill with 0.0
    dcresize,dc,(nels+100),/zero
    ; to use this, or any toolbox function, on a DC in the !g
    ; structure, do this
    dc = !g.s[0]
    nels = data_valid(dc)
    dcresizse,dc,nels+200
Version
$Id$

Parameters
dc
in/out, required
variable
The data container to resize.
newsize
in, required
integer
The new number of channels. This must be > 0.

Keywords
zero
in, optional
boolean
If set, any new channels are filled with zero instead of NAN.
beginning
.


Produced by IDLdoc 1.6 on Wed Sep 28 13:27:38 2016