Saturday, February 28, 2015

server dns issue

One of our servers at Dallas stopped sending us daily status emails. Mentioned it to PB. He checked the logs and found DNS not resolving. Checked the nameserver, found it was set to Apparently that belongs to Level 3.

Asked Codero tech support, they said that for that data centre, the nameserver has to be some external one, like Google's and so on. Apparently just editing /etc/resolv.conf is not the answer, but have to edit /etc/network/interfaces and reboot. So P set it to Google's and and rebooted, problem solved. 

Thursday, February 26, 2015

slow shared server - my comments

One of our ashram websites was becoming very slow to respond, and one of us submitted a ticket to Nettigritty. I interjected with the following comments, when Nettigritty responded that they did not see any issue:

In general, these shared web servers will not be very responsive - you might have seen how slow the web control panel is. So, if the mysql server is also on a shared server, or on a shared network connection like our cyberoam, that may be the reason.

The solution may be to use asynchronous protocols instead of real time updates, or using larger time-out settings on the server, or using protocols which run over http/https like xml / soap. (But SOAP has been deprecated.) In general, it is very dangerous to directly leave the sql server open to the web.

Planetarium dome surface area

There was a request for estimate of Planetarium dome surface area for painting.

1. Looking at the dome, for eg. in the picture at our website, I estimate 45 4-sided figures visible from the front. Assuming 45 more from the back, and rounding off to 100, I would estimate 100x area of one 4-sided figure.

The 4-sided figure is made of 3 triangles and one trapezium, and its overall shape is like a big equilateral triangle of side approximately 3 metres as measured with a metre scale, an estimate which is likely to be a bit on the low side, would be sqrt(3)/4*3^2 x100,
3.9 sq. metres x 100 = 400 square metres (approx).

2. Another estimate is using the distance measured with my feet for radius, 10.75 metres, for the dome. That would make it 2*pi*r^2 = 725 square metres!

This is closer to being correct, because the estimate of 100 4-sided figures by looking at the picture is probably wrong. 

But this would be area if the hemisphere was smooth. Actually it is more like a series of pyramids. So, the actual area could be even double this estimate. 

(Eg. If a pyramid has 10m x 10m length and breadth, if it has 10m height also, google shows that its surface area would be around 350. Subtracting the base area of 100, that makes it 2.5 times the area of the base alone.)

Tuesday, February 17, 2015

znetlive hosting and folder permission changes

The CT web team wanted to change permissions for an image upload folder for a new site under construction. Changing through filezilla gave the error: SITE CHMOD [permissions] not understood - apparently IIS FTP server can't change permissions?

ZNET LIVE's user portal also couldn't change the permissions, "Error reading file/folder permissions".

Finally resolved by contacting their customer support and asking them to change the permissions. Luckily the difficulties experienced by these people or these were not faced by the CT team. 

Sunday, February 15, 2015

email ids for a new domain - Zoho mail

Google Apps free signup is no longer available. znet, where the website is hosted, offers a free email plan. But after creating there, mail sent from that account takes around 20 minutes to reach, and also goes to gmail's spam. Gmail has now stopped support for sending emails for other domains from their smtp servers. So the free email forwarding from godaddy, to a gmail id, and replying from gmail will not work. Free email hosting for domains from has also stopped.

Due to the delays and poor spam reputation of znet servers, S suggested moving to Zoho's free plan. So, migrated to Zoho, the experience so far is good. 

Monday, February 09, 2015

google earth for earth zoom-in movies

Now that google earth pro is available for free, creating google earth zoom in videos should now be easier I suppose.

Digitalurban describes a click and drag method as well as a zoom out and then reverse method.

And this hi-res movie making script method is nice for resolutions higher than 1080p.

Saturday, February 07, 2015

4d dicom file from renal scan

S had a student who had a problem with a 4-d dicom file from a renal scan. He wanted to display it on the screen and do some manipulations on it with matlab, but of course his routines expected 2D images and not 4-D data.

At first, I assumed the dicomread routine was wrongly reporting 4D data - 64x64x1x63 , and asked him to use squeeze to get rid of the extra dimensions. Then I read that the 4D is actually correct, and also a better treatment of the files rather than squeeze. In his code, there were some for loops, and using matlab's matrix methods are generally faster.

Sunday, February 01, 2015

experiences with google cardboard

Got an assembled Google cardboard from K - had ordered via for around $2. This reddit thread helped in getting to know some basic apps. My USP was two-fold. Try out immersive planetarium-style experience with VR Player, and to get a large screen experience for movie watching, normal flat screen movies. Phone used was the Xiaomi Mi3.

The magnet on the cardboard viewer was not fixed properly. This dodocase thread gave the pointer of testing with the app called Sensors for testing. Also, how to correctly assemble, from this video. But the magnet is not used in the apps I needed, below.

Planetarium show experience:
The only app I found which supported fulldome rendering was VR Player. It needs the video to be in mp4 AVC (H264) format with baseline profile in order to display without dropping frames! Have to re-encode with Handbrake for this - ensure zero cropping in the first screen - Picture tab, and choose H.264 Profile as baseline in the Video tab. With those settings, and choosing constant framerate and specifying an average bitrate of 6000 kbps, good results for me, and a 1.5 GB file for a half-hour planetarium show in 2K.

In the VR Player app, the default 110 degree FOV setting gives reasonably good results with the full dome projection. But the default number of slices - 32 - leads to somewhat wavy straight lines etc - distortions in the warping. Number of slices 100 gave much cleaner results. The Coverage setting was at 180, and Tilt at 0. Using this, by hitting the calibrate button at the bottom of the screen when onscreen controls are on (toggle on and off by touching the screen) an appropriate tilt of 30-40 degrees could be set.

I also needed to disable the Gestures in the settings - before that, the screen was getting tapped by the cardboard, and was calibrating again and again during the movie, causing the viewport to shift. Removing the magnet may also be necessary to prevent drift - I removed it, just to be safe.

The experience is somewhat like viewing the show in the dome through blinkers or through binoculars. Somewhat restricted field of view, somewhat distorted at the edges. Suggestions for settings tweaks are welcome.

For flat movie viewing, found that VR Cinema Pro was the best choice for me. It has an option to not track based on sensors, then the movie is shown on the centre of the screen. Choosing the + - buttons so that the movie is largest without being truncated, and choosing the pincushion/barrel distortion button to choose no distortion, side-by-side viewing gives a widescreen experience on Cardboard. Unfortunately the current version has a bug - every time a file is opened, it becomes thinner and thinner - squashed vertically.

After 3-4 times of open file, display becomes just a single line.

Rebooting the phone fixes it. Also, this app does not show up on the registered apps for viewing videos, so have to go through its own interface to open files, and then put on Cardboard.

Other apps with the same functionality, but more bells and whistles, have the unfortunate problem of needing mp4 video with baseline encoding for smooth playback, with other codecs causing dropped frames. Examples: Cmoar VR Cinema Pro, Fibrum VR CinemaVR Player, Side-by-side video player.

There are many other things which can be done with google cardboard, of course. Viewing photospheres with Orbulus, games, the official cardboard app, SBS (side-by-side) 3D youtube videos with VRTube and more.