Scientific Computing

Amateur Radio strong FM adjacent to weak signal

The 902 MHz band plan was adapted to reflect reality in much of the USA with regard to easily adaptable commercial equipment. FM next to weak signal situation might include:

band discussion
50MHz The SSB/CW only and “any mode” meet at 50.3 MHz. Do most FM operators stay about 51MHz?
144MHz I assume most weak signal work is at least 100 kHz away from the popular 144.390MHz APRS frequency
220MHz Again a case of ~100 kHz spacing between FM and whatever weak signal work may exist
440MHz The satellite band with what are typically very directive antennas keep multi-MHz separation between FM and weak-signal
900MHz I would expect below 902.080MHz and above 902.120 MHz to have heavy interference for weak signal operators according to the band plan.

Consider the relevant FCC specifications demand for “off-channel, in-band” emissions. Is this specified as say -60dB so many kHz from center channel, or with an emission mask? Is the specification sufficient to protect a weak signal operator within N km of a powerful FM transmitter? If the specification is not sufficient for weak signal protection from nearby (in range) FM transmitters, do the practical filter implementations used by the most frequently used equipment provide enough protection any way as a corollary to meeting the FCC specification?

AGI STK in Virtualbox on Linux

Run AGI STK on a Linux PC by using a Windows guest virtual machine.

If STK crashes upon opening a scenario in VirtualBox, shut down the virtual machine. In the options for that virtual machine, disable 3D acceleration, enable 2D acceleration, and set video memory to at least 64 MB. Then startup the virtual machine and try STK again.

Lenovo second slice battery advantages

The Lenovo X220 represents the pinnacle of ThinkPad development, having in effect a 7 row keyboard, excellent display and battery life. Now that new old stock (NOS) 42T4967 slice batteries are showing up at reasonable prices, it’s worth thinking about adding one on. The Lenovo X220 can have a second “slice” battery that snaps onto the bottom, adding nearly 60 Watt-hour to the 86 Watt-hour 9-cell battery built-in to most Lenovo X220. By this time, you might not have your full 9-cell 42T4940 battery life anymore, so the slice battery will nearly double your battery working time.

Charging order: Lenovo firmware prioritizes charging first the built-in (non-slice battery) first, and the slice battery last.

When discharging, the slice battery discharges first all the way, then the built-in battery is used.

AIRtools and ReguTools in Python using Oct2Py

For those working with real-world inverse problems, P.C. Hansen’s AIRtools and ReguTools are great ways to quickly try out inverse methods.

As in general in Python and Matlab, you need to be sure that your column vector of observations “b” is actually passed into the functions as a column vector. I’ll illustrate the issue by example.

Assume you have ill-conditioned problem Ax = b, with dimensions:

variable dimensions
A 256 x 10
x 10 x 1
b 256 x 1

so to use the ReguTools function maxent.m from Python, implementing the Berg Maximum Entropy method, your myinv.py file would look like:

import oct2py
import numpy as np

def myinv(A,b,maxentLambda):
    oc = oct2py.Oct2Py(oned_as='column')
    oc.addpath('ReguTools')
    xhat = oc.maxent(A,b,maxentLambda)
    return xhat

PC Hansen AIRtools and Regutools in Python.

Removing line numbers from text file

Assuming an OCR’d book or other text file that has line numbers embedded in file neat.py:

1 # cool program
2 import sys
3 def howneat():
4     sys.exit('Thanks for visiting')

Remove the line numbers by typing in Terminal:

perl -pe 's/^[ t]+d+//' neat.py  > neater.py

Regular expression:

^[ t]+d+
\^
beginning of the line
[ t]+
match space or tab (one or more)
d+
match one or more digits
-p
implicitly loop over (read each line of) the file neat.py.
-e
enable PCRE

And we replace with nothing. This leaves alone the indentation of the code (relevant for Python).

I could have used the -i flag to edit in place, but I instead redirected STDOUT to neater.py in case I made a mistake (inputting the wrong file, for example).