Visiting mother in law - always enough to eat!
Sunday, July 31, 2005
Friday, July 29, 2005
The inside
Relates to the previous post. Both shot while visiting my parents house with the childrens for a barbeque evening. A couple of the other ones where taken there, too. Nice to be home from time to time.
Tuesday, July 26, 2005
Sunday, July 24, 2005
Wednesday, July 20, 2005
Friday, July 08, 2005
Wednesday, July 06, 2005
Årets første bad!!!
Siden sist har Telenor(?) lurt seg til å sette opp et lite hus på svaberget vårt - bildet av det kommer kanskje her etter hvert - ikke så lite frekt spør du meg. Men vi kom oss da ut i vannet allikevel. Og det var ikke vondt. Varmt er det i luften, og i vannet har nok temperaturen kommet opp i over 20°C - det vil si at det er varmt nok for meg.
Vi håper på en lang og fin badesesong. Jobb eller ikke jobb, bade må vi da ihvertfall ta oss tid til!
Med ønske om en fin sommer!
Tuesday, July 05, 2005
Python snippet - setattr
class A(object):
def __init__(s, **kw):
for n,v in kw.items():
setattr(s,n,v)
Any key/value pairs in the keyword argument to the constructor call will be assigned as members in instances of the class.
Take care,
Monday, July 04, 2005
Reflections
I was riding my bike today, and saw this next to the road. Another title could have been "old meets new" or something like that. Go figure :-)
Saturday, July 02, 2005
Thursday, June 30, 2005
This is Oslo
Well, the place in the front seem to be a nice place, but all the stuff behind there...
Sorry, the harbour of Oslo isn't very nice.
Saturday, June 25, 2005
Python snippet
Python lack the ?: conditional short-cut from for instance C. It is, however, possible to do:
a and b or cThere is, though, a small problem with this. If 'a' evaluates to True, the result should be 'b'. But if 'b' also evaluates to False, python will go on with 'c', and return the result of 'c'. A quick fix is:
(a and [b] or [c])[0].
As [b] always is True, regardless of 'b', the result will be [b] if 'a' is True, and the last [0] will extract the first entry from the list [b], which is 'b'.
Take care!
Tuesday, June 21, 2005
Sunday, June 19, 2005
Focal-length statistics!
Download img-focalstat. Save the file as img-focalstat.pl or whatever you like.
img-focalstat is a Perl script which takes a directory as input, scan the directory recursively for jpeg's, and check the focal length for each picture using jhead. The script show the number of pictures for each focal length, sorted from shortest to longest.
If you like, a GD bar-plot can be made of the data, with a width of each bar of your choice.
Also, all images for a particular focal length can be showed. This requires gthumb at the moment. May be made configureable on user-request.
To use the script, you need perl with File::Find, Getopt::Std, POSIX, and GD::Graph, as well as jhead and optionally gthumb. Should work on any linux, Mac OS X or other **ix. May work on Window$ as well.
The script is licenced under GPL.
syntax: img-focalstat.pl [directory| [-s focal-length] [-g ] [ -o filename ] [-n integer ] [ -i ] [ -b directory]
Description of options:
-s focal-length: Show all images with the given focal length using gthumb. Focal length should be specified as jhead show it, but without "mm". For instance 24.0 (and not just 24, at least with my jhead...)
-g : Make a GD::Graph bar-plot
-o : Output filename for bar-plot, must be a non-existant file, the script refuse to overwrite. Output will be a PNG image.
-n ingeger : The number of bars to have in the plot. Focal length will be distributed evenly on this number of bars.
-i : Include images with unknown focal length in the count and bar plot, show up as "n/a". For those cases where jhead are unable to detext any focal length in the EXIF data.
-b basedir : The basedirectory to scan. If any options are given, the base directory must be specified with the -b option. If no option is given, the base directory can just be given as the only argument to the script (without the -b)
Feel free to use or abuse or whatever. Comments are welcome :-)
Take care!
Closeup experiments
Try the +4 closeup on my 75-300, in my garden. A nice sunny day, and stopped down the lens can still be kind of sharp.
Haven't done any rigorous tests, but I think the closeup give me at least true macro (1:1 magnification) on the 75-300.
In other news, I am still writing my Ph.D stuff.
Friday, June 17, 2005
Salt and pepper!
Got a new close-up diopter/filter for my lenses. It's a +4 strength close-up
that fit on both the kit-lens and my 75-300. This picture is with the
kit-lens. The magnification is significantly higher with the 75-300, but
it's hard to do anything serious without a tripod (which I do not have yet).
Will probably go look for bugs in the garden tomorrow...