Select
- Workspace.Select(self: pyarts.arts._Workspace, needles: pyarts.arts.WorkspaceVariable | pyarts.arts.ArrayOfAbsorptionLines | pyarts.arts.ArrayOfAgenda | pyarts.arts.ArrayOfArrayOfAbsorptionLines | pyarts.arts.ArrayOfArrayOfGriddedField1 | pyarts.arts.ArrayOfArrayOfGriddedField2 | pyarts.arts.ArrayOfArrayOfGriddedField3 | pyarts.arts.ArrayOfArrayOfIndex | pyarts.arts.ArrayOfArrayOfMatrix | pyarts.arts.ArrayOfArrayOfPropagationMatrix | pyarts.arts.ArrayOfArrayOfRadiationVector | pyarts.arts.ArrayOfArrayOfScatteringMetaData | pyarts.arts.ArrayOfArrayOfSingleScatteringData | pyarts.arts.ArrayOfArrayOfSpeciesTag | pyarts.arts.ArrayOfArrayOfStokesVector | pyarts.arts.ArrayOfArrayOfString | pyarts.arts.ArrayOfArrayOfTensor3 | pyarts.arts.ArrayOfArrayOfTensor6 | pyarts.arts.ArrayOfArrayOfTime | pyarts.arts.ArrayOfArrayOfTransmissionMatrix | pyarts.arts.ArrayOfArrayOfVector | pyarts.arts.ArrayOfCIARecord | pyarts.arts.ArrayOfGriddedField1 | pyarts.arts.ArrayOfGriddedField2 | pyarts.arts.ArrayOfGriddedField3 | pyarts.arts.ArrayOfGriddedField4 | pyarts.arts.ArrayOfIndex | pyarts.arts.ArrayOfJacobianTarget | pyarts.arts.ArrayOfMatrix | pyarts.arts.ArrayOfPpath | pyarts.arts.ArrayOfPropagationMatrix | pyarts.arts.ArrayOfQuantumIdentifier | pyarts.arts.ArrayOfRadiationVector | pyarts.arts.ArrayOfRetrievalQuantity | pyarts.arts.ArrayOfScatteringMetaData | pyarts.arts.ArrayOfSingleScatteringData | pyarts.arts.ArrayOfSparse | pyarts.arts.ArrayOfSpeciesTag | pyarts.arts.ArrayOfStokesVector | pyarts.arts.ArrayOfString | pyarts.arts.ArrayOfSun | pyarts.arts.ArrayOfTelsemAtlas | pyarts.arts.ArrayOfTensor3 | pyarts.arts.ArrayOfTensor4 | pyarts.arts.ArrayOfTensor5 | pyarts.arts.ArrayOfTensor6 | pyarts.arts.ArrayOfTensor7 | pyarts.arts.ArrayOfTime | pyarts.arts.ArrayOfTransmissionMatrix | pyarts.arts.ArrayOfVector | pyarts.arts.ArrayOfXsecRecord | pyarts.arts.Matrix | pyarts.arts.Sparse | pyarts.arts.Vector, haystack: pyarts.arts.WorkspaceVariable | pyarts.arts.ArrayOfAbsorptionLines | pyarts.arts.ArrayOfAgenda | pyarts.arts.ArrayOfArrayOfAbsorptionLines | pyarts.arts.ArrayOfArrayOfGriddedField1 | pyarts.arts.ArrayOfArrayOfGriddedField2 | pyarts.arts.ArrayOfArrayOfGriddedField3 | pyarts.arts.ArrayOfArrayOfIndex | pyarts.arts.ArrayOfArrayOfMatrix | pyarts.arts.ArrayOfArrayOfPropagationMatrix | pyarts.arts.ArrayOfArrayOfRadiationVector | pyarts.arts.ArrayOfArrayOfScatteringMetaData | pyarts.arts.ArrayOfArrayOfSingleScatteringData | pyarts.arts.ArrayOfArrayOfSpeciesTag | pyarts.arts.ArrayOfArrayOfStokesVector | pyarts.arts.ArrayOfArrayOfString | pyarts.arts.ArrayOfArrayOfTensor3 | pyarts.arts.ArrayOfArrayOfTensor6 | pyarts.arts.ArrayOfArrayOfTime | pyarts.arts.ArrayOfArrayOfTransmissionMatrix | pyarts.arts.ArrayOfArrayOfVector | pyarts.arts.ArrayOfCIARecord | pyarts.arts.ArrayOfGriddedField1 | pyarts.arts.ArrayOfGriddedField2 | pyarts.arts.ArrayOfGriddedField3 | pyarts.arts.ArrayOfGriddedField4 | pyarts.arts.ArrayOfIndex | pyarts.arts.ArrayOfJacobianTarget | pyarts.arts.ArrayOfMatrix | pyarts.arts.ArrayOfPpath | pyarts.arts.ArrayOfPropagationMatrix | pyarts.arts.ArrayOfQuantumIdentifier | pyarts.arts.ArrayOfRadiationVector | pyarts.arts.ArrayOfRetrievalQuantity | pyarts.arts.ArrayOfScatteringMetaData | pyarts.arts.ArrayOfSingleScatteringData | pyarts.arts.ArrayOfSparse | pyarts.arts.ArrayOfSpeciesTag | pyarts.arts.ArrayOfStokesVector | pyarts.arts.ArrayOfString | pyarts.arts.ArrayOfSun | pyarts.arts.ArrayOfTelsemAtlas | pyarts.arts.ArrayOfTensor3 | pyarts.arts.ArrayOfTensor4 | pyarts.arts.ArrayOfTensor5 | pyarts.arts.ArrayOfTensor6 | pyarts.arts.ArrayOfTensor7 | pyarts.arts.ArrayOfTime | pyarts.arts.ArrayOfTransmissionMatrix | pyarts.arts.ArrayOfVector | pyarts.arts.ArrayOfXsecRecord | pyarts.arts.Matrix | pyarts.arts.Sparse | pyarts.arts.Vector | object, needleindexes: pyarts.arts.WorkspaceVariable | pyarts.arts.ArrayOfIndex, verbosity: pyarts.arts.WorkspaceVariable | pyarts.arts.Verbosity | None = self.verbosity) None
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.
Author(s): Oliver Lemke
- Parameters:
needles (ArrayOfAbsorptionLines or ArrayOfAgenda or ArrayOfArrayOfAbsorptionLines or ArrayOfArrayOfGriddedField1 or ArrayOfArrayOfGriddedField2 or ArrayOfArrayOfGriddedField3 or ArrayOfArrayOfIndex or ArrayOfArrayOfMatrix or ArrayOfArrayOfPropagationMatrix or ArrayOfArrayOfRadiationVector or ArrayOfArrayOfScatteringMetaData or ArrayOfArrayOfSingleScatteringData or ArrayOfArrayOfSpeciesTag or ArrayOfArrayOfStokesVector or ArrayOfArrayOfString or ArrayOfArrayOfTensor3 or ArrayOfArrayOfTensor6 or ArrayOfArrayOfTime or ArrayOfArrayOfTransmissionMatrix or ArrayOfArrayOfVector or ArrayOfCIARecord or ArrayOfGriddedField1 or ArrayOfGriddedField2 or ArrayOfGriddedField3 or ArrayOfGriddedField4 or ArrayOfIndex or ArrayOfJacobianTarget or ArrayOfMatrix or ArrayOfPpath or ArrayOfPropagationMatrix or ArrayOfQuantumIdentifier or ArrayOfRadiationVector or ArrayOfRetrievalQuantity or ArrayOfScatteringMetaData or ArrayOfSingleScatteringData or ArrayOfSparse or ArrayOfSpeciesTag or ArrayOfStokesVector or ArrayOfString or ArrayOfSun or ArrayOfTelsemAtlas or ArrayOfTensor3 or ArrayOfTensor4 or ArrayOfTensor5 or ArrayOfTensor6 or ArrayOfTensor7 or ArrayOfTime or ArrayOfTransmissionMatrix or ArrayOfVector or ArrayOfXsecRecord or Vector or Matrix or Sparse) – Selected elements. Must have the same variable type as haystack. [OUT]
haystack (ArrayOfAbsorptionLines or ArrayOfAgenda or ArrayOfArrayOfAbsorptionLines or ArrayOfArrayOfGriddedField1 or ArrayOfArrayOfGriddedField2 or ArrayOfArrayOfGriddedField3 or ArrayOfArrayOfIndex or ArrayOfArrayOfMatrix or ArrayOfArrayOfPropagationMatrix or ArrayOfArrayOfRadiationVector or ArrayOfArrayOfScatteringMetaData or ArrayOfArrayOfSingleScatteringData or ArrayOfArrayOfSpeciesTag or ArrayOfArrayOfStokesVector or ArrayOfArrayOfString or ArrayOfArrayOfTensor3 or ArrayOfArrayOfTensor6 or ArrayOfArrayOfTime or ArrayOfArrayOfTransmissionMatrix or ArrayOfArrayOfVector or ArrayOfCIARecord or ArrayOfGriddedField1 or ArrayOfGriddedField2 or ArrayOfGriddedField3 or ArrayOfGriddedField4 or ArrayOfIndex or ArrayOfJacobianTarget or ArrayOfMatrix or ArrayOfPpath or ArrayOfPropagationMatrix or ArrayOfQuantumIdentifier or ArrayOfRadiationVector or ArrayOfRetrievalQuantity or ArrayOfScatteringMetaData or ArrayOfSingleScatteringData or ArrayOfSparse or ArrayOfSpeciesTag or ArrayOfStokesVector or ArrayOfString or ArrayOfSun or ArrayOfTelsemAtlas or ArrayOfTensor3 or ArrayOfTensor4 or ArrayOfTensor5 or ArrayOfTensor6 or ArrayOfTensor7 or ArrayOfTime or ArrayOfTransmissionMatrix or ArrayOfVector or ArrayOfXsecRecord or Vector or Matrix or Sparse) – Variable to select from. May be the same variable as needles. [IN]
needleindexes (ArrayOfIndex) – The elements to select (zero based indexing, as always.). [IN]
verbosity (Verbosity) – ARTS verbosity. See
verbosity
, defaults toself.verbosity
[IN]