Thursday, April 26, 2007

Adios, soltero en ciencia


Five long BS* years
95 thesis pages
1,351,965 bytes of source code
60++ GB of data
32 computing nodes
16 former computing nodes
633 nanometers of wavelength
3 years in the lab
3 SPP publications
3 mugs at the kitchen
3 class card markings
3 tubes of Alaxan gel to replace dozens of missed breakfasts
Countless sachets of instant coffee
Countless overnights
Countless sleepless overnights
Liters of sweat and blood
Several dozens of black shirts
Thousands of friends
Millions of enemies
One glorified Sunday


*The acronym BS may stand for other more appropriate words I'd rather not spell out.

Tuesday, April 17, 2007

Thoughts in djvu format

As a reader of djvu ebooks, I got curious how I could make my own djvu documents. Making pdfs is quite trivial nowadays with many free pdf printers (PDFCreator, PrimoPDF, CutePDF). Using a printable document (created with Open Office or M$ Office), here's how I converted my .odt's to .djvu's with readable/searchable text (text not treated as graphics).

Materials & Equipment

  1. djvudigital that comes with the djvulibre package. It converts pdf/ps to djvu.

  2. Ghostscipt (Usually comes with Linux)

  3. Linux: it is easier to compile/install djvulibre in here, Cygwin might also work (A real Linux is usually better)

  4. If printing in Windows,
  5. A pdf printer that uses GNU Ghostscript such as CutePDF



Methodology
  1. Convert the document to PDF. Unfortunately direct pdf export from Open Office may not work optimally, because it encodes PDF's differently. This may result in text being treated as graphics in the resulting djvu. Since djvudigital uses Ghostscript, it is better to "print to pdf" using the system's printer devices.. When exporting from OpenOffice, check the "Tagged PDF" option that would be seen by clicking the "Export..." button. This option makes the PDF file more readable to djvudigital. In Windows, I also use CutePDF since it uses GNU Ghostscript converter.

  2. In the bash prompt type:

    djvudigital --exact-color --words --lines -v input.pdf output.djvu

    Here it is assumed that input.pdf will be converted to output.djvu. The option --words ensures the text in the pdf remains text in the djvu. The explanation of the other options can be displayed by typing:

    djvudigital --help


I already had a djvu version of my undergraduate thesis (which is not supposed to be online yet). Here is my Lumban embroidery paper in djvu format.

Sunday, April 15, 2007

Drive Rescue to the rescue

Just when I thought my crammed fine arts paper is almost done, I suddenly realized that the SD Card's folder containing the photos (/DCIM/100CAMEA) is inaccesible to Windows and unseen to Linux. However, the photos are still browable through the camera's display. I tried both plugging the camera's interface cable and a third party card reader (by CD-R King) only to get the same ubfavorable results. I suspect this was due to recent proliferation of viruses targetting removable media (those that exploit autorun.inf) (I should had been more selfish!).

After failing to read the JPEG files from my SD card, I eventually remembered the night when Vera asked me for help on her unreadable USB flash drive. I used Drive Rescue to recover her files (downloadable here).


Figure 1. Jpg image files inaccessible to Window$ explorer but seen by Drive Rescue

I first encountered Drive Rescue at the free to use workstations at CSRC wayback 1st year college (VRD was not yet its coordinator). At that time (2002-03), floppies were still widely used and USB media doen't seem to exist yet. I saw it while browsing at the software on the start menu and copied it, thinking it would be useful at home where we had old hard drives (Seagate 120mb types (ST3144)) and lots of floppies (e.g., 22 floppy Win95, etc...). Despite being relatively old (2002), it works good for newer gadgets such as USB drives and SD cards.

Friday, March 30, 2007

ExplorerXP: Tabbed file browsing

There must be a Windows counterpart for Konqueror. In addition to its web browser, what I like about Konqueror is its tabbed file browser. Unlike with Window$ explorer where you have to open many explorer windows when working with different directories. It's a mess.

ExplorerXP is a nice Windowze software that can do that. (Just leave the tabbed web browsing to Firefox)


Figure 1. Unfinished thesis manuscript files in different directories accessible via tabbed browsing


...Back to thesis writing...

Sunday, March 04, 2007

