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.

If needleindexes is set to [-1], all elements are copied.
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

GOUTneedles(ArrayOfAbsorptionLines, ArrayOfArrayOfAbsorptionLines, ArrayOfAgenda, ArrayOfArrayOfGriddedField1, ArrayOfArrayOfGriddedField2, ArrayOfArrayOfGriddedField3, ArrayOfArrayOfIndex, ArrayOfArrayOfMatrix, ArrayOfPpath, ArrayOfArrayOfPropagationMatrix, ArrayOfArrayOfRadiationVector, ArrayOfArrayOfScatteringMetaData, ArrayOfArrayOfSingleScatteringData, ArrayOfArrayOfSpeciesTag, ArrayOfArrayOfStokesVector, ArrayOfArrayOfString, ArrayOfArrayOfTensor3, ArrayOfArrayOfTensor6, ArrayOfArrayOfTime, ArrayOfArrayOfTransmissionMatrix, ArrayOfArrayOfVector, ArrayOfCIARecord, ArrayOfGriddedField1, ArrayOfGriddedField2, ArrayOfGriddedField3, ArrayOfGriddedField4, ArrayOfIndex, ArrayOfMatrix, ArrayOfPropagationMatrix, ArrayOfQuantumIdentifier, ArrayOfRadiationVector, ArrayOfRetrievalQuantity, ArrayOfScatteringMetaData, ArrayOfSingleScatteringData, ArrayOfSparse, ArrayOfStokesVector, ArrayOfString, ArrayOfTelsemAtlas, ArrayOfTensor3, ArrayOfTensor4, ArrayOfTensor5, ArrayOfTensor6, ArrayOfTensor7, ArrayOfTime, ArrayOfTransmissionMatrix, ArrayOfVector, ArrayOfXsecRecord, Vector, Matrix, Sparse) Selected elements. Must have the same variable type as haystack.
GINhaystack(ArrayOfAbsorptionLines, ArrayOfArrayOfAbsorptionLines, ArrayOfAgenda, ArrayOfArrayOfGriddedField1, ArrayOfArrayOfGriddedField2, ArrayOfArrayOfGriddedField3, ArrayOfArrayOfIndex, ArrayOfArrayOfMatrix, ArrayOfPpath, ArrayOfArrayOfPropagationMatrix, ArrayOfArrayOfRadiationVector, ArrayOfArrayOfScatteringMetaData, ArrayOfArrayOfSingleScatteringData, ArrayOfArrayOfSpeciesTag, ArrayOfArrayOfStokesVector, ArrayOfArrayOfString, ArrayOfArrayOfTensor3, ArrayOfArrayOfTensor6, ArrayOfArrayOfTime, ArrayOfArrayOfTransmissionMatrix, ArrayOfArrayOfVector, ArrayOfCIARecord, ArrayOfGriddedField1, ArrayOfGriddedField2, ArrayOfGriddedField3, ArrayOfGriddedField4, ArrayOfIndex, ArrayOfMatrix, ArrayOfPropagationMatrix, ArrayOfQuantumIdentifier, ArrayOfRadiationVector, ArrayOfRetrievalQuantity, ArrayOfScatteringMetaData, ArrayOfSingleScatteringData, ArrayOfSparse, ArrayOfStokesVector, ArrayOfString, ArrayOfTelsemAtlas, ArrayOfTensor3, ArrayOfTensor4, ArrayOfTensor5, ArrayOfTensor6, ArrayOfTensor7, ArrayOfTime, ArrayOfTransmissionMatrix, ArrayOfVector, ArrayOfXsecRecord, Vector, Matrix, Sparse)Variable to select from. May be the same variable as needles.
GINneedleindexes(ArrayOfIndex)The elements to select (zero based indexing, as always.)