RTC Toolkit  1.0.0
lisaCamera.hpp
Go to the documentation of this file.
1 
12 #ifndef RTCTK_STANDALONETOOLS_RAWRECORDER_LIASCAMERA_HPP
13 #define RTCTK_STANDALONETOOLS_RAWRECORDER_LIASCAMERA_HPP
14 
15 #include "fitsConverterIf.hpp"
16 #include "packetCombiner.hpp"
17 #include <CCfits/Table.h>
18 #include <map>
19 #include <array>
20 #include <algorithm>
21 #include <boost/endian/conversion.hpp>
22 
28 std::valarray<uint16_t> ConvertToPixels(boost::endian::order order, const std::vector<uint8_t>& data);
29 
30 class LisaCamera : public FitsConverterIf {
31  public:
32  LisaCamera(const std::string& directory, const bool split_files);
33  virtual void WriteData(const PacketData& data) override;
34 
35  private:
39  void WriteImage(const CombinedFrames&);
40 
41  static constexpr size_t PACKET_SIZE = 3360;
42  static constexpr size_t FRAME_COUNT = 200;
43  static constexpr size_t PIXEL_WIDTH = 840;
44  static constexpr size_t PIXEL_HEIGHT = 800;
45 
46  CCfits::Table* m_table_handle;
47  uint64_t m_row;
48  PacketCombiner m_combiner;
49 };
50 
51 #endif // RTCTK_STANDALONETOOLS_RAWRECORDER_LIASCAMERA_HPP
fitsConverterIf.hpp
Fits converter Interface.
LisaCamera::WriteData
virtual void WriteData(const PacketData &data) override
Write data into the FITS file(s)
Definition: lisaCamera.cpp:55
CombinedFrames
Data about the combined packets of a single sample.
Definition: packetCombiner.hpp:160
LisaCamera
Definition: lisaCamera.hpp:30
ConvertToPixels
std::valarray< uint16_t > ConvertToPixels(boost::endian::order order, const std::vector< uint8_t > &data)
Function that converts bytes to 16bit pixels in the correct byte order.
Definition: lisaCamera.cpp:24
LisaCamera::LisaCamera
LisaCamera(const std::string &directory, const bool split_files)
Definition: lisaCamera.cpp:50
PacketCombiner
This class combines the packets of a sample.
Definition: packetCombiner.hpp:175
PacketData
Definition: fitsConverterIf.hpp:22
FitsConverterIf
Definition: fitsConverterIf.hpp:29
packetCombiner.hpp
Class that combines Frames of a sample.