November 30, 2011

Label an image series from their filenames

What if you have a series of images (say, a series of plots at different times or screen captures at different experimental stages) and you want to quickly include them in a note without having to manually type out a description for each one?

Well, if you gave each image a descriptive filename when you created them, you're in luck!

Consider the following note which contains a series of diffraction patterns after a certain number of monolayers (ML) of material has been grown:

What's going on?  It's impossible to tell what's what.  You could manually type descriptions of these images, but if you have 70 images instead of four, things get tedious.

The solution I've found is to use the freeware FastStone Image Viewer to expand each images' canvas and add its filename in the space created.  If your filenames are descriptive, this effectively auto-labels the images.

I'll describe the steps, but first the result (my filenames are 01 ML.png, 02 ML.png, 03 ML.png, and 05 ML.png):


Pretty slick.  The process was performed in batch so it takes about one minute to accomplish regardless of the number of images you have.

So, how to do it?  Well, after the FastStone Image Viewer is installed, fire it up and navigate to the folder containing your image series:


Select the images you want to process using the mouse or Ctrl-A then press F3 or go to Tools->Batch Convert Selected Images:


On this page, you can select your output file format, specify an output path, etc...


To get the magic to happen though, you need to select Use Advanced Options and click the Advanced Options button.  The following two images show how to set things up to add whitespace at the bottom and then fill it with the filename (minus the extension):



Once that's done, hit OK to get back to the Advanced Options screen and click the Convert button.  Voila.  The new images have been dumped into the specified output directory with the filename labels added.

A couple notes:
  1. If your filenames are long, you may need to add double or triple the whitespace to give them room to wrap.
  2. For some reason, selecting a bunch of images and pasting them into Evernote inverts their order (as seen in the folder or the FastStone Viewer).  You can simply inverse sort them or manually arrange them in the FastStone viewer before dragging with this in mind.
Hope that's helpful!

Experiment index note

I use an index note to provide a summary of the experiments I've done along with note/hyperlinks.  I accomplish this by creating an Excel table with the information I want and then copy-pasting the result into Evernote.  I attach the source spreadsheet so that I can quickly add entries:


The hyperlinks are created in the spreadsheet using Excel's HYPERLINK("URL", "text") function.  The URL to use for the "note" and "web" link are obtained via right-click->Copy Note Link and right-click->Share->Copy Note URL to Clipboard respectively.

Make linked notes web-friendly

A gripe I have with the way Evernote renders shared notes for the web is that it does not dynamically convert note links to hyperlinks, even if the destination note is also shared.  My workaround is this:

Consider the following index note containing a note link to a linked note as viewed in the Windows client:


Where the link was created in the Windows client by right-clicking on "Linked note", selecting "Copy Note Link", and pasting the result.

On the web, this is rendered as:


No link!  This is not what I want.  What to do?

Right-click on "Linked note" and select "Share"->"Copy Note URL to Clipboard":



After the pasted note link in "Index note" type " (web link)", select "web link" and press Ctrl-k.  Paste the contents of your clipboard in the dialog box that appears and select "OK".

The result in the Windows client is:


And, on the web:


Clicking on "web link" will now point the browser to the web version of the linked note as desired.

It is my opinion that converting note links to hyperlinks if the destination is shared should be the default behavior but, since it's not, this workaround will have to do.

November 29, 2011

Organization

The first question to be answered is how to structure the data imported into Evernote.  The nature of my research suggests a hierarchical structure.  Everything begins with a crystal growth.  Tests may then be conducted on that sample, producing data.  That data may then be analyzed.

My first thought was to have a single note per sample wherein all growth notes, data, and analyses would be presented in chronological order.  The idea was to have each note be a wholly self-contained idea.  Analyses which potentially included data from multiple samples would also be independent notes.  These notes would be segregated into different notebooks (e.g., Growths, Analyses, etc).

Problems with this approach were readability and Evernote's per note size limit (50 MB for premium users).  Having all data in one note made it necessary to scroll through a note to find what I wanted.  Regarding the size limit:  few files I would want to attach are greater than this limit individually but the aggregate commonly is.

So the data relevant to a single sample must be spanned across multiple notes.  How should this be done?  I decided to make each note as specific as possible and use note links and hyperlinks to connect related data (I wanted to say something about relational database normalization here but I don't actually know enough about that to not get the analogy wrong).  The root of this sparse structure would be the "growth note" which would describe how the sample was produced and include a list of links to relevant data and analysis notes.

For example, note "Growth A" would contain the data files produced during growth along with the PDFized handwritten notes taken with the Echo.  At the top of this note would be a list of links to "XRD on Growth A", "AFM on Growth A", etc...  The "XRD on Growth A" link would lead to a note that would include the XRD data files, the settings used, and plots of the results as images.  If comparative analysis was done which included Growth A, links to the notes containing the analysis results would be included in a separate list.

Usage

I am a graduate student in experimental condensed matter physics.  I grow materials by MBE and test the results via XRD, AFM, transport measurements, etc...  The results of the growths and tests are what I would like to keep organized and readily available in any context.

Evernote is used to record and organize almost all laboratory notes and data.  Data is only excluded if it is too large (>50 MB due to Evernote's note size limit).  A Livescribe Echo pen is used for handwritten notes which are converted to PDF and uploaded to Evernote.  I'm using the Windows client on a lab computer, my laptop, and my home computer as well as the iPhone app on my phone.  The web interface is used in contexts such as showing data to my adviser (who does not use Evernote).

Motivation

For a few months, I've been looking for an alternative to my disorganized paper/local storage based method of laboratory note-taking. I've experimented with Stefan Ritt's open-source ELOG hosted on my home computer or a lab computer. I decided against it because I didn't have confidence in my home Comcast connection and didn't want to have to VPN every time I wanted to access the site on a lab computer. I tried applying my feeble programming skills to creating my own using Microsoft's Lightswitch suite but wasn't good enough.

My introduction to Evernote was a result of someone telling me about the Livescribe Echo smartpen which seemed (and is) awesome. Livescribe was (and still is) offering a free year of Evernote premium with a smartpen purchase. I looked into Evernote a bit and decided to give it a try. I bought an Echo 8GB and began my Evernote experiment.

That was a couple of months ago. I have since gained momentum with this new note-taking platform and am liking it a lot. I have discovered a number of things that might be obvious to most but were not to me. I figured I always appreciate when someone shares what they've figured out with me so I would create a blog to share what I'm learning with you. I hope it will prove useful.