bad idea



A new pronunciation for Voltes V.

Friday, February 16, 2007

Staring at the screen again

Waiting for the right words to come out
But not out of my mouth
Not from my pen either
Or this glorified typewriter
But out of nothing
Just wasting my time writing
Typing typing typing...
Ideas extracted out of emptyness
Ususually end up as a mess
Hanging exhausted before the next line
Juggling thoughts to make it rhyme
Maybe not this time
The opportunity is not mine
Hanging hanging hanging
Waiting waiting waiting
The world just keeps revolving
As my timid blood keeps flowing
Preventing me from dying
As if I am living
Figuratively said
I'm dead
Dead

Wednesday, February 14, 2007

adiós teléfono

My alarm clock/phone is gone. I don't use its phone part anyway.

back to thesis work...

Tuesday, February 13, 2007

Cool link free books

free science

...back to thesis work...

Monday, February 12, 2007

Bound to fail

Tomorrow supposedly will be my examination day in Music Literature. Part of that exam would be a name that tune type. In addition to their non intuitive foreign titles, I could not distinguish some tracks from the others. Not now, I need more time to familiarize with the music.

...

Back to thesis work...

Sunday, February 11, 2007

x11 problem

My Linux box didn't start in gui mode:
When I run startx from the console, I see this part of the message:

...
(EE) Failed to load module "bitmap" (module does not exist, 0)
...

Luckily I remember installing an updated (apparently buggy) version of x11-server-common. That was the last stupid thing I did with my box while attempting to install vncserver so that I can work else where in the lab.

I reverted back to the older version using x11-server-common-1.1.1-11.2mdv2007.0.i586.rpm with --nodeps and --force options in addition to the usual -Uvih option of rpm.

Back to thesis work...

Saturday, February 03, 2007

Public servant

Cluster Report for Sat, 3 Feb 2007 10:31:59 +0800

CPUs Total:19
Hosts up:18
Hosts down:0


Avg Load (15, 5, 1m):
362%, 362%, 363%
Localtime:
2007-02-03 11:02




(This is not the flag of Japan.)

Here is a preview of CSRC's ganglia cluster load monitor
The problem with public servers... Anyone just gets to do anything no matter how reckless their programming habits are. With 512MB of memory and 10GB of swap, on each node just imagine how much greedy a program/(group of programs) could get to use more than 300% of these resources.

If someone else (aside from myself) will complain that he/she cannot run his/her program, then I will have to kill...

It's ironic that some people are on a high with their problem solving skills but could not interpret their solutions into feasible/efficient programs/code.

Scientific computing environments such as Matlab, Scilab, Mathematica, Maple etc... are good since they shorten the transition from solution to code to results visualization (especially the lazy man's symbolic Mathematica that does most of the thinking for you). However, their ease does not promote efficient programming. I even know someone who worries about his/her very long complicated equation. As if he/she has to evaluate it's value in a single blow. Most formulas involving two or more terms can be broken down into parts.

I guess some will never learn.

Saturday, January 27, 2007

A series of improbable events

1) Getting an interview from Toshiba despite the fact that my DOST debts will prevent me from going outside the Philippines.
2) Seeing Glenn of theory lab in MRT on his way home from Ayala (around 3pm).
3) Seeing my brother also on the same train cab for a Magallanes-Cubao trip with pet stuff from Cartimar Pasay, just in the side opposite Glenn's.
4) Wearing a lite colored formal attire.

Saturday, January 20, 2007

What is your wavelength?

"One small step for man, one giant leap for mankind."
--Neil Armstrong

"One small bug for programmer, one giant error for results."
--Thanatos

After getting unexpected results from my c/c++ pseudo-generalized implementation of Richard's and Wolf's vector diffraction integral (Electromagnetic diffraction in optical systems II), I finally found out what causes the problem (although I still don't know exactly why).
With my work with a spatial light modulator (SLM), I consider that each square SLM pixel has a side of 2mm/768. Then I scale the wavelength to pixel units, so 1 wavelength = 0.02433846153846153846 pixels.

I tried it for different numerical apertures and topological charges. The numerical aperture had to be too small (.0001) before getting expected far field results. Usual values (0.1 order of magnitude) result in what looks like symmetric noisy data. But the results resemble that of Richards and Wolf's when I blow up the image to sub pixel dimensions, thus I thought it was just brought about by simplifications (neglecting the lens's phase contribution, putting the object field at the lens,etc...).

