aol_model Package

acoustics Module

The acoustics module provides the means to handle the acoustic wave involved in the acousto-optic interaction. An AOL associates an AcousticDrive object with each AOD object. When an optic ray (Ray object) is incident on the AOD, the AcousticDrive is called to generate the local acoustics, an Acoustics object. The Acoustics object is used in the xu_stroud_model module to handle the acousto-optic interaction.

class aol_model.acoustics.AcousticDrive(const, linear, quad=0, power=1, velocity=612.8834, ramp_time=None)

A class to hold the drive parameters for an AOD. An AOL associates an AcousticDrive object with each of its AODs. When an optic ray (Ray object) is incident on the AOD, the AcousticDrive is called to generate the local acoustics, an Acoustics object.

get_local_acoustics(time, ray_positions, base_ray_position, aod_direction)

Returns an Acoustics object to represent the local acoustic field at the point an optic ray is incident on an AOD.

static make_acoustic_drives(const, linear, quad=[0, 0, 0, 0], power=[1, 1, 1, 1], velocity=612.8834, ramp_time=None)

Generates four AcousticDrive objects at a time. The function is useful because and AOL has four AODs, and each AOD requires a corresponding AcousticDrive.

class aol_model.acoustics.Acoustics(frequency, power=1, velocity=612.8834)

A class to hold the acoustic properties relevant to the acousto-optic interaction. An Acoustics object is generated from an AcousticDrive object for each Ray incident on an AOD object. The Acoustics object is used in the xu_stroud_model module to handle the acousto-optic interaction.

aod Module

The aod module contains the Aod class, representing an AOD.

class aol_model.aod.Aod(normal, relative_ac_dir, transducer_height, transducer_width, crystal_thickness, transducer_efficiency_func=<function <lambda>>)

The Aod class represents an AOD. An Aod object can be used alone to simulate a single AOD or in a group of four in an AolFull to simulate an AOL.

acoustic_direction

The AOD aperture is, as a first approximation, normal to [0,0,1] (the z-axis) and the relative_acoustic_direction is defined based on this. The actual acoustic_direction needs to be rotated according for the exact normal.

get_ray_direction_ord(rays)

Take account of relatively minor walkoff due to shape of indicatrix.

optic_axis

Included for future extensions to the model that allow rotated AOD designs. For now, the optic axis is taken to be aligned with the normal.

propagate_ray(rays, local_acoustics, order)

Take a bunch of optic rays through the AOD by first refracting into the AOD, then diffracting acousto-optically, propagating through the AOD and finally refracting out.

refract_in(rays)

Refract an optic ray into the AOD.

refract_out(rays)

Refract an optic ray out of the AOD.

aod_visualisation Module

class aol_model.aod_visualisation.AodVisualisation(op_wavelength_vac, ac_dir_rel=[1.0, 0, -0.0], is_wide=True, order=-1, resolution=60, freq_bnds=(20, 60), deg_bnds=(0.5, 4.5))

Useful class for exploring AOD properties graphically.

plot_efficiency_angle_out(ac_power=1.5, deg=2.2)

Plot diffraction efficiency against acoustic frequency for fixed incidence angle.

plot_efficiency_freq(ac_power=1.5, deg=2.2)

Plot diffraction efficiency against acoustic frequency for fixed incidence angle.

plot_efficiency_freq_max(ac_power=1.5)

Plot maximum diffraction efficiency for any incidence angle against acoustic frequency.

plot_efficiency_freq_max__power_varies_with_wavelength(deg=1.95, power_wavelen=[(1.5, 8e-07), (1.5, 9.2e-07), (1.5, 1.03e-06), (2.2, 9.2e-07)])

Plot maximum diffraction efficiency against acoustic power for fixed acoustic frequency and incidence angle.

plot_efficiency_freq_max_second_order(ac_power=1.5)

Plot maximum diffraction efficiency for any incidence angle against acoustic frequency.

plot_efficiency_power(ac_mhz=40)

Plot maximum diffraction efficiency for any incidence angle against acoustic power for fixed acoustic frequency.

plot_efficiency_xangle(ac_power=1.5, ac_mhz=39)

Plot diffraction efficiency against incidence angle for fixed acoustic frequency.

plot_efficiency_xangle_freq(ac_power=1.5)

Plot diffraction efficiency against incidence angle and acoustic frequency.

plot_efficiency_xangle_freq_second_order_noise(ac_power=1.5)

Plot diffraction efficiency against incidence angle and acoustic frequency.

plot_efficiency_xangle_yangle(freq, ac_power=1.5)

Plot diffraction efficiency against incidence angle and the orthogonal incidence angle.

plot_mismatch_angle_freq(ac_power=1.5)

Plot wavevector mismatch between incident optic wavevector, acoustic wavevector and diffracted optic wavevector against incidence angle and acoustic frequency.

plot_mismatch_xangle(ac_power=1.5, freq=39)

