Thursday, December 16, 2010

Set maximum memory limit in Fiji

Fiji is a "bundle version" of ImageJ, i.e., ImageJ + a lot of plugins already developed and installed.

I use it on a daily basis for my image processing/analysis tasks.

When there is need to import a sequence of images as a stack and such stack is quite big, you may need to setup a larger maximum memory limit than what it comes with the standard setup.

In order to do that, open the menu Edit -> Options -> Memory & Threads and fix the maximum memory limit.

This operation essentially writes into Fiji startup configuration file, called jvm.cfg and located within Fiji's root folder. If you open it, you can see the Java Virtual Machine option -Xmx????m, where ????m indicates the maximum memory limit expressed in MBytes.

Thursday, September 23, 2010

Page-wide figures in two-column articles

Here's the problem I had:

I was writing an article for Phys. Rev. Lett. using APS' RevTeX 4.1 package.
I needed to include a figure that required the full two-column space.

Solution:

I used the \begin{figure*} ... \end{figure*} environment.
The other possibility is to enclose the standard figure environment into the widetext one.
The latter is usually adopted for including math environments with very long equations that
cannot be contained in a single column space, unless being cut.
The disadvantage of the widetext environment is that it breaks the two-column layout with a couple of horizontal lines showing where the full page part begins and ends.

Better to use the figure* environment.

Thursday, September 16, 2010

Install RevTex 4.1 into MikTeX 2.8

RevTeX's latest version is 4.1 up to today.
If you want to install it under MikTeX 2.8, here there's the recipe as found from RevTeX 4.1
README file:

Installation ------------ You already started the installation process by unzipping revtex4-1.zip. As you will have seen, it created a directory revtex4.1
containing this file README, the file DOWNLOAD, and the file revtex4-1-tds.zip, which contains the bulk of the installation. To install this software
into a TDS-compliant TeX installation, like TeX Live, working as root, issue a shell command like

unzip revtex4-1-tds.zip -d /usr/local/texlive/texmf-local/

where the destination for the unzipped files is, in this example, appropriate for a local modification of a sufficiently recent distribution of TeX Live.
You may of course choose a different destination depending on your particular requirements. After installation, files will be located as per the
Manifest above. Run the appropriate update command (mktexlsr, initexmf -u, etc.); under TeX Live that would be (as root)

mktexlsr /usr/local/texlive/texmf-local

Install required packages (AMS-LaTeX, natbib, textcase, and bm).
Please consult the documentaton for your local TeX package for more information.
MikTeX users should use a recent version (see http://miktex.org/) and consult the documentation there. There are several steps you will have to do.
Please note that the steps given here may change with future versions of MikTeX, but the basic steps should be quite similar.

1) Create a texmf-local directory if needed. For example, you might create a directory such as C:\local\miktex\texmf-local.

2) Tell MikTeX where your texmf-local directory is. Find the MikTeX Options window and look for the "Roots" tab. If your texmf-local directory
is not listed, click "Add" and add it.

3) Unzip the revtex4-1-tds.zip (part of the REVTeX distribtution) in your texmf-local directory.

4) Update the "File Name Database (FNDB)." This step is essential and it registers all of the files in your texmf-local directory with MikTeX.
Do this by clicking on "Refresh FNDB" in the General tab of the MikTeX Options window.


MikTex also comes with a package manager. This can be an easier way to maintain the packages installed on your system.
However, please note that the packages available may not be the most current version of the packages.


Some remarks:

MikTex Options window can be opened by
Start -> Programs -> MikTex 2.8 -> Maintenance -> Settings
and choosing the Roots tab.

Friday, July 23, 2010

How to change font size in PuTTY

PuTTY is one of the most known telnet/SSH clients for the MS Windows environment.

I use it on a daily basis for connecting, via the SSH protocol, to the compute clusters I use for my job, from my (unfortunately) MS Windows desktop computer.

One trivial but highly frequent configuration issue happening when installing PuTTY on a new machine consists in how to setup the wanted font size for your SSH terminal, such that you do not get blind trying to read what's on your remote machine screen.

Here there are the simple instructions for such configuration:

http://www.cam.ac.uk/cs/docs/faq/q3.html

Saturday, April 3, 2010

Current work directory in Matlab at startup time

I use Matlab on a daily basis for the post-processing and preliminary visualization of my simulation datasets.

Every time I upgrade Matlab to a newer version I face the following issue:

when Matlab starts, the current work directory is set to a default value, inside Matlab directory tree itself.

This default directory is of no use for me. Usually, I prefer to have as current work directory at startup time the one with which I've been working most recently.

To setup your preferred current work directory at startup time, you just need to run once the command


userpath('my preferred current work directory')

Next time you run Matlab, it will automatically setup your chosen directory as the current work one.

If you run Matlab via an shortcut icon on your desktop, under MS Windows, just be sure that the "Start in" field of the shortcut is empty (see image below) otherwise the directory you chose and setup via the
userpath(...) command will be overwritten by the one inserted in the shortcut's "Start in" field.