Wednesday, December 28, 2011

Fun with eutectic metals - Galinstan

I have been doing lots of full-wave electromagnetic simulation as part of my PhD and most of these techniques are applied for antenna design (as opposed to backscatter estimation for very complex targets i.e. forests). So naturally I decided sideways into antenna theory and started exploring malleable liquid antennas. These antennas have the advantage of taking strain and being easy to electro-mechanically tune and fit to a lot of form factors solid metal antennas cannot cope with.

The dominant material in liquid antennas is Galinstan - the mongrel made from Gallium, Indium and Stannum (well Tin). It sounds like some country in Asia Minor, next to Afganistan and Pakistan, but in fact it occupies a spot somewhere near Hydrargyrum (Mercury) in electrical and thermal properties. It is also not as toxic as Mercury, which caused the Mad Hatter and Isaac Newton to become rather eccentric.

Galinstan is apparently also rather useful for its ability to generate electricity when compressed, rather like piezo crystals. This has led to applications in the infamous heel/toe strike device, with patent holders claiming upto 10w per foot. I am sure the shoe phone is not far away.

Tuesday, December 27, 2011

Holiday in Adelaide - Ghosts of Christmas past

Last year was rather topsy-turvy for me, so this year I decided to jet back to Adelaide and spend Christmas with long time friends. The pre-christmas birthday party turned out to be a real blast. All the people I hadn't seen for years managed to turn up.


The hostel on Carrington is pretty fun as well, they laid out a Christmas spread, but I had an invitation to Hanukkah. Some drifting around the University, The SA Art Gallery and Glenelg ensued. I am still drawing away little things, learning scheme and swimming in the ocean.
The hostel has a huge collection of DVD's and books. I am burning through the massive Peter. F. Hamilton Tome - Pandora's Star, dragging it down to the beach when I can. Maybe I will finish it before I leave.

Tuesday, December 6, 2011

Time to move on and finish something

I recently resigned from my position at CSIRO. It was a great year but things were not working out. Peter Oke my bosses boss puts it like this:


"
I'm glad that we had the chance to discuss things with you and to understand your reasons for leaving. I recognise that finishing your PhD while working full time is very challenging, and that being away from family and friends is also difficult. So I understand and accept your reasons for leaving.
"

I managed to learn a lot in this year. Particularly about NetCDF vagaries - it is a bucket, just stick some labels on and put bits in it. It so reminds me of formalin filled viscera buckets we used to have in CMC SFI (the CPM's students' wing) Hostel, labeled - lungs, hearts, guts etc. I learnt some thing about the data collection, assimilation and simulations which produce these nasty monolithic and often badly labelled NetCDF beasts. Some of the nicer output comes from SHOC, XBEACH and ROMS.

It is now time to head back to the electromagnetic world and do some microwave bending. I have a bit to code and write up on Chapter 3 of my thesis. Concerning mostly 2D FDTD modelling of tree stands with open canopy and resultant impact on the scattering centres at different polarisations. Since I have chosen to use MEEP, this will involve learning some more Scheme.

Tuesday, November 15, 2011

OSDC 2011 - MiniConf Redux

Last couple of days I hung around Canberra attending the OSDC in ANU and drinking gallons of orange juice and tomato juice in pubs.

The morning was spent catching up on PHP. I learnt stuff like traits, hiphop (via Facebook),  odata (via Microsoft),

On the first day I assisted Jody in running the Geotools workshop. Only a small fraction turned up with laptops, so it was a rather cozy session. I met some old acquaintances again - Matt Paget from CSIRO Black Mountain (TERN) and Kelvin from Adelaide Uni now at DSD.
Osdc geotools students
Osdc geotools the teacherWe celebrated the after conference party at a quiz night, where team OSDC consistently got the lowest score and I learnt trivia like there have been 5 different images of the queen on the Australian coins. The second day was a mad Arduino rush. I acquired an Arduino Uno via Littlebird and lots of wisdom concerning making PCB's and making lights blink in fancier and fancier ways.
Apparently once you have fallen in love with Ferric Chloride you will never go back to anything else for etching. I now just need to find someone to come and have a look at my etchings.

Monday, October 24, 2011

Carbon Accounting and Mine Sweeping in The Tarkine

Last week I had a super-long weekend thanks to the Hobart showday public holiday added to burning one day off my annual leave. Instead of enjoying the g-forces on offer at the show I went to the Tarkine with TWS to do some more community carbon accounting.

