| RESPITE: The CASA Toolkit Page: Documentation: Block Library Index:Split |
The Split block generates sample or 1-D frame sub-frames by splitting a 1-D frame input (i.e. it performs the complimentary operation to Join). The block can take any number of outputs. By default the number of outputs is 2.
To cut a frame into two pieces use the integer parameter CUT to indicate the index at which to split the frame. The cut will occur between this index and the one below. i.e. a frame of size 64, cut at POS=17, will produce two frames, one from indices 1 to 16, and the other using indices 17 to 64.
To cut a frame into more than two piece use the integer vector parameter CUTS to indicate the indices at which to perform each successive cut. i.e an input frame of length 64, cut with CUTS={17, 33, 49} will produce 4 output frames using the index ranges [1,16], [17, 32], [33, 48], [49,64].
If using the CUTS parameter, then the NOUTPUTS parameter must be explicitly set and it must be consistent with the number of outputs implied by the number of elements in the vector CUTS. The values of the elements of the vector parameter CUTS must be in ascending order.
| Inputs | Meaning | Sample | 1-D frame | |
|---|---|---|---|---|
| in1 | signal | Yes | Yes | Yes |
| Outputs | Meaning |
|---|---|
| out1 | 1st sub-frame |
| ... | ... |
| out n | nth sub-frame |
| Parameters | Type | Default | Meaning |
|---|---|---|---|
| NOUTPUTS | Integer | 2 | Number of outputs |
| CUT | Integer | - | Position for a single cut |
| CUTS | IntegerVector | - | Positions for several cuts |