pulse_demod.m
Interactive demodulation of a complex pulse waveform by a user-specified frequency. The in-phase and out-of-phase components are combined into in_phase+1i*out_phase, and the figure shows either the unwrapped phase of the demodulated waveform or the instantaneous frequency obtained by differentiating that phase over the midpoints of the time grid. The demodulation frequency is set either by typing into the entry field or by dragging the slider, whose window is a moving 100-step interval that recentres when the frequency is typed in or when the step size changes, and shifts when the thumb comes within ten steps of either end. The function blocks in uiwait until the save button is pressed or the figure is closed, and then returns the waveform that was on display.
Syntax
demod_pulse=pulse_demod(time_grid,in_phase,out_phase)
Parameters
time_grid - strictly increasing time grid, seconds
in_phase - in-phase pulse waveform component
out_phase - out-of-phase pulse waveform component
Outputs
demod_pulse - demodulated complex pulse waveform
Notes
The frequency entry field uses Hz. The GHz, MHz, kHz, and Hz buttons set the slider step size without changing the demodulation frequency. The phase and frequency buttons switch the plot between unwrapped phase in radians and instantaneous frequency in Hz. The sticky wrap button switches the phase plot into the [0,2*pi] interval. The slider range is a moving 100-step window in the selected units. The save button returns the current demodulated waveform and exits. The complex waveform in_phase+1i*out_phase is multiplied by exp(2*pi*1i*freq*time_grid).
See also
heterodyne.m, read_wave.m, bruker_write.m, pulse_shape.m, Kernel functions
Version 2.13, authors: Ilya Kuprov