[linrad] Re: MAP65 and Linrad Network

2007-06-22 Thread Leif Asbrink
Hi Joe,

 Yes, it should be possible to run everything on a single 
 fast computer with plenty of memory.  I have not yet 
 established that the necessary CPU-sharing during 
 time-critical parts of each program is handled adequately 
 for this to work without glitches.  Neither Linrad nor 
 Windows is a very good real-time O/S, and one must work 
 around their limitations in this area.
I do not think there would be any problems:-)

 Moreover, one will almost certainly want separate screens 
 for Linrad and MAP65 -- both of which generally use most or 
 all of a normal-size screen.
Yes, I agree - but those who have only one standard computer
should know it is possible - if it really is;-)


 For testing MAP65 when real signals are not available, and 
 anyway so that I can get 100% repeatable results, I solved 
 this problem in a slightly different way.  I saved some data 
 by using the Linrad S command during the ARRL EME contest 
 last November.  With a slightly modified Linrad I converted 
 the data to 16-bit TIMF2 format, and wrote it to a file.  A 
 simple program that I call plrs (for pseudo-Linrad send) 
 can read this file and multicast it in the same way that 
 Linrad would do, so that MAP65 can receive it.  The data 
 file, 11 minutes of original data, amounts to 507 MB.  After 
 compression with bzip2 it is 228 MB.  I will make the data 
 file available soon, together with plrs and MAP65, to anyone 
 who wants to participate in testing MAP65.
Hmmm, I would have liked a file that allows me to play with
Linrad on the data that are sent to MAP65. Presumably you have
a couple of spurs and perhaps other interesting interference
that MAP65 (or at least the waterfall graph) would benefit from
not getting. 

Surely, for MAP65 testing and development I agree that your
strategy is more convenient - but from my point of view the
original file is far more interesting

73  Leif / SM5BSZ

#
This message is sent to you because you are subscribed to
  the mailing list linrad@antennspecialisten.se.
To unsubscribe, E-mail to: [EMAIL PROTECTED]
To switch to the DIGEST mode, E-mail to [EMAIL PROTECTED]
To switch to the INDEX mode, E-mail to [EMAIL PROTECTED]
Send administrative queries to  [EMAIL PROTECTED]



[linrad] Re: MAP65 and Linrad Network

2007-06-22 Thread Joe Taylor

Hi Leif,

Moreover, one will almost certainly want separate screens 
for Linrad and MAP65 -- both of which generally use most or 
all of a normal-size screen.


Yes, I agree - but those who have only one standard computer
should know it is possible - if it really is;-)


When MAP65 is available, I will be sure to document how it 
can best be used, and what the hardware requirements will be.



Hmmm, I would have liked a file that allows me to play with
Linrad on the data that are sent to MAP65. Presumably you have
a couple of spurs and perhaps other interesting interference
that MAP65 (or at least the waterfall graph) would benefit from
not getting. 


This will not be a problem.  I have the original raw data 
file and have placed it at 
http://physics.princeton.edu/pulsar/K1JT/06_0744.raw.bz2


It is 263 MB in size.

One of the nuisances of using the original data file is that 
Linrad's raw data are not time-stamped.  As you know, JT65 
transmissions must start at the top of a UTC minute.  To use 
the raw data file effectively with MAP65 you will need to do 
something to ensure that the multicast packets contain times 
that are close to being correct with respect to the 
original time (modulo 60 seconds).



Surely, for MAP65 testing and development I agree that your
strategy is more convenient - but from my point of view the
original file is far more interesting


Yes.  It probably will be far more interesting, for you 
especially.  You will find plenty of birdies and other junk 
in the test file!!  See 
http://physics.princeton.edu/pulsar/K1JT/MAP65_1.JPG .


-- Joe, K1JT

#
This message is sent to you because you are subscribed to
 the mailing list linrad@antennspecialisten.se.
To unsubscribe, E-mail to: [EMAIL PROTECTED]
To switch to the DIGEST mode, E-mail to [EMAIL PROTECTED]
To switch to the INDEX mode, E-mail to [EMAIL PROTECTED]
Send administrative queries to  [EMAIL PROTECTED]



[linrad] Re: MAP65 and Linrad Network

2007-06-22 Thread Leif Asbrink
Hi Joe,

 I have the original raw data file and have placed it at 
 http://physics.princeton.edu/pulsar/K1JT/06_0744.raw.bz2
Excellent:-)

 One of the nuisances of using the original data file is that 
 Linrad's raw data are not time-stamped.  