We stayed near Edith Creek , I obstinately refused to take a bed and occupied the drawing room floor. We covered 6 or so sites in a couple of days. The first day was mostly spent driving up and setting up camp. One of the most interesting sites was along a creek, the ground was full of burrows made by mini mud crayfish. 

We also the proposed site of the Shree open cut iron mine and  took some group photos.

Tuesday, October 18, 2011

The iGlobe project - Globe + N-d data + Intelligence

Patrick at NASA is amazing at putting people together, he put CSIRO Marine and Atmospheric Research ( who provide my daily bread currently ) , ORNL , NOAA and NASA itself. This project aims to visualise space-time resolved datasets in the globe context. With proper planetary projections on any object.

We had internally started building blocks of a large modular data visualisation framework called TrikeND, this was a natural choice to attach it to the globe context via worldwind. Even though scientists often prefer to see the data in pure form without being attached to the globe, so we have alternative renderers such as VTK and Jzy3D in the sights in addition to iGlobe. The primary data source is NetCDF, but we also provision GIS formats via Geotools, I put in sometime experimenting with OSGification of Geotools, with lots of help from Mathieu and Jody. This is designed to carry on from our legacy product DIVE.
DIVE Use cases

iGlobe focuses on addressing the following issues:

Vector field rendered in iGlobe

1: Streaming large datasets from where they sit to where they are viewed. We would like to use standard protocols where possible, especially WCS NetCDF profile and OPeNDAP.
2: Providing heuristics to identify the right fields to be visualised as scalars, vectors and tensors.
3: Different display techniques for rendering scalar and vector fields, including volume visualisation with voxel and slice based techniques, display lists, vertex array, VBO , true impostors and other usual suspects.
4: Coherent time-locked animations keeping all the layers in sync in real/model time domain.
5: Transparent analysis techniques running on small problems on the client side and calling on server resources for large problems. Varun has been implementing various data mining techniques including FFT, change detection and anomaly detection.

There is lot more to come including an opportunity run iGlobe as part of an experiment on the ISS.

Sunday, October 16, 2011

The Hobart Giraffe hunt

The other day while walking to salsa I met someone who likes giraffes. So I went on a week-long artistic giraffe hunt to please her. I acquired and made giraffes using various materials and metaphors, and I still have enough inertia to keep collecting, even though my muse has moved on.


  1. First one acquired was a Kenyan wooden sculpture. This has been passed on to a very good friend in Adelaide.
  2. I drew it up as a sketch, first in my new Moleskine - iCamera. This has been donated to the Ivory, great place to relax, have a drink and draw in peace.
  3. I used the wooden giraffe sculpture and drawing as models and built a paperclip and random stuff sculpture. This one has gone to a sculpture student at UTAS.
  4. Learnt that we have been invited to submit an experiment for the ISS and made an origami coin box giraffe (which was declared a Brontosaurus).
  5. Walking back spotted the initial giraffe available at Despards Gallery and bought it up.
  6. A soft and cuddly one from Teddy Bear store, this one got ogled on the way back to base and possibly jinxed the whole process. So I have donated it back to the jinxer. There is still a limited edition collectable hanging out in the store which I might get at some point in the future.
  7. The papier mache giraffe made in Philippines that I picked up while drifting around in Spotlight. During this drift I also met someone who has been awarded a scholarship to create piece based on the Monomyth at MONA. This giraffe ended up acquiring a knuckle mark on one of my adventures around the xenophobic parts of Hobart town. I passed it on to my French housemate.

Thursday, October 13, 2011

The lost generation of Tasmania - citizens of Xenophobart

There seems to be a generation of lost Tasmanian kids, 18-25 drifting around in the streets.

Begging in the mall, fighting and very obviously picking on me. Since I tend to focus their
attention by being different, wearing funny hats never helps.

V for Vandetta

I have had a few conversations with older Tasmanians today ( and lodged the information about
harassment incidences with the police). The welfare system seems to have nurtured a generation
of value nothingers who think money comes out of a hole in the wall, as far as their limited ability can penetrate the financial system( lack of education seems to be a key), it indeed does.


They feel the world owes them everything, stuff will just fall in their path. The haves have to
hand over all they have to the can't-be-bothered-to-work-for-its.

Yet I have met some amazing older Tasmanians. I carpenter whose book is choke full of quantum
physics. Intellectual giants and pranksters at the Tasmania Wilderness Society.
Nick and Nancy, amazingly creative pair of people. Not to mention my superhuman colleagues at
CSIRO.

