Thursday, December 9, 2010

Lorentzian and related concepts

Lorentzian, or Lorentz distribution, is also known as Cauchy distribution. It also has a relativistic version, the Breit-Wigner distribution f(E) ~ [(E^2-M^2)^2 + M^2\Gamma^2]^-1.

The Fano resonance, characterized by f(E) ~ [(E-M + q*\Gamma)][(E-M)^2 + \Gamma^2]^{-1}, is [E-M+q*\Gamma] times the Lorentzian. Thus the Fano resonance is asymmetric even when \Gamma is E-independent. The parameter q is called the Fano parameter, which represents the ratio between the resonant and direct scattering. In the absence of direct scattering, q-> infinity and the Fano resonance reduces to the Lorentzian.

The Feshbach-Fano partitioning separates the scattering into two parts, the resonance part P, and the direct (background) part Q, with P+Q=1. The operators related to P and Q are defined somewhat arbitrarily, but once they are defined, the total scattering process (defined by a Hamiltonian H), can be unique separated into two parts, PHP, and [QHQ + \Delta(E) - i\Gamma].

Monday, October 11, 2010

x11vnc

I finally gave up trying to start vino on my remote linux box after numerous failures. The new VNC server I use now is x11vnc. The command is simply:

x11vnc -rfbauth ~/.vnc/passwd -bg -forever -display :0

"-rfbauth ~/.vnc/passwd" specifies the passwd file, "-bg" lets the server run in the background, and "-forever" keeps the server running forever (versus "-once" which stops the server after the viewer exits).

To store the password file, use

x11vnc -storepasswd PATH

and the prompt will ask you to input the password and confirm it. The default path for the file is ~/.vnc/passwd.

Two independent problems:

  • On one of my linux box the shift key is disabled somehow. I found the following post which is very helpful (http://www.openg.info/tag/x11vnc-enable-shift-key). It suggested adding "-nomodtweak" which worked!
  • On the other one I had the problem via ssh that x11vnc failed to start ":0" and it suggested me using "XAUTHLOCALHOSTNAME=localhost" which didn't help. But it worked fine if I started x11vnc directly on the box. It turned out that x11vnc couldn't find the .Xauthority file which was put in a weird place. All I needed to do was to type "x11vnc -findauth" on the box and use the output location when connecting via ssh. "x11vnc -auth XAUTHORITYPATH ...". Bravo!
  • x11vnc has a GUI that makes changing the setting easier. To open the GUI, type

    x11vnc -gui connect

    It takes effect immediately for the running sessions. Common options include "-share" (whether multiple viewers are allowed for the same session), "-norepeat" (no repeating of a key when pressed for an extended time) and etc.

Tuesday, April 6, 2010

Change names of multiple files in a shell

Example: change all files whose name starts with "kIM" to "kIM_partial" with the same file type (.doc->.doc, .mat->.mat)

1. ls kIM* > namelist
2. cat namelist | awk '{c=split($0, s, "."); print "mv "$0" "s[1]"_partial."s[2]""}' | sh

Monday, February 8, 2010

Start VNC server from command line

$ssh user@server
$DISPLAY=:0.0 /usr/lib/vino/vino-server&

Friday, January 1, 2010

Acer GameZone trick

Go to the installed path and click on the .exe files of the games to play. No time restriction. They are "green" programs, so you can make a copy of the whole folder, and uninstall them from the control panel.

Windows activation after upgrading harddrive or migration

If the online activation doesn't work, call MS to activate it by phone.

Chinese MUI for Windows XP

Can be easily found online. Also install the SP3 update, WMP MUI and IE8 MUI.

HP dv5t unknown device in Device manager in Windows 7

Install the HP smart protect software and it fixes the problem.

IguanaTex: installation and test

I tried to install IguanaTex on my new laptop but failed. There are two possible problems. The first is that the Temp folder can only be accessed with administrator privilege. The second is that there are packages missing in MikTex, and a pop-up window says "the object is not found". In this later case click the "interactive mode" when using IguanaTex and MikTex should be able to install the missing packages.