1
Lenses / Re: How do you determine the focal length you use most often?
« on: May 16, 2013, 10:20:20 AM »
Here is a free way to do it that allows you to get the results into Excel or LibreOffice. You can also use it to study other things like what apertures, lenses, ISO speeds and shutter speeds you are using. It also works with RAW files.
1. On Windows, download and install exiftool, GNU coreutils and GNU grep and add them to your executable search path. On OS X, just install exiftool. The packages for each are located here:
http://www.sno.phy.queensu.ca/~phil/exiftool/
http://gnuwin32.sourceforge.net/packages/coreutils.htm
http://gnuwin32.sourceforge.net/packages/grep.htm
If you are using Windows and have cygwin installed, you can skip downloading the GNU utilities as you will likely already have them installed.
2. Using the command prompt, change directories to the one above your photo library. Run the following command sequence:
exiftool -r path1 path2 pathn | grep "Focal Length" | grep equivalent > focal-lengths.txt
Where path1 path2 pathn are the names of the photo library directories you want to analyze. You can specify one or multiple directories. If you shoot RAW+JPG, you can add "-ext CR2" or "-ext JPG" to the exiftool command above to make exiftool only look at the photo type you want. As long as you run exiftool without destructive parameters, it will open your images read-only. '-r' just tells it to recurse through all subdirectories underneath the starting path or paths. The grep commands are used to only send the focal length information to the focal-lengths.txt file. With some tweaking you could alter this step to study apertures used, etc. To get an idea of what exiftool reports, try running it on a single photo file without the grep commands, and be sure to scroll up as there is a lot of output.
3. After that command finishes, run the following command sequence:
cat focal-lengths.txt | cut -d : -f 3- | cut -d " " -f -2 | sort -n | uniq -c > focal-lengths.csv
Note that Windows has its own sort.exe so you may need to specify the full path to the coreutils sort.exe file.
4. Then open focal-lengths.csv in Excel or LibreOffice and use fixed-width delimiters to split the file into two columns.
5. Select column A (which has the counts for each focal length) and move it to the right of column B (the focal lengths). At least in LibreOffice, this is necessary for the graph to plot correctly, otherwise the axes will be flipped.
6. Select both columns and then generate an X-Y scatter graph, and if desired, have it use lines instead of points.
7. Add axis labels as appropriate.
1. On Windows, download and install exiftool, GNU coreutils and GNU grep and add them to your executable search path. On OS X, just install exiftool. The packages for each are located here:
http://www.sno.phy.queensu.ca/~phil/exiftool/
http://gnuwin32.sourceforge.net/packages/coreutils.htm
http://gnuwin32.sourceforge.net/packages/grep.htm
If you are using Windows and have cygwin installed, you can skip downloading the GNU utilities as you will likely already have them installed.
2. Using the command prompt, change directories to the one above your photo library. Run the following command sequence:
exiftool -r path1 path2 pathn | grep "Focal Length" | grep equivalent > focal-lengths.txt
Where path1 path2 pathn are the names of the photo library directories you want to analyze. You can specify one or multiple directories. If you shoot RAW+JPG, you can add "-ext CR2" or "-ext JPG" to the exiftool command above to make exiftool only look at the photo type you want. As long as you run exiftool without destructive parameters, it will open your images read-only. '-r' just tells it to recurse through all subdirectories underneath the starting path or paths. The grep commands are used to only send the focal length information to the focal-lengths.txt file. With some tweaking you could alter this step to study apertures used, etc. To get an idea of what exiftool reports, try running it on a single photo file without the grep commands, and be sure to scroll up as there is a lot of output.
3. After that command finishes, run the following command sequence:
cat focal-lengths.txt | cut -d : -f 3- | cut -d " " -f -2 | sort -n | uniq -c > focal-lengths.csv
Note that Windows has its own sort.exe so you may need to specify the full path to the coreutils sort.exe file.
4. Then open focal-lengths.csv in Excel or LibreOffice and use fixed-width delimiters to split the file into two columns.
5. Select column A (which has the counts for each focal length) and move it to the right of column B (the focal lengths). At least in LibreOffice, this is necessary for the graph to plot correctly, otherwise the axes will be flipped.
6. Select both columns and then generate an X-Y scatter graph, and if desired, have it use lines instead of points.
7. Add axis labels as appropriate.

To follow up to my previous posts, I did some shooting with the 5D3 this weekend for Easter and ended up with much better battery life, but I was shooting much more than usual rather than taking an occasional shot and letting the camera idle. I noticed this effect as well with my T2i - I was once able to get 2,000 shots on one battery, but I was doing rapid fire shots nearly constantly for a rock concert. I wish the 5D3 had a smaller time period setting for auto power off, such as 5 seconds instead of a minute. For now I just shut off the camera after each shot when I'm shooting periodically.