But where does all the sanity leak away at night ?

The night the night, 
when the armies of emotions come out to fight ! 

Lost property
What happened 20 years ago to produce this lost generation of Tasmanian youth ? They come to MONA, hook themselves up to the euthanasia machine and complain about not dying.

Sunday, October 2, 2011

Carbon Accounting in Blue Tier

Last weekend was full of veriditas, I did community carbon accounting with the Tasmania Wilderness Society. It was my first time bush bashing in through one of the older Tasmanian forests. The trip to Mt. Fields was way more touristy than this.

I had the privilege of wearing the Tasmanian Devil costume and posing in front of an imposing Eucalyptus Regnans. The rest of the two days involved dancing and scrambling through undergrowth measuring dead and alive trees, quantifying to the best of our ability the cycle of life in the forest.
The tools of the trade are - diameter tape, study area marker ribbons and data collection sheets. The work area is laid out along the slope with tape and compass and the perimeter of the stratified sampling sites marked with ribbons.
The accommodation was in a set of ritzy bunks at Weldborough, followed by a second day of crawling around in Macquarie vines.
I managed to fit in some Gargoyle mode headgear design using the XTion and Infra-red cameras to document the forest. I hope to have a functional prototype before the next field trip. With enough data we may be able to solve allometric issues with smaller species such as tree-ferns and vines.

Monday, September 19, 2011

Are you artier than a fifth grader ?

Once upon I time while I still used to watch TV (instead of the world go by, which is much more interesting), Rove used to host a show called "are you smarter than a fifth grader". It seems that it is still on. The show mostly tested textual and numerical skills or pure recall (very left brained). I have recently started experimenting with drawing techniques and I hear "My 5th Grader could have done that" quite often. It is so nice to see young talent, and I do indeed have some pieces from the open-sketchbook project proving the beauty of children's artwork.

So I am putting forward here a right-brained show in the same vein. Put an established artist and a 5th grader in the same stimuli field and let them each produce a piece. Then do a double-blind test with a jury of their peers (both age groups need to be represented since art is highly subjective), on which one is better. It may get hard to keep the stimuli field interesting for the adult and the child at the same time. I did one of my coolest subliminals while watching Final Destination 5.

I believe the education system currently established is very asymmetric and a right brained show may help highlight this or prove me wrong ( none are so blind as those who will not see).  Just to keep it clear on my belief in children's abilities, the bits of TV (Time Tunnel) I do watch is recommended by kids I meet while walking to Salsa.

Thursday, September 15, 2011

ESA SOCIS - Coding in the Space Space

The summer of code pattern seems to have become rather popular, pity it is a mis-nomer for us Southern hemisphere folk, that's what you get for the earth being top heavy in landmass ( whoever decided they are on top anyway).

This year the European Space Agency (ESA) is running an SOC event, the catch line being a slight variant of the Copenhagen Interpretation. The two projects I am associated with are:
  1. Orfeo Toolbox SAR Interferometry support - This one is academically of most interest to me, there have been several attempts to develop the interferometry chain in open source, but they have not been properly software engineered, have dubious licensing or other shortcomings. More on this project and the teething issues encountered later.
  2. iGlobe NetCDF support enhancements - This one is professionally of most interest to me. Patrick at NASA recently put us (CSIRO) together with NOAA, NASA and ORNL to build and application tying NetCDF to WorldWind. We are planning to explore large data visualisation techniques and get best possible performance and accuracy. As well as include some analysis capability. The project is code named iGlobe.


These projects will bring my student supervision quota up-to 5 for this year, I have only had them for 3 months and there has been a huge amount work delivered. I wish I had this kind of free labour and velocity at the real workplace.

Sunday, September 4, 2011

Making NetCDF Faster, microbenchmarks on macro .nc

We have several very large NetCDF datasets with lots of variables to visualise. I have a gut feeling that file sizes are an issue and there is a bottleneck at the disk to RAM stage, but how do I prove it ? By writing a set of micro-benchmarks to test the various storage and access options. The options are:

1) Storage pattern - NetCDF allows vanilla NetCDF3, Lossy Packing, Lossless Deflation, Chunking and combinations of the aforementioned schemes for storage. If data fidelity is not an issue (as in the case of materialised overviews) , my benchmarks indicate that Lossy Packing is the best way to go.

