opening

Regular reports of my grabber activity and that of others, plus information on QRSS software, hardware and technique that comes my way

Thursday, June 14, 2012

Archiving QRSS Uploads with Dropbox

One of the more difficult parts of operating a grabber is making an online archive and keeping it purged of old files.  I like to keep 24 hours of grabs which should give everybody time to look for their signal while they were asleep or whatever.

Until recently I had been using Picasa for archiving my grabber files using the feature which uploads images from my SL folder to Picasa Web and keeps the two synced.  As files in the SL folder get automatically deleted by a program called Autodelete when they are over 24 hours old the sync feature deletes the same files in the Picasa Web folder.  As Google made changes to Picasa the syncing process stopped working  requiring me to delete old files manually every day....ugh!  So now I use Dropbox.

I've seen Dropbox mentioned favorably as a place to store images and files for others to view so decided to check it out.  They offer a free account of 2 GB which is much more than adequate for my QRSS archiving. The files at Dropbox are maintained in sync with the corresponding folder on your computer. After establishing an account I linked it to my SL folder and then changed the URL link in my html file at qsl.net to that of the Dropbox folder...easy as pie and works like a charm.  I also like the images better and the ease of scanning through them.  The syncing is spot on.

The Dropbox account provides two folders, one for images and one for files.  Within the image folder you can add other folders and I use two, one for the 10 minute grabs and one for the 6 hour grabs.  The other folder for files has come in handy also as a way to include files with the posts in this blog ...Google doesn't allow files attachment in their blogs.

Autodelete is a neat little program that deletes computer files older than x days in specified folders when run, where x is 1 day or greater.  I run it 4 times a day automatically via the Windows Task Scheduler.  If you haven't used TS it is in Assesories/System Tools menu.

For a week now the Dropbox/Autodelete process has been performing flawlessly leaving me with one more thing I don't have to forget to do.

A special thanks to Dave, N4FRE, for watching the archives for problems, of which there were a few.

de w4hbk

Monday, June 4, 2012

A Spectrum Lab Tutorial for QRSS

Spectrum Lab is a creation of Wolf, DL4YHF.  I can say that having delt with spectrum analysis professionally during my career as a physicist that SL is a magnificent tool.  Not only does it do a nearly perfect job of rendering the waterfall spectrum but it includes an interactive programming capability which allows the user to expand the waterfall capabilities manyfold.

Lately several guys have asked for my Spectrum Lab .usr settings to help in starting to use SL.  It is the King of the grabber programs but at a price...the learning curve is very steep.  This is due to the many features, so many that it's hard to figure out which ones you need for grabber work except by lengthy experimentation.  I've been using SL for about 10 years and still find things I didn't know plus many I do know about but haven't had time to learn to use yet.

To get you started here are the .usr files for both the 10 minute and 6 Hour grabbers, plus comments on how to change the relevant settings to customize SL for your way.  Place these files in the "Configurations" folder and note their names carefully since this folder comes with many other .usr files.

After you run SL for the first time click on the "Quick Settings" tab at the top then "Load & Create User def'd entries...".  Increment to Menu Nr 1  then click on "Import", find the .usr file, open it and click on  Done.

Next:
1.  Click on Start/Stop at the top and then "Start Sound Thread"
2.  Click on "Options" then "Audio I/O" and select your sound card then the "CTRL" button to set the level so that the the noise is at the bottom of the amplitude scale on the right.

At this point your SL should work just like mine.  Once everything seems to be working it's a good idea to save this configuration in the "Quick Settings" window with a slightly diff name to distinguish it from the .usr file I provided so you can come back to it in the event things get all screwed up from experimenting.

The only other things relevant to a grabber are:

1. Options:  FFT, Audio I/O and Spectrum Display Settings Parts 1 and 2.
2. View/Windows: Controls on Left Side
------------------------------------------------------------------------------------------------
SL FFT Screen