As it turns out, the wavelength assumed seems to be small with respect to the pixels. I learned from FDTD simulations that the discretization of space voxels should be at most 1/10 of the wavelength (1/20 recommended). This avoids the error caused by truncating higher order terms when numerically differentiating with Maxwell's equations. I didn't expect that to be the case for diffraction integrals too. Thus I set 1 wavelength = 20 pixels.

So far it works.



(a) (b)
(c) (d)

Figure 1. Calculated electric fields for an aperture radius of 32 in the center of a 128x128 computational array. Shown are the resulting image field intensities for different topological charges of the object field (1 for a and c, 0 for b and d) and numerical apertures of the lens (0.1 for a and b, 0.999 for c and d).
The modulus of the Ex Ey and Ez components are encoded to the Red Green and Blue channels respectively. It can be seen that the fields are predominantly linearly polarized along the x-axis for low NA values.

Friday, January 12, 2007

Those missing days

The familiar high pitched tune as a 56kbps modem dials a predefined set of numbers during the first few minutes of the day invokes a nostalgic feeling in me. Stranded in my residential habitat with nothing left from SPP and without the semester's stipends yet makes you realize how long 24 hours could be (psychological time dilation). With nothing to do but eat, sleep, and those mechanical, redundant house hold chores, Christmas vacation felt just like another alibi for not staying home.





A card stacking pattern made popular by Hunter X Hunter's Hisoka (SONY optical USB mouse in the background)

I realized that it was more difficult to make a "Hisoka card stack" with smaller cards (approx 2 x 3 cm2). I used to easily reach 3 to 5 stories with standard cards. With these miniature ones,I already gave up at 2. Inertia came into my mind, the smaller cards having less mass are less likely to stay in their position. Then came friction; with less surface to rub against the base, the cards would slide easier. Finally came the thought that if DOST was faithful in providing their scholar's stipends on time, I would have had a standard sized deck.




P is for Paper. A Guy Fawkes mask based on the rendition of David Lloyd

I thought that I would be adding some drawings to my collection during the break, but I decided to go 3d instead. Just expressing my artistic/autistic mind. It looked good with my naturally long hair back then.


I eventually realized how generic our book collection is, when I could not find any advanced geek physics or programming stuff to ponder with at home. Without a decent compiler I was forced to experiment with browser interpreted Javascript. I also had to endure the slow (about 3kbps) download speeds for Javascript and DOM e-books (with such a slow connection, I decided to disable loading images in firefox). I should have burned some e-books from the lab.




Oscillating some strings while RJ's broken guitar gently weeps.

But everything was not that bad after all. On December 22, I went to RJ's house before my last year's stay at the lab which lasted until December 23. Nothing had changed much after half a decade, he still is that friendly funny practical person I knew back in high school. He thought me how to solve a Rubik's cube with pictures (how to deal with the center pieces' orientations). He was also the one who thought me how to solve the cube with only a plain color on each face. Shamefully, all I can give for Christmas's sake was the vodka awarded to me for being the most intimidating IPL member application examiner (which I rarely thought of utilizing).


Clouds and sky over San Mateo. Looks so good, you'd think it's a wall paper.

Also, the December 30 San Mateo reunion with relatives on my mother's side was worth while since I rarely have a chance to swim. That is where I thankfully received some cash from the least expected uncle. Sometimes (in a year), it feels good to be with people who have similar genes as yours.


For those of you wondering if I had been dead during my absence else where (equivalently my presence else where else (compliment of impenetrability, "No thing could be at two places at the same time" "(cf No two things could occupy the same space at the same time)")) these are among the stuff that I had been doing. And I had my phone off most of the time (especially on peak seasons) to avoid those holiday spams (peace of mind).

Saturday, December 23, 2006

2006 was the year...