2) Access pattern - The beast under scrutiny was 27GB RAMS Atmospheric model with 50+ variables. The biggest variable chews up 2GB of RAM if you load it all at once. Full data load takes 1000s, while 1/16th load in all dimensions takes 600ms. If just edges are read to perform a bounding box style render that is quicker as well. The exact access pattern used will depend on the volume rendering technique chosen. There are also asymmetries in accessing the beginning and ending of the variables. This indicates linear seeks across files.

3) Access Path - Still need to compare access via the C-library+JNA/JNI rather than pure Java. John Caron seems to have done it a while ago, but I am still agonising over how to activate this experimental code in the current version of the library.

PS: I have got the JNA code working with NetCDF-Java and started a dialog with John.

Tuesday, August 30, 2011

The opensketchbook project and drunk louts in Salamanca

I suffer from a lot of ailments one of them is "Hypertransparency" - as one of the pieces in Experimenta Utopia puts it:

With hypertransparency you get a society of chameleons and octopi.

I have been involved in open source projects, then open hardware projects, now I am trying my hand at open artware. I just give my sketchbook out to willing hands with some material ( it has mostly been mechanical pencil, charcoal and calligraphy pen) and ask for a contribution. Sometime willing hands find my book lying unattended in a public place and ninja in some contribution ( others would derisively call it graffiti, but I like graffiti).
First night of the open Sketchbook project Phoebe,  Aaron and... on Twitpic
I have run the project in bars, clubs, at MONA and even in my colleague's office in Canberra. Thank you all for willingly contributing to make my blank white pages interesting. I am not aiming to curate, the sample here is merely the first contributions rather than any qualitative measure - art is a subjective personal matter after all.

I wish drunk and drugged people in Salamanca late on weekend nights would let me be who I am and not harass me for my skin colour.

Tuesday, August 23, 2011

Week of fun Hardware - Octocopter, Extruder, Kinect Poetry and MIDI 2 Life

Last week was an amazing overload of gadgets (with some flying to Canberra and hanging out at a bar with E-Tax release manager thrown in). First highlight was the Octocopter at UTAS - it is indeed a massive beast with 8kg border line payload, paltry 5 minute endurance, but it gets the kit off the ground. I also saw some of the amazing work Arko has been doing with Bundler, PMVS and Meshlab.

 The night before I went to Canberra, there was a Sound2Lights show in the Long Gallery with lots of cool gadgets. Including the aforementioned Rep-rap extruder printing out music (Joseph) , a Kinect you had to do a weird dance to get to put words in place (and possibly rhyme and form poetry - Aaron) and of course Nick's game of life with music controlling organisms rendered in Unity 3D.

Thursday early in the morning I flew off to Canberra to help deploy Australia wide terrain, but that is another story.

Monday, August 15, 2011

Sketching paintings and taking photos of sketches - metaart

Lately I have been hopping around the world sketching a lot of things I see. I only got told off, actually mildly reprimanded for doing so yesterday at the Henry Jones art hotel. I have been practicing what I can best describe as meta-art or referential art (without repeating all of the title of this post), like this Picasso piece titled etudes. The work at the art hotel is on display for sale purposes and sketching them steals their soul and reduces value.


At least MONA does not suffer from such constraints and I happily reproduced different views of the fat car, plastic enhanced Porsche in pencil, together with glimpses of the surrounding material and carbon-dioxide sensors.

On the ferry back I ran into some very nosy Hobartian who have been snooping on our conversations at Dr. Coffee, but such are the charms of a small town. Now I know who to watch out for when expounding on the joys of Navier-Stokes.

Saturday, August 13, 2011

Confessions of a Google Tourist ( via Stan)

On Wednesday last week I managed to visit Emmanuel and get a guided tour of Googleplex. Patrick dropped me off and asked him to take good care of me. I got free lunch and free dinner - I consider that very good care.

Google is all about software engineering and scalability, now with G+ they are getting into some social engineering as well. As a contribution from the society of people priviledged to visit Google and if you use it file a bug/feature request mentality I get from open source, I started filing thing straight away:
  1. The visitor registration screen asked if you were from Sudan(s), since sometime last month there is no more Sudan. The registration text needed updating.
  2. The glass elevator needs to have the ability to play through time, so that I can show the Southern Surveyor arriving and leaving the docks outside work and the snow levels shifting on Mt. Wellington. I would also like it to have a roof and a floor (whatnick pavement view to be released soon) and seamlessly transition into streetview.
