Die Kaiser-Max-Grotte bei Zirl

Die Kaiser-Max-Grotte in der Martinswand ist von der Inntalautobahn gut sichtbar und obwohl man schon so oft vorbei gefahren ist, bleibt doch nie Zeit sich diesen Ort von der Nähe anzusehen. Das wollte ich nun ändern und bin kurzerhand mit dem Bus vom Finanzamt Innsbruck nach Zirl gefahren. Nach nur ca. 20 Minuten Fahrt (3.6€) erreicht man die Haltestelle Zirl/Gasthof Schwarzer Adler. Von dort aus spaziert man am besten zur Rettungsleitstelle Zirl und geht weiter westwärts. An der Gabelung des Geistbühelweges biegt man scharf rechts um die Kurve und folgt diesem bis er in den Weinbergweg übergeht. Der Asphaltweg geht in eine Schotterstraße über, die leicht ansteigend bis zum Steinbruch führt. Direkt nach der Haarnadelkurve nach links ist der Grottensteig ausgeschildert, der dann wiederum rechts oberhalb des Steinbruchs zur Grotte führt. Der Weg ist sehr gut gesichert und obwohl es gestern stark geregnet hatte, war er sehr gut begehbar.

Continue reading


Enzianhütte, Rumer Alm und Vintlalm

Mit dem Fahrrad erreicht man vom Stadtzentrum aus mit etwas Mühe den Ausgangspunkt für eine nette Dreialmenwanderung im Karweldengebirge, und zwar den Landeshauptschießstand Innsbrucker Hauptschützengesellschaft (sic). Man stärke sich am der Tränke neben dem Kinderspielplatz und folge dem vorbildlich ausgeschilderten Weg, der anfangs noch asphaltiert ist, bis zur ersten Abzweigung. Dann geht es weiter auf schönen Waldwegen, immer der Beschilderung nach, bis zur Enzianhütte (1041m). Diese erste Einkehrmöglichkeit erreicht man nach nur ca 20 Minuten, heute war sie jedoch wegen Krankheit geschlossen.

Wenn man die Enzianhütte umrundet, kann man dahinter dem Wanderweg zur Rumer Alm folgen, die man nach weiteren 30 Minuten bzw. 200 hm erreicht. Von dort aus hat man einen herrlichen Blick über Innsbruck. Weiter geht es der Beschilderung Richtung Vintlalm folgend, immer bergwärts, ca 280 weitere Höhenmeter, die sich etwas ziehen. Die Landschaft ändert sich merklich und vor allem das rötliche Gestein ist schön anzusehen. Man erreicht die Vintlalm (1567m) von oben und überblickt das östliche Inntal und den Brenner. Eine ähnliche Wanderung ist hier beschrieben.

 

 

Continue reading


Plotting Colourful Graphs with R, RStudio and Ggplot2

The Aesthetics of Data Science

Data visualization is a powerful tool for communicating results and recently receives more and more attention due to the hype of data science. Integrating a meaningful graph into a paper or your thesis could improve readability and understandability more than any formulas or extended textual descriptions can. There exists a variety of different approaches for visualising data. Recently a lot of new Javascript based frameworks have gained quite some momentum, which can be used in Web applications and apps. A more classical work horse for data science is the R project and its plotting engine ggplot2. The reason why I decide to stick with R is its popularity and flexibility, which is still  impressive. Also with RStudio, there exists a convenient IDE which provides useful features for data scientists.

Plotting Graphs

In this blog post, I demonstrate how to plot time series data and use colours to highlight a specific aspect of data. As almost all techniques, R and ggplot2 require practise and training, which I realised again today when I spent quite a bit of time struggling with getting a simple plot right.

Currently I am evaluating two systems I developed and I needed to visualize their storage and execution time demands in comparison. My goal was to create a plot for each non-functional property, the execution time and the storage demand, while each plot should depict both systems’ performance. Each system runs a set of operations, think of create, read, update and delete operations (CRUD). Now for visualizing which of these operations has the most effects on the system, I needed to colourise each operation within one graph. This is the easy part. What was more tricky is to provide for each graph a defined set of colours, which can be mapped to each instance of the variable. Things which have the same meaning in both graphs should visualized in the same way, which requires a little hack.

Prerequisits

Install the following packages via apt

and RStudio by downloading the deb – File from the project homepage.

Evaluation Data

As an example,we plan to evaluate the storage demand of two different systems and compare the results. Consider the following sample data.

We created a random data set simulating the characteristics of system measurement data. As you can see, we have a list of operations of the four types CREATE, READ, UPDATE and DELETE and a measurement value for the storage demand in both systems.

The Simple Plot

Plotting two graphs of thecolumns storage1 and storage2 is straight forward.

We assign for each point plot a color. Note that the color nme “Storage 1” for instance of course does not denote a color, but it assignes a level for all points of the graph. This level can be thought of as a category, which ensures that all the points which belong to the same category have the same color. As you can see at the definition of the color scale, we assign the actual color to this level there.  This is the result:

plot1Plotting Levels

A common task is to visualise categories or levels of measurement data. In this example, there are four different levels we could observe: CREATE, READ, UPDATE and DELETE.

Instead of assigning two colours, one for each graph, we can also assign colours to the operations. As you can see in the definition of the graphs and the colour scale, we map the colours to the variable operations instead. As a result we get differently coloured points per operation, but we get these of course for both graphs in an identical fashion as the categories are the same for both measurements. The result looks like this:

plot2Now this is obviously not what we want to achieve as we cannot differentiate between the two graphs any more.

Plotting the same Levels for both Graphs in Different Colours

