Conventions

Code design and conventions

From a user's perspective the code provides 2 high-level functions to perform calculations of:

  1. Fixed orientation far-field cross-sections (extinction, absorption and scattering), for multiple wavelengths and incidence directions
  2. Orientation-averaged cross-sections (extinction, absorption and scattering) and associated circular dichroism spectra, using numerical cubature over the full solid angle

The high-level functions require at least 2 inputs:

  • A Cluster object, describing the geometry of the particle cluster
  • A Material object, describing the wavelength-dependent optical properties of the various media

Geometry description

Cluster is a structure comprising 4 fields,

  • positions, a vector of N particle positions stored as 3-vectors storing cartesian coordinates x,y,z

  • orientations, a vector of N particle orientations stored as quaternions (4 components, $\cos\phi/2; \sin\phi/2 \mathbf{v}$ with $\mathbf{v}$ the rotation axis). The quaternions are automatically converted into rotation matrices with the Rotations.jl package.

  • material, a string referencing the material for each particle; the corresponding dielectric functions are stored as a dictionary in the Material object

  • type, a string indicating whether the polarisability corresponds to a point dipole, or to a particle. For the former, a local-field correction needs to be applied to convert the polarisability into an effective one responding to macroscopic fields.

Material description

The Material structure contains two fields:

  • wavelengths, array-like wavelengths to use in the calculations
  • media, a dictionary containing:
    • the different dielectric functions, such as "Au" => epsAu
    • the refractive index of the embedding medium, stored under the name "medium" => (x -> 1.33)
    • for point dipoles, a wavelength-dependent polarisability function "alpha" => alpha_dye

High level functions

Fixed orientation cross-sections

Angular averaging and circular dichroism

Rotations

Angular averaging