We then drifted off into philosophical discussions about software and refactoring being somewhat similar to Mandala's. Make it - learn about it - throw it away - do it again. The stroll down from Googleplex to the Mountain View Wetlands is great for taking in the squirrels and owls along with other wetland birds.
Here is what we are sending you from YVR @melaneum on Twitpic

After the walk, we finished off the evening with stacks of crepe and conversation. The little boy seems to like the "Sterling Dervish" from Forkometry which is a good sign.

Monday, August 8, 2011

Life and Times of a NASA International Visitor

Monday, 1st of August 2011, I officially signed in as a NASA visitor. Patrick gave me a grand tour of the place. Since photography would get us into trouble in most of the places I resorted to sketching things up. First stop was the Vertical Motion Simulator, which was simulating a VTOL aircraft (tilt-rotor) when we got there. We saw Hangar one (big blimp hangar), the uber Wind tunnel with hockey playing equipment strewn in front of it. We then discussed the past, present and future of WorldWind, Globe viewing client, scalable + distributed data serving, porting to Android platforms and much much more. We finally had a small timeslot to catch up with Mars Rover software team, heavy users of the Ardor3D Java based game engine. I have been building OSGi manifests into Ardor3D and I was preaching the use of the manifest enabled jars in their projects - Antares and Verve. I also discussed the differences between Clipmapped terrain (as in Ardor3d) and Chunked LOD (as in WorldWind) with Leslie and how we can merge the 2 techniques for large terrain rendering to make something scalable, accurate and aesthetically pleasing.
Day two I sat in on one of the WorldWind team telecons and got wind of the developments on Android and challenges of a multitouch interface user semantics, as well as scalability required to proxy and deploy Microsoft Virtual Earth datasets.
On Friday I had a joint showing with Bruce from Emxsys and caught up with Vince Ambrosia and team from the WRAP project. We discussed coupled fire models (terrain + fuel + wind + fire) and UAV derived information assimilation for training and operational fire fighting purposes. Another show-n-tell in NASA hangars followed (including ogling at Google Jets parked in there). We saw the mostly moulded carbon fibre hull SIERRA and discussed air-space management during fires to allow use of UAV's.

Over all it was a highly enlightening trip. One I would like to repeat as soon as possible.

Tuesday, August 2, 2011

Bumping into people in Mountain View - Part 1

The last few days in Mountain View have been full of chance encounters. I better jot them down before they fade from memory. I walked into the US, literally, at Vancouver airport. The passport got stamped by US Customs and bits of Vancouver airport are technically US territory.

On the flight I sat next to a lady (librarian) with sons in Stanford and Twitter. Interesting discussions ensued regarding DNA untwisting and social sensing via Twitter. I caught a cab-ride from SFO to my hotel in Mountain View and promptly fell asleep.

Saturday I visited the NASA AMES' open to public show case and drowned in a sea of high-schoolers visiting under the SMASH umbrella. I listened to a bit of a talk on SOFIA - air-borne telescope. I piped up about seeing infrared with mobile phones and open source at NASA (in response to a student question). This earned me a new label - "mysterious stranger".

I strolled down Moffett Blvd towards Castro hunting for some dinner. A couple rode past on bikes and they were rather offended when I said I didn't know who they were (apparently local TV personalities). I was looking lost at a set of traffic lights and the Mac Outlook lead walked past with his wife and guided me. Some more dining and penciling in what I saw followed.

Sunday I took a trip to the end-of-line in VTA light rail, all the way to Almaden. Then tramped a few more miles to the old Almaden Vineyard site (now a bunch of houses), this was apparently California's first winery. I acquired some charcoal for drawing along the way and made another chance stop at the house of some kids I had met on the train to refill my water bottle. Almaden trip was rounded off by a scramble along the rocky edge of Almaden Lake.

The hopped off the return train to Downtown Mountain View and went into the wine bar at the station. I was trying out my newly acquired charcoal on some wine racks and a chandelier, when an ex-Lockheed employee walked in and talked about his work on the batteries on the Hubble space telescope. So a rendition of Hubble and his name got attached to couple of pages filled with wine racks.

On Monday I visited Patrick and couple of people from the Mars Rover team at NASA, but that is another post. No chance encounter took place.

Sunday, July 31, 2011

