Back: 6.16 Event Counter Functions Forward: 6.18 Monochromator Functions   FastBack: 6. Device Functions Up: 6. Device Functions FastForward: 7. Other Modules         Top: fsc2 Contents: Table of Contents Index: Index About: About This Document

6.17 CCD Camera Functions

Modules for the following CCD cameras exist:

rs_spec10

Roper Scientific Spec-10

oriel_matrix

Newport Oriel Matrix Sprectrometer

To use a module in an experiment put its name into the DEVICES section of the EDL script.

The module for the Roper Scientific Spec-10 requires the PVCAM library supplied by Roper Scientific to be installed. To to be able to work with the camera also the Linux device driver for the PCI board used for the communication with camera, also supplied by Roper Scientific, must be installed.

The Newport Oriel Matrix Sprectrometer is controlled via the USB bus and requires cthe libusb library (currently version 0.1).

Please note:

By setting two variables the configuration file for the Roper Scientific Spec-10 the orientation of the spectra or images taken by the camera can be influenced. They allow to mirror the spectra or images (i.e. exchanging right and left side) and/or turn images upside-down. Since some functions assume spectra to have an increasing wavelength or relative wavenumber axis (or decreasing absolute wavenumber axis) this option can be used to satisfy the requirement.

Please note also:

For the Roper Scientific Spec-10 at the start of the experiment the target temperature for the camera is set to the lowest possible value unless a target temperature is explicitely set using the function ccd_camera_temperature() (see below).

For the Roper Scientific Spec-10 the values for the region of interest, the binning values, the binning mode and the number of clear cycles are stored internally between experiments, so at the start of an experiment these values are set automatically to the ones they had in the previously run experiment.

List of CCD camera functions:

`ccd_camera_name()'
`ccd_camera_roi()'
`ccd_camera_binning()'
`ccd_camera_binning_method()'
`ccd_camera_exposure_time()'
`ccd_camera_clear_cycles()'
`ccd_camera_get_image()'
`ccd_camera_get_spectrum()'
`ccd_camera_temperature()'
`ccd_camera_pixel_size()'
`ccd_camera_pixel_area()'

Descriptions of CCD camera functions:

`ccd_camera_name()'

Returns a string with the name of the CCD camera being used.

`ccd_camera_roi()'

The function is only supported for the Roper Scientific Spec-10 and is used to query or set the region of interest (ROI) of the CCD chip to be used when fetching spectra or images from the camera. When no arguments are specified the function returns an array with 4 elements. Its first element is the x-coordinate of the lower left hand of the ROI, the second element the y-coordinate of the same point and the third and fourth element are the x- and y-coordonate of the right hand upper corner of the ROI. The coordinate of the lower left hand pixel of the CCD chip is 1, 1, the coordinates of the upper right hand corner are the width and height of the chip.

If there is an argument this must be either an array with 4 elements that specify the ROI as explained above or the string "ALL" to set the ROI to the complete area of the CCD chip. Further calls of the functions ccd_camera_get_image() and ccd_camera_get_spectrum() will return pictures or spectra from the ROI specified by the command. If one of the elements of the array specifying the ROI is 0 the corresponding setting for the ROI remains unchanged.

If the ROI sizes do not fit the binning factors (i.e. the width or height in pixels of the ROI isn't an integer multiple of the corresponding binning factor) the upper right hand corner of the ROI gets adjusted automatically when an image or spectrum is fetched from the camera by reducing the ROI - only when the width or height would drop below 1 the corresponing binning factors is reduced to guarantee that at least a single value for the direction gets returned.

The ROI setting is stored between experiments, so when a new experiment is started the ROI setting is identical to the one it had in a previously run experiment.

`ccd_camera_binning()'

The function is only supported for the Roper Scientific Spec-10 and allows to set or query the binning (i.e. the combining of several pixels) done by the camera. If called with no arguments the function returns an array with 2 elements. The first element is the number of pixels that get binned in the (horizontal) x-direction, the second element is the binning factor in (vertical) y-direction.

If the function is called with arguments the first argument must be an either an array with 2 elements or a string. If the argument is an array its first element is the number of pixels to be binned in x-direction, the second the number in y-direction. If the number is 0 the current setting of the binning value remains unchanged. Alternatively, if the first argument is a string it can be only the string "NONE" which tells the function to switch binning off.

If the number of pixels of the region of interest (ROI) in one of the directions isn't a integer multiple of the corresponding binning size the ROI is automatically reduced to an multiple of the binning size when the next image or spectrum is fetched from the camera. Only if the ROI size in a direction is smaller than the binning size the ROI size is expanded to the binning size, resulting in a width of one of the returned image or spectrum for this direction.