Oooh! But they are:-) Your file is stamped 1163231107.413487 which
was the output of the routine current_time() at the start of
the recording.
 
double current_time(void)
{
struct timeval t;
gettimeofday(t,NULL);
return 0.01*t.tv_usec+t.tv_sec;
}

This is the time in seconds with six decimals since Epoch
and if you run Linrad on the file with a fast waterfall
you will see the time on the waterfall starting at 07.45.08

Unfortunately I have missed to put the correct time in the 
time variable of the network packets. Currently the time
is the time when data was read from the hard disk and not
when it was stored there. I will correct for the next version:-)

The 'S' file only has a single time stamp for when write was
started. With Delta 44 soundcards, the sampling rate is 
pretty accurately 96 kHz (96014 Hz with the card in this 
particular computer.) I think one can safely assume that
the error is well below 0.05% so in a 1 hour recording
the time error at the end should stay well below 2 seconds.

 As you know, JT65 
 transmissions must start at the top of a UTC minute.  To use 
 the raw data file effectively with MAP65 you will need to do 
 something to ensure that the multicast packets contain times 
 that are close to being correct with respect to the 
 original time (modulo 60 seconds).
OK. I hope that you have found the time to be correct when
receiving timf2 data from Linrad in real time.

  Surely, for MAP65 testing and development I agree that your
  strategy is more convenient - but from my point of view the
  original file is far more interesting
 
 Yes.  It probably will be far more interesting, for you 
 especially.  You will find plenty of birdies and other junk 
 in the test file!!  See 
 http://physics.princeton.edu/pulsar/K1JT/MAP65_1.JPG .
Fine!

I do not know how to interpret the MAP65 screen. The polarisation
data of AA1YN seems odd to me. They change very rapidly:
0746:  90
0748: 135
0750: 135
0752: 135
0754:   0
0756:  45

Which signal on the screen that has this behaviour is not obvious to me.
The processing screen says Freq 128 and DF=0 (or very close.)
When I look at the file, I find the weak signal at the center of the 
lower waterfall to start at 144.129823 and drift down to 144.129814.
That is a 1.818 Hz frequency shift as compared to the MAP65 screen???
There is some info Options in the upper waterfall, but that does not 
fit. The signal at 144.12982 is right hand circular in Linrad and it 
does not change polarisation during the 10 minutes.

The strong signal at -880 Hz in the lower waterfall is at 144.12894
in Linrad. This signal is elliptic, about 50% left hand. Polarisation
does not change with time on this signal either.

How do I compute the true frequency of the sync tone from the data 
in the MAP65 screen? 

73

Leif / SM5BSZ


#
This message is sent to you because you are subscribed to
  the mailing list linrad@antennspecialisten.se.
To unsubscribe, E-mail to: [EMAIL PROTECTED]
To switch to the DIGEST mode, E-mail to [EMAIL PROTECTED]
To switch to the INDEX mode, E-mail to [EMAIL PROTECTED]
Send administrative queries to  [EMAIL PROTECTED]



[linrad] Re: MAP65 and Linrad Network

2007-06-22 Thread Joe Taylor

Hi Leif,

The combination works OK, and but a significant number of 
packets (around 400 in each minute, or slightly more than 1% 
of the data) are dropped during MAP65's most 
compute-intensive parts of each minute.  Since plrs does no 
significant computing, I imagine that the problem may be 
worse when running Linrad + MAP65.


It could also be the other way around.


Indeed, it could.  In that case I will be surprised, but it will 
hardly be the first time I have been similarly surprised.



It may be necessary to add a call to Sleep(0) under Windows
or to sched_yield() under Linux at regular intervals in all
routines that might lock up the CPU for a too long time.

Those calls are effected by lir_sched_yield() in the OS independent
code of Linrad and I found it necessary to place about 45 such
calls within Linrad.


Hmmm, I may have trouble doing the equivalent.  For example, 
MAP65 does some very long FFTs using tthe FFFTW3 library.  I 
can't very well put calls to relinquish CPU control inside these 
tasks.  On the other hand, there is a threads version of 
FFTW3, which might be what's needed.


Right now such issues are not a top priority, though.

-- Joe, K1JT

#
This message is sent to you because you are subscribed to
 the mailing list linrad@antennspecialisten.se.
To unsubscribe, E-mail to: [EMAIL PROTECTED]
To switch to the DIGEST mode, E-mail to [EMAIL PROTECTED]
To switch to the INDEX mode, E-mail to [EMAIL PROTECTED]
Send administrative queries to  [EMAIL PROTECTED]



