A Little Off Code, Computers, Photography and Guns

24Jun/091

Reply to Searches

Every couple of days I stop and take a look through the stats on my blog to see how things are progressing, and I notice plenty of times where people have used certain search terms to come to my blog. Sometimes the terms are very specific, sometimes they are very vague, but I always wonder the same thing: did they find what they were looking for?

I often times wish I could some how contact the person that made a certain query to ask them if they found what they wanted to find. I wonder if they took the time to read through the post i wrote that relates to their query and found their answer. I know how I read blogs and it's often not very thorough, I figure that a majority of the time I don't find what i'm looking for specifically because I just skim over it. I do admit though that I'm probably not making it very easy for the readers to find very specific information, there's often a lot of fluff and cruft surrounding the important bits of information in my posts.

Google can you help me? I want to be able to answer the questions posed by your users' queries. Yes I already know you're going to tell me that that's what comments are for but sadly not enough people use comments. I also already know you've implemented what you call a SearchWiki[1] and that seems to have failed miserably, but I like the idea, just wish I could contribute my own results and findings to other's SearchWiki's.

  1. http://www.google.com/support/websearch/bin/answer.py?hl=en&answer=115764 SearchWiki lets you customize your Google Web Search results by ranking, removing, and adding notes to them. []
23Jun/092

Installing MikTeX on Windows 7

One of the only things that kept me from installing Windows 7 permanently during the school year was that the few times I tried, I had never gotten MikTeX[1] to work. This of course was a major problem since nearly all of my assignments are done with MikTeX now. When installing MikTeX I always ran into a BSOD that I ignored because I figured that it was only because Windows 7 was only an RC[2].

I've had Windows 7 on my desktop now for about 2 weeks and up until this point I've been making due with the MikTeX Portable Edition which is pretty buggy to say the least. More than half of the time it would hang on compiling a document to pdf at something due to it not thinking initexmf.exe was an operable program. And of course upon googling this problem, nothing of use could be found.

Well tonight I decided I'd give the install another go to see if either Windows 7 had been patched to fix this issue, or if MikTeX had fixed the problem. On my first try, it did exactly as it had always done before BSOD'd. Since I had never set windows to not automatically restart upon catastrophic system failure[3] it would just instantly restart without giving me enough time to read the type of error. I fixed this and ran the installer once more. The BSOD was a PAGE_FAULT_IN_NON_PAGED_AREA error, which was pretty vague as usual but I figured it had to do with system paging, so I disabled the Virtual Memory restarted and ran the installer once more. This time it worked exactly as it should.

On another interesting note, I discovered that pdflatex is significantly faster than texify. I found this out when I was trying different methods of compiling my TeX documents into pdf's using the MikTeX Portable Edition which was giving me fits with my old method.

I used to use the following in NotePad++'s NppExec plugin to compile a pdf and view in Adobe Reader:

1
2
C:\Program Files\MiKTeX 2.7\miktex\bin\texify.exe -c -p "$(FULL_CURRENT_PATH)" "$(NAME_PART).pdf"
C:\Program Files\Adobe\Reader 9.0\Reader\AcroRd32.exe "$(CURRENT_DIRECTORY)\$(NAME_PART).pdf"

Now I use pdflatex:

1
2
C:\Program Files\MiKTeX 2.7\miktex\bin\pdflatex.exe "$(FULL_CURRENT_PATH)"
C:\Program Files\Adobe\Reader 9.0\Reader\AcroRd32.exe "$(CURRENT_DIRECTORY)\$(NAME_PART).pdf"
  1. MiKTeX (pronounced mick-tech) is an up-to-date implementation of TeX and related programs for Windows (all current variants). []
  2. Release Candidate []
  3. Read: Blue Screen Of Death []
16Jun/090

Infrared Photos

DSC_4540

I'd have to say that my favorite style of photography is good black and white infrared photography, occasionally false-color infrared photography is good but black and white is by far my favorite.

I finally got a chance this summer to take some decent IR photos on my parent's ranch in Wyoming. I did all of the photos with my Nikon E-Series 28mm f/2.8, which on my Nikon D50 is a bit closer to a 42.7mm lens than a 28mm lens. How did I figure that you ask?