Proper use of the FFT screen requires some knowledge of FFT which can be pretty complicated.  The FFT Input Size essentially determines the spectral resolution and I've found that 65536 is the max usable for a 10 minute QRSS screen.  If you try a higher number for greater resolution it will be necessary to slow the scan rate down or else the image will become blurry due to longer response time.  If you want to use the other stuff in a meaningful way you'll just have to bite the bullet and read up on the Fast Fourier Transform.
------------------------------------------------------------------------------------------------


On the Audio I/O screen the only other things to adjust are the sample rate and it's calibration.  It is interactive with the FFT sample size and the optimum I've found is 11025.  Again, you need to know FFT theory to do it in a meaningful way.  Your sound card rate will differ from the 11025 and cause an error in the frequency scale on the display.  This can be corrected by measuring the apparent frequency of a known frequency and entering the data into the Sample Rate Calibrator.  I use the audio signal from WWV which is available for 500 and 600 Hz.

------------------------------------------------------------------------------------------------

On the Spectrum Display, Part 1 the main adjustment is the Waterfall Scroll Interval.  700 mSec is just right for a 10 minute grabber with amplitude graph and 20000 for my 6 hour grabber without amplitude graph.  I've found no reason to make a screen width "exact" in terms of the desired time coverage.  For example, having a 10 minute grabber go a minute or so longer works just fine even for stacking purposes.  Of the little boxes to check only Vertical Freq Axis, optimum waterfall avg, Amplitude Grid and Waterfall Time Grid Enabled seem to be important.  In the Show window you can select whether and where to have the amplitude grid and below that how wide to make the amplitude window.  The other parameters in Waterfall Time Grid allow choice of the time ticks along the bottom.

------------------------------------------------------------------------------------------------



On the Spectrum Display, Part 2 the main adjustment is the range, which interacts with the signal level into the sound card.  I find that a range from -90 to -30 dB is a good starting point and that the signal level should be adjusted to make the noise level at about -90 dB.  The Visual AGC is an interesting function and helps keep the display at a constant level.  The selections are off, slow, medium and fast plus a reference level.  If it's off you may find it necessary to adjust the rx audio or sound card level often.  The ref should be close to the low end of the range or about -84 dB when the lower end is -90.  Selecting "fast" suppresses most impulse noise like lightning and slow or medium shows such noise.  Sometimes it's good to see lightning or other clicks and pops from local switch gear but I've found that for stacking it's best to eliminate it since it accumulates in the stacked image.  Whatever the choice, it's mainly an appearance thing and doesn't actually improve the SNR, etc.  As for the other choices, I always select Grid in Graph to help in reading signal levels and occasionally Grid in Waterfall (dotted) to help in reading frequencies in the waterfall.  Finally, use the Frequency Scale Style to select either Classic (more detailed and larger) or Ruler (less cluttered and smaller) along with the Pixel Size to select it's size.

-------------------------------------------------------------------------------------------------



Finally, on the "Controls on Left" under View/Windows you will find the adjustments for total spectral range and the colors, intensity and contrast of the display.  For an offset of 0 enter the desired audio frequency range (min & max).  I use 1300 Hz as the center of the QRSS band in question and go 100 Hz above and below this.  Thus the Min and Max frequencies are 1200 and 1400 Hz, respectively. For example, with my TS-440 in USB mode and dial frequency of 10138.700 a signal at 10140.000 will produce an audio tone of 1300 Hz. That is, 10140.000 - 10138.700 = 1300 Hz.  Enter the dial frequency (Hz) in the Offset window to make the frequency scale read in absolute units of Hz.  To get the screen looking just the way you want it select a color scheme by left-clicking on the color palette then move the B slider to adjust Brightness and the C slider to adjust Contrast.