2
0
0
6
* I learned FDTD (finite difference time domain)
* Most of my parallel implemented (MPI and FFTW based) Gerchberg-Saxton algorithm (PIGSA) was accomplished after the construction of the CSRC high performance cluster near the end of 2005.
* My hair had grown to its longest length so far since my last trip to the barber in October 2005 (around SPP time)
* I had two SPP publications
* Consequently, I had an incomplete less prioritized RGEP subject
* I had to ride an airplane for the first time for the sake of SPP


A large piece of flying metal with some heads of unidentified people in the foregound

* DOST had not given it's UPD scholars' stipends on time (As usual. Hopefully they will give it early in 2007)
* Scholar (or more appropriately "iskolar") was apparently defined as a student activist that don't necessarily study at all
* Lantern Parade was canceled consequently
* A friend recruited me to projectw
* ebookz had flourished on the web (making .djvu become as widespread as .pdf), along with one-click file hosting and many other freebies ending in "z" (mp3z, moviez, warez, etc...)
* I had seen the first Terminator movie for the first time (in mpeg-1 format vcd compliant)(atleast for the first time I'm aware of it). This movie is as old as me (approximately). The burning TV scene in Kyle's future will probably pollute my mind for many months to come.


3d-tv with audio, visual and even thermal transducers, a future possibility
point mouse to picture


* My friendster account magically disappeared some time in January (although its profile link and last photo might still be seen)
...now you don't.

* I used up 140 pages of my IPL log book (more than half of my total usage since page 1, Aug 22, 2004)
* I had to turn off my high-tech alarm clock (it comes with a blue flash light, 64kb of external storage capcity, some games, and even has SMS capabilities) more often not just to save battery life, but also because it is underutilized.
* Some sons of a bitch and a bitch (literally and sometimes figuratively) were introduced into my residential ecosystem, thus displacing me from my local study area with the stench of their waste matter.




* The year's greatest scientific disocvery was made during March 31 at the new NIP building around 7 pm. ATCHONINGUS ASTIGANUS SAPIENS SUPERIOR, a highly evolved astig was discovered by members of the Instrumentation Physics Laboratory. Experts have not agreed yet on the scientific name's notation, although it is likely that the default italicized or underlined writing won't be used (For now it is written in blinking bold all-caps as a reminder that it should be written uniquely. Maybe biology books have to be reinvented to render blinking fonts).

Wednesday, December 20, 2006

Open source replacements



This site saves you the trouble of searching the top free alternatives yourself (and if you think there are still better alternatives, it allows you to help others by suggesting them).

Osalt: open source as alternative

Although other sites (freshmeat, sourceforge) may be helpful, osalt is organized to show what open source software may replace what commercial software.

Read more from this Popular Science article

Saturday, December 16, 2006

Vitamin beer crap

"The whole may not be greater than the sum of the parts"

I was annoyed one day while watching a TV program featuring Filipino inventions/inventors.

Although some of his inventions may deserve respect, the concept of vitamin beer is totally . (I'm giving you the privilege of filling in the descriptive words).


Third Prize (P20,000)
Patent No. : 1-2002-02291
Title : Beer Fortified with Multivitamins (Vitamin Beer)
Inventors : ********
Address : ********
Tel. No. : ********
Abstract : A beer fortified with multivitamins to give it supplemental nutritional value. The multivitamins are stirred in after the primary fermentation stage when alcohol has been formed resulting in a robustly pale-yellowish appetizing pale pilsen bouquet, malty and hoppy brew supportive and supplemental in nutritional states.

Reference Links: Vitamin beer crap, Vitamin beer crap (PDF)

Mix and match child's play should not be considered as inventions unless the whole is greater than the sum of the parts. There's nothing new about vitamins and there's nothing new about beer either. And there's nothing special about combining them. You get the same thing if they were taken separately, plus the bonus of being at a reasonable price (you get what you payed for). It's just like combining the thirst quenching property of plain boring water and the sweetness of sugar's taste, and voila-eureka!, you invented sugar water! It wasn't even mentioned whether they have done a chemical anlysis of the action of alcohol on vitamins it can dissolve.

In lay terms, an invention is a novel device, material, or technique [1]. It is an innovation that is both novel and non-obvious[2]. At best this might be called an innovation that is painfully obvious.

A simple google search would even reveal that it is not an original concept in the first place. There had already been Stampede Beer as early as February 2006. The CY 2006 NATIONAL INVENTION CONTEST was held during November 2006.

It is clear that this is something done to promote alcohol drinking, a large cause of crime and accidents, also health problems (that it claims to solve), a cause of temporary decrease in alertness and intelligence, a direct cause of so called beer bellies, a direct cause of loss of money due to addiction. Unless the mixing of such vitamins cancels these bad effects, it has done no improvement either. Not all alcohol drinkers are responsible enough. But yet we have a government agency encouraging this people. But who is to blame, most of our government officials are tomadors (alcoholics) themselves (take for example the expelled Joseph Estrada or his henchmen). It is disappointing that a good amount of cash was awarded to this.

He's lucky to live at Sucat, Parañaque, making it easier for him to submit such things to DOST.

The Filipino attitude of "palakasan" (the favoring of someone because of his/her past reputation or relationship to the one who is giving a favor and not necessarily because he/she is actually favorable at present) can also be seen here. Had he not had previous 'inventions' and a reputation to keep, and a familiarity to the DOST officials, vitamin beer would surely be a flop.

References:

1. http://en.wikipedia.org/wiki/Invention
2. http://www.novagraaf-intellectual-property.co.uk/glossary.htm

Monday, December 11, 2006

Whatever happened to that old man with a silly costume

Contrary to the rumors that he was shot in the belief that he was a burglar ("akyat bahay"), or hypothermia had frozen him in his hometown (GPS: 90° latitude N), there could be another explanation why children will no longer be receiving gifts from Santa Claus.
Given the testimony of the five year old eye witness who would be called by the name of Jackson, police investigations lead toward homicide.

The testimony: (warning, the following lines may contain adult content.)




"Wow! mommy's kissing santa claus!
I saw mommy kissing santa claus
Underneath the mistletoe last night
...
Then I saw mommy tickle santa claus
Underneath his beard so snowy white
...
If daddy had only seen
..."



It seems that daddy had seen, and it was not a 'laugh it would have been'. As for the mommy, police reports are too violent to be written in this blog.

Sorry kids, I'm not a Santa Claus (or Christmas) fan either. It seems that you won't be getting imported Chinese mass produced self destructing brittle plastic toys this year, and for the years to come. I could only advise you to grow up and face the reality of the world's amazing crime rate.

Anyway, for those who are expecting it, since you have gone this far with this libelous article, allow me to greet you in the most artificial commercialized manner I could achieve:

Merry Christmas!

--Thanatos reporting

Friday, December 08, 2006

Vuelo de la noche (dos)

Mercurio



I could not type another line
I can't resist it anymore
I can not work until I'm fine
I need to go to the drug store

Analgesics on the shelf
In different brands and prizes
Makes me ask this to my self
"Is health care for the masses?"

Punching on her number pad
Numeric codes my tablets had
Faking a smile though she is sad
How would I know, I'm not a god

Reaching through my bulky pocket
Filled with pens and stuff
Whatever's left of my slim wallet
I hope it is enough

I hope it is enough to say
That tomorrow would be better
And if my headache still would stay
At least I should have seen her

Just like the day
She was wearing gray
Going her way
What words to say?

It plays with your brain
Like wet drops of rain
Like the rattling chain
It's not just caffeine

I'm sleepy
My eyes are heavy
I guess they sold me
Decaffeinated coffee...




<< previous next >>

*Thanks to esca of clantemplates for the rollover workaround.

Thursday, December 07, 2006

Machine error demonstration

Either there is a problem with printf, atof, division or with floating point numbers:



#include <cstdio>
#include <cstdlib>
using namespace std;

int main(int argc, char **argv){
if(argc>2){
float f1 = atof(argv[1]);
float f2 = atof(argv[2]);
printf("%f/%f = %f\n", f1, f2, f1/f2);
}
return 0;
}



After compiling and running the given code, I get these strange results:

$ ./div 234 67.9
234.000000/67.900002 = 3.446244
$ ./div 234 67.2
234.000000/67.199997 = 3.482143



The code was compiled with g++ (GCC) 4.1.1 20060724 (prerelease) (4.1.1-3mdk). No optimizations were used:

$ g++ div.cpp -o div

Speaking of division, this article about division by zero might be interesting.