IGARSS 2011 Vancouver - Redux (So that you don't fall asleep)

It took a lot of messing around and changing flights to get there but thanks to the excellent folk at Flight Centre Melbourne Airport I arrived on time , left Melbourne 25th July Morning 10:30am and arrived in Vancouver 25th July 7:30am. Again proving the fact that a teleporter is indeed equivalent to a time machine.

Screen shot 2011-07-31 at 6.03.47 PM

This monday turned out to be full-on 48hour monday, lots of interesting sessions to go to. I attended the plenary by Shimada San introducing ALOS-2 and ALOS-3 with next generations of the great optical and SAR sensors we have come to expect from the Japanese. May be I can sneak into the CALVAL stage and score another trip to Japan.


More flight dramas continued in the background, the presentations blurred into a constant stream of words and diagrams on my sketchbook in the foreground. I learnt a lot about what has been done in the past year and what is coming over the horizon.

I saw science solving political problems with cross-boundary river basin monitoring with Poseidon, Jason-1 and in the future Jason-2. Important basins across unfriendly countries such as Indus, Ganges, Brahmaputra and the Mekong can be monitored by the international science community and appropriate alerts sent and action taken when one of the partner nations or the weather in the river basin begins to misbehave.

I saw the cold-gas (NO2) driven engines that keep TerraSAR-X and Tandem-X locked in their helical dance, not forever, only till the global elevation model project is complete or the gas runs out - whichever comes first. Some extra effort will be required to collect the elevation model of Antarctica, since the satellites will need to be rolled to face left. This is where the polar observation satellites - Cryosat-2 and more, will make a great impact.

I used the conference services a fair bit as well and got labelled "the troublemaker" - thanks people. If you want to get in touch with me just search for the troublemaker at IGARSS.

The real highlights of the week however were the impromptu dinner get-togethers. After the poster session on Monday I drifted off with SAR people from Spain and a few other places. Tuesday night was spent with the OTB team and a fun Columbian guy from ITC. Scientists on one night, engineers on another, we discussed the transition from Science to Engineering to Products, and the effort and mindsets it takes to go the next step, and how the last step provides continuing fuel for the first. The next night it was back to science setting up a collaboration aimed at just such a transition for the OTB ESA Summer of Code in Space (ESA SOCIS 2011). Thursday evening I had great stroll through the Sun Yat Sen garden, dinner at Shukaku and a movie at the Scotiabank Theatre - ultimate self indulgence. Friday, went to very few sessions and spent most of the time in Stanley park sketching totem poles, before catching a flight out. Thank you for a great time Vancouver - I will definitely be back.

Thursday, July 21, 2011

Getting some fish into WorldWind

Last few days I have gone back to biological data, well animal tracks. CSIRO has put together a very nice oceantracks website using the amazing Indie game engine - Unity 3D (amazing in every way except running on Linux). It runs on Android, so with some effort on GL-ES front it can be made to work on Linux.



Talking about multi-platform game engines the other impressive one is Ardor3D,  not that OGRE or Irrilicht are bad. It is just easier to get going without getting platform specific binaries or needing to set up a large tool-chain. It is also easier to maintain the Java based game engine on top of JOGL and LWJGL instead of maintaining JNI bindings to a C++ engine (especially if your bindings are outside the source tree) . The other large draw from Ardor is the JOGL based rendering which lets us share the GLContext between Ardor and WorldWind, as I have done in jaxb-collada (lots of thanks to the original Ardor hack post and improvements from niccastel and brujito). Some pretty famous use-cases have picked Ardor up as their rendering engine including the Mars rover project, I hope to catch up with them in a few weeks. May be the local guys down here in Hobart will adopt it as a mission control system for the SLOCUM Gliders.


There are some altitude setting bugs in the Ardor3D+WorldWind code , and the animations key-frames are not enabled, but the models load nicely and will look great with some more water surface shaders and actual track data.

WorldWind_Tuna

Friday, July 15, 2011

GSOC 2011 - Sub-surface Features in WorldWind

Honestly I did not sign up to mentor this project, but I kind of drifted into throwing some advice by the way of the student. Doing a prototype of sub-surface visualisation is not at all difficult, but it is difficult to get it right, to convey the information without losing the context provided by the draped textures.

California Seismic or Australia Boreholes data goes down into the earth's crust. The crust is not that thick (only a few 10's of km in the 6000 or so km's of earth radius). Thinks get a bit weird in portraying things accurately while using vertical exaggeration. The surface of the earth becomes a bit of an event horizon. Nevertheless good progress has been made with changing the transparency of the surface textures and deploying secondary meshes below the normal terrain mesh. The aim is to get something close to Rockworks. The implementation so far tweaking secondary meshes in WorldWind can be seen here:

Tuesday, June 28, 2011

GSOC 2011 - PyOssim

The awesome Ossim library has served me (and disaster situations in New Orleans and Haiti) in getting large amount of imagery processed accurately and without too much manual messing around.

OSSIM already sports a JNI wrapper tying the rich C++ library to the JVM (I loathe to say Java - it is such a verbose and bureaucratic language). Coming from C++, an Ossim wrapper should attach to a more dynamic language. Indeed the OMAR developers chose to write it mostly in Groovy+Grails.
Ship Tracks in OssimPlanet

This year the GSOC project is aiming to wrap some important bits of the vast library using SWIG for use in CPython. Writing a SWIG wrapper can be painful at the best of times as I found out during my Kinect SWIG work. In spite of the hurdles Vipul has made decent progress and made some of the previous work with JNI + SWIG compile in the Python context. Now he is starting fresh from a purely Python perspective, we will figure out which functions are important and should form the seed for a python wrapping project.

If it all becomes too hard to do with CPython, we might stick with the link to JVM and script Ossim with Jython.

Sunday, June 26, 2011

GSOC 2011 - Ship Detection in Opticks

This is my second mentoring stint for the Google Summer of Code. I am advising on 3 separate projects in different capacities.
  1. Ship + wake detection and parameter estimation using Radar images in Opticks
  2. Wrapping the awesome OSSIM library in python
  3. Displaying sub-surface features in a 3D globe - NASA WorldWind
This post is going to be the first in a series describing the goals of each of the projects and where we are so far in them. In my personal opinion given the complexity of the algorithms involved and the visual outputs the ship detection project has progressed the farthest. We are using a beautiful 3m TerraSAR-X image from DLR as the basis for our implementation.

The various algorithms we have thrown in include:

1) CFAR with k-distribution model of the clutter
2) Elliptical width, height and orientation estimation
3) Isodata clustering for ship points
4) Linear feature (wake) detection with radon transform
5) Conversion of ship to wake displacement to ship velocity using satellite trajectory and imaging mode

