Node.js package published

In my new job I am doing front-end coding with React.js, and every Javascript programmer needs to have some package published at npmjs.com I guess. 😉

So here is my first package: js-object-util

It is inspired by the Immutable API but works for plain Javascript objects. You can use it to easily check for and retrieve properties of deeply nested objects. Let’s have a closer look at the usage:

var objectUtil = require('js-object-util');

// some deeply nested example input
const book = {
	publisher: {
		name: "dpunkt",
		address: {
			city: "Heidelberg",
			plz: 69123
		}
	},
	title : "React",
	year: 2015,
	properties: {
		includes_ebook: false,
		whatever: null,
		dunno: undefined
	},
	readers: [
		{
			type: "user",
			name: "Johnny",
			age: 32,
			nickname: null
		},
		{
			type: "user",
			name: "Brad",
			age: 13,
			nickname: "Bratze"
		}
	]
};

// let's go
var keyExists;
keyExists = objectUtil.hasIn(book, ['publisher', 'address', 'city']);	    // true
keyExists = objectUtil.hasIn(book, ['publisher', 'address', 'notthere']);   // false
var value;
value = ObjectUtil.getIn(book, ['year']);		   // 2015
value = objectUtil.getIn(book, ['readers', '1', 'name']);  // Brad
value = objectUtil.getIn(book, ['readers', '1', 'notthere'], 'alternate');  // 'alternate'

This is cool because you don’t have to do these stupid step-wise tests for the existence of certain properties anymore.

I hope you like it. See js-object-util for installation instructions. Unit tests and coverage stats are included, the source code is at github. License is MIT.

Posted in coding, IT and computers, tools | Tagged , , , , | Leave a comment

Fun with processing.js

I started checking out various visualization tools for the web during the last few months. A project which I found very interesting is processing.js. This is a JS port of the processing language, an easy-to-use language to write visualizations or interactive media stuff. It seems it’s mainly used for visual art stuff.

You can see some example processing.js code here:

 

processing_code

 

The page header animation at the processing website inspired me to create a small game, which I called PRace. Here is a screenshot:

prace_web

It’s a 2D side scroller. You are the red guy on the left, and the goal is NOT to crash into the blue guys coming at you from the right — BUT flying close to them gives you points.

The best thing is that you can give the game a try yourself with a modern browser:

http://rcmd.org/projects/prace/

The code can be found at Github: https://github.com/dfsp-spirit/web/tree/master/processingjs/prace

 

Enjoy!

 

Posted in coding, general, IT and computers | Tagged , , , , | 1 Comment

Architecture visualization in the Quake 3 engine

I was recently given a bunch of 2D plans of a large building. They were floor plans for the 5 stories, plotted on paper. I’m pretty good at imagining the 3D object from 2D plans, but in this case, I thought some 3D visualization might be helpful. So for everybody involved in the project, I built the whole thing in the Quake 3 engine on a rainy Sunday afternoon some months ago when I was ill and had nothing better to do.

Here is the front view:

q3_arch_1

Here is the back of the building:

q3_arch_2

And finally, a small section which already has some windows:

 

q3_arch_3

This was a fun project for a day that made some people happy.

Here is a final shot showing the scene in the Quake level editor GtkRadiant:

q3_arch_editor.jpg

 

Posted in general, Level Design | Tagged , , , , | Leave a comment

Talk on Hodgkin lymphoma cell graphs at ISMB 2016

It’s been a while since I went to the Intelligent Systems for Molecular Biology (ISMB) 2016 conference, but I thought I’d still share a few impressions.

IMG_3775.JPG

 

The conference was held at a Disney Resort Hotel near Orlando, FL. Great weather, but not a good place to be as a PhD student who is short on money.

img_3782

I am working on two projects in the fields of digital pathology/imaging and protein topology in my PhD. I submitted a paper we recently published in Bioinformatics to the highlight track and it was accepted, and I was also given a $ 1000 travel grant (thanks to the RNA group at ISCB!). So I went to the conference directly after a returning from a trip to Indonesia.

The conference was well organized and interesting. There were very few contributions from the field of digital pathology, but quite a few interesting talks on structural biology. I especially enjoyed the keynotes by Ruth Nussinov on Ras signaling and by Deborah Marks on Molecular structure and organism fitness from genomic sequences.

img_3789

My highlight talk was at the last day of the conference, but I got some good questions afterwards and also met interesting people at the poster sessions that were held earlier during the conference.

img_3812

If you are interested in the talk, you can find the slides at F1000:

Tim Schäfer, Hendrik Schäfer, Jörg Ackermann, Norbert Dichter, Claudia Döring, Sylvia Hartmann, Martin-Leo Hansmann, and Ina Koch. CD30 cell graphs of Hodgkin lymphoma are not scale-free — an image analysis approach. Highlight talk at Intelligent Systems for Molecular Biology 2016. Orlando, FL, USA

Slide link at F1000: http://www.slideshare.net/TimSchfer4/schaefertp105

This is a highlight talk based on the following publication:

 

Hendrik Schäfer, Tim Schäfer, Jörg Ackermann, Norbert Dichter, Claudia Döring, Sylvia Hartmann, Martin-Leo Hansmann, and Ina Koch. CD30 cell graphs of Hodgkin lymphoma are not scale-free — An image analysis approach. Bioinformatics, 32(1):122–129, 2016. DOI 10.1093/bioinformatics/btv542

