ICEMEASURE
Jump to navigation
Jump to search
ICE module test routines (NextMidas Only)
<function> Function to perform ( BAND, CHAR, NPR, ... ) <out> Type 3000 output data file <in1> Type 1000/2000 scalar frequency domain input file This primitive will perform signal processing algorithms on waveforms received from an ICE module. The input data is assumed to be the magnitude of a transformed waveform. Passing in complex or time domain waveform will result in unexpected behavior. The valid functions are: BAND <out> <in1> <fs> <fbw> <thresh> Characterize a band-limited frequncy spectrum. Additional Arguments: fs - Sampling rate of the waveform (in Hertz) fbw - Fractional bandwidth the waveform occupies (perc. b.w.) thresh - Value for comparison (in dB) Outputs: Creates a type 3000 data file with the following sub-records: NF - Median Noise Floor value inside signal bandwidth (in dB) IN - Percentage of in-band bins above NF+thresh OUT - Percentage of out-of-band bins above NF+thresh Example: wave tmp1 shape=white firkais tmpfir band .5 .3 ,,, 10 fdfilter tmp1 tmpfir tmp2 fft/mag tmp2 ftmp2 icemeas band flist ftmp2 1 .3 3 list flist /bg fcalc fplot ftmp2 log 10 * plot fplot type=line CHAR <out> <in1> <fs> <fbw> <thresh> <freq1> Characterize a frequency band with one active signal. Additional Arguments: fs - Sampling rate of the waveform (in Hertz) fbw - Fractional bandwidth the waveform occupies (perc. b.w.) thresh - Value for comparison (in dB) freq1 - Frequency of the tone (in Hertz) Output: Creates a type 3000 data file with the following sub-records: SNR - Signal-to-Noise Ratio in dB SFDR - Spur-free dynamic range in dB NF - Median Noise Floor in dB (adjusted for FFT size) THRESH - Percentage of bins above NF+thresh SIG - Signal Amplitude in dB MAXSPUR - Max. Spur Amplitude in dB MAXSPURFREQ - Max. Spur Frequency Example: wave tmp freq=10e6 elem=128k delta=5e-9 fft/mag tmp ftmp 32k bh92 icemeas char flist ftmp 200e6 1 3 10e6 list flist /bg fcalc fplot ftmp log 10 * plot fplot type=line HARM <out> <in1> <fs> <thresh> <freq1> <freq2> <order> Characterize a frequency band with two active tones. Additional Arguments: fs - sampling rate of the waveform (in Hertz) thresh - Value for comparison (in dB) freq1 - Frequency of the 1st signal (in Hertz) freq2 - Frequency of the 2nd signal (in Hertz) order - Number of harmonics and intermods to consider Output: Creates a type 3000 data file with the following sub-records: SNR - Signal-to-Noise Ratio in dB S1S2 - Peak amplitude delta between the 2 signals in dB SFDR - Spur-free dynamic range in dB NF - Median Noise Floor in dB (adjusted for FFT size) THRESH - Percentage of bins above NF+thresh MAXSPUR - Max. spur amplitude in dB MAXSPURFREQ - Max. spur frequency in Hertz Optional subrecord (based upon order): HNF1FREQ - Nth order harmonic frequency from 1st signal in Hertz HNF1POW - Nth order harmonic power from 1st signal in dB HNF1DBC - Nth order harmonic power below carrier from 1st signal in dB INAFREQ - Nth order intermod 1 frequency in Hertz INAPOW - Nth order intermod 1 power in dB INADBC - Nth order intermod 1 power below carrier in dB Example: home fat ice %gentones tmp 100e6 128k 1 5k 4 5k 64 f1 f2 home restore fft/mag tmp ftmp 32k bh92 icemeas harm flist ftmp 100e6 6 f1 f2 2 list flist /bg fcalc fplot ftmp log 10 * plot fplot type=line MSE <out> <in1> <in2> <segments> Determine the mean squared error between two waveforms. One file should be a templated or 'clean' version of the waveform. Specify the number of (frequency) segments to partition the transformed waveform for increased resolution. This is particularly useful for 'noise-like' waveforms. Each (frequency) segment will get averaged together for comparison. Note, the two signals must have the same transform size (NFFT). Additional Arguments: in2 - Templated/ideal comparison signal segments - Number of frequency partitions Output: Creates a type 3000 data file with the following sub-records: AVERAGE - Average mean-squared error between two signals per segment WORST - Worst mean-squared error between signals (single sample) Example: wave twave1 elem=33000 amp=512 wave nwave elem=33000 shape=white fcalc twave2 twave1 nwave + thin twave1 mwave1 232 thin twave2 mwave2 ,, 32k fft/mag mwave1 fwave1 nfft=1k win=bh92 navg=10 fft/mag mwave2 fwave2 nfft=1k win=bh92 navg=10 icemeasure mse flist fwave1 fwave2 10 list flist NOISE <out> <in1> <fs> <fbw> <thresh> Characterize a noise filled frequency spectrum. Additional Arguments: fs - Sampling rate of the waveform (in Hertz) fbw - Fractional bandwidth the waveform occupies (perc. b.w.) thresh - Value for comparison (in dB) Output: Creates a type 3000 data file with the following sub-records: NF - Median Noise Floor with adjustment for FFT size (in dB) THRESH - Percentage of bins above NF+thresh MAXSPUR - Max. Spur Amplitude (in dB) MAXSPURFREQ - Max. Spur Frequnecy (in Herz) Example: calc xdel 1 1k / wave mwave elem=32k shape=white delta=xdel fft/mag mwave fwave nfft=1k win=bh92 navg=10 icemeasure noise flist fwave 1k .5 3 list flist /bg fcalc fplot fwave log 10 * plot fplot type=line NOTCH <out> <in1> <fs> <nbw> <fbw> Characterize the carrier suppression algorithm on the L-Band module. The input waveform is expected to be the frequency domain output of the L-Band tuner module. Note, use a small percentage (~2%) to catch if the algorithm is suppressing too much of the waveform. Additional Arguments: fs - Sampling rate of the waveform (in Hertz) nbw - Bandwidth of the notch (in Hertz) fbw - Fractional bandwidth the waveform occupies (perc. b.w.) Output: Creates a type 3000 data file with the following sub-records: MEDIAN - Median Signal Level across the bandwidth of interest (in dB) NOTCH - Median level of the Notch (in dB) TONE - Amplitude of the carrier leak-through (in dB) Example: set rate 1000000 set card PIC1 set flags "IOM1=LB2D|MUXCLK=P|MBITS=-16|RFOPTS=(DCS)/TC=OFF/ACQ/RCVR" set port TUNER1 picd/flags=force|^flags reset card pic create fileo ci 4m rate picd/flags=^flags/port=^port set card rffreq 900 picd/flags=^flags/port=^port set card rfbw 50 picd/replay=-2/port=^port/flags=^flags acquire card fileo fft/mag fileo ftmp 64k navg=10 win=bh92 icemeasure notch flist ftmp rate 4e3 .02 list flist NPR <out> <in1> <freq1> <bw1> <freq2> <bw2> <freqn> <bwn> Characterize a Noise Power Ratio test signal. This function will calculate the amplitude difference between the two passbands. It will also calculate the notch depth. Additional Arguments: freq1 - First passband starting offset (percentage) bw1 - First passband width (percentage) freq2 - Second passband starting offset (percentage) bw2 - Second passband width (percentage) freqn - Notch starting offset (percentage) bwn - Notch width (percentage) Output: Creates a type 3000 data file with the following sub-records: SIGNAL - Amplitude delta amplified spectra (in dB) NOTCH - Notch depth (in dB) Example: home fat ice %gennpr/cmplx ci_npr 10k 32k 100e6 .5 .3 .05 512 home restore fft/mag ci_npr fwave win=bh92 navg=10 icemeasure npr flist fwave .1 .4 .64 .24 .59 .02 list flist /bg fcalc fplot fwave log 10 * plot fplot type=line SONET <out> <in1> <in2> <skip2> <frame> <cor> <off> Look for correlations between two input files and determine BER Additional Arguments: in2 - Second input file skip2 - Number of samples to skip at the front end of 2nd input frame - Frame size of OC signal cor - Number of frames to correlate over off - Number of samples into the first input (in1) signal where correlation was found (output result) Output: Creates a type 3000 data file with the following sub-records: ERRORS - Number of errors PROC - Number of points processed BER - Bit Error Rate Example: home fat ice wave inp1 elem=16k shape=white amp=2k wave inp2 elem=64k shape=sin amp=4k mergefile inp2 inp1 icemeas sonet flist inp1 inp2 0 1k 64 off list flist /bg say "Found match ^off samples in" home restore UDP <out> <in1> <levels> Validate input ramp file Additional Arguments: levels - Amplitude scale (2^levels) Output: Creates a type 3000 data file with the following sub-records: MAXDELTA - Largest delta between samples ERRORS - Number of errors in file Example: home fat ice set levels 10 calc amp_ 2 levels ** calc freq_ 1 2 levels 1 + ** / wave mfile si 8k saw amp_ freq=^freq_ icemeas udp flist mfile levels list flist /bg home restore Switches: NONE Widgets: NONE See Also: ICEFAT, PIC, PICD