Vijay is in his 5th week now and has been making great progress, picking up algorithms from various examples and adapting them to Opticks.

Monday, June 20, 2011

WebGL globes round up - in the face of security

WebGL bring the the OpenGL Embedded Systems (ES) profile to the virtual machine that the web browser is rapidly becoming. Microsoft has hit the headlines in the last few days with their proclamations about the security holes created by WebGL and their reluctance to fix them. They might be trying to plug any holes in their answer to high performance graphics in the browser - Silverlight, may be they can reuse the silverlight code to plug the GPU access security holes.

I wasn't going to rant about IE's double-standards but summarise a few WebGL globes I have come across, so here goes:
  1. A very early port of NASA WorldWind API to WebGL - Lanyard.
  2. The Swiss OpenWebGlobe.
  3. Google's data visualisation globe.
  4. WebGL Earth from Klokan.
  5. Godzi globe from Pelican.
Let us just hope that Microsoft pulls its head out of the sand and works on securing GPU access via no-matter which technology. Meanwhile I will rush off to build a video buffer capture with handhacked versions of JOGL (if anyone ever accepts my signature). What Javascript really needs is establishment of trust and signed execution.

Sunday, June 19, 2011

Why choose a language when you can be a Polyglot

Flamewars between language fanatics often gets in the way of "getting things done". I pick up languages fairly quickly and appreciate their benefits and short comings. After a fair bit of survey it seems like no language will instantly have familiarity and features concurrently, not unless it is also attached to a time machine and a brain washer. So why not call a truce and support them all (or most) - on a half-decent industry standard VM (no matter how much you dislike oracle).

Dynamic languages are a lot of fun to develop with, you can create prototypes quickly and have a tight feedback loop of your application taking shape. Sometimes the heuristics built into an application are not the right ones (u,v in vector interpretation are swapped, some format loader does not quite do what you expect). The expert/inquisitive user should be able to fix these vagaries at runtime and make the application behave. Any self-respecting application should include such dynamic scriptablity (Qgis does via CPython/SIP, Geoscript is nascent).
Matlab JSR-223

The REPL based languages that we are aiming to support via JSR 223 include:
  1. Jython - with standard JSR 223.
  2. JavaScript - with Mozilla Rhino, browser JNI bindings can be lobbed in as needed.
  3. JRuby - again we get JSR 223 for free.
  4. Groovy - the standard interface is not enough for delving in the depths of Groovy, but it does the job.
  5. R - I hacked together a placeholder based on the JNI based rJava project, there are standard implementations but they don't play along nicely with our integration framework yet.
  6. Perl - Another day another hack for the Inline::Java JNI based calls to the Perl interpreter.
  7. Matlab - I had a chance to delve deep into the innards of Matlab and discovered a native and jvm based beast. There are several hacks to talk to Matlab from Java including running your Java code on the same VM Matlab is running (it even includes the felix runtime and scr). For now I am using matlabcontrol with some JSR-223 linkage.
