Thursday, May 7, 2009

Shortcut to paste plain text in MS Word

A serious let down of MS Word is the hoops it makes you jump through to paste text from other documents, web pages, emails, or spreadhseets without bringing all the unwanted formatting accross. Just give me the plain text! I don't want to go through the awkward Paste Special dialog box everytime.

Thankfully a Lifehacker reader has posted an easy solution for use in Word 2007. It can be easily adapted for earlier versions, like Word 2003, as follows:


  1. Go to Tools->Macro->Macros.

  2. Enter PasteSpecial under the Macro name.

  3. Click Create

  4. Replace the contents of the code editor with the following text:
    Sub PasteSpecial()
    Selection.PasteSpecial DataType:=wdPasteText
    End Sub

  5. Hit Save and then close the editor.

  6. From the Word menu bar go to Tools->Customize. On any tab hit the Keyboard button.

  7. In the left hand list scroll to Macros. In the right hand list scroll to PasteSpecial. Assign a new keyboard shortcut key in the box below by pressing the desired combination. Ctrl+Shift+V is a good option to replace the existing shortcut to the default Paste Special dialog box (which you can still reach from the menu bar).

Easy peasy.

Saturday, November 1, 2008

Finished my inversion PhD thesis


Today I finalised my Ph.D. thesis,
Geologically-constrained UBC–GIF gravity and magnetic inversions with examples from the Agnew-Wiluna greenstone belt, Western Australia
having passed my oral thesis defense on October 24th. It has been a fairly grueling year, but I am very pleased with the result. The thesis abstract abstract is presented below and the full thesis is available here.
Geologically-constrained inversion of geophysical data is a powerful method for predicting geology beneath cover. The process seeks 3D physical property models that are consistent with the geology and explain measured geophysical responses. The recovered models can guide mineral explorers to prospective host rocks, structures, alteration and mineralisation. This thesis provides a comprehensive analysis of how the University of British Columbia Geophysical Inversion Facility (UBC–GIF) gravity and magnetic inversions can be applied to subsurface mapping and exploration by demonstrating the necessary approach, data types, and typical results.

The non-uniqueness of inversion demands that geological information be included. Commonly available geological data, including structural and physical property measurements, mapping, drilling, and 3D interpretations, can be translated into appropriate inversion constraints using tools developed herein. Surface information provides the greatest improvement in the reliability of recovered models; drilling information enhances resolution at depth. The process used to prepare inversions is as important as the geological constraints themselves. Use of a systematic workflow, as developed in this study, minimises any introduced ambiguity. Key steps include defining the problem, preparing the data, setting inversion parameters and developing geological constraints.

Once reliable physical property models are recovered they must be interpreted in a geological context. Where alteration and mineralisation occupy significant volumes, the mineralogy associated with the physical properties can be identified; otherwise a lithological classification of the properties can be applied. This approach is used to develop predictive 3D lithological maps from geologically-constrained gravity and magnetic inversions at several scales in the Agnew-Wiluna greenstone belt in Australia’s Yilgarn Craton. These maps indicate a spatial correlation between thick mafic-ultramafic rock packages and gold deposit locations, suggesting a shared structural control. The maps also identify structural geometries and relationships consistent with the published regional tectonic framework.

Geophysical inversion provides a framework into which geological and geophysical data sets can be integrated to produce a holistic prediction of the subsurface. The best possible result is one that cannot be dismissed as inconsistent with some piece of geological knowledge. Such a model can only be recovered by including all available geological knowledge using a consistent workflow process.
Over the next few months, I hope to post some of the key results here.

Friday, October 3, 2008

Slow Remote Desktop Connection?

I have spent most of the last 9 months logged into my university PC from home using Microsoft's Remote Desktop Connection. It has been a life saver, but every now and then things go wrong. One of the most common problems I have is occasional days (such as today) where the connection speed is so ridiculously slow as to be unusable. This seriously hampers my productivity and I haven't been able to achieve much of anything over the last 4 hours.

The problem is not the internet connection at either end: running connection speed tests at both ends shows that both internet connections are normal and fast.

Doing a quick search on the web in frustration I just discovered a solution that seems to work. The details are discussed here, but it basically comes down to the new version of Remote Desktop Connection (6.0) using a feature called Receive Window Auto-Tuning. This sounds like a beneficial feature in general, but temporarily disabling this service speeds up the slow connection problem immediately. Here's how:
  1. Disconnect from Remote Desktop.
  2. Open an administrator command prompt and enter:
    netsh interface tcp set global autotuninglevel=disabled
  3. Reconnect Remote Desktop.
When you're finished with the connection you can turn it back on by reversing the command:
netsh interface tcp set global autotuninglevel=normal

Somewhat tedious, but only occasionally is my connection afflicted, so I can handle it to regain lost hours of productivity. [TMCnet]