Posted in Bioinformatics, general, Science | Tagged , , , , , | Leave a comment

Back from Indonesia

I recently submitted my PhD thesis and then went on a 3 week trip to Sulawesi, Indonesia. We visited Makassar, Rantepao, Tentena, Ampana, the Togean Islands, and Palu. You can find my travel blog with a description of the trip and lots of photos here: https://sulawesi2016blog.wordpress.com/

You can find my travel blog with a description of the trip and lots of photos here: https://sulawesi2016blog.wordpress.com/

Posted in general | Leave a comment

Elinchrom EL Skyport ECO does not fire flash anymore

I have an Elinchrom D-Lite 2 lighting set in my home studio, and I fire the soft boxes via an Elinchrom EL Skyport ECO transmitter mounted in the camera’s hot shoe.

DSC_5609_ELINCHROM_SKYPORT

When I wanted to start a photo session yesterday, the flashes refused to fire. When I clicked the Test button, the LED flashed green, so it seems the batteries were OK. But I didn’t know what else to do (channel settings were good), so I changed the battery. Still no flash.

I searched the internet, and after a while, I found the following line in some product description of the Elinchrom Skyport: Status LED flashes once or twice depending on if Normal-or Speed Sync mode is selected. With my device, it flashed twice.

With this info and new search terms, I finally found this post at bayerpattern.com:

http://www.bayerpattern.com/elinchrom-skyport-trigger-problem/

Basically, the Skyport was in its second operation mode (‘speed mode’), and in this mode it does not work with my studio lights. So the solution is to change the mode back to normal. You can do this by holding the Test button until the LED flashes once it seems.

(In the baypattern article it says hold it for 10 seconds, but that did not work in my case.)

Posted in Photography | Tagged , , , , , , | 3 Comments

DSLR filming: oh right, what about the audio?

When you’re a hobbyist DSLR guy like me and try to make your first videos, you will most likely be busy getting the visuals right first. After a while, you may have the idea of turning the sound on when whatching the videos you recorded. At that time, you are most likely be shocked by the cruel audio quality of your oh so great and expensive DSLR!

I thought they gotta be kidding me when I first heard it. My thought was like: I spend € 2000.- on a D800 body, and THIS SHIT is what it gives you for audio?!

The problem

Yes, it’s true. Audio quality of DSLRs sucks hard. Why? Some of the most obvious problems with the built-in DSLR audio include:

  1. Handling noise: The mic is directly attached to the camera without any shockmount (and additionally, it is not directional). So it records the handling noise of the camera, e.g., you pressing buttons / moving the camera, zooming the lens, etc.
  2. Mic quality: The mic most likely has high self noise and/or is not sensitive enough.
  3. Wind (outdoors only): Even very little wind may cause ugly hissing, because the mic has no dead cat or similar protection against wind.
  4. Dependent on camera: You cannot move the mic (independently of the camera). Note that this means you cannot ask somebody to talk directly into the mic — he would not be in the frame of the camera anymore (or be VERY close and look very stupid).

Options to solve the problem

So what can you do to get better audio with a DSLR? This depends on what you want to record, which quality you need, etc. But the general options include:

  • Ignore / circumvent the problem: Decide that audio is not that important or convince yourself that the quality you have is good enough. Or decide to simply not use the recorded audio at all — use background music only for the videos, or whatever. Pros: Dirt cheap, little work! Cons: Crappy or no audio.
  • Buy a video mic: buy a standard, rather cheap (€ 80 — € 200) video mic (like Rode VideoMic, Shure VP83 or similar stuff from other companies). These get mounted in the camera hot shoe, the data is send to your camera for recording via the 3.5 mm jack. Pros: Improves problems 1, 2 and 3 listed above. Rather cheap, medium amount of work (audio is part of the video). Cons: Does not address problem 4. Whether the other problems get solved or only improved depends on your application.
  • Record with an external device: Get a handy recorder (Zoom H4N, Tascam DR-40 or similar stuff from other companies). These are devices with a size between an old cell phone and a Game Boy — you may be able to force them into your pocket, and it is possible to attach them to a DSLR. They have a built-in microphone and they record to internal SD cards these days. Priced between € 180 and € 400. If you don’t go for the cheapest ones, they usually have 2 XLR inputs — this is interesting for high quality audio, because XLR is what professional microphones use! Pros: Possibility to get very good quality. Cons: Expensive, more work (handle 2 devices, sync audio to video later, post-process audio to get even better quality?).

DSC_5610_ZOOM_H5
Zoom H5

Actually, the last option could be subdivided further.

  • Record with an external device, but not to it. That is, use the mic of the device, but not the recorder (and storage). Instead, route the audio signal back into the camera for recording (from the monitoring output of the device to the 3.5 mm mic input jack on the camera). Note that this requires a special cable: the mic input on a DSLR requires a mic-level audio signal, and the headphone output of a handy recorder is line-level (see this article by Sam Mallery for details). Pros: Uses good mic of external device, no need to sync audio. Cons: ?
  • Also record to the device. Pros: No need for special cable, can use advanced features of the recording device, e.g., audio filters. Cons: Need to sync audio later

That’s it for now. You now know some options to get better audio when filming with your DSLR.

Posted in audio, Photography | Tagged , , , , , | Leave a comment