Thursday, December 23, 2010

Photoresponse in nanowires!!

Well, we finally got a photoresponse out of our nanowires.
The I-V curve is below -- more current when more light is shining on them! Also, strangely non-linear behaviour -- perhaps a schottky barrier at one end between the Pt-Si.

short wire (1.3 μm) -- massive photoresponse at saturation. The sample was gently shaded with Al foil, still a lot of light leaking in for the dark curve, and just room light for the light curve (more current)

long wire (6.1 μm) -- very small photoresponse, quite good diode action


Unfortunately the contacts melted during annealing, but we might yet be able to fix that.

Argh

Argh. Job interview yesterday. Lots of technical questions; I'd come across similar problems previously for almost all of them. Unfortunately, for one of the harder questions I gave a very confused description of a complicated (but efficient!) algorithm. Still kicking myself over that one.

Thursday, December 02, 2010

Hugin Panorama Software

So I discovered Hugin today.

In ubuntu, it installs as you would expect, just add it under the Software tab.

In Windows, the installation is a little more involved. Download the usual setup from the main website and extract it into a directory. Run Hugin to start using it... however, we don't yet have all the magic, due to patent restrictions. To get the remaining magic, head to here, and add the extra executables from the bin directory of the second download into the bin directory of the first download (but don't overwrite anything). *Now* when you run hugin.exe the wizard should be effective.

Works best with high-res, in-focus photos, with a decent amount of overlap.

This program is just magical.

Sunday, October 17, 2010

Ubuntu faster USB loading

Create the file
/etc/modprobe.d/slow_storage
with the contents
options usb_storage delay_use=0
to have Ubuntu not wait when loading USB sticks. Reboot to take effect.

Friday, September 10, 2010

Motivating students

As a tutor, it is important to appear not to know everything and make mistakes. Your students will correct you and pay attention, as they have to make sure you don't get things wrong.

A tutor who never makes a mistake is not interesting.

Saturday, August 28, 2010

A good programming project -- Geant4 Blender Script

So I've developed several particle simulations for our group now, based on Geant4. I'm a little concerned about what will happen when I leave -- there will be no-one around to do simulations! I think people should be able to do them themselves.

Geant4 is a beautiful toolkit, but not particularly easy to use -- a simulation takes several weeks to develop (just learning the interface, setting up commands etc.) and requires a decent working knowledge of C++.

I've also had a reasonable amount of experience with Blender, which has an excellent interface designed for 3D modelling.

I think someone (perhaps me if I find the time) should integrate the two, and distribute a package that allows someone to install it and have complex simulations running within a few hours.

The Geant4 python interface seems like the easiest (if slowest) way to do so, and would be good for a first attempt.

Geometry would be created in Blender, and then the Geant4 Blender Script would send the geometry to Geant4 and run simulations. The results would then either be displayed by Geant4's OGLIX (probably easier) or on the Blender model by creating new objects.

One important option for the Geant4 Blender Script would be a length scale, i.e. "One Blender unit = X metres in Geant4", with options from nanometres to kilometres. Something else that needs careful thought is the results system. How would the results of the simulation be displayed in a scientifically useful fashion? The easiest thing to do would be just to export the particle endpoints (and possibly final energy, direction, energy deposition points, etc. via options) and let the user do the plotting themselves. This is good and bad from a usability point of view -- it makes the interface simpler. The user can use whatever data analysis package they are used to and competent with. For simple plots, such as a final energy spectra, it should be possible to use matplotlib to generate something directly from the script.

