Monday, February 13, 2017

configuring a DLink DCS-942L camera

In May, I had struggled with port-forwarding, virtual server on router etc while setting up a DLink DCS-942L home network camera. Now, re-configuring it to use a JioFi 4G router, just had to remove the static ip using the Windows setup wizard, then WPS to connect to the wifi network, and that was it. No manual port-forwarding was needed. 

Tuesday, February 07, 2017

ode45 on octave

Trying the gnlse numerical solution for SCG from the Dudley book using GNU Octave - the Matlab clone. The Octave "port" needed some modifications.

  1. The report function doesn't work properly, so probably can be omitted. Instead of outputting a percentage for every step, it outputs at the end. Maybe it is a difference in the flags returned by the ode45 function.
  2. Had to add 'InitialStep', 0.001 to the odeset parameters - or else the error becomes too large and ode45 exits.
  3. Instead of Z which was linspace(0, flength, nsaves), gave [0, flength] as the parameter to ode45 - or else the ode45 in Octave ignores RelTol and AbsTol. 
  4. Then, spline to create a linearly spaced array of our desired spacing.
So, instead of 
[Z, AW]=ode45( @rhs, Z, ifft(A), options .... etc
called it as
[Zoctave, AWoctave]=ode45( @rhs, [0, flength], ifft(A), options .... etc
and then
Z     = linspace(0,flength, nsaves);
AW = spline(Zoctave, AWoctave,Z);

Then, running time - 

Octave modified ugnlse = 166 sec on i7
Matlab  = 281 sec on Athlon

Since python code got 9x speedup on the i7, I guess the Octave ode45 + spline is slower than the Matlab ode45. Still, running on the i7 gets the advantage of more RAM. Doesn't give the out of memory error so easily. 

Monday, February 06, 2017

pynlo on Linux Mint running on i7 Macbook Pro 4GB

Got a Macbook for doing some tests, computations etc.
OS X Snow Leopard 10.6.8
Intel Core i7
2.66 GHz
2 cores

Made it dual boot with Linux Mint 18.1 Cinnamon using rEFInd, installed Anaconda 2.7 for pyNLO.

Anaconda installed with no issues. But pip install needed
apt-get install python-pip
apt-get install python-setuptools
apt-get install python-dev

pip install pyfftw
gave permission errors, so did
pip install pyfftw --user
apt-get install libfftw3-dev

python did not work - no module named matplotlib
pip install matplotlib --user

Then needed
apt-get install python-tk

Finally working. But colours were different in the pcolor plot.

Changed colormap of pcolor using
cmap=plt.get_cmap('viridis') inside pcolor function call.

On my Athlon 32 bit Windows XP laptop - - runs for 15:33 = 933 sec and Mem Error
On the i7 - the same script runs for 1:42 = 102 sec, no Mem Error

So, more than 9x faster.

Sunday, February 05, 2017

status page from uptimerobot have created status pages now, which can be made public also. Our status page is at

Had to make the custom url a redirect, could not make it a subdomain, since Cloudflare complained that two separate accounts cannot CNAME each other.