The current integration tests with patchwork hooks to convert SUN Spi to OSGi Services looks something like below.


INFO: Testing Script Engine: jython
Jun 19, 2011 12:53:36 PM org.trikend.script.test.ScriptTest testConsole
INFO: Testing Script Engine: javascript
Jun 19, 2011 12:53:36 PM org.trikend.script.test.ScriptTest testConsole
INFO: Testing Script Engine: jruby
Jun 19, 2011 12:53:37 PM org.trikend.script.test.ScriptTest testConsole
INFO: Testing Script Engine: groovy
Jun 19, 2011 12:53:37 PM org.trikend.script.test.ScriptTest testConsole
INFO: Testing Script Engine: R
Jun 19, 2011 12:53:38 PM org.trikend.script.test.ScriptTest testConsole
INFO: Testing Script Engine: perl
Jun 19, 2011 12:53:38 PM org.trikend.script.test.ScriptTest testConsole
INFO: Testing Script Engine: matlab

A JSR-223 bridge may not do it justice and we may have to write our entire high-reliability portion of the system in Erjang, but that will not stop me from adding an Eshell to the integration test next. The java scripting project feels dead for a year, possibly due to Oracle turmoil, if there is any news on this front and Github forks alive and kicking I would really like to know. Other syntaxes and languages with fun features to evaluate would be: Scala + Akka, Clojure and Gosu.

Monday, June 13, 2011

CMAR Python Be-In - converting Matlab/R/VB folks

Last couple of days we have been running a coffee and cake fueled Be-In/Hackfest to learn Python at CSIRO CMAR. In the oceanography community a lot of coding goes on, the large models are written in Fortran and C. The throw-away prototyping is done in Matlab by physical oceanographers and in R by biologists.

R is open source and contribution/hacking friendly, but Matlab is another story altogether. Matlab however has a rich set of documentation and toolboxes which you will probably never read or use, just like you will never redline the tacho in your car - but one gets the comfortable feeling of knowing it is there in case something goes wrong. I was aiming for positive reviews like these.

In my true UI's are the best fashion I did a short IDE round up which you can find here. I learnt a lot about requirements of true large data processing, caveats in python and some backend magic for matplotlib. Also got a chance to look at the scripting API for Java and the pains with the SPI service registries and the death of com.sun.

Since we are on the Python topic I mucked around with running Matlab style functions from Python via Scilab (Java Matlab look alike). Data gets passed around Python Interpreter to Java VM for the sake of syntactic familiarity. After a couple of build hick-ups:
  • locating includes due to scilab layout on Ubuntu
  • launching with jvm and libjava on LD_LIBRARY_PATH
  • proper setting of SCI env variable to /usr/share/scilab 
I had a matlab like API in Python. So I tried comparing computation of matrix inverses:
inverse_images

pylab_scilab


In [81]: from numpy.linalg import pinv,inv
In [82]: from scilab import scilab as sci
In [83]: x = sci.rand(100,100)
In [84]: from pylab import imshow,show
In [85]: a = inv(x)
In [86]: b = pinv(x)
In [87]: c = sci.inv(x)
In [88]: figure(1)
In [89]: imshow(a-b)
In [90]: figure(2)
In [91]: imshow(a-c)
In [92]: figure(3)
In [93]: imshow(b-c)


The inverse calculation is a fairly complex series of floating point operations and errors accumulate between the different techniques in the order of 4x10^-15 for the random array. No wonder results from matlab don't match up with those from Scilab and Numpy. Next I will grab a copy of Matlab and use mlabwrap to compare with the "real matlab" computed inverses.

PS: mlabwrap results are in, how do I tell which inverse is more "correct" suggestions welcome.
In [42]: mean(abs(sci.inv(x)-mlab.inv(x)))
Out[42]: 1.0797192783948417e-14
In [43]: mean(abs(sci.inv(x)-inv(x)))
Out[43]: 1.1512191793925341e-15
In [44]: mean(abs(inv(x)-mlab.inv(x)))
Out[44]: 1.0661985412661976e-14