HORIBA C++ SDK
Library for HORIBA devices
Loading...
Searching...
No Matches
ccd.h
Go to the documentation of this file.
1#ifndef CCD_H
2#define CCD_H
3
6
7#include <any>
8#include <memory>
9#include <nlohmann/json.hpp>
10#include <stdexcept>
11#include <string>
12#include <unordered_map>
13#include <vector>
14
24class ChargeCoupledDevice final : public Device {
25 public:
32
45
46 enum class CleanCountMode : int {
47 NEVER = 0,
50 EACH = 3,
52 };
53
58
60 int id, std::shared_ptr<communication::Communicator> communicator);
61 ~ChargeCoupledDevice() override = default;
62
68 void open() noexcept(false) override;
69
75 void close() noexcept(false) override;
76
84 bool is_open() noexcept(false);
85
94 void restart() noexcept(false);
95
103 nlohmann::json get_configuration();
104
117 int get_gain_token() noexcept(false);
118
130 void set_gain(int gain_token) noexcept(false);
131
143 int get_speed_token() noexcept(false);
144
156 void set_speed(int speed_token) noexcept(false);
157
170 int get_parallel_speed_token() noexcept(false);
171
184 void set_parallel_speed(int parallel_speed_token) noexcept(false);
185
194 std::vector<int> get_fit_parameters() noexcept(false);
195
204
213 ChargeCoupledDevice::TimerResolution timer_resolution) noexcept(false);
214
232 int number_of_rois, AcquisitionFormat acquisition_format) noexcept(false);
233
242
251 void set_x_axis_conversion_type(XAxisConversionType conversion_type) noexcept(
252 false);
253
263 int get_acquisition_count() noexcept(false);
264
273 void set_acquisition_count(int count) noexcept(false);
274
283 std::pair<int, ChargeCoupledDevice::CleanCountMode>
284 get_clean_count() noexcept(false);
285
295 int count, ChargeCoupledDevice::CleanCountMode mode) noexcept(false);
296
305 int get_acquisition_data_size() noexcept(false);
306
314 double get_temperature() noexcept(false);
315
323 std::pair<int, int> get_chip_size() noexcept(false);
324
332 int get_exposure_time() noexcept(false);
333
341 void set_exposure_time(int exposure_time_ms) noexcept(false);
342
370 std::tuple<bool, int, int, int> get_trigger_input() noexcept(false);
371
395 void set_trigger_input(bool enabled, int address, int event,
396 int signal_type) noexcept(false);
397
424 std::tuple<bool, int, int, int> get_signal_output() noexcept(false);
425
448 void set_signal_output(bool enabled, int address, int event,
449 int signal_type) noexcept(false);
450
458 bool get_acquisition_ready() noexcept(false);
459
474 void set_acquisition_start(bool open_shutter) noexcept(false);
475
489 void set_region_of_interest(int roi_index = 1, int x_origin = 0,
490 int y_origin = 0, int x_size = 1024,
491 int y_size = 256, int x_bin = 1,
492 int y_bin = 256) noexcept(false);
493
518 std::any get_acquisition_data() noexcept(false);
519
527 bool get_acquisition_busy() noexcept(false);
528
534 void abort_acquisition() noexcept(false);
535
547 void set_center_wavelength(int monochromator_id,
548 double wavelength) noexcept(false);
549
569 std::vector<double> range_mode_center_wavelenghts(
570 int monochromator_id, double start_wavelength, double end_wavelength,
571 double pixel_overlap) noexcept(false);
572};
573} /* namespace horiba::devices::single_devices */
574#endif /* ifndef CCD_H */
void set_parallel_speed(int parallel_speed_token) noexcept(false)
Sets the parallel speed of the CCD.
int get_acquisition_data_size() noexcept(false)
Returns the size of the data from the CCD.
std::tuple< bool, int, int, int > get_trigger_input() noexcept(false)
This command is used to get the current setting of the input trigger.
std::tuple< bool, int, int, int > get_signal_output() noexcept(false)
This command is used to get the current setting of the signal output.
void set_gain(int gain_token) noexcept(false)
Sets the gain of the CCD.
nlohmann::json get_configuration()
Returns the configuration of the CCD.
void restart() noexcept(false)
Restarts the CCD.
void abort_acquisition() noexcept(false)
Stops the acquisition of the CCD.
void open() noexcept(false) override
Opens the device.
ChargeCoupledDevice(int id, std::shared_ptr< communication::Communicator > communicator)
int get_gain_token() noexcept(false)
Returns the gain token of the CCD.
void set_trigger_input(bool enabled, int address, int event, int signal_type) noexcept(false)
This command is used to enable or disable the trigger input.
std::vector< double > range_mode_center_wavelenghts(int monochromator_id, double start_wavelength, double end_wavelength, double pixel_overlap) noexcept(false)
Finds the center wavelength positions based on the input range and pixel overlap.
bool is_open() noexcept(false)
Checks if the connection to the CCD device is open.
void set_exposure_time(int exposure_time_ms) noexcept(false)
Sets the exposure time in milliseconds.
void set_center_wavelength(int monochromator_id, double wavelength) noexcept(false)
Sets the center wavelength value to be used in the grating equation.
void set_clean_count(int count, ChargeCoupledDevice::CleanCountMode mode) noexcept(false)
Sets the clean count mode of the CCD and the corresponding mode.
bool get_acquisition_ready() noexcept(false)
Returns true if the CCD is ready to acquire.
std::pair< int, ChargeCoupledDevice::CleanCountMode > get_clean_count() noexcept(false)
Gets the number of cleans to be performed prior to measurement.
void set_x_axis_conversion_type(XAxisConversionType conversion_type) noexcept(false)
Sets the x-axis pixel conversion type to be used when retrieving the acquisition data with thee.
bool get_acquisition_busy() noexcept(false)
Returns true if the CCD is busy with the acquisition.
void set_acquisition_format(int number_of_rois, AcquisitionFormat acquisition_format) noexcept(false)
Sets the number of ROIs (Regions of Interest) or areas and the acquisition format.
void set_signal_output(bool enabled, int address, int event, int signal_type) noexcept(false)
This command is used to enable or disable the signal output.
std::any get_acquisition_data() noexcept(false)
Returns the acquisition data of the CCD.
void set_acquisition_count(int count) noexcept(false)
Sets the number of acquisitions to be performed. The acquisition count is used to perform multiple ac...
void set_acquisition_start(bool open_shutter) noexcept(false)
Starts an acquisition that has been set up according to the previously defined acquisition parameters...
double get_temperature() noexcept(false)
Returns the chip temperature of the CCD.
void set_region_of_interest(int roi_index=1, int x_origin=0, int y_origin=0, int x_size=1024, int y_size=256, int x_bin=1, int y_bin=256) noexcept(false)
Sets the region of interest (ROI) of the CCD.
void close() noexcept(false) override
Closes the device.
int get_acquisition_count() noexcept(false)
Gets the number of acquisitions to be performed.
XAxisConversionType
CCD X axis converstion type.
Definition ccd.h:40
XAxisConversionType get_x_axis_conversion_type() noexcept(false)
Gets the conversion type of the x axis.
int get_exposure_time() noexcept(false)
Returns the exposure time in milliseconds.
std::vector< int > get_fit_parameters() noexcept(false)
Returns the fit parameters of the CCD.
int get_parallel_speed_token() noexcept(false)
Returns the parallel speed of the CCD.
void set_timer_resolution(ChargeCoupledDevice::TimerResolution timer_resolution) noexcept(false)
Sets the timer resolution of the CCD.
std::pair< int, int > get_chip_size() noexcept(false)
Gets the chip resolution of the CCD.
int get_speed_token() noexcept(false)
Returns the speed of the CCD.
ChargeCoupledDevice::TimerResolution get_timer_resolution() noexcept(false)
Returns the timer resolution of the CCD.
void set_speed(int speed_token) noexcept(false)
Sets the speed of the CCD.
Device(int id, std::shared_ptr< communication::Communicator > communicator)
Definition device_manager.h:7