Friday, March 16, 2012

LaTeX - formatting - utilizing vertical space - \vspace

Again, I was adjusting the look of my CV using the \vspace command because there were extra spaces between section headings, an horizontal line, and the first entry of the section like so:


Here is that section of code:

\section*{Employment} 
\HRule 
\begin{itemize}
\item \textbf{Graduate Research Assistant}
\item University of Tennessee Space Institute, Tullahoma, TN
\item November 2011 - Present
 \begin{itemize}
 \item AFRL Prime Contract No. FA9300-06-C-0023
 \item Assisted major advisor who was a reviewer for journal papers in critiquing and writing summaries
 \item Assisted major advisor in building and proofreading research grant proposals
 \end{itemize}
\end{itemize}
\HRule
\begin{itemize}
\item \textbf{Graduate Research Assistant}
\item University of Tennessee Space Institute, Tullahoma, TN
\item August 2006 - May 2011
 \begin{itemize}
 \item Worked on AFOSR grant No. FA9101-06-D-0001/0003, Advanced High-Speed Propulsion Development; Out of the grant I produced and presented one AIAA conference paper and my MS thesis in Aerospace Engineering

So I tightened it like this:


\section*{Employment} \vspace{-5 mm}
\HRule \vspace{-6 mm}
\begin{itemize}
\item \textbf{Graduate Research Assistant}
\item University of Tennessee Space Institute, Tullahoma, TN
\item November 2011 - Present
 \begin{itemize}
 \item AFRL Prime Contract No. FA9300-06-C-0023
 \item Assisted major advisor who was a reviewer for journal papers in critiquing and writing summaries
 \item Assisted major advisor in building and proofreading research grant proposals
 \end{itemize}
\end{itemize}
\HRule \vspace{-6 mm}
\begin{itemize}
\item \textbf{Graduate Research Assistant}
\item University of Tennessee Space Institute, Tullahoma, TN
\item August 2006 - May 2011
 \begin{itemize}
 \item Worked on AFOSR grant No. FA9101-06-D-0001/0003, Advanced High-Speed
Propulsion Development; Out of the grant I produced and presented one AIAA conference paper and my MS thesis in Aerospace Engineering

So little things like this make LaTeX, IMO, very versatile/customizable and small changes can make big differences in looks.

LaTeX formatting - right alignment \ruggedleft

Here is a small thing, but I'd thought I'd post it since the small things can be big. Anyways, I was cleaning up my CV and the template I found and am using had my information at the top using this code.

\begin{minipage}[t]{0.5\textwidth}
  212 E. Emerald Ave \\
  Knoxville, TN 37917-5531
\end{minipage}
\begin{minipage}[t]{0.5\textwidth}
 Phone: (812) 531-9006 \\
