cherab.phix.observer.thin_lens_ccd.ThinLensCCDArray#

class cherab.phix.observer.thin_lens_ccd.ThinLensCCDArray#

Bases: Observer2D

An ideal CCD-like imaging sensor that preferentially targets a thin lens circle.

The targetted CCD is a regular array of square pixels. Each pixel samples red, green and blue channels (behaves like a Foveon imaging sensor). The CCD sensor width is specified with the width parameter. The CCD height is calculated from the width and the number of vertical and horizontal pixels. The default width and sensor ratio approximates a 35mm camera sensor.

Each pixel will target the randomly sampled point inside the circle which is modeled as a thin lens. The lens radius is caluclated by the f-number and focal length. The number of samples is pixel_samples multipled by lens_samples, so total number of sampling rays is taken as a pixel_samples in Observer2D object.

Parameters:
  • pixels (tuple) – A tuple of pixel dimensions for the camera (default=(512, 512)).

  • width (float) – The CCD sensor x-width in metres (default=35mm).

  • focal_length (float) – The focal length in metres (default=10mm).

  • working_distance (float) – The working distance from lens to focus plane in metres (default=50.0cm).

  • f_number (float) – f-number (default=3.5).

  • lens_samples (int) – Number of samples to generate on the thin Lens (default=100).

  • per_pixel_samples (int) – Number of samples to generate per pixel (default=10). which is different from pixel_samples in Observer2D object. When you use ThinLensCCDArray, pixel_samples = per_pixel_samples x lens_samples (default=100 x 10).

  • pipelines (list) – The list of pipelines that will process the spectrum measured at each pixel by the camera (default= RGBPipeline2D).

  • **kwargs (Observer2D and _ObserverBase. properties, optional) – kwargs are used to specify properties like a parent, transform, pipelines, etc.

Methods

_generate_rays(ix, iy, template, ray_samples)

Generate a list of Rays that sample over the sensitivity of the pixel.

observe

Ask this Camera to Observe its world.

to

Returns an affine transform that, when applied to a vector or point, transforms the vector or point from the co-ordinate space of the calling node to the co-ordinate space of the target node.

to_local

Returns an affine transform from world space into this nodes local coordinate space.

to_root

Returns an affine transform from local space into the parent node's coordinate space.

Attributes

children

f_number

f-number which defines the lens radius with focal length.

focal_length

Focal length in metres.

frame_sampler

The FrameSampler2D class for this observer.

lens_radias

Lens Radius in metres.

lens_samples

The number of samples on lens.

max_wavelength

Upper wavelength bound for sampled spectral range.

meta

min_wavelength

Lower wavelength bound for sampled spectral range.

name

The name of this node.

parent

The parent of this node in the scenegraph.

per_pixel_samples

The number of samples to take per pixel.

pipelines

A list of pipelines to process the output spectra of these observations.

pixel_area

One pixel area in the CCD sensor

pixel_samples

The number of samples to take per pixel.

pixels

Tuple describing the pixel dimensions for this observer (nx, ny), i.e. (512, 512).

quiet

ray_extinction_min_depth

Minimum number of paths before russian roulette style ray extinction.

ray_extinction_prob

Probability of ray extinction after every material intersection.

ray_importance_sampling

ray_important_path_weight

Relative weight of important path sampling.

ray_max_depth

Maximum number of Ray paths before terminating Ray.

render_complete

render_engine

root

spectral_bins

The number of spectral samples over the wavelength range.

spectral_rays

The number of smaller sub-spectrum rays the full spectrum will be divided into.

transform

The transform for this node's coordinate system in relation to the parent node.

width

The CCD sensor x-width in metres.

working_distance

distance between the lens plane and focusing plane in metres.