Posts by: Michael Hirsch

AGI STK in Virtualbox on Linux

AGI STK (Systems Tool kit) does not currently run under WINE for version 10 of STK. However, you can run STK from VirtualBox using Windows guest virtual machine. Currently (with VirtualBox 4.3.16) you may find that STK crashes upon opening a scenario. Shutdown your virtual machine and try disabling 3D acceleration, enabling 2D acceleration, and […]

Matplotlib TkAgg

Now that Matplotlib 1.4 has been released, BEFORE upgrading matplotlib with sudo pip3 install –upgrade matplotlib consider first installing tk-dev sudo apt-get install tk-dev

Find text string in file

I save a script named “findtext” that will look inside any file smaller than my maximum (avoiding searching huge binary file) #!/bin/bash maxFileSize=10M #don’t search inside huge binary files if [ $# -eq 1 ]; then srchText=$1 fDir=”.” fntmp=”*” elif [ $# -eq 2 ]; then fDir=$1 srchText=$2 fntmp=”*” elif [ $# -eq 3 ]; […]

Cohen-Sutherland line clipping in Python

Here is my version of Cohen-Sutherland line clipping for Python: https://github.com/scienceopen/cv-utils/blob/master/lineClipping.py

Cygwin64 HDF5 load() crash fix

Currently, Octave 3.8.1 in Cygwin64 was compiled with headers 1.8.12 but HDF5 library 1.8.13. This causes Octave to seg fault Warning! ***HDF5 library version mismatched error*** and exit. To avoid having to recompile, you can type HDF5_DISABLE_VERSION_CHECK=1 octave to startup octave you can perhaps add to your ~/.bashrc file the line: alias octave=”HDF5_DISABLE_VERSION_CHECK=1 octave -q”

Maximum Entropy Regularization on Python

I have ported to Python the maxent.m function now called maxent.py This is for maximum entropy regularization, from PC Hansen’s Regutools.

Matplotlib 3D plotting: how to import

For 3D plotting to work in Matplotlib, near the beginning of the first .py file you use to start your program, you must have imports in this order: import matplotlib as mpl from mpl_toolkits.mplot3d import Axes3D import matplotlib.pyplot as plt If you try importing Axes3D in a later function that actually does the 3D plotting, […]

Getting a metal enclosure for Ettus USRP B200/B210

Current (Aug. 2014) USRP B200/B210 come with Micro-USB 3.0 connector, and the custom housing is available direct from Takachi Electronics Enclousure Co, Ltd.. Request a quote for the MXA3-11-16SSH The current price is about $200 in single quantities and Fedex overnight shipping is about $30 currently. It takes a few business days for them to […]

Stop 3-D plot crashing on Matlab over VNC

Restart Matlab, and before doing anything type: opengl(‘neverselect’) Then at plotting time: figure set(gcf,’renderermode’,'manual’,'renderer’,'painters’) slice(..) and so on

Cygwin Python 3 pip install: Segmentation fault

Note: I get segmentation fault upon pip3.2 command, has anyone solved this? This was tested on Cygwin 1.7.31 with Python 3.2 and may be out of date when you read this Prereqs: python3-setuptools In cygwin type easy_install-3.2 pip to use pip3 type in Cygwin pip3.2