Email: \href{mailto:timothy.andrew.barber@gmail.com}{timothy.andrew.barber@gmail.com} \\
Homepage: \href{http://timothyandrewbarber.blogspot.com/}{http://timothyandrewbarber.blogspot.com/}
\end{minipage}


Now the CV looked like this.





Now this is ok, but I decided I wanted it aligned to the right.  So I use the command \raggedleft to do this.  Found here: http://en.wikibooks.org/wiki/LaTeX/Paragraph_Formatting

The code now looks like this:

\begin{minipage}[t]{0.5\textwidth}
  212 E. Emerald Ave \\
  Knoxville, TN 37917-5531
\end{minipage}
\begin{minipage}[t]{0.5\textwidth}
 \raggeleft Phone: (812) 531-9006 \\
\href{mailto:timothy.andrew.barber@gmail.com}{timothy.andrew.barber@gmail.com} \\
\href{http://timothyandrewbarber.blogspot.com/}{http://timothyandrewbarber.blogspot.com/}
\end{minipage}

So I decided to remove the "Email:" and "Homepage:" as well.  Don't worry, my CV is a page on my blog and a few other sites so my info is out there anyways.

Ride on Hypersonic Plane to Cost $10,000 or More | Innovationnewsdaily.com

Ride on Hypersonic Plane to Cost $10,000 or More | Innovationnewsdaily.com

New Biplane Design Stops Sonic Booms | Silent Supersonic Aircraft | LiveScience

New Biplane Design Stops Sonic Booms | Silent Supersonic Aircraft | LiveScience

Tuesday, March 13, 2012

Latex - formatting - date

Most document classes automatically use the current date on the title page.  To change the date the date manually simply use the command \date{text} where the "text" is where you put in your date of course (\date{October 9, 1998}).  In order to have no date show up simply put nothing in the \date command braces (\date{}).

Thursday, March 8, 2012

Transferring files, syncing, and authorizing-deauthorizing on iTunes

So, I decided to finally update my iOS on my iPhone 3GS.  I haven't done this in awhile since I don't usually use Windows and I could never get iTunes to work in Wine (I don't remember if it will at all) nor I have finished my VirtualBox Windows installation (I have to do something to get it to recognize USB drives and just haven't done it).  Anyways, I wanted to back my iPhone up before updating from 4.3.3 to 5.1 and was having trouble doing it.  I needed to authorize a laptop but couldn't since I already had 5 other computers authorized.  I decided to deauthorize all 5 (yes all 5 since there is no option to pick or choose, BOO).  I selected this option, signed in, but iTunes gave me a message saying it couldn't access iTunes and to come back later and try again.  What the heck?!  I tried it a few more times with the same result.  So I then began to look for help on Apple's website.  Garbage.  The website is no help and this is why I am writing this blog.  Couldn't find an email address for customer support like Apple's site suggested.

Anyways, I went back and tried the deauthorization route a few minutes later.  Wow, it magically worked.  I then clicked under File the option to transfer all purchases.  Woohoo!  It finally worked.  So, I am writing this in case anyone got as frustrated as I did for this simple task.

Monday, March 5, 2012

GNOME-Pie 0.5 released with slice labels, new effect and more | Ubuntu + Ubuntu = Iloveubuntu

GNOME-Pie 0.5 released with slice labels, new effect and more | Ubuntu + Ubuntu = Iloveubuntu

Huh, never heard of this. Thought I'd share.

Highlighting text in LaTeX - changing hl colors too

Please Make A Note: How to highlight text in LaTeX
Utilize the "soul" package.  (Side note, I think the "color" package should be loaded for this to work as well. The class I am using for my thesis already has it loaded, and I saw this somewhere, so just in case.)

\usepackage{soul}

Then use the following command to highlight text:

\hl{text to be highlighted}

Screenshots:



Although, it seems you cannot highlight citations using this command.  There is probably a way to do this.

Update: 3-9-12

You can use the \hl command around text options such as \textit and \textbf.  To use different colors to highlight I found this neat command here:

http://tex.stackexchange.com/questions/5959/cool-text-highlighting-in-latex

\newcommand{\hlc}[2][yellow]{ {\sethlcolor{#1} \hl{#2}} }

which is to go into the preamble.  The command is then:


\hlc[green]{Text goes here.}


Screenshot:


Wednesday, February 29, 2012

Abbreviated Journal Names in Mendeley | alex m. chubaty

Abbreviated Journal Names in Mendeley | alex m. chubaty

This might be useful to some. This blog post is about Mendeley and using abbreviated journal names. Some journal publications use the abbreviated journal names in their bibliographies (references). One such journal is the Journal of Fluid Mechanics.

How to Install Elementary Luna OS in Ubuntu 12.04 Using this Simple Script | Tech Drive-in

How to Install Elementary Luna OS in Ubuntu 12.04 Using this Simple Script | Tech Drive-in

Alright, I'm back! Passed the defense, woohoo!

This is an interesting article on Elementary "Luna" OS built upon Ubuntu 12.04. Still alpha version so is very unpredictable.

A quote from the article:
Other major apps that comes as default with Elementary OS Luna include BeatBox Music Player, Maya calendar and organizing tool, Marlin file browser, Footnote note taking application, Feedler feed reader, Midori web browser, Plank dock application, Snap for taking pictures, Postler email client, Dexter address book and so on. As you can see, folks behind Elementary Project are trying to create a lean mean Linux distro with a clear focus on detail and consistency. I hope things pan out well for them. Good luck to the devs.

Thursday, February 23, 2012

10 New Features Added to Ubuntu 12.04 Precise Pangolin | Tech Drive-in

10 New Features Added to Ubuntu 12.04 Precise Pangolin | Tech Drive-in

Sorry about the lack of activity, I've been busy with a defense presentation. Here is an interesting read on some updates about the next Ubuntu, 12.04

Tuesday, February 14, 2012

Ubuntu 12.04 Alpha 2 Review: Unusually Bug-Ridden | Tech Drive-in

Ubuntu 12.04 Alpha 2 Review: Unusually Bug-Ridden | Tech Drive-in'

Seems like a few things still need to be worked on bug-wise. However, it is an alpha release so expect some issues.

Friday, February 10, 2012

Sage ImportError: No module named _md5 - Ubuntu 11.10

Ok, so I installed a fresh copy of Ubuntu 11.10 on a few Windows machines at school and downloaded Sage 4.8 to use.  However, I was getting the error:

ImportError: No module named _md5

when trying to run Sage.  The fix for this is to install the package:


libssl0.9.8


by either executing in the terminal the command:


sudo apt-get install libssl0.9.8


or installing it from the USC.

http://ubuntuforums.org/showthread.php?t=1863653

http://groups.google.com/group/sage-support/browse_thread/thread/c1cb916b28b0992e?pli=1

Wednesday, February 8, 2012

Ubuntu 11.10 - update on a few things from me

Ok, so I installed Ubuntu 11.10 on a few of my computers at school and have noticed a few things.

First, it seems that Ubuntu finally updated its repositories in the USC to reflect the latest wxMaxima version which is 11.04.



I also noticed that is seems synaptic package manager is slowly becoming obsolete.  I could install it, but I couldn't run it while the USC was open.  So I decided to install my wanted extra TeX Live packages from the USC instead.  It worked pretty well.


I am also cutting down on software packages, especially for math/science.  I have cut off the simple graphing and calculating software such as KAlgebra, Libniz, Euler, etc., and I am sticking mainly with wxMaxima and Sage.  I am also trying to get into Python.

Marlin File Browser is Evolving Pretty Nicely | Tech Drive-in

Marlin File Browser is Evolving Pretty Nicely | Tech Drive-in

For Ubuntu. Not official yet, though.

Friday, February 3, 2012

Natural log and trig relation: -ln(tan(phi/2)) = ln(csc(phi) + cot(phi)) and the integrals of csc^3(phi) and csc(phi)

\[

- \ln \left( \tan \dfrac{\phi}{2} \right) = - \ln \left( \dfrac{\sin \phi}{1 + \cos \phi} \right) = \ln \left( \dfrac{1 + \cos \phi}{\sin \phi} \right) = \ln \left( \dfrac{1}{\sin \phi} + \dfrac{\cos \phi}{\sin \phi} \right)

\]
\[

= \ln \left( \csc \phi + \cot \phi \right)

\]

However, I recently was using this in an analysis, was checking some work, and noticed that:


\[

\ln \left( \tan \dfrac{\phi}{2} \right) = \ln \left( \dfrac{1 - \cos \phi}{\sin \phi} \right) =  \ln \left( \csc \phi - \cot \phi \right)

\]

I looked up the formulas again and became quite confused.


The tangent half angle relations are:

\[ \tan \dfrac{\phi}{2} = \dfrac{1 - \cos \phi}{\sin \phi}\]

and

\[ \tan \dfrac{\phi}{2} = \dfrac{\sin \phi}{1 + \cos \phi}\]

So, I guess the relation is:

\[ \ln \left( \csc \phi - \cot \phi \right) = -\ln \left( \csc \phi + \cot \phi \right) \]

Yup, it is confirmed:



Links to the tangent half angle:

http://en.wikipedia.org/wiki/Tangent_half-angle_formula

http://planetmath.org/encyclopedia/DerivationOfHalfAngleFormulaeForTangent.html


However, my problem originates to the integral of \( \csc^3 \phi \).  This integral can be solved by (at least how I did it)

\[ \int \csc^3 \phi \mathrm{d} \phi \]

First, utilize integration by parts

\[ \mathrm{d}v = \csc^2 \phi \mathrm{d} \phi \]

\[ u = \csc \phi \]

\[ v = -\cot \phi \]

\[ \mathrm{d}u = - \csc \phi \cot \phi \mathrm{d} \phi \]

The formula for integration by parts is

\[ uv - \int v \mathrm{d}u \]

Substituting in the correct values gives

\[ -\csc \phi \cot \phi - \int \csc \phi \cot^2 \phi \mathrm{d} \phi \]

Using the trigonometric identity \( \cot^2 \phi = \csc^2 \phi - 1 \) transforms the relation to

\[ -\csc \phi \cot \phi - \int \csc \phi \left( \csc^2 \phi - 1 \right) \mathrm{d} \phi \]

Multiplying through we obtain

\[ -\csc \phi \cot \phi - \int \csc^3 \phi - \csc \phi \mathrm{d} \phi \]

Separating the RHS integrals produces

\[ -\csc \phi \cot \phi - \int \csc^3 \phi \mathrm{d} \phi +  \int \csc \phi \mathrm{d} \phi \]

Recall that this whole relation is equal to \(  \int \csc^3 \phi \mathrm{d} \phi \) which yields

\[  \int \csc^3 \phi \mathrm{d} \phi = -\csc \phi \cot \phi - \int \csc^3 \phi \mathrm{d} \phi +  \int \csc \phi \mathrm{d} \phi \]

At first this seems counter-intuitive and does not seem to help.  However, if you collect the integrals of \( \csc^3 \phi \) the equation becomes clearer as where to go next.  So collecting the \( \csc^3 \phi \) integrals to the LHS, we obtain

\[  2 \int \csc^3 \phi \mathrm{d} \phi = -\csc \phi \cot \phi +  \int \csc \phi \mathrm{d} \phi \]

Then we can divide by two and evaluate the left hand side which gives us

\[  \int \csc^3 \phi \mathrm{d} \phi = \dfrac{1}{2} \left[ -\csc \phi \cot \phi +  \int \csc \phi \mathrm{d} \phi \right] \]

Okay, so this is where my problem began.  I've found two answers for this integral of \( \csc \phi \).  The first is the same as the one I got by evaluating the integral of \( \csc \phi \)

\[  \int \csc^3 \phi \mathrm{d} \phi = \dfrac{1}{2} \left[ -\csc \phi \cot \phi - \ln | \csc \phi - \cot \phi | \right] \]

where

\[ \int \csc \phi \mathrm{d} \phi = - \ln | \csc \phi - \cot \phi | \]

according to: http://www.math.com/tables/integrals/more/csc.htm

However, here: http://answers.yahoo.com/question/index?qid=20080225213623AAUQMz6, the answer is

\[ \int \csc \phi \mathrm{d} \phi = - \ln | \csc \phi + \cot \phi | \]

?? (I'll have to check these to make sure there isn't a mistake.

To make matters worse here: http://answers.yahoo.com/question/index?qid=20080623173220AAyRTys we get an answer for \( \int \csc^3 \phi \mathrm{d} \phi \) equal to

\[  \dfrac{1}{2} \left[ -\csc \phi \cot \phi + \ln | \csc \phi - \cot \phi | \right] \]

??? What the heck is going on?! (Again, when I get the time I will check these answers since the formulation is given.  However, this does give the final answer I am looking for which is

\[  \dfrac{1}{2} \left \lbrace -\csc \phi \cot \phi + \ln \left[ \tan \left( \dfrac{\phi}{2} \right) \right] \right \rbrace \]

However again, the relation I first displayed above shows that

\[  \dfrac{1}{2} \left[ -\csc \phi \cot \phi - \ln | \csc \phi + \cot \phi | \right] \]

\[ = -\dfrac{1}{2} \left[ \csc \phi \cot \phi + \ln | \csc \phi + \cot \phi | \right] \]


\[ = -\dfrac{1}{2} \left[ \csc \phi \cot \phi - \ln | \csc \phi - \cot \phi | \right] \]



\[ = \dfrac{1}{2} \left[ -\csc \phi \cot \phi + \ln | \csc \phi - \cot \phi | \right] \]

So this tells me that the second link should be correct!  The reason for this post originates to me trying to change the angle \( \phi \) from spherical polar coordinates to cylindrical polar coordinates \( \left( r, z \right) \) through the relation \( \phi = \tan \left( r/z \right) \)and \( R^2 = r^2 + z^2 \).  Thus, I am posting this to keep myself from become confused!

Tuesday, January 31, 2012

SymPy - Python library for symbolic mathematics

http://sympy.org/en/index.html

SymPy is a Python library for symbolic mathematics. It aims to become a full-featured computer algebra system (CAS) while keeping the code as simple as possible in order to be comprehensible and easily extensible. SymPy is written entirely in Python and does not require any external libraries.


matplotlib: python plotting

http://matplotlib.sourceforge.net/
matplotlib is a python 2D plotting library which produces publication quality figures in a variety of hardcopy formats and interactive environments across platforms. matplotlib can be used in python scripts, the python and ipython shell (ala MATLAB®* or Mathematica®†), web application servers, and six graphical user interface toolkits. matplotlib tries to make easy things easy and hard things possible. You can generate plots, histograms, power spectra, bar charts, errorcharts, scatterplots, etc, with just a few lines of code. For a sampling, see the screenshots, thumbnail gallery, and examples directory

Sage - 2D plot - simple plot, more than one function on the same plot, axes limits, change color of function in graph

There are many options when plotting in Sage.  Here is a simple example.

alpha = 30*pi/180
show(alpha)
show(float(alpha))
f = (arcsin(alpha))^2 + log(tan(alpha/2)) - arcsin(alpha)*arctan(alpha)
show(f)
show(float(f))
g = (1/(0.7*sin(x)))*sqrt(1 + ((pi)^(-2))*((0.7*sin(x))^2)*(f - csc(x)*tan(x/2) - log(tan(x/2))))
p = plot(g, (0, alpha))
show(p, ymin = 0, ymax = 20)

In Sage, the variable x is automatically known/defined.  I then create a simple function similar to how I created alpha and f.  I next equal p to the plot since I wanted to change the y axis range manually which you can do through the show command (or this can also be done in the plot command as well).



Here is another example of a 2D plot.  This one shows how to plot a couple of functions.

alpha = 30*pi/180
show(alpha)
show(float(alpha))
z = 0.5
r_max = z*tan(alpha)
show(r_max)
show(float(r_max))
lamb_da = (csc(alpha))^2 - (cot(alpha))*(csc(alpha)) + log(tan(alpha/2))
show(float(lamb_da))
cig_ma_c = 1
r = var('r')

psee = (1/2*pi)*(cig_ma_c)*(r^2)*(lamb_da + (z/r)*sqrt(1 + (z/r)^2) - log(sqrt(1 + (z/r)^2) - z/r) - 1 - (z/r)^2)

lamb_da_bi = (csc(alpha))^2 - (cot(alpha))*(csc(alpha)) + log(tan(alpha)/2)

show(float(lamb_da_bi))

psee_bi = (1/2*pi)*(cig_ma_c)*(r^2)*(lamb_da_bi + (z/r)*sqrt(1 + (z/r)^2) - log(r/(2*z)) - 1 - (z/r)^2)

p1 = plot(psee, (r, 0, r_max))

p2 = plot(psee_bi, (r, 0, r_max), color ='green')

show(p1 + p2)



Sage - displaying a float decimal point

In Sage, like many other mathematics software, uses either a float command or you can simply put a "." in your value to display decimals.

f = (arcsin(alpha))^2 + log(tan(alpha/2)) - arcsin(alpha)*arctan(alpha)
show(f)
show(float(f))

Screenshot:


Monday, January 30, 2012

Sage - Declaring a value

So first things first.  I simply want to declare a value for something.  In this case I want alpha to equal some number.

alpha = 30*pi/180

show(alpha)

Hit evaluate and it gives: (1/6)*pi It works!


Installing Sage for Windows 7


This is a pretty cool mathematical program/software which is kind of like a combination of MATLAB/Octave, Mathematica, Maple, Maxima, etc.  They even say that as a description.  I've mentioned Sage before, but now I am going to really give it a go.  To install for Windows 7 simply go here  http://wiki.sagemath.org/SageAppliance and follow the instructions.  First you will need to DL and install VirtualBox, though, here https://www.virtualbox.org/wiki/Downloads and DL the Windows Sage appliance here  http://www.sagemath.org/download-windows.html.

Here are my earlier posts about Sage:

http://timothyandrewbarber.blogspot.com/2011/08/sage-open-source-mathematics-software.html

http://timothyandrewbarber.blogspot.com/2011/08/pre-built-binary-install-sage.html <-- Ubuntu install

http://timothyandrewbarber.blogspot.com/2011/08/sage-in-emacs-and-tex.html

Python for Windows 7

I am going to try to explore using the computer programming language Python.  It seems to be "easier" to use than say C or even C++ since, so it seems, a lot of stuff is done upfront like MATLAB/Octave.  There is no need to code everything.  I'll give some examples later.

In order to install Python on Windows 7, it's pretty simple.  Just follow this link, http://python.org/getit/, and download the version you'd like for windows.  Run the installer and there you have it.


Sunday, January 29, 2012

Maxima and wxMaxima in Windows 7

I am forced to use Windows every now and then, but I have recently found out that some of my favorite software works for Windows and is relatively easy to install.  Maxima is very easy, as you just download and run the Windows installer from here:  http://www.windows7download.com/win7-maxima/kqcjkmcz.html

Installing Maxima for Windows also installs wxMaxima (and Xmaxima if wanted) and gnuplot.  Here is a screenshot.


Friday, January 27, 2012

Updated AIAA website

Whoa, check out AIAA's new webpage design.

PPA Installing the latest KDE 4.8 in (K)Ubuntu 11.10

PPA Installing the latest KDE 4.8 in (K)Ubuntu 11.10:

http://kde.org/announcements/4.8/

Looks like a new version of KDE is out.

Please Make A Note: LaTeX: Vertical Spacing in Multiline Equations

Please Make A Note: LaTeX: Vertical Spacing in Multiline Equations: "\setlength{\jot}{12pt}"

Haha, I was searching if \vspace*{} worked or not in the align environment and stumbled across my friend's blog post. This works! However, for local entries I had to put yNot's suggestion from the comments where after the line breaks you put [12 pt], for example.

\begin{align}\setlength{\jot}{12pt}
\psi_{yyyy} = \alpha &R \left[ \psi_{yyt} + \left( y + \psi_y \right) \psi_{xyy} - \psi_{yyy} \psi_x \right] - 2 \alpha^2 \psi_{xxyy} \nonumber \\[12 pt] &+ \alpha^3 R \left[ \psi_{xxt} + \left( y + \psi_y \right) \psi_{xxx} - \psi_x \psi_{xxy} \right] - \alpha^4 \psi_{xxxx}
\end{align}

before:

after:

Monday, January 23, 2012

LaTeX - Math - nth power root

In order to write an nth power root the command is:

\sqrt[n]{k}

\[\sqrt[3]{x}\]

where n is the power of the root and k is the expression within the root symbol.

Found this and also other LaTeX help here: http://web.mit.edu/rsi/www/2003/help/faq/latex/#faq9

Sunday, January 22, 2012

Installing GNOME 3 Shell on Ubuntu 11.10: Update

Now that Gnome 3 has officially been released it is easier than ever to install.  Simply go the USC and search for gnome.  Should be the top choice as The GNOME Desktop Environment, with extra components.

Update: 2-8-11

I got Gnome 3 to install fine on a desktop.  However, my laptop didn't like it.

Here are some links related to Gnome 3:

http://www.techdrivein.com/2011/11/8-things-i-did-after-installing-gnome.html

http://www.techdrivein.com/2011/10/7-best-gnome-shell-extensions-install.html

http://www.techdrivein.com/2011/10/how-to-install-and-manage-gnome-shell.html

http://www.techdrivein.com/2011/09/top-10-gnome-shell-themes.html


Wednesday, January 18, 2012

Mendeley Desktop Update 1.3.1 - Ubuntu 11.10

A new release just came out for MD.  It is version 1.3.1, and update manager in Ubuntu 11.10 automatically installed it this time!

Sunday, January 15, 2012

Mayavi Project - 3D Scientific Data Visualization and Plotting


Mayavi Project - 3D Scientific Data Visualization and Plotting
The Mayavi project includes two related packages for 3-dimensional visualization: 
  • Mayavi: A tool for easy and interactive visualization of data, with seamless integration with Python scientific libraries. 
  • TVTK: A Traits-based wrapper for the Visualization Toolkit, a popular open-source visualization library. These libraries operate at different levels of abstraction. TVTK manipulates visualization objects, while Mayavi lets you operate on your data, and then see the results. Most users either use the Mayavi user interface or program to its scripting interface; you probably don't need to interact with TVTK unless you want to create a new Mayavi module.

Mayavi 
Mayavi seeks to provide easy and interactive visualization of 3-D data. It offers:
  • An (optional) rich user interface with dialogs to interact with all data and objects in the visualization. 
  • A simple and clean scripting interface in Python, including one-liners, or an object-oriented programming interface. Mayavi integrates seamlessly with numpy and scipy for 3D plotting and can even be used in IPython interactively, similarly to Matplotlib. 
  • The power of the VTK toolkit, harnessed through these interfaces, without forcing you to learn it. Additionally Mayavi is a reusable tool that can be embedded in your applications in different ways or combined with the Envisage application-building framework to assemble domain-specific tools.

TVTK
TVTK wraps VTK objects to provide a convenient, Pythonic API, while supporting Traits attributes and NumPy/SciPy arrays. TVTK is implemented mostly in pure Python, except for a small extension module. Developers typically use TVTK to write Mayavi modules, and then use Mayavi to interact with visualizations or create applications.
Using Mayavi from ipython

The Mayavi application

SciPy and NumPy - Scientific Tools for Python



Scientific Tools for Python 
SciPy (pronounced "Sigh Pie") is open-source software for mathematics, science, and engineering. It is also the name of a very popular conference on scientific programming with Python. The SciPy library depends on NumPy, which provides convenient and fast N-dimensional array manipulation. The SciPy library is built to work with NumPy arrays, and provides many user-friendly and efficient numerical routines such as routines for numerical integration and optimization. Together, they run on all popular operating systems, are quick to install, and are free of charge. NumPy and SciPy are easy to use, but powerful enough to be depended upon by some of the world's leading scientists and engineers. If you need to manipulate numbers on a computer and display or publish the results, give SciPy a try!

Python and Scientific Computing 
NumPy and SciPy are two of many open-source packages for scientific computing that use the Python programming language. This website, together with other subdomains of the scipy.org domain, serves as a portal for all scientific computing with Python, not just NumPy and SciPy. The index under Topical Software in the navigation bar lists these domains and other destinations for scientific software using Python.  
Good places to start to learn more about SciPy: 
This is a community effort. We seek volunteers at all levels of ability to work on the project, from coding and packaging to documentation, tutorials, recipes, and the web site. Visit the Developer Zone if you are interested in helping out. SciPy is sponsored by Enthought, Inc.
SciPy optimization on Ubuntu Linux

NumPy is the fundamental package needed for scientific computing with Python. It contains among other things: 

  • a powerful N-dimensional array object 

  • sophisticated (broadcasting) functions 

  • tools for integrating C/C++ and Fortran code 

  • useful linear algebra, Fourier transform, and random number capabilities. 
Besides its obvious scientific uses, NumPy can also be used as an efficient multi-dimensional container of generic data. Arbitrary data-types can be defined. This allows NumPy to seamlessly and speedily integrate with a wide variety of databases. Numpy is licensed under the BSD license, enabling reuse with few restrictions.

LaTeX - Table of Contents

Some links to help with a table of contents in LaTeX:

http://www.personal.ceu.hu/tex/toc.htm

http://en.wikibooks.org/wiki/LaTeX/Document_Structure#Table_of_contents

http://en.wikibooks.org/wiki/LaTeX/Indexing#Adding_Index_to_Table_Of_Contents

http://www.andy-roberts.net/writing/latex/contents

Saturday, January 14, 2012

LaTeX - KOMA Scripts

Information on KOMA scripts in LaTeX:

http://tex.stackexchange.com/questions/1351/most-useful-additions-in-koma-script

LaTeX - Subtitles

Helpful links for subtitles in LaTeX:

http://kom.aau.dk/net/guides/latex.html

http://tex.stackexchange.com/questions/5948/subtitle-doesnt-work-in-article-document-class

LaTeX - Document Classes

Some links to help with document classes in LaTeX:

http://en.wikibooks.org/wiki/LaTeX/Basics

http://texblog.org/2007/07/09/documentclassbook-report-article-or-letter/

http://tex.stackexchange.com/questions/4221/what-are-your-favorite-document-classes-and-what-do-you-use-them-for

http://tex.stackexchange.com/questions/782/what-are-the-available-documentclass-types-and-their-uses

LaTeX - Title Page

Some links to help with title pages in LaTeX:

http://en.wikibooks.org/wiki/LaTeX/Title_Creation

LaTeX - Appendixes/Appendices

Some links for Appendices in LaTeX:

http://www.tex.ac.uk/cgi-bin/texfaq2html?label=appendix

http://en.wikibooks.org/wiki/LaTeX/Document_Structure

Monday, January 9, 2012

Updating Mendeley Desktop from version 1.1 to 1.3 in Ubuntu 11.10

Alright, so I was having issues updating MD.  I finally figured it out.  Stupid mistake by me.  I posted this in the Mendeley support forum:
I am having trouble upgrading from MD ver 1.1 to 1.3 in Ubuntu 11.10. I've looked everywhere for help but haven't found any. I noticed there (or I couldn't find it at least) is not an MD repository for Ubuntu 11.10. Is it because there (from what I have noticed) are some problems with dpgk and/or dependcies, etc., especially with new installations? I've tried deleting and re-downloading. I've tried running the update in the terminal, in the update manger, and in the software center. So far, nothing works. I don't want to delete and do a fresh install since Mendeley Desktop does not save preferences/settings for "Document Details" (unless there is a way and I do not know/ haven't found it). Any ideas, thoughts?

I answered it myself once I figured it out which wasn't long after I posted it!!
Ahh, what a sec. I may have found my mistake. I tried "sudo dpkg -i mendeleydesktop_1.3_amd64.deb" but didn't realize, until now, that I didn't specify the directory which is in Downloads in my home folder. I also didn't read the error closely which told me the file wasn't found in the directory I was using!! So I changed the directory and reran the command. Oh yeah, that worked! Doh! Sorry. Well if anyone overlooks stuff like me, then maybe this will help!

Just type sudo dpkg -i mendeleydesktop_1.3_amd64.deb in the terminal but make sure you point it to or are in the right directory. I had to do this since the commands sudo apt-get update and sudo apt-get install mendeleydesktop did not work for me. I think it has something to do with MD not having posted a repository for Ubuntu 11.10 yet (?).

Edit: 1-18-12 A new release just came out for MD, 1.3.1.  The update manager automatically installed it this time.

Thursday, January 5, 2012

Inkscape - exporting bitmap (as a .png file) getting rid of unwanted checkered background/hatch fill

Ok, so I've been using Inkscape for awhile for drawing simple images, and I love it.  However, I don't know if this is default or what, but when you begin exporting your image using "Export Bitmap" it exports the file fine as a .png except there is this hatched fill or checkered background on the image!  I finally found out how to fix this from here: http://www.inkscapeforum.com/viewtopic.php?f=5&t=820 at about halfway down the page.

To fix this, while in Inkscape go to File - Document Properties.  Then click on the area where it says background.  It should, at least in my case, have half of the bar or strip as white and the other half as checkered.  When you click on it, this is really strange, the settings are all on white!  However, I clicked on the hatched portion, called Alpha (opacity) and then move it to darker (left) then moved it back to white/lighter (right).  Then it disappeared (the checkered area)!




BTW, I tried to fix it manually by going to the object fill and stroke properties, but like above the settings were all on white.  I don't think I tried messing with the checkered setting, but I would just do the above steps to fix the whole thing.

I also, before, used, from what I remembered, a white rectangle to cover the area of the figure and set it to the lowest layer.  However, I could not get that to work this time so I hunted out this fix.

Friday, December 30, 2011

Moving the legend location in Maxima/Gnuplot

I had a plot where the function graph intersected the legend at its default position in the upper right hand corner.  I finally found a command which will move it to the lower right instead.  I'm sure you can move it to where you like, but this is the only one I found so far.  The command is:

[gnuplot_preamble,"set key bottom"]


For example,

plot2d([legendre_p(0, x), legendre_p(1, x), legendre_p(2, x),legendre_p(3, x), legendre_p(4, x), legendre_p(5, x)], [x, 0, 2], [y, -2, 5], [legend,"P_0 (x) = 1","P_1 (x) = x","P_2 (x) = (1/2)*(3*x^2 - 1)", "P_3 (x) = (1/2)*x*(5*x^2 - 3)","P_4 (x) = (1/8)*(35*x^4 - 30*x^2 + 3)","P_5 (x) = (1/8)*x*(63*x^4 - 70*x^2 + 15)" ], [ylabel,"P_n (x)"], [gnuplot_preamble,"set key bottom"]);


Found this here: http://maxima.sourceforge.net/maxima-gnuplot.html

Editing axis and legend labels in Maxima/Gnuplot

The commands for editing the labels for the x and y axes in Maxima are:

[xlabel,"expr"]

and

[ylabel,"expr"]

where expr is the argument holder where you place your text for whatever label you are wanting.  The quotes " " are necessary.

The command for the legend label is:

[legend,"expr1","expr2"]

where expr1, expr2, etc. are the argument holders where you place your text for whatever labels you are wanting depending on the number of legend labels.

These commands go inside your overall plot command.  For example,

plot2d(func, x, [xlabel,"expr"], [ylabel,"expr"], [legend,"expr1","expr2"])

Found these commands here: http://maxima.sourceforge.net/docs/manual/en/maxima_12.html#SEC65