예제 #1
0
/** Apply the transformation to an input vector (as a VMD type).
 * This wraps the apply(in,out) method (and will be slower!)
 *
 * @param inputVector :: an inD-length vector
 * @return the output vector as VMD
 */
Mantid::Kernel::VMD
CoordTransform::applyVMD(const Mantid::Kernel::VMD &inputVector) const {
  if (inputVector.getNumDims() != inD)
    throw std::runtime_error("CoordTransform::apply(): inputVector has the "
                             "wrong number of coordinates!");
  coord_t *outArray = new coord_t[outD];
  this->apply(inputVector.getBareArray(), outArray);
  VMD out(outD, outArray);
  delete[] outArray;
  return out;
}
예제 #2
0
/** Returns the signal (normalized by volume) at a given coordinates
 * or 0 if masked
 *
 * @param coords :: coordinate as a VMD vector
 * @param normalization :: how to normalize the signal returned
 * @return normalized signal
 */
signal_t IMDWorkspace::getSignalWithMaskAtVMD(
    const Mantid::Kernel::VMD &coords,
    const Mantid::API::MDNormalization &normalization) const {
  return this->getSignalWithMaskAtCoord(coords.getBareArray(), normalization);
}