HORIBA C++ SDK
Library for HORIBA devices
|
Represents a CCD camera. More...
#include <ccd.h>
Public Types | |
enum class | AcquisitionFormat : int { SPECTRA = 0 , IMAGE , CROP , FAST_KINETICS } |
enum class | XAxisConversionType : int { NONE = 0 , FROM_CCD_FIRMWARE , FROM_ICL_SETTINGS_INI } |
CCD X axis converstion type. More... | |
enum class | CleanCountMode : int { NEVER = 0 , FIRST_ONLY = 1 , BETWEEN_ONLY = 2 , EACH = 3 , MODE_UNKNOWN = 238 } |
enum class | TimerResolution : int { THOUSAND_MICROSECONDS = 0 , ONE_MICROSECOND } |
Public Member Functions | |
ChargeCoupledDevice (int id, std::shared_ptr< communication::Communicator > communicator) | |
~ChargeCoupledDevice () override=default | |
void | open () noexcept(false) override |
Opens the device. | |
void | close () noexcept(false) override |
Closes the device. | |
bool | is_open () noexcept(false) |
Checks if the connection to the CCD device is open. | |
void | restart () noexcept(false) |
Restarts the CCD. | |
nlohmann::json | get_configuration () |
Returns the configuration of the CCD. | |
int | get_gain_token () noexcept(false) |
Returns the gain token of the CCD. | |
void | set_gain (int gain_token) noexcept(false) |
Sets the gain of the CCD. | |
int | get_speed_token () noexcept(false) |
Returns the speed of the CCD. | |
void | set_speed (int speed_token) noexcept(false) |
Sets the speed of the CCD. | |
int | get_parallel_speed_token () noexcept(false) |
Returns the parallel speed of the CCD. | |
void | set_parallel_speed (int parallel_speed_token) noexcept(false) |
Sets the parallel speed of the CCD. | |
std::vector< int > | get_fit_parameters () noexcept(false) |
Returns the fit parameters of the CCD. | |
ChargeCoupledDevice::TimerResolution | get_timer_resolution () noexcept(false) |
Returns the timer resolution of the CCD. | |
void | set_timer_resolution (ChargeCoupledDevice::TimerResolution timer_resolution) noexcept(false) |
Sets the timer resolution of the CCD. | |
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. | |
XAxisConversionType | get_x_axis_conversion_type () noexcept(false) |
Gets the conversion type of the x axis. | |
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. | |
int | get_acquisition_count () noexcept(false) |
Gets the number of acquisitions to be performed. | |
void | set_acquisition_count (int count) noexcept(false) |
Sets the number of acquisitions to be performed. The acquisition count is used to perform multiple acquisitions in a row. | |
std::pair< int, ChargeCoupledDevice::CleanCountMode > | get_clean_count () noexcept(false) |
Gets the number of cleans to be performed prior to measurement. | |
void | set_clean_count (int count, ChargeCoupledDevice::CleanCountMode mode) noexcept(false) |
Sets the clean count mode of the CCD and the corresponding mode. | |
int | get_acquisition_data_size () noexcept(false) |
Returns the size of the data from the CCD. | |
double | get_temperature () noexcept(false) |
Returns the chip temperature of the CCD. | |
std::pair< int, int > | get_chip_size () noexcept(false) |
Gets the chip resolution of the CCD. | |
int | get_exposure_time () noexcept(false) |
Returns the exposure time in milliseconds. | |
void | set_exposure_time (int exposure_time_ms) noexcept(false) |
Sets the exposure time in milliseconds. | |
std::tuple< bool, int, int, int > | get_trigger_input () noexcept(false) |
This command is used to get the current setting of the input trigger. | |
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::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_signal_output (bool enabled, int address, int event, int signal_type) noexcept(false) |
This command is used to enable or disable the signal output. | |
bool | get_acquisition_ready () noexcept(false) |
Returns true if the CCD is ready to acquire. | |
void | set_acquisition_start (bool open_shutter) noexcept(false) |
Starts an acquisition that has been set up according to the previously defined acquisition parameters. | |
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. | |
std::any | get_acquisition_data () noexcept(false) |
Returns the acquisition data of the CCD. | |
bool | get_acquisition_busy () noexcept(false) |
Returns true if the CCD is busy with the acquisition. | |
void | abort_acquisition () noexcept(false) |
Stops the acquisition of the CCD. | |
void | set_center_wavelength (int monochromator_id, double wavelength) noexcept(false) |
Sets the center wavelength value to be used in the grating equation. | |
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. | |
![]() | |
Device (int id, std::shared_ptr< communication::Communicator > communicator) | |
virtual | ~Device ()=default |
int | device_id () const |
Additional Inherited Members | |
![]() | |
communication::Response | execute_command (const communication::Command &command) |
Represents a CCD camera.
This class should not be created directly by the end user. Instead a DeviceManager should be used to access the detected CCDs on the system.
The cells of the CCD can be binned and summed up.
|
strong |
|
strong |
|
strong |
|
strong |
horiba::devices::single_devices::ChargeCoupledDevice::ChargeCoupledDevice | ( | int | id, |
std::shared_ptr< communication::Communicator > | communicator ) |
|
overridedefault |
void horiba::devices::single_devices::ChargeCoupledDevice::abort_acquisition | ( | ) |
Stops the acquisition of the CCD.
std::exception | When an error occurs on the device side. |
|
overridevirtual |
Closes the device.
std::runtime_error | when an error occurred on the device side |
Implements horiba::devices::single_devices::Device.
bool horiba::devices::single_devices::ChargeCoupledDevice::get_acquisition_busy | ( | ) |
Returns true if the CCD is busy with the acquisition.
std::exception | When an error occurs on the device side. |
int horiba::devices::single_devices::ChargeCoupledDevice::get_acquisition_count | ( | ) |
Gets the number of acquisitions to be performed.
The acquisition count is used to perform multiple acquisitions in a row.
std::exception | When an error occurs on the device side. |
std::any horiba::devices::single_devices::ChargeCoupledDevice::get_acquisition_data | ( | ) |
Returns the acquisition data of the CCD.
The acquisition data is a dictionary with the following keys:
std::exception | When an error occurs on the device side. |
int horiba::devices::single_devices::ChargeCoupledDevice::get_acquisition_data_size | ( | ) |
Returns the size of the data from the CCD.
std::exception | When an error occurs on the device side. |
bool horiba::devices::single_devices::ChargeCoupledDevice::get_acquisition_ready | ( | ) |
Returns true if the CCD is ready to acquire.
std::exception | When an error occurs on the device side. |
std::pair< int, int > horiba::devices::single_devices::ChargeCoupledDevice::get_chip_size | ( | ) |
Gets the chip resolution of the CCD.
std::exception | When an error occurs on the device side. |
std::pair< int, ChargeCoupledDevice::CleanCountMode > horiba::devices::single_devices::ChargeCoupledDevice::get_clean_count | ( | ) |
Gets the number of cleans to be performed prior to measurement.
std::exception | When an error occurs on the device side. |
nlohmann::json horiba::devices::single_devices::ChargeCoupledDevice::get_configuration | ( | ) |
Returns the configuration of the CCD.
std::runtime_error | when an error occurred on the device side |
int horiba::devices::single_devices::ChargeCoupledDevice::get_exposure_time | ( | ) |
Returns the exposure time in milliseconds.
std::exception | When an error occurs on the device side. |
std::vector< int > horiba::devices::single_devices::ChargeCoupledDevice::get_fit_parameters | ( | ) |
Returns the fit parameters of the CCD.
std::runtime_error | when an error occurred on the device side |
int horiba::devices::single_devices::ChargeCoupledDevice::get_gain_token | ( | ) |
Returns the gain token of the CCD.
Note: The CCD can have different sensors installed, which can have different gain values. This is why only the token to the gain is returned. You need to first check what gain values are available for the CCD using the get_configuration function.
std::runtime_error | when an error occurred on the device side |
int horiba::devices::single_devices::ChargeCoupledDevice::get_parallel_speed_token | ( | ) |
Returns the parallel speed of the CCD.
Note: The CCD can have different sensors installed, which can have different parallel speed values. Therefore you need to first check what parallel speed values are available for the CCD using the get_configuration function.
std::runtime_error | when an error occurred on the device side |
std::tuple< bool, int, int, int > horiba::devices::single_devices::ChargeCoupledDevice::get_signal_output | ( | ) |
This command is used to get the current setting of the signal output.
The address, event, and signalType parameters are used to define the signal based on the supported options of that particular CCD.
The supported signal options are retrieved using the get_configuration command, and begin with the “Signals” string contained in the configuration.
std::exception | When an error occurs on the device side. |
int horiba::devices::single_devices::ChargeCoupledDevice::get_speed_token | ( | ) |
Returns the speed of the CCD.
Note: The CCD can have different sensors installed, which can have different speed values. Therefore you need to first check what speed values are available for the CCD using the get_configuration function.
std::runtime_error | when an error occurred on the device side |
double horiba::devices::single_devices::ChargeCoupledDevice::get_temperature | ( | ) |
Returns the chip temperature of the CCD.
std::exception | When an error occurs on the device side. |
ChargeCoupledDevice::TimerResolution horiba::devices::single_devices::ChargeCoupledDevice::get_timer_resolution | ( | ) |
Returns the timer resolution of the CCD.
std::runtime_error | when an error occurred on the device side |
std::tuple< bool, int, int, int > horiba::devices::single_devices::ChargeCoupledDevice::get_trigger_input | ( | ) |
This command is used to get the current setting of the input trigger.
The address, event, and signalType parameters are used to define the input trigger based on the supported options of that particular CCD.
The supported trigger options are retrieved using the get_configuration function, and begin with the “Triggers” string contained in the configuration.
std::exception | When an error occurs on the device side. |
XAxisConversionType horiba::devices::single_devices::ChargeCoupledDevice::get_x_axis_conversion_type | ( | ) |
Gets the conversion type of the x axis.
std::runtime_error | when an error occurred on the device side |
bool horiba::devices::single_devices::ChargeCoupledDevice::is_open | ( | ) |
Checks if the connection to the CCD device is open.
std::runtime_error | when an error occurred on the device side |
|
overridevirtual |
Opens the device.
std::runtime_error | when an error occurred on the device side |
Reimplemented from horiba::devices::single_devices::Device.
std::vector< double > horiba::devices::single_devices::ChargeCoupledDevice::range_mode_center_wavelenghts | ( | int | monochromator_id, |
double | start_wavelength, | ||
double | end_wavelength, | ||
double | pixel_overlap ) |
Finds the center wavelength positions based on the input range and pixel overlap.
The following commands are prerequisites and should be called prior to using this command:
monochromator_id | Monochromator ID that is used with this CCD |
start_wavelength | Start wavelength |
end_wavelength | End wavelength |
pixel_overlap | Overlap in pixels |
std::exception | When an error occurs on the device side. |
void horiba::devices::single_devices::ChargeCoupledDevice::restart | ( | ) |
Restarts the CCD.
Note that this function only works if the camera has been opened before. The connection to the camera stays open after the restart.
std::runtime_error | when an error occurred on the device side |
void horiba::devices::single_devices::ChargeCoupledDevice::set_acquisition_count | ( | int | count | ) |
Sets the number of acquisitions to be performed. The acquisition count is used to perform multiple acquisitions in a row.
count | Number of acquisitions to be performed. |
std::exception | When an error occurs on the device side. |
void horiba::devices::single_devices::ChargeCoupledDevice::set_acquisition_format | ( | int | number_of_rois, |
AcquisitionFormat | acquisition_format ) |
Sets the number of ROIs (Regions of Interest) or areas and the acquisition format.
After using this command to set the number of ROIs and format, the ccd_setRoi command should be used to define each ROI.
Note: The Crop (2) and Fast Kinetics (3) acquisition formats are not supported by every CCD.
number_of_rois | Number of regions of interest |
acquisition_format | Acquisition format |
std::runtime_error | when an error occurred on the device side |
void horiba::devices::single_devices::ChargeCoupledDevice::set_acquisition_start | ( | bool | open_shutter | ) |
Starts an acquisition that has been set up according to the previously defined acquisition parameters.
Note: To specify the acquisiton parameters please see set_region_of_interest, set_x_axis_conversion_type. If there are no acquisition parameters set at the time of acquisition it may result in no data being generated.
open_shutter | Whether the shutter of the camera should be open during the acquisition. |
std::exception | When an error occurs on the device side. |
void horiba::devices::single_devices::ChargeCoupledDevice::set_center_wavelength | ( | int | monochromator_id, |
double | wavelength ) |
Sets the center wavelength value to be used in the grating equation.
Used when X axis conversion is XAxisConversionType::FROM_ICL_SETTINGS_INI
monochromator_id | Monochromator ID that is used with this CCD |
wavelength | Center wavelength value in nm |
std::exception | When an error occurs on the device side. |
void horiba::devices::single_devices::ChargeCoupledDevice::set_clean_count | ( | int | count, |
ChargeCoupledDevice::CleanCountMode | mode ) |
Sets the clean count mode of the CCD and the corresponding mode.
count | Number of acquisitions to be performed. |
mode | Clean count mode |
std::exception | When an error occurs on the device side. |
void horiba::devices::single_devices::ChargeCoupledDevice::set_exposure_time | ( | int | exposure_time_ms | ) |
Sets the exposure time in milliseconds.
exposure_time_ms | Exposure time in milliseconds. |
std::exception | When an error occurs on the device side. |
void horiba::devices::single_devices::ChargeCoupledDevice::set_gain | ( | int | gain_token | ) |
Sets the gain of the CCD.
Note: The CCD can have different sensors installed, which can have different gain values. Therefore you need to first check what gain values are available for the CCD using the get_configuration function.
gain_token | Token of the gain to set |
std::runtime_error | when an error occurred on the device side |
void horiba::devices::single_devices::ChargeCoupledDevice::set_parallel_speed | ( | int | parallel_speed_token | ) |
Sets the parallel speed of the CCD.
Note: The CCD can have different sensors installed, which can have different parallel speed values. Therefore you need to first check what parallel speed values are available for the CCD using the get_configuration function.
parallel_speed_token | Token of the parallel speed to set |
std::runtime_error | when an error occurred on the device side |
void horiba::devices::single_devices::ChargeCoupledDevice::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 ) |
Sets the region of interest (ROI) of the CCD.
roi_index | Index of the region of interest. Defaults to 1. |
x_origin | X origin of the region of interest. Defaults to 0. |
y_origin | Y origin of the region of interest. Defaults to 0. |
x_size | X size of the region of interest. Defaults to 1024. |
y_size | Y size of the region of interest. Defaults to 256. |
x_bin | X bin of the region of interest. Defaults to 1. |
y_bin | Y bin of the region of interest. Defaults to 256. |
std::exception | When an error occurs on the device side. |
void horiba::devices::single_devices::ChargeCoupledDevice::set_signal_output | ( | bool | enabled, |
int | address, | ||
int | event, | ||
int | signal_type ) |
This command is used to enable or disable the signal output.
When enabling the signal output, the address, event, and signalType parameters are used to define the signal based on the supported options of that particular CCD.
The supported signal options are retrieved using the ccd_getConfig command, and begin with the “Signals” string contained in the configuration.
enabled | Enable or disable the signal output. Note: When disabling the signal output, the address, event, and signal_type parameters are ignored. |
address | Used to specify where the signal is located (e.g. 0 = Signal Output) |
event | Used to specify when the signal event should occur. (e.g. 3 = Shutter Open) |
signal_type | How the signal will cause the event. (e.g. 0 = TTL Active High) |
std::exception | When an error occurs on the device side. |
void horiba::devices::single_devices::ChargeCoupledDevice::set_speed | ( | int | speed_token | ) |
Sets the speed of the CCD.
Note: The CCD can have different sensors installed, which can have different speed values. Therefore you need to first check what speed values are available for the CCD using the get_configuration function.
speed_token | Token of the speed to set |
std::runtime_error | when an error occurred on the device side |
void horiba::devices::single_devices::ChargeCoupledDevice::set_timer_resolution | ( | ChargeCoupledDevice::TimerResolution | timer_resolution | ) |
Sets the timer resolution of the CCD.
timer_resolution | Timer resolution |
std::runtime_error | when an error occurred on the device side |
void horiba::devices::single_devices::ChargeCoupledDevice::set_trigger_input | ( | bool | enabled, |
int | address, | ||
int | event, | ||
int | signal_type ) |
This command is used to enable or disable the trigger input.
When enabling the trigger input, the address, event, and signalType parameters are used to define the input trigger based on the supported options of that particular CCD.
The supported trigger options are retrieved using the get_configuration function, and begin with the “Triggers” string contained in the configuration.
enabled | Enable or disable the trigger input. Note : When disabling the input trigger, the address, event, and signalType parameters are ignored. |
address | Used to specify where the trigger is located (e.g. 0 = Trigger Input) |
event | Used to specify when the trigger event should occur. (e.g .0 = Once - Start All) |
signal_type | Used to specify how the signal will cause the input trigger. (e.g .0 = TTL Falling Edge) |
std::exception | When an error occurs on the device side. |
|
noexcept |
Sets the x-axis pixel conversion type to be used when retrieving the acquisition data with thee.
conversion_type | Selected axis conversion type |
std::runtime_error | when an error occurred on the device side |