[linrad] Re: MAP65 and Linrad Network

2007-06-21 Thread Leif Asbrink
Hello Joe,

 I have now established the necessary network connection 
 between Linrad and MAP65.  So far, I have found nothing to 
 prevent a happy marriage!

 MAP65 receives a full 90 kHz of xpol signal from Linrad, 
 finds all the JT65 signals in that bandwidth, matches the 
 linear polarization angle of each one, decodes the messages, 
 and provides the operator with a band map showing 
 callsigns, operating frequencies, polarization angles, and 
 message contents over the past 15 minutes or so.  The 
 program provides a full-width waterfall display and another 
 one zoomed in on the frequency of the station currently 
 being worked.

Excellent!!


 
 
 Questions about Linrad's TIMF2 Multicast Data
 -
 
 Header information accompanying Linrad's multicast TIMF2 
 data includes two single-byte parameters, userx_no and 
 passband_direction, about which I have questions.  I 
 understand that userx_no should correspond to the number of 
 RF channels, with negative sign indicating floating format. 
   I would have expected the value -4 for my system using 
 xpol antennas and the WSE converters (I and Q for each of 
 two polarizations), but in fact I see -2.  Is this as it 
 should be?
Yes. You have two RF channels only. You might have used the
hardware described here:
http://www.sm5bsz.com/pcdsp/hware.htm
This uses two audio channels to receive two RF channels but
the output from timf2 would have the same format as you have with
the WSE units. The difference is that the sampling speed of
timf2 is the same as the audio sampling speed with WSE units, 
but half the audio sampling speed for the other solution.
There is no need for MAP65 to know whether the 96kHz timf2 data
originates in a hardware using two audio channels with a sampling
rate of 192 kHz or four channels sampling at 96 kHz.

 Similarly, I would have expected passband_direction=1 as I 
 have no LO's on the high side and the spectrum is not 
 inverted.  However, Linrad sends passband_direction=-1.  Is 
 this correct?
You have the RX10700 with LO=13.175, 13.200, 13.225 or 13.250 MHz 
which is above 10.7. All the other LOs are below so -1 is
correct.

 Linrad FFT Versions
 ---
 
 I have been using FFT Version 0 for the first forward, first 
 backward, and second forward FFTs.  This produces 
 floating-point TIMF2 data on the multicast network.
On a modern computer you can use version 5 for the first
forward fft. It uses the SIMD instructions (single instruction
multiple data, now called sse I think) and computes the
floating point fft quite a bit faster.
  
 To save on memory usage in MAP65 it may be desirable to use 
 16-bit data for TIMF2.  I have effected this by setting 
 first forward FFT to version 5,
The first fft is always floating point. It must be because 
the dynamic range of 16 bits is by far not adequate for
the unprocessed A/D input. Version 5 is always a good choice
on a computer that will allow it. Pentium II and older do
not have the SIMD instructions so they have to use another
version and it differs a little which one will run fastest
depending on architecture. On old machines it might be desireable
to actually try all versions and pick the one that runs fastest
since old machines may be CPU limited.


 first backward FFT to 
 version 1, and second forward FFT to version 2.  Are these 
 good choices?  
Yes.

 Is there any downside to their use that I 
 might not have thought about?  Also, with these settings I 
 notice that the signal in the high resolution graph (red dB 
 lines) is higher than it was with FFT versions 0.  Should I 
 adjust some other parameter to bring this level down be 
 several dB?
When the floating point data from fft1 is truncated to 16 bits
there will be quantization noise. You should place the system
noise floor at least 20 dB above this extra source of noise to
make the loss of NF smaller than 0.043 dB.

Press A on the keyboard to see the amplitude margins. In case
you place the noise floor too high you might find that there is
saturation somewhere. The shift parameters for the FFTs will
allow you to set the noise floor at the correct level.
http://www.sm5bsz.com/linuxdsp/install/dlevel.htm

There are many possible sources of rounding errors (quantization
noise) and Linrad does not set levels automatically since the
criteria for what will be optimum are non-trivial. I hope
the above link will be helpful.

Under normal circumstances you will not need the maximum 
dynamic range in the second FFT. Only if you have a carefully
calibrated system and want to use the smart blanker saturation
on noise pulses will be a problem. Narrowband signals are
automatically attenuated to fit within the dynamic range of 
16 bits. 

In case you want a very large size for the second fft and a 
small size for the first fft, the narrowband signals have to be 
attenuated to a pretty low level. 

A perfect sinewave may put nearly all its energy in a single 
FFT bin.With a