Given that I can find the angle of view of the camera using the equation[1]:

\displaystyle \alpha = 2 \cdot arctan\left (\frac{d}{2f}\right)

Where alpha is the angle of view, f is the focal length of the lens and d is the diagonal length of the sensor of the camera in question. Given that my camera's sensor is 24.7mm x 15.5mm[2], we can substitute this in for d as well as the focal length of my lens, 28mm and solve for alpha:

\displaystyle 53.65^{\circ} = 2 \cdot arctan\left (\frac{\sqrt{(24.7)^2 + (15.5)^2}}{2\cdot 28}\right)

Now that we've found the angle of view that my camera sees through the 28mm lens we can solve for the focal length f in lets say Nikon's D3X which happens to have a full-frame sensor. The Nikon D3X's sensor is 35.9mm x 24mm[3].

\displaystyle f = \frac{d}{2 \cdot tan(\tfrac{\alpha}{2})}

Substituting in the diagonal length of the D3X's sensor and the angle of view my D50 has we can find what focal length of lens the D3X would need to have to have the same angle of view as my D50.

\displaystyle 42.7mm = \frac{\sqrt{(35.9)^2 + (24)^2}}{2 \cdot tan(\tfrac{53.65^{\circ}}{2})}

And now we can figure out how much cropping (magnification if you will) my camera's sensor causes when using a lens meant for a 35mm//full-frame camera.

\displaystyle \frac{42.7mm}{28mm} = 1.525

This happens to be pretty close to the ratio that most people give for calculating the focal length of a lens meant for a 35mm//full-frame camera on Nikon DX format cameras. The general rule given is that you should just multiply the focal length by 1.5 which... as you can see is ever-so-slightly off. I'm just a little OCD about that sort of thing and it seemed too simple to be completely correct so I figured I'd just calculate it myself.

Anyway I suppose I should have warned you at the beginning of the post that this would have more to do with photography math than infrared photos but it probably didn't hurt you to learn something new.

Also I almost forgot to mention what filter I used. I used a Hoya R72 Infrared bandpass filter. This particular filter passes light wavelengths 720nm and greater. Since my camera was designed with visible light photography in mind it has a low pass filter installed over the sensor that blocks out a good deal of infrared and ultraviolet light so even in broad daylight I still have to do long exposures to get infrared photos exposed properly.

The photos in that album were all done at f/16 since I found that using extremely long exposures at smaller f-numbers just blows out the photo and I'm not sure why just yet. However it helps to use a smaller aperture anyway since infrared light also focus' at a different point than visible light does, my 28mm lens has an infrared focusing mark on it for correcting but, it's not perfect and I can't compose or focus the shots while the filter is on the camera since being human my eyes are only sensitive to light of wavelengths between about 380nm and 750nm[4]. As well as making the photos not-blown-out with the aperture so small it also aids in any focusing deficiency since the depth of field is much deeper. Most of the photos were between 2 and 5 second exposures depending on the cloud-cover. You can see detailed shooting info by looking at the EXIF data Picasa shows in the More Info section of each photo, the aperture is erroneous there so ignore it, my Nikon E-Series 28mm is a non-cpu lens so it can't tell the camera what it's current aperture is.

  1. http://en.wikipedia.org/wiki/Angle_of_view []
  2. http://www.dpreview.com/reviews/specs/Nikon/nikon_d50.asp []
  3. http://www.dpreview.com/reviews/specs/Nikon/nikon_d3x.asp []
  4. http://en.wikipedia.org/wiki/Visible_light []
8Jun/093

Logmein on Windows 7 RC

I'm kind of pathetic, I still have access to my workstation even when I'm on vacation and I needed to do a little bit of work while I was here. So I fired up Logmein only to discover it didn't like any of the credentials I had tried to give it.

A quick google later and I found that Windows 7 RC requires the computer's name be prefixed as the domain of the login credentials like so:

Lets suppose your username is bob and your computer's name is bobs-computer. In order to login you would have to use bobs-computer\bob in for the username field then simply bob's password for that username.

So I did manage to remote into my workstation to do some work and all is well.