Scientific Computing

Open source HF aeronomy radar project

A team of four ECE seniors has been self-selected and chosen to design and build an open-source aeronomy radar. The team will build up prior work by Juha Vierinen and David Hysell in the area of HF radar used to investigate the ionospheres behavior vs. time.

Their most recent published work involved one transmitter and two receivers. From discussion with Juha, these measurements become far more interesting when numerous measurement nodes are involved in a small geographic area extending perhaps 400x400 km with stations spaced every 50 km or so. This setup give the capability of telecentric “imaging” of the ionosphere at HF. Using offset antennas and dual synchronized receivers, polarization can be detected.

OpenCV CalcOpticalFlowHS Horn-Schunck

The default lambda=1.0 smoothness parameter for OpenCV 2.4 CalcOpticalFlowHS does not work well for some cases. Also, OpenCV’s lambda is different from Matlab Computer Vision Toolbox Horn Schunck opticalFlowHS('Smoothness',1.0) parameter, which also defaults to 1.0.

Horn Schunck Optical Flow comparison between Matlab and Python OpticalFlow_Python_vs_Matlab.py shows that OpenCV CalcOpticalFlowHS setting lambda=0.001 gives results that are much more like Matlab. OpenCV no longer has the original Horn Schunck optical flow.

Linearized Horn Schunck has problems with large displacements in the image, which can be resolved by a pyramidal algorithm.

Use SVG vector graphics in LaTeX

LaTeX can use “.svg” SVG vector graphics files directly without conversion via LaTeX svg package. If the LaTeX “.sty” doesn’t work with svg package, convert SVG to EPS instead.

This minimal working example of using .svg directly in LaTeX assumes file myfig.svg.

\documentclass{article}
\usepackage[clean]{svg}

\begin{document}

\begin{figure}
    \centering
    \includesvg[width=0.6\columnwidth](myfig.svg)
\end{figure}

\end{document}

Abandoned objects video databases

Events over the weekend in the US were mitigated by “see something, say something”-mindedness of passersby. Even better prompt detection of unusual events by ever more pervasive surveillance video may be achieved through coupling of machine vision-machine learning algorithms. Having a reference dataset is a useful starting point. Here are a quick list of abandoned object datasets.

11 videos of busy, day/night scenes

carefully collected few dozen videos presented in research paper

Mount .vdi VirtualBox disk image

Assume a VirtualBox guest OS Windows VDI disk image mydisk.vdi that you wish to mount without Virtualbox, perhaps because your guest OS crashed. The disk space used by the cloned .img file will be the full expanded size of the dynamic partition if one was used. Example: dynamic partition max size was 100 GB but only 10 GB was used → clone operation uses full 100 GB.

Rescue files from VDI by copying the VDI to IMG format:

VBoxManage clonehd --format RAW mydisk.vdi mydisk.img

cd ~/"Virtualbox VMs/Windows"

Examine partition

parted mydisk.img  #not sudo

unit
B
print

look for the “start” column for the biggest partition, that’s probably the virtual machine.

If you chose “12345 B”:

mount -t ntfs -o loop,ro,offset=12345 mydisk.img /mnt

It takes several minutes to unpack.

Explore the files in /mnt as usual. Copy out what you need.

7zip & move recursively

tarcp.py uses xz or other compression methods to take the top-level directories and make a 7zip, XZ, or tar archive from each top-level directory, containing all its subdirectories.

Example: say 100000 data files are scattered by date in subdirectories. This is very cumbersome to share and move around.

Cablewifi / xfinitywifi technical notes

xfinitywifi is one of the most widespread Wifi SSIDs in the USA. It’s not just limited to Xfinity cable internet subscribers; other cable companies partner their subscribers in or paid access is available.

Like most WiFi captive portals, xfinitywifi uses the device MAC address like a “cookie” after the web browser login. For devices without a web browser, a more capable device might sign in once with the non-browser device’s MAC.

xfinitywifi has the usual range limits of 2.4 GHz and 5 GHz Wifi. xfinitywifi is a VLAN-like network, separated from host subscriber network. The maximum distance from the WiFi router depends on the Xfinity router placement. For example, one might pickup the router in an adjoining building or dwelling. Coverage maps are notional, and don’t account for building materials or interference.

Using git to restore a single deleted file

Easily recover a Git-tracked file, even after several commits have passed. You need to know the path of the deleted file within the repo. In this example, suppose it’s “path/to/file.txt”.

This example assumes a Unix-like shell. For simplicity, on Windows use WSL to do this.

myfile=path/to/file.txt

git checkout $(git rev-list -n 1 HEAD -- "$myfile")^ -- "$myfile"