예제 #1
0
        public void GetRawSpacialCoordinates()
        {
            double[] mz = { 1.0, 2.0, 3.0 };
            double[,] data = { { 1, 1.1, 1.2 }, { 1, 1.1, 1.2 } };
            int[,] coords  = { { 1, 2, 3 }, { 4, 5, 6 } };

            _dataset.CreateFromRawData(mz, data, coords);

            var retCoords3D = _dataset.GetRawSpacialCoordinates(is2D: false);

            Assert.AreEqual(retCoords3D, coords, message: "Dataset returned incorrect 3D spatial coordinates array.");

            var retCoords2D = _dataset.GetRawSpacialCoordinates(is2D: true);

            Assert.AreEqual(retCoords2D,
                            actual: new[, ] {
                { 1, 2 }, { 4, 5 }
            },
                            message: "Dataset returned incorrect 2D spatial coordinates array.");
        }