The function also accepts a second parameter, the binning method to be used. You can use either hardware binning, i.e. binning is done by the camera itself, or binning can be done by software, in which case the whole image or spectrum is fetched from the camera and the binning is done numerically on the received data). Wile hardware binning is faster (mainly due to the reduced time required for the transfer) in some cases it might lead to saturation effects when the sum of the values of all pixels combined during binning would be larger than 65536. In this case the value after binning would never exceed 65536.

The binning method argument must be either 0 or one of the strings "HARDWARE" or "HARD" for use of hardware binning or the number 1 or one of the strings "SOFTWARE" or "SOFT" for software binning.

The binning factors and method are stored between experiments, so when a new experiment is started the settings for the binnoing are identical to the one they had in a previously run experiment.

`ccd_camera_binning_method()'

This function is only supported for the Roper Scientific Spec-10 and lets you query or set the binning method to be used. You can use either hardware binning, i.e. binning is done by the camera itself, or binning can be done by the software, in which case the whole image or spectrum is fetched from the camera and the binning is done numerically on the received data). Wile hardware binning is faster (mainly due to the reduced time required for the transfer) in some cases it might lead to artifacts when the sum of the values of all pixels combined in binning would be larger than 65535. In this case the value after binning is always 65536, leading to an effect that looks like saturation of the region of the chip.

If called with no argument the function returns the number 0 when hardware binning is used and 1 for software binning.

To set the binning method you must specify either 0 or one of the strings "HARDWARE" or "HARD" for use of hardware binning or the number 1 or one of the strings "SOFTWARE" or "SOFT" for software binning.

The binning binning method is stored between experiments, so when a new experiment is started its settingis identical to the it had in a previously run experiment.

`ccd_camera_exposure_time()'

The function can be used to determine or set the exposure time used by the camera. If called without an argument the function returns the exposure time in seconds. If called with an argument, the exposure time in seconds, the exposure time is set. It must be between 1 us and one hour.

If no exposure time gets set a default value of 100 ms is used.

The function can only be used in the EXPERIMENT section of an EDL script.

`ccd_camera_clear_cycles()'

The function is only supported for the Roper Scientific Spec-10a and allows to determine or set the number of clear cycles of the CCD chip to be done before an exposure is started. If called without an argument the function returns the number of clear cycles. If an argument is passd to the function it must be a number between 0 and the maximum number of clear cycles (which is 7 for the Spec-10 camera). The default value of clear cycles is 1.

The number of clear cycles is stored between experiments, so when a new experiment is started its setting is identical to the it had in a previously run experiment.

The function can only be used in the EXPERIMENT section of an EDL script.

`ccd_camera_get_image()'

The function is only supported for the Roper Scientific Spec-10 and starts an exposure, fetches the resulting image from the camera and returns it to the EDL script as a 2-dimensional array. The size of the image depends on the setting of the region of interest (ROI) and the settings for binning. When no ROI or binning has been set the image returned is the whole area of the CCD chip.

The function can only be used in the EXPERIMENT section of an EDL script.

`ccd_camera_get_spectrum()'

The function starts an exposure, fetches the result from the camera and returns it as an 1-dimensionl array to the EDL script. The length of the array depends on the width of the region of interest (ROI) and the binning setting for the (horizontal) y-direction. All pixels of the ROI in the (vertical) y-direction are binned together.

The function can only be used in the EXPERIMENT section of an EDL script.

`ccd_camera_temperature()'

The function can be used to determine the current temperature of the CCD chip or to set a target temperature for the chip. If called without an argument the current temperature (in Kelvin) of the chip is returned. If called with an argument this must be the requested temperature in Kelvin. Please note that it may take quite some time until a target temperature is reached.

The function can only be used in the EXPERIMENT section of an EDL script.

`ccd_camera_pixel_size()'

The function is only supported for the Roper Scientific Spec-10, taking no arguments and returning the width of a pixel of the CCD chip.

`ccd_camera_pixel_area()'

The function accepts no arguments and returns an 1-dimensional array with two elements, where the first argument is the number of pixels of the CCD chip in the (horizontal) x-direction and the second element is the number of pixels in the (vertical) y-direction.


Back: 6.16 Event Counter Functions Forward: 6.18 Monochromator Functions   FastBack: 6. Device Functions Up: 6. Device Functions FastForward: 7. Other Modules

This document was generated by Jens Thoms Toerring on September 6, 2017 using texi2html 1.82.