There you go.  I've mentioned everything I've found important and I think you can ignore all the rest.  Even so, when I look at how much I've just typed that's still a lot.  But KEEP IN MIND you should be able to use the .usr files I sent without needing to advance all the way up the learning curve and/or learn it as you feel necessary or have time.  Don't forget to read the Spectrum Help file for more detailed help.

de w4hbk




Uploading Files Using DOS Commands

                             
Several months ago I found a somewhat hidden feature in Spectrum Lab which uses DOS commands in a simple batch file to directly upload grabs. I learned to use DOS commands and batch files years ago before there was Windows and the Internet so that's probably why I wasn't aware of the ftp DOS commands.  I haven't seen anyone describe it for QRSS grabbers so I'll report my experiences with it.

The programming consists of a few lines of code within SL and a few lines in a special file in the root directory,C:\.  Once it's working there's no need for a separate program such as Argo Uploader and it starts working as soon as SL is switched on.

Here's the two lines that go in the Periodic Actions page in SL:
-------------------------------------------
capture("C:\\ftp_upload\\SL1.jpg")
exec ("c:\\ftp_upload\\ftp_up.bat SL1.jpg")
-------------------------------------------
The first line makes the grab and stores it in the special folder in the root directory and the second line causes the batch file with the upload instructions to be executed and upload the file to my page at qsl.net.

The batch file and associated files are located in the folder c:\ftp_upload which contains the following files:

ftp_up.bat
ftpcmd.txt
ftplog.txt
SL1.jpg

Here's what the batch file, ftp_up.bat, looks like:
----------------------------------------
cd \ftp_upload

>> ftpcmd.txt echo USER user password

>> ftpcmd.txt echo binary

>> ftpcmd.txt echo put SL1.jpg

>> ftpcmd.txt echo disconnect

>> ftpcmd.txt ECHO bye

FTP  -n -s:ftpcmd.txt ftp.qsl.net > ftplog.txt

End
---------------------------------------

The files ftpcmd.txt and ftplog.txt are generated the first time the batch file runs so you don't have to worry about their content. SL1.jpg is the name of the grabbed image file that is expected by my page at qsl.net.  For the longer grabber it's 4Hr.jpg.

The first line in ftp_up.bat ensures we're in the directory with the file to be uploaded.  The other lines are standard DOS commands and the only thing you need to change is user and password in the next line and the ftp address of you web page in the next to last line.  Note that the USER in caps is part of the DOS ftp command and user is your username at your web site.  Otherwise it's not necessary to understand DOS command programming (which I barely do).

I actually have three versions of the batch uploader, one for each of my two grabbers and one to upload an "Off the Air" screen.  I simply name them ftp_upload1, 2 and 3. It's very versatile.

The only drawback to this method of uploading is that a small black cmd: screen pops up for a few seconds while it's uploading. If you find it annoying there's a way to suppress this screen but I'll save that procedure for a ps below.

Here is my Periodic Action Screen in Spectrum Lab:

Spectrum Lab Periodic Action Screen
The first line captures the screen for my storage folder and gives it a name like "SL04JUN12 1410z".
The second line captures it again with the name "SL1" just for upload purposes.
The third line executes the upload batch file.

DOS commands and batch files can be pretty tricky because of all the parameters and switches so if you have trouble I'll be glad to help.

de w4hbk

ps  How to suppress the black pop-up cmd: screen.

There is a Properties Box associated with the cmd: screen which can be invoked by right clicking on the bar at the top of the cmd: screen.  Since it stays on for only a few seconds it will be necessary to hit the "Pause" key to make it freeze so you have time to work, then "any key" to resume.  This doesn't actually suppress it but it reduces the size and moves it to a corner.  Change "Window Size" to 1 for both width and height and "Window Position" to move it to a corner.  As you change the numbers you'll see the changes in the "Window Preview".  It can actually be moved completely off screen by making one of the position numbers larger than the screen but I left mine as a tiny screen at the lower left so I'll be aware something is happening.  Maybe as I get more confident I'll move it totally off.