# Define FFT waveforms grecord(aSub,"$(PREF):$(PLANE):$(VAR)_fft") { # Processing functions and other settings field(INAM,"fftInit") field(SNAM,"fftProcess") field(SCAN,"Passive") field(EFLG,"ALWAYS") # Time dependence field(FTA ,"FLOAT") field(NOA ,"$(NSLICES)") field(INPA,"$(PREF):$(PLANE):$(VAR)_wf CPP") field(TSEL,"$(PREF):$(PLANE):$(VAR)_wf.TIME") # Copy of the data field(FTVA,"FLOAT") field(NOVA,"$(NSLICES)") # Real part field(FTVB,"FLOAT") field(NOVB,"$(NFREQS)") # Imaginary part field(FTVC,"FLOAT") field(NOVC,"$(NFREQS)") } grecord(acalcout, "$(PREF):$(PLANE):$(VAR)_mag_calc") { field(SCAN, "Passive") field(CALC, "SQRT(BB^2+CC^2)/ARR($(NFREQS))") field(OCAL, "SQRT(BB^2+CC^2)/ARR($(NFREQS))") field(INBB, "$(PREF):$(PLANE):$(VAR)_fft.VALB CPP") field(INCC, "$(PREF):$(PLANE):$(VAR)_fft.VALC CPP") field(DOPT, "Use OCAL") field(OOPT, "Every Time") field(NELM, "$(NFREQS)") field(OUT , "$(PREF):$(PLANE):$(VAR)_mag PP") } grecord(acalcout, "$(PREF):$(PLANE):$(VAR)_phase_calc") { field(SCAN, "Passive") field(CALC, "R2D*ATAN2(CC,BB)") field(OCAL, "R2D*ATAN2(CC,BB)") field(INBB, "$(PREF):$(PLANE):$(VAR)_fft.VALB CPP") field(INCC, "$(PREF):$(PLANE):$(VAR)_fft.VALC CPP") field(DOPT, "Use OCAL") field(OOPT, "Every Time") field(NELM, "$(NFREQS)") field(OUT , "$(PREF):$(PLANE):$(VAR)_phase PP") } grecord(acalcout, "$(PREF):$(PLANE):$(VAR)_axis_calc") { field(SCAN, "1 second") field(CALC, "1") field(OCAL, "IX/ARR($(NFIFO)*A)") field(INPA, "$(PREF):$(PLANE):ComDwel") field(DOPT, "Use OCAL") field(OOPT, "Every Time") field(NELM, "$(NFREQS)") field(NUSE, "$(NFREQS)") field(OUT , "$(PREF):$(PLANE):$(VAR)_axis PP") } grecord(waveform, "$(PREF):$(PLANE):$(VAR)_mag") { field(SCAN, "Passive") field(NELM, "$(NFREQS)") field(LOPR, "1") field(HOPR, "$(NFREQS)") field(FTVL, "DOUBLE") } grecord(waveform, "$(PREF):$(PLANE):$(VAR)_phase") { field(SCAN, "Passive") field(NELM, "$(NFREQS)") field(LOPR, "1") field(HOPR, "$(NFREQS)") field(FTVL, "DOUBLE") } grecord(waveform, "$(PREF):$(PLANE):$(VAR)_axis") { field(SCAN, "Passive") field(NELM, "$(NFREQS)") field(LOPR, "1") field(HOPR, "$(NFREQS)") field(FTVL, "DOUBLE") } grecord(waveform, "$(PREF):$(PLANE):$(VAR)_axis_wf") { field(SCAN, "Passive") field(NELM, "$(NSLICES)") field(LOPR, "1") field(HOPR, "$(NSLICES)") field(FTVL, "DOUBLE") } grecord(acalcout, "$(PREF):$(PLANE):$(VAR)_axis_wf_calc") { field(SCAN, "1 second") field(CALC, "1") field(OCAL, "IX*ARR($(NFIFO)*A/$(NSLICES))") field(INPA, "$(PREF):$(PLANE):ComDwel") field(DOPT, "Use OCAL") field(OOPT, "Every Time") field(NELM, "$(NSLICES)") field(NUSE, "$(NSLICES)") field(OUT , "$(PREF):$(PLANE):$(VAR)_axis_wf PP") } grecord(acalcout, "$(PREF):$(PLANE):$(VAR)_rms_calc") { field(SCAN, "Passive") field(CALC, "STD(BB)") field(INBB, "$(PREF):$(PLANE):$(VAR)_wf CPP") field(DOPT, "Use CALC") field(OOPT, "Every Time") field(NELM, "$(NFREQS)") field(OUT , "$(PREF):$(PLANE):$(VAR)_rms PP" ) } grecord( ai, "$(PREF):$(PLANE):$(VAR)_rms" ) { field(SCAN, "Passive") field(PREC, "4") }