max_amplitude = int(maxdata-offset)
offset_meters = _base.convert_bits_to_meters(
output_axis.config, offset)
- bit_wavelength = _base.convert_meters_to_bits(
- output_axis.config, offset_meters + laser_wavelength
- ) - offset
- amplitude = 2*bit_wavelength
+ if laser_wavelength is None:
+ amplitude = 0.5*max_amplitude
+ else:
+ bit_wavelength = _base.convert_meters_to_bits(
+ output_axis.config, offset_meters + laser_wavelength
+ ) - offset
+ amplitude = 2*bit_wavelength
log_string = (
'generated amplitude for interference wiggle: %g'
% amplitude)