This last part is a bit tricky, as ggplot2 does not allow assigning different colour schemes within one plot. There do exist some hacks for this, but the solution does not improve the readability of the code in my opinion. In order to apply different colour schemes for the two graphs while still using the categories, I appended two extra columns to the data set. If we append some differentiation between the two graphs and basically double the categories from four to eight, where each graph now uses its own four categories, we can also assign distinct colours to them.

We then assign the new column for each system individually as colour value. This ensures that each graph only considers the categories that we assigned in this step. Thus we can assign a different color scheme for wach graph and print the corresponding colours in the label (legend) next to the chart. This is the result:

plot3

Now we can see which operation was used at every measurement and still be able to distinguish between the two systems.

Continue reading


Von der Hungerburg zur Umbrüggler Alm, zur Höttinger Alm und zur Seegrube

Ausgehend vom Wanderwege-Hub Hungerburg, erreicht man hinter der Talstation die ausgeschilderten Wanderwege zur Umbrüggeler Alm und zur Arzler Alm.

Hält man sich links, gelangt man nach nur 30 Minuten die Umbrüggler Alm (Beschreibung hier). Man folgt der Beschilderung weiter und gelangt über Forstwege, einen kurzen Waldabschnitt und über die Skipiste nach einer weiteren Stunde zur Höttinger Alm (1487m). Als beinahe etwas bösartig erweist sich der letzte Anstieg, ruhigen Schrittes vorbei an den Rindern, bis zur Alm. Die letzten Höhenmeter ziehen sich, da man die Alm bereits gut im Blick hat.

Nach einer Stärkung geht es weiter entlang des Forstweges Richtung Nordosten. Man folgt der Beschilderung zur Bodensteinalm und quert nahezu steigungsfrei den Hang, bis man eine Gabelung erreicht. Man hält sich bergwärts und erreicht nach ca. 200 Höhenmetern die Bodensteinalm (1661m) entlang eines Forstweges. Man kann nun entweder der Forststraße bis zur Seegrube folgen, oder quält sich über den Seegrubenbahnsteig unterhalb der ebensolchen hinauf bis zur Bergstation. Von der Höttinger Alm bis zur Seegrubenbahnbergstation (1905) benötigt man etwa eineinhalb Stunden. Belohnt wird man mit einem traumhaften Ausblick über Innsbruck und das Inntal sowie auf die unzähligen Touristen in Flipflops und Seidenblusen. Man schließe sich diesen an und gleite bequem ins Tal. Eine weitere Beschreibung der Tour fndet sich hier.

 

Continue reading


Timelape Photography with the Camera Module V2 and a Raspberry Pi Model B

Recently, I bought a camera module for the Raspberry Pi and experimented a little bit with the possibilities a scriptable camera provides. The new Camera Module V2 offers 8.08 MP from a Sony sensor and can be controlled with a well documented Python library. It allows to take HD videos and shoot still images. Assembly is easy, but as the camera is attached with a rather short ribbon cable, which renders the handling is a bit cumbersome. For the moment, a modified extra hand from my soldering kit acts as a makeshift.

picamInitial Setup

The initial setup is easy and just requires a few steps, which is not surprising because most of the documentation is targeted to kids in order to encourage their inner nerd. Still works for me as well 🙂

Attach the cable to the raspberry pi as described here. You can also buy an adapter for the Pi Zero. Once the camera is wired to the board, activate the module with the tool raspi-config.

configThen you are ready to install the Python library with sudo apt-get install python3-picamera, add your user to the video group with  usermod -a -G video USERNAME  and then reboot the Raspberry. After you logged in again, you can start taking still images with the simple command raspistill -o output.jpg. You can find some more documentation and usage examples here.

Timelapse Photography

What I really enjoy is making timelapse videos with the Raspberry Pi, which gives a nice effect for everyday phenomena and allows to observe processes which are usually too slow to follow. The following Gif shows a melting ice cube. I took one picture every five seconds.

Eiswurfel2_kleinerA Small Python Script

The following script creates a series of pictures with a defined interval and stores all images with a filename indicating the time of shooting in a folder. It is rather self explanatory. The camera needs a little bit of time to adjust, so we set the adjustTime variable to 5 seconds. Then we take a picture every 300 seconds, each image has a resolution of 1024×768 pixels.

This script then can run unattended and it creates a batch of images on the Raspberry Pi.

Image Metadata

The file name preserves the time of the shot, so that we can see later when a picture was taken. But the tool also stores EXIF metadata, which can be used for processing. You can view the data with the exiftool.

Processing Images

The Raspberry Pi would need a lot of time to create an animated Gif or a video from these images. This is why I decided to add new images automatically to a Git repository on Github and fetch the results on my Desktop PC. I created a new Git repository and adapted the script shown above to store the images within the folder of the repository. I then use the following script to add and push the images to Github using a cronjob.

You can add this to you user’s cron table with crontab -e and the following line, which adds the images every 5 minutes,

On a more potent machine, you can clone the repository and pull the new images like this:

The file names are convenient for being able to read the date when it was taken, but most of the Linux tools require the files to be named within a sequence. The following code snippet renames the files into a sequence with four digits and pads them with zeros if possible.

Animated Gifs

Imagemagick offers a set of great tools for images processing. With its submodule convert, you can create animated Gifs from a series of images like this:

This adds a delay after each images and loops the gif images infinitely. ImageMagick requires a lot of RAM for larger Gif images and does not handle memory allocation well, but the results are still nice. Note that the files get very large, so a smaller resolution might be more practical.

Still Images to Videos

The still images can also be converted in videos. Use the following command to create an image with 10 frames per second:

Example: Nordkette at Innsbruck, Tirol

This timelapse video of the Inn Valley Range in the north of the city of Innsbruck has been created by taking a picture with a Raspberry Pi Camera Module V2 every 5 minutes. This video consists of 1066 still images.

Continue reading