I predict that this project would take several months of work. It would likely release a deb package that installed all the requirements (dependency on Blender, the (compiled?) Geant4 libraries (in a separate package?), the script itself.

I would be hesitant about making a Windows version because I don't think it's easy to compile Geant4 for Windows. It's not as though Ubuntu is hard to install anyway, and scientists who need the capability shouldn't mind and probably have access to an Ubuntu machine anyway, or can ask their IT department for a server to run simulations on.

Saturday, August 21, 2010

The Australian Election

So I voted today.

It's quite sad to watch the two largest parties dragging each other down. I prefer to vote for someone with ideals (other than spin and getting elected).

The Liberals seem to be interested almost exclusively in businesses, which tend to be a bit sociopathic in my experience.

Labor are depressing -- they seem confused and quite right-wing. Malcolm Turnbull probably would have saved them, he impressed me on the Chaser last week -- quite statesmanlike, and catching the train! He's not a puppet. Tony Abbott is a bit ridiculous.

The Greens have ideals, but no-one really knows what they'd be like in government.

With any luck Conroy will be dumped.

Friday, August 20, 2010

Where are the aliens?

So I've come up with a few possible reasons why we haven't seen any aliens yet, despite the ridiculous amounts of time they've had to get here.
  1. There aren't any. Intelligent life realises how pointless existence is, and dies out. Evolution keeps intelligence levels just below this critical level until their resources are exhausted, and they die out without migrating to other planets.
  2. Interstellar travel is impossible. The energy cost is just too high, or interstellar radiation destroys organized molecules before they get anywhere.
  3. Interstellar travel is too slow. Travelling 1000 light years (1/100th of the galaxy's diameter) at 1% of lightspeed takes 100000 years, and when you get to the next habitable system you have to spend some time setting up (at least) fuel refineries etc. Intergalactic travel is right out.
  4. They know we're here, and they're leaving us alone. Not much else to say about this one.
  5. We're the first. Life just hasn't appeared anywhere else, because conditions are not right on other planets.

Thursday, June 17, 2010

Black Gold

HP Black Ink 56: 19mL¹, $34.87². Density approx. that of water, 1g/mL.

The density of gold is approx 19g/mL.

Price of gold: $46.15 /g

Price of HP#56: $34.87/(19mL * 1g/mL) ~= $2/g

30mL bottle of Pelikan 4001 Fountain Pen Ink: $10.95
1L bottle of Pelikan 4001 Fountain Pen Ink: €30 ~ $43
Pelikan 4001 by weight: $10.95 / (30mL * 1g/mL) = $0.37/g
Pelikan 4001 by weight: $43 / (1L * 1kg / L) = $0.04/g

Wednesday, May 26, 2010

Integral of four Hermite polynomials

Anyone know anything similar to Saalschutz's theorem?

I was trying to simplify the integral of four Hermite polynomials, and I can't get rid of the last summation.

Wednesday, May 12, 2010

Hey, everyone else was doing it

A malamanteau is a word which is both a portmanteau and a malapropism. This means that the word must
  • (portmanteau) be a combination of two (or more) other words (and their meanings), and
  • (malapropism) have been used because it sounds correct in that place in the sentence, but is actually either nonsensical or an unusual word.
"Malamanteau" also implies that the speaker or writer has used language in an unusual way.

The word was first published on the Internet here. The examples by which the word was defined are
During the first discussion, the guy described his misunderstanding of what someone was saying by stating, "I misconscrewed it up."

The second time, another guy explained his inability to talk while upset by saying he was, "flustrated."
In a curious twist, "malamanteau" is a portmanteau of "malapropism" and "portmanteau".

As a result of a recent xkcd comic, "malamanteau" is now also a neologism ("a newly coined word that may be in the process of entering common use, but has not yet been accepted into mainstream language").

Tuesday, May 11, 2010

1000 tonnes of CO₂ = 1 person's house.

So, here's a (ridiculously rough) calculation.

An increase of 200ppm (doubling) the CO₂ concentration in the atmosphere warms the globe considerably. Antarctica and Greenland melt, raising the sea level by 80m. Perhaps 1/6 of the world's population is displaced -- say 10⁹ people have their houses washed away. People tend to live near the coast, after all.

There are about 10⁴⁴ molecules in the atmosphere, so 200ppm is something like 2×10⁴⁰ molecules. This many molecules of CO₂ weighs about 10¹² tonnes.

So, for every thousand tonnes of CO₂ added to the atmosphere, one person's house gets washed away.

By way of comparison, the dirtiest power station in the world, Hazelwood, in Victoria, Australia, puts out 17 million tonnes of CO₂ every year. That's 17,000 people's homes worth.

I think it's time the world switched to nuclear power. If France can do it, surely the rest of us can? Some kind of thorium reactor would probably be the best option. Alternatively, a biological answer is also possible... but that would use a large fraction of the earth's surface given photosynthetic efficiency of about 1%.

Yep, no references. If we don't agree, do the calculation yourself with your own sources. Arguments about linearity etc. are probably valid too, but we have to admit that this gives us a rough idea.

Thursday, April 01, 2010

Measure eye-tracking speed easily

So my phone has a little flash-light that flashes (square wave) at 120 ± 2 Hz. It's easy to see if you move it around quickly, you get a trace like an oscilloscope would show. However there's a certain speed where if you move it slowly enough, all of a sudden your eye starts to track it properly and you can't tell that it's flashing any more.

This would be a good way to cheaply determine eye-response.

Just saying.

Saturday, March 13, 2010

ssh tunneling, explained simply

Many networks these days have closed networks connected to outside by gatekeepers. The way to connect to machines inside the network from outside is to use ssh tunneling via the gatekeepers.

This site explains how to do that clearly and simply for Linux, OSX and Windows.

In case that site disappears:

The linux command is
ssh -L 2222:internal_host:22 username@gatekeeper.uni.edu
where -L means 'forward local port' (once connected to the gatekeeper);
2222 is the local port on your localhost (the machine you are sitting in front of right now).
username is your username on the gatekeeper machine (and it will probably ask you for the connected password unless you have set up ssh keys)
internal_host is the DNS name of the host on the closed network you are trying to connect to
22 is the port on the internal host that you are trying to connect to
gatekeeper.uni.edu is the public DNS name on the wider internet of the gatekeeper.

After running this command, trying to connect to port 2222 on your local machine is the same as trying to connect to port 22 on the internal host from the gatekeeper.

Windows users use putty and put Source=2222 and Destination=internal_host:22 .

nxclient users should then tell their client to connect to localhost:2222 (i.e. through the tunnel) and then log in to the internal machine as normal.

Setting up keys

On the client, run

ssh-keygen

(and accept the default options). Once that's finished,

ssh-copy-id username@server

will add your key to the server. That's it!

Friday, February 26, 2010

High viscous fluid order

So I saw a video recently, and I can't find it on Youtube. Let me know if you have a copy:

A very viscous, transparent (I think sugar solution) fluid is in a beaker. A needle is used to inject a blob of ink, which remains suspended in the solution. A pole down the centre of the beaker is rotated, shearing the fluid and smearing out the blob into a ring. The pole rotates about 10 times, so that the blob is completely smeared out. The pole is then rotated back in the opposite direction and the blob reforms.

If I can't find a copy of the video I will try it myself.

Thursday, February 25, 2010

Sails and aerofoils

As a windsurfer and physicist, the aerodynamics of aerofoils are important to get right.

At the most basic level, modelling molecules with Newton's laws will get you the right result when simulating an aerofoil. However, an aerofoil does not simply deflect air downwards.

Actually this is hard to describe unambiguously, I can see why there are arguments.

Thoughts on the nature of light

The wave-particle duality of light has always bugged me. I have recently been thinking about how to simulate diffraction in a raytracer - could a ray perhaps have a certain radius in which it bends towards objects it passes close to?

This does still not account for interference. The fact that a photon travels through both slits of a double-slit experiment can be viewed as a photon in a coherent superposition.

It is quite likely that I am about to embarrass myself in exposing a woeful lack of understanding of optical quantum computing.

Does this then mean that we can use a double slit as an optical quantum computer? Actually, now that I think of it, probably not, because we can't develop gates that change behaviour of certain paths based on whether a photon passed through one slit or the other.

The result of a double-slit experiment (making some idealising assumptions) can be computed through the Fourier transform of a the slit arrangement. This in fact works for any series of slits.

Finally, the clinching proof that this is not possible is that Feynman showed that a classical computer cannot simulate a quantum computer in reasonable time. If it were possible, Feynman would have been wrong somehow.

So rememeber, quantum computing requires a way of interacting your qubits. Interference effects are not enough. I have seen interference being used in several experiments, however.. I don't understand how that works. Photons only interact with themselves... except in non-linear media, I guess. That must be it.

Thursday, February 18, 2010

Metropolis Light Transport is not unbiased

I believe MLT is a biased algorithm, as it doesn't sample rays randomly. Many papers discuss something called "start-up bias", which results from choosing the paths to be perturbed - those paths are rated as 'more important' by the algorithm.

One would think that as long as completely new paths to mutate are regularly chosen, then the algorithm will eventually converge to the same solution as normal path tracing with no mutating of paths. To take the extreme case, if every possible (within the computational accuracy of the machine) path is sampled an equal number of times, it doesn't matter if you did that using path mutation or not.

Another question, then, is whether or not the mutation process leads the renderer to implicitly favour some paths over others. For example, paths right on the edge of the light may have fewer valid paths near them and will thus be sampled less often. If this is the case, then I think MLT is ultimately biased.

Wednesday, February 17, 2010

World Peace

So, imagine we had world peace, guaranteed in some way.

Would that be a good thing? I think there would be a big risk of stagnation and decay.

Sunday, February 14, 2010

Wavefront rendering

I've been thinking about path tracing a lot lately, and I came up with a bad idea. Why it's bad is interesting though, as it demonstrates partly why physically-based rendering is so hard (complexity). I think it also validates path tracing as a good approach.

So, my idea was to take each emitter mesh, and propagate a single wavefront out through the scene. The mesh would be simplified as it propagated (retopologising, perhaps using Delauney triangulation). Once the wavefront was at a low enough intensity, it would not be reflected. The camera would then either receive all wavefronts on an image plane (which could potentially be stored as a hologram) or just raytrace the lit scene (seemed similar to radiosity).

Such a scheme would be able to store polarisation and phase in the wavefront, and thus calculate interference effects at surfaces (if previous wavefronts that hit the surface were recorded), and diffraction around barriers would be possible as well.

The problem with this approach is complexity. An area light at the top of a Cornell box is square. The left side sends light to the right, and the right side sends light to the left. A single mesh is not able to capture that much information -- my approach above was too simplistic.

The next step, then, is to make each part of the mesh emit spherical waves. We could then propagate them using the Huygens-Kirchoff principle if we cared about diffraction effects. This gets very complicated, as we almost need to store the state of light throughout the volume of interest, at a resolution good enough to observe interference effects (otherwise there's not much point using secondary waves at all). If we do not use secondary waves during propagation, but merely propagate the spherical waves outward, then this is a very complicated way of doing photon mapping.

So I conclude that this method, while interesting, is not practical, except for very specific scenes which may require such modelling.

Diffraction and interference are probably still better done storing and propagating phase with rays and image pixels - e.g. having 8 images, each storing the accumulated intensity for photons with a certain phase, and combining them to show interference effects at the end of rendering. Actually that sounds kind of cool, I'll have to try that one day. Diffraction could be done by using fuzzy intersection code and bending rays a random amount toward an edge when they went past an edge.

Edit: Someone's already thought of this, and called it Beam tracing.

Coanda effect helicopters

The person who takes these things, puts a camera on them and sells them for use following the action in sports television will make a fortune.

The idea is patented in the US; electric versions may not last long; it would be easy to have several and recharge them while others are flying.

I suspect the main challenge (after licensing) is in the control software. You'd either need very experienced pilots, or a good control system. A system that had the camera mounted with a gyro for stability like those old bomber turrets in a swivel ball would make things a lot easier for the pilot.

In case the above link is broken, I am referring to helicopters with dome-shaped bodies and a small blade on top that pushes air around the body; they fly as a result of the Coanda effect (the same one that most aeroplane wings use: faster air = lower pressure), as discussed on Slashdot.

Tuesday, February 09, 2010

solid state QC fabrication daydreaming

Well. One way would be to get bricks, 10nm^3 with sheer edges, and a single dopant at the centre. Constructing your QC would then simply be a matter of positioning bricks, perhaps by immersing them in liquid and pouring them over something.

The best strategy for regular arrays involves natural alignment through chemistry of some sort, for example if donors could be made to repel each other over some range, that would be very useful.

An alternative is some sort of nano-periodic structure that can be filled in in some kind of regular fashion and then etched away.

Perhaps a long biological molecule could be periodic on the scale required, and laid flat and straight on a substrate? The unwanted bits could then be removed, and crystal grown around the remainder..

Saturday, February 06, 2010

So yeah


I just finished this game,

and it was awesome,

and there's no SVG logo on the web.


Actually, the more surprising thing is that Double Fine doesn't sell a green turtleneck with this logo on it. I suppose they do have Kochamara...

Friday, January 29, 2010

2up page formatting with pages scaled better

So I print a lot of stuff (I can't afford an A4 sized ebook reader) 2 pages per side. The large margins have always annoyed me. Here's the solution.

Two 2 pages per sheet ps document (convert pdf to ps with ps2pdf), with page borders reduced by 1cm:

psnup -2 infile.ps outfile-2up.ps -Pletter -pa4 -b-1cm

-P input paper size
-p output paper size
-b border (margin) change

Changing different borders by different amounts is more complicated but can be done with pstops, and is left as an exercise for the reader.

Sunday, January 17, 2010

Because I forgot how to type unicode characters

The last post is the only one worth reading:

Applications that use newer GTK+ libraries (which includes all applications written for Gnome) require a "U" before the Unicode digits. Either of the following sequences should work:

Ctrl-Shift-U, hex codes, Spacebar

Hold down Ctrl-Shift, U, hex codes, release Ctrl-Shift