Plot diffraction efficiency against acoustic frequency for fixed incidence angle.

plot_xangleout_xangle_freq(ac_power=1.5)

Plot diffracted angle against incidence angle and the acoustic frequency.

plot_xangleout_xangle_yangle(ac_power=1.5)

Plot diffracted angle against incidence angle and the orthogonal incidence angle.

aol_drive Module

The aol_drive module handles the calculation of drive parameters for an AOL.

aol_model.aol_drive.calculate_drive_freq_4(order, op_wavelength, ac_velocity, aod_spacing, crystal_thickness, base_freq, pair_deflection_ratio, focus_position, focus_velocity)

The top level function for calculating drive frequencies. The centre frequencies are calculated first (const) before linear chirps. The quadratic chirps have not been implemented.

aol_model.aol_drive.find_constant(order, op_wavelength, ac_velocity, spacing, base_freq, pair_deflection_ratio, xy_deflection)

Calculate the centre frequency for each of the four AODs.

aol_model.aol_drive.find_linear(order, op_wavelength, ac_velocity, spacing, base_freq, pair_deflection_ratio, xy_focus_velocity)

Calculate the linear chirps for each of the four AODs.

aol_model.aol_drive.get_reduced_spacings(crystal_thickness, spacing)

Account for the thickness of the crystals. The higher refractive index causes a lower curvature. The adjustments are made to ensure the correct axial focal position but the orientation of the crystals away from the z-axis will lead to some displacement from the desired lateral focal position.

aol_full Module

class aol_model.aol_full.AolFull(aods, aod_spacing, acoustic_drives, order, op_wavelength)

The full AOL model. Can take a list of rays and propagate them through the AolFull. The ray energies and positions can be examined to evaluate the AOL’s performance.

static create_aol(aods, aod_spacing, order, op_wavelength, base_freq, pair_deflection_ratio, focus_position, focus_velocity, ac_power=[1, 1, 1, 1], ac_velocity=612.8834, ramp_time=30000000.0)

Helper method to create the AOL with AODs and drive attributes.

plot_ray_through_aol(rays, time, distance)

Method to take a list of rays and plot their path through the AOL to a given distance past it. Ray states are unchanged.

propagate_to_distance_past_aol(rays, time, distance=0)

Method to take a list of rays, propagate them through the AOL and then a given distance further. Ray states are changed.

aol_simple Module

class aol_model.aol_simple.AolSimple(num_of_aods, order, aod_spacing, acoustic_drives, base_ray_positions=array([[ 0., 0.], [ 0., 0.], [ 0., 0.], [ 0., 0.]]), aod_directions=[[1, 0, 0], [0, 1, 0], [-1, 0, 0], [0, -1, 0]])

Simplified AOL that treats AODs as thin and uses lambda*F/V to calculate deflection angles. Cannot calculate efficiencies. Useful for calculating the AOD positions in the AolFull. Can work with ray or ray_paraxial.

static create_aol_from_drive(num_of_aods, order, aod_spacing, const, linear, op_wavelength)

Helper method to create the AOL with drive attributes.

find_base_ray_positions(op_wavelength)

Calculate the AOD positions for an AolFull.

plot_ray_through_aol(ray, time, distance)

Method to take a list of rays and plot their path through the AOL to a given distance past it. Ray states are unchanged.

propagate_to_distance_past_aol(ray, time, distance=0)

Method to take a list of rays, propagate them through the AOL and then a given distance further. Ray states are changed.

error_utils Module

memoize Module

class aol_model.memoize.memoized(func)

Decorator. Caches a function’s return value each time it is called. If called later with the same arguments, the cached value is returned (not reevaluated).

optically_uniaxial Module

A module providing functions useful when dealing with a uniaxial crystal, possibly with optical activity.

aol_model.optically_uniaxial.calc_refractive_indices(angles, relative_impermeability_eigenvals, activity_vector)

Calculate the refractive indices of a uniaxial crystal. Returns tuple: (n_extraordinary, n_ordinary).

aol_model.optically_uniaxial.get_imperm_properties(angles, relative_impermeability_eigenvals, activity_vector)

Calculate relative impermeability properties of a uniaxial crystal needed to calculate the refractive indices.

optimise_aol Module

The optimise_aol module is useful to calculate the correct orientation of each AOD in an AOL.

class aol_model.optimise_aol.OptParams(start, stop)

A class used to hold optimisation parameters.

aol_model.optimise_aol.calculate_efficiency(aol, after_nth_aod, op_wavelength=9.09e-07)

Calculate the efficiency of the AOL up to and including the (after_nth_aod) AOD.

aol_model.optimise_aol.optimise_nth_aod_by_hand(aod_num, aol)

Calculate the optimal AOD angle and corresponding efficiency by searching along a line for the given aol_num. The ends of the line are taken as two separate console inputs and are both specified as [x_angle, y_angle]. Both pairs of [x_angle, y_angle] should be read off a plot produced by plot_region. The return value must be copied into the set_up_utils to be used as the AOD orientations

