Originally, I was wondering if I could replace my 120-400 zoom by a 300mm prime and a 1.4x multiplier. Since I can’t resist a good occasion to write a python script, I quickly wrote something to extract the relevant EXIFs from a collection of pictures, and with the help of LibreOffice, make a histogram from that.
So this is the histogram of all the Photos I have on my hard disk, pretty much all of 2018 and a good deal of 2017, plus a few older directories I haven’t archived yet. Some interesting findings:
I don’t use the 10-20mm that much
I don’t use my 1.4x multiplier that much either (the small bar around 560mm)
The long end of my 17-70mm is overworked. Maybe I should get a 24-105mm.
I do make a lot of shots in the 280-400mm range, but I do use the low end of the zoom quite a bit, too.
I’ve often wondered how this would look like for my own collection too. I think I might as well get prime lenses only, but I haven’t checked. Would you care to share your script?
You generate the bins in the spreadsheet, so you can use any scale you want. For my purpose I mostly wanted to see how I used the 120-400 range, and a logarithmic scale over the whole set of pics would not have had enough detail.
I wrote a nice script to do this a few years ago; alas, lost it in my Ubuntui 18.04 upgrade…
Anyway, here’s quick-n-dirty, using two tools: 1) exiftool, and 2) perl. Yes, perl, I’m that old. Both exiftool and perl install from the Unbuntu repositories; with that, put this script in /usr/local/bin:
#!/usr/bin/perl
$min=10000;
$max=0;
while ($val = <>) {
next if $val !~ /Focal/;
$val =~ s/^.+?://;
$val =~ s/ mm//;
chomp $val;
$val = int $val;
$histogram{$val}++;
$min = $val if $val < $min;
$max = $val if $val > $max;
}
for ($i=$min; $i<=$max; $i++) {
print "$i: $histogram{$i}\n";
}
and run the following in the directory with all your raw files (NEFs in my example):
$ exiftool -S -FocalLength *.NEF | histogram.pl
Yes, not a pretty graph, but the relevant information is presented.
You just need exiftool, full stop. I make sure I have it, dcraw, and gmic (command line version) somwhere in my $PATH…
Try using pandas, matplotlib, and seaborn to create the histogram, it will look a lot better than what you can make in calc, and will give you a 100% Pythonic way of making that plot in just one script. Cool idea, btw!