Wednesday, August 27, 2008

Sites for sharing large files

Ever needed to share a file too big for email but didn't know how? Well here's a nice roundup of 13 websites that specialise in sharing large files, with a summary of the features and limitations of each. They're especially useful for adhoc collaborative projects.

Saturday, August 23, 2008

VoIP sucks

So being a fan of new technology and harbouring an active and passionate resentment for all telecommunication companies (and that includes you Fido, Telstra, Rogers, Telus), I am very keen to make the switch to VoIP. Unfortunately the system still seems like a gimmick rather than a service and after several years of failed attempts, I am giving up. My main use for VoIP is international PC-to-landline phone connections (too few friends and relatives have active VoIP connections to make much use of free PC-to-PC calls), and I have never had a single successful and satisfying experience connecting to landlines.

In frustration, more due to the embarassment of repeated ugly conversations of "Hello? Hello? Can you hear me? How abou...garblegarblegarble" than the wasted money, I recently lodged a complaint with my current provider, Freshtel. They have not provided any solutions, but did provide some useful criteria for judging whether VoIP might work for your situation prior to you signing up. The criteria they gave me were:
Upload data rate > 128 kb/s & ping time < 200 m/s
The upload speed is obviously how quickly your computer can send your voice to the recipient, and the ping time indicates how long it takes the data packets to connect to the recipient (roughly).

An easy way to check whether you hit the mark is to go to one of the many speed testing websites such as SpeedTest, and run the free test. Although my speed and times are fine for my local server, it would seem the trick is to test your upload speed and ping time using a server near the person you wish to call. As most of my calls are from Vancouver to Melbourne, that was the clincher test for me (see result in the image). With a fast cable connection the data transmission speeds will never be a problem, but the ping time is the killer. It basically tells me that Freshtel is not entirely to blame, but that data transmission from Canada to Australia is just too slow, and most VoIP providers will struggle to provide quality service.

For the record, my ping times to North America, Japan, and parts of Europe are completely fine. I just won't be using VoIP for calls to Australia, New Zealand, SE Asia, Africa, or South America anytime soon. Guess I am stuck with my landline for a few more years.

Sunday, May 25, 2008

The amazing invisible floating bookshelf


How To Install Invisible Shelves

I love it! Haven't you always wanted one of these floating bookshelves. Imagine a whole wall of them...

And the video is just so lovably cheesy.

[via Lifehacker]

Friday, May 23, 2008

Gridding errors for potential field data

I regularly have a need to grid gravity and magnetic geophysical data, but don't have much in the way of fancy software to do it, mainly an old version of ER Mapper (6.3) and MATLAB. Recently I made a comparison between the methods I available to me and got some surprising results.

I have an extremely irregularly spaced set of gravity data on a topographic surface. Data spacings range from 25 m to 10 km. I require a 400 m grid. I will do some processing later that will get rid of grid points that are located "far" from any original data points, so my primary criteria for a good grid is:
  1. The grid patch near an observed data point reproduces that data point accurately
    • I judged this by interpolating the recovered grid at the original data points and calculating the difference between the original data points and the grid value at those points.
  2. The grid patch near observed data points has a nice shape to it - no rips, tears, jumps, spikes, etc.
    • I judged this by looking at the grid image and seeing if I liked how it looked near data points.
The methods I tried were:
  • ER Mapper, minimum curvature gridding, with tension = 25 (ER Mapper default for potential field data).
    • The grid image had little bumps at each of the datapoints that were widely spaced (like tent poles holding up a tent). The average difference to the original data points was 0.26 mGal or 0.53%
  • ER Mapper, minimum curvature gridding, with tension = 15.
    • The grid image still had the little bumps at each of the datapoints, but not as badly as the example above. The average difference to the original data points was 0.25 mGal or 0.51%.

  • MATLAB - GRIDDATA, 'v4' spline gridding.
    • The grid image looked nice and smooth where data were sparse, and detailed where data was abundant. The average difference to the original data points was 0.17 mGal or 0.34%.
  • MATLAB - GRIDDATA, 'cubic' gridding.
    • The grid image looked okay, but in some places there were sharp facets or triangles in the grid where data were sparse. The average difference to the original data points was 0.18 mGal or 0.37%.

This is hardly a robust analysis of gridding methods, and doesn't take into account all the multitude of algorithms out there, but it is enough to tell me that MATLAB's griddata command using 'v4' splines is more than acceptable for these problems (even if there are complaints about how inefficient and unreliable GRIDDATA it is). It will be my method of choice until I find a better one.

But it also gives a good indication of how poor all of these methods are at creating reliable grids. The errors of > 0.17 mGal are much greater than the measurement accuracy (including all sources of error) of < 0.05-0.10 mGal. User beware!