Data AcQuisition And Real-Time AnalysisScope - Spectrum - Spectrogram - Signal Generator
Software for Windows
Science with your Sound Card!
Contact us about
Reading DDisk Files
When Daqarta opens a file, it looks at the number of samples per channel. Files longer than 1024 samples won't fit on a single screen, so file navigation features are required. These long files are referred to as DDisk files, regardless of their actual origin. Most .WAV files from non-Daqarta sources fall into this category.
The row of <<, <, >, >> file navigation buttons beneath the thin DDisk control dialog button will be enabled. Daqarta will show the first screen and allow you to move back and forth through the rest of the file using these buttons or the keyboard equivalents: The (unshifted) <> keys or buttons move by one sample at a time. The shifted <> keys or the << or >> buttons move by 512 samples.
You can also use the ALT+<> keys to move by the user-adjustable Read Step Size.
Home moves to the start of the file, and End moves to the last 1024 samples in the file; the end of the file is thus the last sample used to create the display.
In Spectrogram or Pitch Track (Sgram/PT) modes, the (unshifted) <> keys or buttons move by one pixel column at a time, which is the Read Step Size. The shifted <> keys or the << or >> buttons move by 512 columns, or one screen. ALT moves by Read Step Size columns, which is Read Step Size squared samples. Home starts the spectrogram at the start of the file, while End starts the spectrogram such that the end of the file is at the right end of the trace area (assuming the file is long enough to fill at least one screen at the current Read Step Size).
A position readout will appear below the right end of the trace. This shows the file position of the first sample of the 1024 samples used to create the display. Note that even though the readout is at the right end of the display area, it is showing the file position of the left end of the display.
You can directly enter a value and the display will jump to that file position.
The file position readout units default to Samples but can be changed to Bytes, Seconds, HH:MM:SS elapsed time, or Local or UTC file time format by toggling the units button, by hitting ALT+SHIFT+D, or by using the Units buttons in the DDisk Controls dialog.
The Pause button will be activated when the file is opened, but unlike for single-screen files it will not be disabled. You can unPause, and the file will appear to "run" as though the signals were live. (This will not produce any sound.) The position readout will show the current file position.
You can Trigger the unPaused display using any channel as the Trigger Source; you can use any trigger mode except Gen Sync. In particular, you can use Single triggering to advance through the file to each trigger event, which can be very useful if they are separated by long periods of uninteresting low-level activity.
Also unlike single-screen files, the Averager is enabled; you can create synchronous waveform averages just as for live data. However, you will need a stable trigger source since there is no Gen Sync here. If the file was created with Daqarta, all channels from the original session will appear in the data, including Generator outputs. If these include a stimulus waveform suitable for use as a trigger, and your card has good full-duplex performance, you can use that channel directly. Otherwise, see the Full-Duplex Techniques section for a discussion of some alternative methods.
In general, no triggering is required for spectrum averages.
At the end of an average of file data, manual motion will cause the average to be abandoned. The Paused display will resume showing the instantaneous file data at the current file position.
If Trigger and Pause are toggled off, the display will free-run through the file. The speed is controlled by the Read Step Size set in the DDisk Controls dialog. If this is set lower than 1024 samples, each new screen will include some data from the prior display. Setting the value down to only a few samples allows slow scrolling of waveforms, or high-resolution spectrograms.
When viewing the spectrogram of a file, the file position is the start position of the spectrogram within the file. The end position is shown by a separate readout-only panel below that.
Note that in waveform mode with eXpand active, the view will be an expansion of a subset of the 1024 samples used to create an uneXpanded display; these might not include the actual first sample in the file when Home is used, nor the last when End is used. The position readout always shows the initial sample of the uneXpanded display.
The FilePosn macro uses the units (Bytes, Samples, or Seconds) set via the Units buttons in the DDisk Controls dialog. HH:MM:SS, Local Time, and UTC Time modes are treated as Seconds here. (See below to use Samples regardless of current units.)
FilePosn=1000 moves the start of the screen to an absolute point 1000 units into the file. However note that in Local and UTC Time modes this would set an absolute file time equivalent to 1000 seconds, which would be 00:16:40.000. If the file start time is later than that, the file start will be used instead.
FilePosn=+100 moves the start 100 units farther than the current position, and FilePosn=-100 moves 100 units earlier.
FilePosn=+s moves Read Step Size farther than the current position, and FilePosn=-s moves earlier.
To move to the start of the file, use FilePosn=0. (Note that in Local Time or UTC Time modes this will attempt to set an absolute file time of midnight, but as long as the start time is later than that it will move to the actual start time.)
To move to the end of the file, set a value larger than the largest possible file size. FilePosn=5G (5 Giga-units) is larger than the largest possible file size (4 Gigabytes) and is easy to enter.
FilePosn is always regarded as absolute in an IF statement. Since absolute position can not be negative, statements such as IF.FilePosn=-100 are unlikely to be useful. However, IF.FilePosn=+s may be used to determine if the current file position is one Read Step from the start.
The FilePosn macro does nothing if a DDisk file is not open.
To set a position directly in samples, regardless of the current units, use FilePosn#S. To read the current position in samples, use FilePosn?S.
Questions? Comments? Contact us!We respond to ALL inquiries, typically within 24 hrs.
Over 35 Years of Innovative Instrumentation
© Copyright 2007 - 2021 by Interstellar Research
All rights reserved