Biboroku

Customizing & Installing Linux Kernel on Debian Wheezy

Written by Taro Sato, on . Tagged: linux sysadmin

Here is a quickie for customizing and install Linux kernel 3.5.x on Wheezy. Add yourself (with account username) to sudoer group: # adduser username sudo You need to logout and login for this change to take effect. You also need to be able to use sudo or su to install the new kernel in the end. ... Continue reading.

Using Japanese on Debian Wheezy

Written by Taro Sato, on . Tagged: linux sysadmin

The goal is to make the system capable for Japanese input, while letting the base system remain English. For the Japanese input method, I had been using Anthy, but I will be using mozc, which is now better supported and presumably much better (it is). ... Continue reading.

Searching for Nearest-Neighbors between Two Coordinate Catalogs

Written by Taro Sato, on . Tagged: stats astro

Say I have two catalogs of points, each in two-dimensional space. For each object in a catalog, I want to find the nearest object(s) in the other catalog. I can do this by computing the distances between every single unique pair of objects and finding the ones within a search radius and possibly doing an additional sort. ... Continue reading.

Half-Light Radii for Various Profiles

Written by Taro Sato, on . Tagged: astro math

For a radial profile of I(r), the enclosed flux within the radius r is given by F(r)=02πdϕ0rdrrI(r,ϕ) . I’m only concerned about azimuthal symmetric cases, so F(r)=2π0rdrrI(r) . ... Continue reading.

Testing if a Point is Inside a Polygon in Python

Written by Taro Sato, on . Tagged: algo python

Finally got around to finding this out by Googling. It’s a useful function so I reproduce it here for copy & paste: def inside_polygon(x, y, points): """ Return True if a coordinate (x, y) is inside a polygon defined by the list of verticies [(x1, y1), (x2, y2), . ... Continue reading.