LSST Applications  21.0.0-157-ge5427992+ebd5a6ff45,22.0.0+000ed19a8b,22.0.0+06dd0f93dc,22.0.0+4b7a2a553d,22.0.0+b6433cb9cd,22.0.0+dfc68d4d09,22.0.0+e6ee2fa291,22.0.1-1-g7d6de66+d5b52a074f,22.0.1-1-g87000a6+2036d5eaca,22.0.1-1-g8e32f31+e6ee2fa291,22.0.1-13-g5845b92+f6aee3ecd9,22.0.1-14-g6272d78+53053d8c6e,22.0.1-2-g92698f7+000ed19a8b,22.0.1-2-ga9b0f51+dfc68d4d09,22.0.1-21-g5bd0cb7e+70d022058a,22.0.1-22-g41e933f+f35f853512,22.0.1-23-ged5e717+d5b52a074f,22.0.1-24-g4fd6b65+3f3650e748,22.0.1-28-g0aba325f+8c51f084bf,22.0.1-3-g59f966b+51be954097,22.0.1-3-g849a1b8+34b059fcac,22.0.1-3-g85f6b2a+dfc68d4d09,22.0.1-3-geb91c39+d5b52a074f,22.0.1-36-g99137b0eb+ec953d57b4,22.0.1-4-g243d05b+407143e2a6,22.0.1-4-g35e927a+600e1785c4,22.0.1-4-gf0e1808+40b33593de,22.0.1-5-g096abc9+fb28b9dcc5,22.0.1-5-g15c806e+7e58257bcf,22.0.1-5-g75bb458+2e8da71d76,22.0.1-5-gec4f438+6eccae7d65,22.0.1-7-gba73697+7e58257bcf,22.0.1-8-g903eb1c+d5b52a074f,master-g6e05de7fdc+bdf610cf3e,master-g99da0e417a+4b7a2a553d,w.2021.43
LSST Data Management Base Package
utils.cc
Go to the documentation of this file.
1 /*
2  * LSST Data Management System
3  * Copyright 2017 AURA/LSST.
4  *
5  * This product includes software developed by the
6  * LSST Project (http://www.lsst.org/).
7  *
8  * This program is free software: you can redistribute it and/or modify
9  * it under the terms of the GNU General Public License as published by
10  * the Free Software Foundation, either version 3 of the License, or
11  * (at your option) any later version.
12  *
13  * This program is distributed in the hope that it will be useful,
14  * but WITHOUT ANY WARRANTY; without even the implied warranty of
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16  * GNU General Public License for more details.
17  *
18  * You should have received a copy of the LSST License Statement and
19  * the GNU General Public License along with this program. If not,
20  * see <https://www.lsstcorp.org/LegalNotices/>.
21  */
22 
23 #include <pybind11/pybind11.h>
24 #include <pybind11/stl.h>
25 
26 #include "ndarray/pybind11.h"
27 
29 
30 namespace py = pybind11;
31 using namespace py::literals;
32 
33 namespace py = pybind11;
34 namespace lsst {
35 namespace afw {
36 namespace formatters {
37 namespace {
38 
39 PYBIND11_MODULE(utils, mod) {
40  mod.def("stringToBytes", stringToBytes);
41  mod.def("bytesToString", bytesToString);
42 }
43 
44 } // namespace
45 } // namespace formatters
46 } // namespace afw
47 } // namespace lsst
PYBIND11_MODULE(_cameraGeom, mod)
Definition: _cameraGeom.cc:38
ndarray::Array< std::uint8_t, 1, 1 > stringToBytes(std::string const &str)
Encode a std::string as a vector of uint8.
Definition: Utils.cc:161
std::string bytesToString(ndarray::Array< std::uint8_t const, 1, 1 > const &bytes)
Decode a std::string from a vector of uint8 returned by stringToBytes.
Definition: Utils.cc:172
A base class for image defects.