Data AcQuisition And Real-Time AnalysisScope - Spectrum - Spectrogram - Signal Generator
Software for Windows
Science with your Sound Card!
Contact us about
Save Y-log Trace as .CAL, .FRD, .CRV, or .LIM File
This File option is only available when there is a Y-log spectrum on the screen. Its purpose is to save a transducer frequency response .CAL or .FRD file for calibration of a User Line, or a custom .CRV file for compensating a particular stimulus spectrum. See Microphone And Speaker Calibration in the Applications section for more details.
When you click on this option, a dialog appears having controls marked Reference Baseline, OK, and Cancel. A single .CAL or .FRD file can hold data for only one channel, which is shown below 'Channel:' at the top of the dialog. This is also the channel shown on the Y axis, which you can change by toggling off unwanted channel display buttons.
A horizontal cursor also appears on the trace, passing through the average of all the spectrum values between the normal solid and dotted cursors. The Reference Baseline control defaults to this value.
You may adjust the solid and dotted cursors to define the region you want to become the baseline for the .CAL file. Alternatively, you can manually enter a baseline value and the horizontal cursor will move to match. (You can't drag the horizontal cursor vertically, however.)
The specific baseline value is not critical for subsequent Y-log spectrum work using the .CAL file, since when it is loaded into a User Line the complete response curve will be in effect. However, in waveform or linear spectrum modes there is no frequency-dependent calibration correction, so the baseline serves to define an approximate overall sensitivity in those modes.
If the response has obvious dips and peaks, it may be best to locate the baseline on the flattest portion of the spectrum, or perhaps on the flattest portion of the midrange or other particular region of interest.
When you are satisfied with the baseline, hit OK to go to a normal Windows file Save As dialog. The saved file will have a .CAL extension by default. To instead save in .FRD format, scroll the file type selector drop-down control to that selection. Otherwise, hit Cancel, [X], or the Escape key to abandon the save at any time.
A standard Daqarta .CAL or enhanced .FRD file will be created from the data. The 'Unit:' field will hold the name of whatever units were in effect when the file was created, defaulting to 'Volt' unless some other name was set in the User Line dialog and User Units was active. The baseline value will become the 'Sens:' reference value, and that value will be subtracted from all the spectrum dB values.
You should create the .CAL or .FRD file at the same sample rate that you will use it. If you use it at a lower rate than recorded, Daqarta will interpolate and the results may still be fairly good. If you use the file at a higher rate than recorded, Daqarta will attempt to linearly extrapolate the upper values from the highest two recorded values, with typically poor results.
The SaveCAL macro will only work when there is a Y-log spectrum on the screen. Also, it has no effect if any File Open or Save As dialog is already active.
SaveCAL= without a name will open the reference baseline dialog. After you hit OK there, the Save As dialog will open with no default file name.
SaveCAL="MyFile" will open the reference baseline as above, but when you hit OK the Save As dialog will have the default name set to MyFile. (Note that quotes are needed around all filenames in macros.) If you accept this by hitting Enter or the Save button in that dialog, Daqarta will assume you want to save a file named MyFile.CAL, or MyFile.FRD or MyFile.CRV or MyFile.LIM if you select one of those file types. If the file already exists, you will be prompted to replace it.
After either of the above commands, you may use IF.Posn?f=0 to see if the user has hit Cancel to exit the Save As dialog instead of choosing a file name. This allows your macro to exit gracefully or take other action.
A.SaveCAL="MyFile" will save MyFile.CAL as soon as you click OK to set the baseline, without any Save As dialog. Note that if the file already exists, it will be overwritten without any confirmation prompt.
A.SaveCAL="MyFile.FRD" will save MyFile.FRD as above, without an overwrite prompt. Similarly, A.SaveCAL="MyFile.CRV" will save MyFile.CRV and, A.SaveCAL="MyFile.LIM" will save MyFile.LIM without a prompt.
Similarly, if the Macro Variable Var0 holds a value of 12, then SaveCAL="Test"+Var0 will set a default file name of Test12. If you expect to use a large series of files, you can use SaveCAL="Test"+Var0(3) (for example) to set the decimal format to 3 integer places to get Test012. This will allow proper sorting by file name.
To save a file without opening the dialog or having to enter a reference value manually, you can set the reference ahead of time via CalSaveRef=-10 (or whatever dB value you choose). Then, for example, A.SaveCAL="MyFile.CRV" will save a Mirror Curve file automatically with no dialog or prompt.
See also File Menu
Questions? Comments? Contact us!We respond to ALL inquiries, typically within 24 hrs.
Over 35 Years of Innovative Instrumentation
© Copyright 2007 - 2023 by Interstellar Research
All rights reserved