LSST Applications  21.0.0-131-g8cabc107+a69ba78d82,22.0.0+04ba422108,22.0.0+11a2aa21cd,22.0.0+304ef9150d,22.0.0+555561a960,22.0.0+64c1bc5aa5,22.0.0+7b3a3f865e,22.0.0+c6621b99e5,22.0.0+d3217bb6e3,22.0.0+f68d4e2320,22.0.1-1-g1b65d06+2b73cf3c80,22.0.1-1-g7058be7+1cf78af69b,22.0.1-1-g7dab645+500ce2b9ed,22.0.1-1-g8760c09+64c1bc5aa5,22.0.1-1-g949febb+64c1bc5aa5,22.0.1-1-ga324b9c+304ef9150d,22.0.1-1-ga86695c+f68d4e2320,22.0.1-1-gf9d8b05+04ba422108,22.0.1-10-g781e53d+66adffc818,22.0.1-10-gba590ab+e809fee73e,22.0.1-13-g00a9d746+721f44a764,22.0.1-13-g76f9b8d+f68d4e2320,22.0.1-18-g3db9cf4b+f395498f22,22.0.1-18-gb17765a+e9e2fc23a5,22.0.1-2-gcb770ba+65b32d44ce,22.0.1-22-gf1d71818e+4206820b0d,22.0.1-3-g7aa11f2+f68d4e2320,22.0.1-3-g8c1d971+f253ffa91f,22.0.1-3-g997b569+3720ea777b,22.0.1-4-g1930a60+6871d0c7f6,22.0.1-4-g5b7b756+6b209d634c,22.0.1-6-ga02864e+6871d0c7f6,22.0.1-7-g3402376+eb203fffe3,22.0.1-7-g65f59fa+912a8ccb80,master-gcc5351303a+555561a960,w.2021.31
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:162
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:173
A base class for image defects.