ARTS built-in documentation server
Workspace Method Select
Description
Method to select some elements from one array and copy them to
a new array. (Works also for vectors.)
This works also for higher dimensional objects, where the selection is
always performed in the first dimension.
For example:
Select(y,x,[0,3])
will select the first and fourth row of matrix x and copy them to the
output matrix y.
Note that it is even safe to use this method if needles and haystack
are the same variable.
Authors: Oliver Lemke
Synopsis
Select( | needles, haystack, needleindexes ) |
Variables
GOUT | needles | (ArrayOfIndex, ArrayOfArrayOfIndex, ArrayOfString, ArrayOfVector, ArrayOfArrayOfVector, ArrayOfMatrix, ArrayOfArrayOfMatrix, ArrayOfSparse, ArrayOfTensor3, ArrayOfArrayOfTensor3, ArrayOfTensor4, ArrayOfTensor6, ArrayOfTensor7, ArrayOfArrayOfTensor6, ArrayOfLineMixingRecord, ArrayOfLineRecord, ArrayOfArrayOfLineRecord, ArrayOfLineshapeSpec, ArrayOfArrayOfSpeciesTag, ArrayOfSingleScatteringData, ArrayOfScatteringMetaData, ArrayOfGriddedField1, ArrayOfGriddedField2, ArrayOfGriddedField3, ArrayOfGriddedField4, ArrayOfArrayOfGriddedField1, ArrayOfArrayOfGriddedField2, ArrayOfArrayOfGriddedField3, ArrayOfArrayOfLineMixingRecord, ArrayOfRetrievalQuantity, ArrayOfCIARecord, Vector, Matrix, Sparse) |
Selected elements. Must have the same variable type as haystack. |
GIN | haystack | (ArrayOfIndex, ArrayOfArrayOfIndex, ArrayOfString, ArrayOfVector, ArrayOfArrayOfVector, ArrayOfMatrix, ArrayOfArrayOfMatrix, ArrayOfSparse, ArrayOfTensor3, ArrayOfArrayOfTensor3, ArrayOfTensor4, ArrayOfTensor6, ArrayOfTensor7, ArrayOfArrayOfTensor6, ArrayOfLineMixingRecord, ArrayOfLineRecord, ArrayOfArrayOfLineRecord, ArrayOfLineshapeSpec, ArrayOfArrayOfSpeciesTag, ArrayOfSingleScatteringData, ArrayOfScatteringMetaData, ArrayOfGriddedField1, ArrayOfGriddedField2, ArrayOfGriddedField3, ArrayOfGriddedField4, ArrayOfArrayOfGriddedField1, ArrayOfArrayOfGriddedField2, ArrayOfArrayOfGriddedField3, ArrayOfArrayOfLineMixingRecord, ArrayOfRetrievalQuantity, ArrayOfCIARecord, Vector, Matrix, Sparse) | Variable to select from. May be the same variable as needles. |
GIN | needleindexes | (ArrayOfIndex) | The elements to select (zero based indexing, as always.) |