A Python Ping Tester

We have been having a lot of short network dropouts lately, something that is rather troubling when playing online games.

The GUI for a little ping tester tracking the stability of our household internet.
The GUI for a little ping tester tracking the stability of our household internet.
I was wondering just how prevalent the issue is, just how good or bad is the service at any given moment. I know I can download any number of network testing utilities, but what is the fun in that? Maybe just write something!

The little app is a Python/Tk gui. It simply pings an IP address and plots the results. The program is nothing serious, but it does the job. I have included the Python code below, a simple example of a Tk GUI.

NetCheck.py

The code is written for Python 3.5 or better as it uses the subprocess.run() method that was introduced with 3.5. This method just makes getting the stdio output so much easier. There are native ping libraries available for Python, they do require running the script in administrator to allow low level socket use. By using a subprocess I avoid that, if not quite as neat a solution.

Any IP address can be pinged, I am currently using 8.8.8.8 which is a Google DNS server. Using this server pretty much guarantees the issue is the local network, not an issue at the server end.

The results? Our local net is not looking too bad. There are periods when a cluster of dropouts occur, each lasting a minute or two. You can see one of these on the screen cap above. Fortunately these are unusual and not the norm… At least so far. I may update that evaluation when I get more data.

Testing TBAD

TBAD is our Transponder Based Aircraft Detector, used to avoid illuminating an aircraft with the AO laser. A specially designed receiver that uses an antenna at the front of each telescope to detect the TCAS anti-collision transponder that is carried by all commercial and most civil aircraft.

Keck 2 Lasing
The Keck 2 AO laser works the northern sky
The odds of our painting an aircraft with the laser is astonishingly small. There is very little air traffic over the summit, those aircraft taking off and landing on the island have descended to well below 14,000ft before approaching. It is also a very large sky in which an aircraft is a very small target. Even if we managed, somehow, to paint the aircraft, the effects would be minor to unnoticed. Essentially the same as shining a bright light on the bottom of the plane. I have stood in the high power beam, strong sunlight feels much warmer.

Still, we are mandated to avoid the situation and to put in place measures to avoid such an occurrence. Before TBAD this involved hiring guys to sit outside and watch the skies for aircraft. I have done this, it can be pretty on a clear night with calm weather. It can be brutal on a cold and windy night. Even when taking precautions such as rotating two spotters every hour or two there is always the question of human fallibility under adverse conditions. Using an automated system like TBAD is far preferable.

Continue reading “Testing TBAD”

Form Test Post

Just testing how some HTML works within a WordPress post…

Format/(Circle of Confusion)

Lens Focal Length (in mm)

Lens Focus Setting (subject distance) in meters

CALCULATION RESULTS

Depth of field:          

From

To

Total depth of field:

 

Hyperfocal Distance:

NOTE: Hyperfocal Distance is determined solely by the focal length and f-stop selected.

It is not affected by the focus distance setting.

If you set your lens to focus at the Hyperfocal Distance, depth of field will be from
to infinity.

Yeah, this may look ugly!