aol_model.optimise_aol.plot_region(aod_num, aol)

For the given aol_num, plots AOD diffraction efficiency over a range of angles in both x and y. The plot should be used to supply the inputs required by optimise_nth_aod_by_hand: click on two points lying either side of the peak such that the line between them crosses the peak. The x,y angles will be printed to the console.

plot_utils Module

pointing_efficiency Module

aol_model.pointing_efficiency.plot_fov_lines(focal_lengths, pdr)

Plot field of view across y_angle=0 for a list of focal lengths and a fixed pair deflection ratio.

aol_model.pointing_efficiency.plot_fov_surf(focal_length, pdr)

Plot field of view over a surface of solid angle (x_angle and y_angle) for a single focal length and a fixed pair deflection ratio.

ray Module

class aol_model.ray.Ray(position, wavevector_unit, wavelength, energy=1)

A ray, free from paraxial assumptions.

propagate_free_space_z(distance)

Move ray a given distance in the z-direction. Used only in AolSimple.

propagate_from_plane_to_plane(plane_z_separation, normal_to_first, normal_to_second)

Move ray from one plane to the next. Useful for moving between AOD surfaces in AolFull.

ray_paraxial Module

class aol_model.ray_paraxial.RayParaxial(position, wavevector_unit, wavelength, energy=1)

A simplified ray whose angle to [0,0,1] (z-axis) is assumed to be small.

propagate_free_space_z(distance)

Move the ray in the direction of its wavevector such that it travels a given distance in z.

set_up_utils Module

Helper functions to create rays, AODs, and AOLs.

aol_model.set_up_utils.get_ray_bundle(op_wavelength, width=0.015)

Create a grid of rays. Useful for passing into an Aol instance.

aol_model.set_up_utils.make_aod_narrow(orientation, ac_dir)

Create an Aod instance with a 1.2mm transducer.

aol_model.set_up_utils.make_aod_wide(orientation, ac_dir)

Create an Aod instance with a 3.3mm transducer.

aol_model.set_up_utils.set_up_aol(op_wavelength, order=-1, base_freq=39000000.0, focus_position=[0, 0, 1000000000000.0], focus_velocity=[0, 0, 0], pair_deflection_ratio=1, ac_power=[1.5, 1.5, 2, 2])

Create an AolFull instance complete with Aods.

aol_model.set_up_utils.set_up_aol6(op_wavelength, order=-1, base_freq=39000000.0, focus_position=[0, 0, 1000000000000.0], focus_velocity=[0, 0, 0], pair_deflection_ratio=0, ac_power=[1.5, 1.5, 1.5, 2, 2, 2])

Create a 6 AOD AolFull instance complete with Aods.

teo2 Module

The teo2 module contains functions for calculating the refractive indices of TeO2 (paratellurite) from the parameters given in Uchida 1971.

aol_model.teo2.calc_refractive_indices(angles, wavelength_vac)

Calculate the extraordinary and ordinary refractive indices at the given wavelength and angle to the optic axis. This is the most called function in the model so a look-up table is memoized for each group of wavelengths. The wavelength groups are given to the nearest 10nm.

vector_utils Module

xu_stroud_model Module

The heart of the model is the acousto-optic interaction solution described in Xu and Stroud. The xu_stroud_model module contains the functions to diffract an optic ray accordiong to the Xu and Stroud theory.

aol_model.xu_stroud_model.diffract_acousto_optically(aod, rays, local_acoustics, order, ext_to_ord=True)

The top level function handles the diffraction and sets out details including possible polarisations (ordinary or exrtaordinary -> ordinary or extraordinary) and whether second order diffraction is included.

aol_model.xu_stroud_model.diffract_by_wavevector_triangle(aod, wavevec_unit_in, wavevec_vac_mag_in, local_acoustics, order, ref_inds)

Wavevector matching between the incident optic, acoustic and diffracted optic is dealt with here. The diffracted wavevector including its direction is calculated here.

aol_model.xu_stroud_model.get_diffracted_wavevectors_and_efficiency(aod, wavevecs_in_unit, wavevecs_in_mag, local_acoustics, order, ref_inds)

The basic Xu and Stroud theory is implemented in this function.

aol_model.xu_stroud_model.get_efficiency(aod, wavevector_mismatches_mag, wavevecs_in_mag, wavevecs_in_unit, wavevecs_out_mag, wavevecs_out_unit, acoustics, ref_inds)

Based on the calculated diffracted wavevector, the diffraction efficiency can be calculated.

aol_model.xu_stroud_model.get_resultant_wavevectors(aod, wavevec_unit_in, wavevec_vac_mag_in, local_acoustics, order, ref_inds)

Calculate the sum of the incident optic and acoustic wavevectors.