File: pyfunctions.h

package info (click to toggle)
aoflagger 3.4.0-4
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 8,960 kB
  • sloc: cpp: 83,076; python: 10,187; sh: 260; makefile: 178
file content (68 lines) | stat: -rw-r--r-- 2,927 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
#ifndef PY_FUNCTION_H
#define PY_FUNCTION_H

#include "../lua/data.h"

#include "../interface/aoflagger.h"

#include <pybind11/pybind11.h>
#include <pybind11/numpy.h>

namespace aoflagger_python {
pybind11::object get_flag_function();

void set_flag_function(PyObject* callable);

pybind11::list polarizations(const aoflagger_lua::Data* data);

pybind11::array_t<double> GetImageBuffer(const aoflagger::ImageSet* imageSet,
                                         size_t imageIndex);

void SetImageBuffer(aoflagger::ImageSet* imageSet, size_t imageIndex,
                    pybind11::array_t<double>& values);

pybind11::array_t<bool> GetBuffer(const aoflagger::FlagMask* flagMask);

void SetBuffer(aoflagger::FlagMask* flagMask, pybind11::array_t<bool>& values);

pybind11::object MakeImageSet1(aoflagger::AOFlagger* flagger, size_t width,
                               size_t height, size_t count);
pybind11::object MakeImageSet2(aoflagger::AOFlagger* flagger, size_t width,
                               size_t height, size_t count,
                               size_t widthCapacity);
pybind11::object MakeImageSet3(aoflagger::AOFlagger* flagger, size_t width,
                               size_t height, size_t count, float initialValue);
pybind11::object MakeImageSet4(aoflagger::AOFlagger* flagger, size_t width,
                               size_t height, size_t count, float initialValue,
                               size_t widthCapacity);

pybind11::object MakeFlagMask1(aoflagger::AOFlagger* flagger, size_t width,
                               size_t height);
pybind11::object MakeFlagMask2(aoflagger::AOFlagger* flagger, size_t width,
                               size_t height, bool initialValue);

pybind11::object FindStrategyFile1(aoflagger::AOFlagger* flagger,
                                   enum aoflagger::TelescopeId telescopeId);
pybind11::object FindStrategyFile2(aoflagger::AOFlagger* flagger,
                                   enum aoflagger::TelescopeId telescopeId,
                                   const char* scenario);

pybind11::object LoadStrategyFile(aoflagger::AOFlagger* flagger,
                                  const char* filename);

pybind11::object Run1(aoflagger::Strategy* strategy,
                      const aoflagger::ImageSet& input);
pybind11::object Run2(aoflagger::Strategy* strategy,
                      const aoflagger::ImageSet& input,
                      const aoflagger::FlagMask& existingFlags);

pybind11::object MakeQualityStatistics1(
    aoflagger::AOFlagger* flagger, pybind11::array_t<double>& scanTimes,
    pybind11::array_t<double>& channelFrequencies, size_t nPolarizations,
    bool computeHistograms);
pybind11::object MakeQualityStatistics2(
    aoflagger::AOFlagger* flagger, pybind11::array_t<double>& scanTimes,
    pybind11::array_t<double>& channelFrequencies, size_t nPolarizations);
};  // namespace aoflagger_python

#endif