C+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ C C F F T S - General FFT program with optimisations for the IFPAN C multipulse schemes of chirped-pulse C and Balle-Flygare cavity spectroscopy C C+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ c c C This program was described in: - c Z.Kisiel, J.Kosarzewski, Acta Physica Polonica 131,311-317(2017) c which is recommended for citing the use of FFTS. c c C FFTS can read these types of files on input: c c 1/ Files converted from the multipulse traces averaged with the LeCroy 735 c oscilloscope and saved as .TRC files. These are to be first converted to c .FID files by using the program WF735. Each .FID is compatible with c the .SPE standard, but is accompanied by a .TRC.INF file containing information c about the oscilloscope waveform and pulsing parameters. c C 2/ Binary FID files in the .FFT standard where microwave multi-pulsing per C single gas pulse has been coadded. The FIDs can be: C (i) chirped pulse excitation files (multi Mpt files supported) C (ii) cavity FTMW files from single frequency conversion (typically to 20 MHz) C (iii) cavity FTMW files from double frequency conversion to zero IF (in this C case the display is treated as +ve sideband only) C C 3/ Two column ASCII FID files in (time,intensity) format, where time has to be C increasing in uniform increments. C This is the most general input option, but once in the FFT screen it is C recommended that the data is saved as a binary .FFT file since this is C a compact representation with 4-bytes used per point intensity, and little C additional overhead. C c 4/ .DAT files form the FTMW++ program of Jen-Uwe Grabow c C C On loading the .FID file the program first checks for the .TRC.INF file, C which should begin with a header similar to the examples further below C (the column of C's has been inserted at the beginning for use in this listing) c C+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ C C Version 27a.VIII.2023 ----- Zbigniew KISIEL ----- C C __________________________________________________ C | Institute of Physics, Polish Academy of Sciences | C | Al.Lotnikow 32/46, Warszawa, POLAND | C | kisiel@ifpan.edu.pl | C | http://info.ifpan.edu.pl/~kisiel/prospe.htm | C_________________________/-------------------------------------------------- C C C Modification history: C C 25.09.12: hacked out of FTMW_20 by knocking out all routines relating C to experiment C 19.02.13: more pruning and .CFG file C 22.02.13: drag-and-drop file input, binary input + many small bugs C 23.07.13: mods enforced by first chirped pulse spectra C 1.08.13: more chirped-pulse tweaks C 18.09.13: use of alternative FFT windowing functions C 27.09.13: sorting out input, output and display issues and FFT snippets C 9.10.13: incremental mods C 29.11.13: autoscaling and R around the chirp region C 2.12.13: solved n>0 problem and better interferogram display compression c 9.12.13: f-domain compression, incremental mods and debugging c 12.12.13: general sine wave subtraction and three types of input c 15.12.13: further debugging of display and output c 31.12.13: tweaks to ^V c 4.02.14: tweaking and debugging of the V option c 20.02.14: C option for inspection of the excitation part of the FID c 6.04.14: The '=' option prints also intensity information C 14.04.14: Major reworking of arrays so that all large ones are ALLOCATABLE C 15.04.14: The Am display scheme c 17.04.14: Many further incremental mods c 17.11.14: Introduction of FFTS.LOG file and incremental mods c 30.11.14: Subtraction of selected spurious peak with ^O + mods C 12.03.15: More debugging+small mods C 2.04.15: Many incremental mods+debugging: including pulse exclusion, comment at C the end of .TRC.INF, ^V blanking C 23.04.15: consistent display of mV amplitudes, more debugging C 13.05.15: debugging C 4.03.16: debugging ctrlP option + enhancements C 16.05.16: more tweaks C 27.01.17: better dynamic range of output and tidier naming of output filenames C 17.02.17: tidying up prior to public release C 28.09.18: units of time on ASCII input + much debugging of outputs C 22.01.20: debugging of RNREP flaw + enhancements C 24.01.20: option to read .DAT files from FTMW++ of J-U.Grabow C 11.06.20: mods to V option Y-scaling, Am mode + many other C 18.06.20: experimental ctrl K opion (only relevant for local use) C 2.07.20: mods to info saved in .FFT files C 10.07.20: option to center on frequency difference+chirp display mod C 28.09.20: graphics tweaks to avoid setting XP compatibility for Windows10 C 23.11.20: ctrl Z option for zeroing FID points C 24.03.22: debugging display and input issues C 14.04.22: automatic removal of predefined spurious constant amplitude components C 4.07.23: better compatibility with .FFT files from VKIEL + small mods C 25.08.23: n=6 tweak for WG-FTMW files, VS2015/IVF2016/W11 compatibility C C C///////////////////////////////////////////////////////////////////////////// c c Each .FID type waveform is to be accompanied by a .TRC.INF file c containing information on the scope waveform and on pulsing parameters. c The pulsing parameters are copied over from the PULSE2A.CFG file used by c the PULSE2A program, with examples given as below. c C c For supersonic chirped pulse operation with horns: c C================================================================================ CPulsing conditions: C================================================================================ C! C Total FID time (microseconds) = 1000.000 C Number of MW shots = 20 C Nozzle to first MW time, Tau.del (us) = 930.000 C Input PIN opening time, Tau.PINin (us) = 4.100 C Output PIN blocking, Tau.PINout (us) = 6.100 C Gas pulse spacing, IWAIT (ms) = 200 C! C Microwave centre frequency (MHz) = 7345.000 C ARB sweep range (MHz) = 100.000 -1120.0000000000 C C================================================================================ C C C For supersonic expansion operation with FP cavity (standard rectangular C pulse excitation): C C================================================================================ CPulsing conditions: C================================================================================ C! C Total FID time (microseconds) = 1000.000 C Number of MW shots = 8 C Nozzle to first MW time, Tau.del (us) = 1000.000 C Input PIN opening time, Tau.PINin (us) = 1.100 C Output PIN blocking, Tau.PINout (us) = 10.100 C Gas pulse spacing, IWAIT (ms) = 200 C! C Microwave centre frequency (MHz) = 11119.700 C +- ARB sweep and signed IF (MHz) = 1.000 -20.2780090000 C C================================================================================ C C C For room-temperature chirped pulse operation with FP cavity: C C================================================================================ CPulsing conditions: C================================================================================ C! C Total FID time (microseconds) = 5000.000 C Number of MW shots = 100 C Nozzle to first MW time, Tau.del (us) = 0.000 C Input PIN opening time, Tau.PINin (us) = 1.500 C Output PIN blocking, Tau.PINout (us) = 15.000 C Gas pulse spacing, IWAIT (ms) = 40 C! C Microwave centre frequency (MHz) = 12200.630 C ARB sweep range (MHz) = 1.000 -20.2780090000 C C================================================================================ C C C For room-temperature chirped pulse operation with FP cavity maximising C the duty cycle (55.5% in this case): C C================================================================================ CPulsing conditions: C================================================================================ C! C Total FID time (microseconds) = 200000.000 C Number of MW shots = 4000 C Nozzle to first MW time, Tau.del (us) = 100.000 C Input PIN opening time, Tau.PINin (us) = 1.100 C Output PIN blocking, Tau.PINout (us) = 10.100 C Gas pulse spacing, IWAIT (ms) = 360 C! C Microwave centre frequency (MHz) = 12162.720 C +- ARB sweep and signed IF (MHz) = 1.000 -20.2780090000 C C================================================================================ C C C When the program does not find such a .TRC.INF file then it will check C in the C:\FFT_CHIRPED directory for the FFTS.CFG file, which can look as follows C (leading C column inserted for this listing): C C!------------------------------------------------------------------------------ C! C! Multipulse compression options for FFTS C! C!----------------------------------------...................................... C! C Intermediate frequency /MHz: -20.278014 C number of microwave shots: 100 C Carrier frequency /MHz: 12200.630 C nskips: 100 C nskipe: 100 C! C!------------------------------------------------------------------------------ C C C///////////////////////////////////////////////////////////////////////////// C C----------------------------------------------------------------------------- C C O M P I L A T I O N: C----------------------------------------------------------------------------- C c NOTE: Since character casing wasn't important in MSF5 it is useful to ensure c case uniformity - (in VISUAL STUDIO) this is done by setting in c PROJECT SETTINGS->FORTRAN->FORTRAN LANGUAGE c Name interpretation = lower case this is equivalent to command line c option /names:lowercase c (this is actually the same option that is set in the c EXTERNAL PROCEDURES section) c c C This version compiles with Intel Visual Fortran 9.0 to 12.x, although C only the most recent Fortran version is used routinely. C Module names in USE statements have been changed from the Compaq DF names C (which still work) to IF names: C C DFLIB->IFQWIN, DFWIN->IFWIN, DFMT->IFMT, DFPORT->IFPORT C C 1. DFWINTY not necessary since USE IFWIN seems sufficient C 2. GETCHARQQ requires USE IFCORE instead of USE IFQWIN C 3. The USE of a module which USEs some IF modules eliminates the need to C specify those modules again in a given program segment c c C Compilation options for Intel Visual Fortran XE 2011: C C /nologo /arch:IA32 /fpscomp:filesfromcmd /warn:unused /Qsave C /names:uppercase /iface:cref /iface:mixed_str_len_arg C /module:"Debug/" /object:"Debug/" /traceback /ccdefault:fortran C /libs:qwin /c C C Linker options: C C /OUT:"Debug/ftmw_20.exe" /NOLOGO /MANIFEST:NO /SUBSYSTEM:WINDOWS C /MACHINE:IX86 kernel32.lib ieee_32m.lib C C Note that some compiler options have changed and the key ones are C in the 'External procedures' tag. ccdefault is in 'runtime' tag C C C Legacy Compilation options for Compaq Visual Fortran 6: C C /ccdefault:fortran /check:bounds /compile_only /debug:full C /fpscomp:filesfromcmd /iface:cref /libs:qwin /nologo /traceback C /warn:argument_checking /warn:nofileopt /module:"debug/" C /object:"debug/" /pdbfile:"debug/DF60.PDB" C C Linker options: C C kernel32.lib ieee_32m.lib /nologo /subsystem:windows /pdb:none C /machine:IX86 /out:"debug/ftmw.exe" C C C-------------------------------------------------------- C Migration to Visual Studio 2015 and Visual Fortran 2016 (Intel Parallel Studio XE Professional) C-------------------------------------------------------- C C In order to migrate a solution from IVF2011 make a suitable new work directory, copy to it C the latest .FOR file and the files: C .vfproj C .ico C .rc C .h C .sln C Compilation also compiles resources placing a .res file in the DEBUG directory. c C On kisiel4/W10 but with VS2015/IVF2016 it was necessary to amend the C linker->general->additional library directories to C c:\Program Files (x86)\Windows Kits\10\Lib\10.0.18362.0\um\x86\; C c:\Program Files (x86)\Microsoft Visual Studio 14.0\lib\ C C/////////////////////////////////////////////////////////////////////////////