Produced by IDL 7.1.1
User Documentation

./toolbox
get_chans.pro

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

get_chans

function get_chans(dc[, nregion][, regions])

Return a vector of channel numbers appropriate for the given data container. If nregion is not set or is 0, all channels are returned. If nregion is set and is not zero then regions must be provided. Ignores any regions or parts of region that extend beyond the end of the data container.

Returns
Array of channel numbers. Returns -1 if there was a problem.
Examples
    ; equivalent to dindgen(n_elements(*dc.data_ptr))
    c = get_chans(dc)
    ; get the chans corresponding to recently set global regions
    c = get_chans(dc, !g.nregions, !g.regions)
  
Uses
data_valid
Version
$Id$

Parameters
dc
in, required
data container
The data container to use.
nregion
in, optional
integer
The number of regions to use. If not set, then all channels are returned.
regions
in, optional
2D array
Limit the channel numbers returned to only those channels that fall in these regions. This assumes the regions follows the same rules as used in !g.nregions. That the regions don't overlap and are properly sorted with the first channel of each region at regions[0,*] and the last channel of each region at regions[1,*]. The nregion argument determines how many regions are used here. If nregion is supplied and is > 0 then regions is required.


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