Category: Open Source

Neuronvisio ModelDb plugged in released into the wild

We have just released Neuronvisio 0.7.0.

With this release it is possible to browse the models present on the ModelDb database, and have a look at the readme and at the properties of the Model.

Model Information and properties are presented in a quick way to the user

The Load Model button permits to download, extract, compile and load the model in one click. Sweet.

The other big things is that I didn’t write all this code, but actually 0.7.0 it’s the first release that features a contribution from another person (before was one man band!). Uri wrote the scraper for ModelDb and I’ve hooked it together in the GUI. We developed using the pull-request framework, which github makes very nice and clean.

If you’re interested in computational Neuroscience, and you are using NEURON, give Neuronvisio a go.

Impacts graph on Neuronvisio repo

Lately, github has rolled out a series of graphs to visualize the commit through the time.

An interesting one is the impact graph. This is when everything started

Neuronvisio_impact_start

Neuronvisio started as one man band project, actually as a spin-off of my PhD, when I realized that I was building something that was missing and that could be useful for other people as well. So I just detached the neuronvisio code in is own package, and released online. With time, Neuronvisio started to get some users, and people actually wrote enthusiastically on the ML about it. I was proud. Last August/September Uri decided to contribute to the software, to increase the features of it, in particular to plug it with ModelDB, making easy to browse the database, and to download and load a model directly with one button. I helped on the GUI part, while he took care of the ModelDB representation.

This is the graph of his impact on the software, at later stage.

I really enjoyed the Pull request method, and I have to say that github made the collaboration very easy and nice.It was good fun and I’m looking forward to other contributions.

The new features are not yet released (we’ll do in a bit of time), however if you can’t wait, you can grab the code from github master and give it a go!

 

 

 

Unity and accents

With the release of Unity and the (following) upgrade, I found myself with a problem that I thought to have solved long time ago: how to write accents. It turns out that the use of the compose key (Super/Meta … the one with the Windows logo) is used for the default shortcuts, which you need badly, to have a decent experience with unity..

The good thing is that I’ve discovered the layout UK – with WinKey which provides all the most classic accent like á é ó which can actually do the trick.

On another note I think Unity is pretty a good idea… But I have to use it a bit more to tell the true story..

Update: Actually I found out that on the UK -with WinKey the standard è is of the less used type (there are two: e acute (é) and e grave (è).

Now the last one is very important because is the third (singular) person of the verb to be (Today is a good day, Oggi è una bella giornata), therefore is used a lot.
I found a decent compromise using a US Layout with Italian letters:
Screenshot-Keyboard Layout "Italy US keyboard with Italian letters"

You get the accent with Alt-Gr.

HIH

Opensource philosophy to science?

Lately there has been a clear movement to move science towards a more open way to make research.

I’m not talking about Open Acess Publishing, which is still important, but to the real art and sweat to do science.

Science has always been very collaborative, however the dimension of this collaborative effort has always been restricted to a small group. This is not the case when general problems seems to be tackle.

For example, when the problem is the definition of a standard, like NeuroML or SBML, the development of it is a community driven project, where the community works as a whole to achieve a standard which is backed by the biggest number of people interested, so can be easily adopted.

The beneficial impact of standard is not the topic of this post, and for the sake of brevity I just want to point out that a well-coded model in a well-recognised standard gives the possibility to share the work of a modeller (in this instance) and make the model be re-used by other people.

On the same line OpenWetWare wanted to share the protocols used in the lab as soon they were established, and actually even before that as ‘Work in progress’.

The ability of a scientist to be a part of a community is not taken in account at all, due to the Publish or Perish system which is right now up and running. This model does not encourage collaboration, and actually create groups of people which are competing on the same topic to scoop each other. This is a broken system.

It’s so broken that some people even decide to leave academia, and that is only one of the cases. A lot of letters are also available in Nature and this article from the Economist got quite famous as well.

Therefore I watched with a lot of interest the new way proposed by Dall’Olio  which consist in collaborative editing of papers.

So far, if I didn’t miss any, at least two papers with this approach have been written, which is very interesting and shed a bright light for the future.

Still the number of places available in academia and the way the recruitment is organized uses the current model, which does not fit the market, and it’s prone to discard talented people very easily. There should be at least a live debate on how to fix this problem, and move science to a super collaborative discipline.

Happier scientists and better science sounds good to me.

We’ve got tips

Writing the Thesis is a big deal, however right tools makes the experience a little bit easier..

I’m using Gedit on steroids, which is quite easy to achieve.

Just get the LaTeX plugin, and the to get all your files up and running in no time, try to gedit manager plugin.

Then use Classic thesis.

One more tip about screenshoots. Long story short, your video resolution will be always a bit short for the rendering in printing, so if you can’t use svg (made with Inkscape) or pdf or anything that is not a vectorial format you have to rescale (up) the png picture, which is tricky.. ’cause you’re trying to make more info from less.

However if you take the picture at top resolution you can use gimp scale tool to make a decent work.

To do that open the image (png, jpeg or what you’ve got) with gimp and then increase the resolution to 300×300 dpi and then change the canvas to a decent dimensions and scale it up.

This should make you rolling. Hopefully 🙂

Reviewing Paperpile 0.5 beta

paperpile logo

Paperpile is a nice software which hit the 0.5 beta version some days ago. It’s been a while that I’m using it and being in the full swing of writing my Thesis, I tend to use it on daily basis, so I decided to review it a bit.

First of all Paperpile is a reference manager, which help to manage, organize, cite and share the collection of scientific papers that you have on your computer. If you do science you know exactly what I’m talking about. If you don’t, imagine you have at least 200 different articles lying on your hard drive, which analyse different but related subjects. When writing a new research article, it’s necessary to cite all the relevant previous work to put you new work in contest. It’s the incremental delta of new information which science uses to evolve (when there is not a quantum leap).

Retrieving, organizing and citing those piece of work is necessary and can be a daunting task, but a good reference manager can help to make your life easier. There are several softwares out there, and I had different experiences, however it seems Paperpile is overcoming anything else and I’m using it productively, making me even to read more papers!

So let’s jump into it.

Paperpile general

General view of Paperpile

This is the general window of paperpile. On the Top left you can see the label à la gmail. More than one label can be added to a paper and different background/foreground colour can be used to personalize it. To add an existing label to a paper just pick and drag it over it. Super easy.

On the Mid right you can add the RSS from journals, which can help you to be updated with the latest articles published. I used to have this RSS in my google reader, however having it directly in paperpile makes super easy to import new papers and collect the pdf.

Bottom right there is a collection of different tool, from being able to search Pubmed to import a directory full of PDF.

Central window is where the meat is. All the paper, ordered by addiction Date (you can change to what you prefer) and the most important feature: the search box. Paperpile implements a search as you type system, so as soon you start to type it it start to search in author title and also abstract.

One very interesting bit is that the search box actually find the article I’m usually looking for, and it’s pretty precise. It really saves me a lot of time. This is a clear edge over Mendeley for example, where the search was a disaster. At least in the version I’ve used so far.

The central window also give you the possibility to add notes to a paper.

On top left there are very useful actions which paperpile can perform for you. Paperpile makes easy to retrieve the article on to the publisher site, either giving you a link to visit the webpage or can automatically fetch the paper for you. Sweet!

Another very useful features, which I used so far at least 3 times, is the automatically generated email, which fire up an already ready to send email to your colleagues with the citation reference.

One last thing that I would like to put under the light is the LaTeX integration. With an easy Ctrl-K the label will be copied in your clipboard ready to be pasted in your LaTeX file. If you need the more standard citation, Ctrl-C will do.

To set up the automatically synch for your bibtex database just click on All Papers, on the top-left and turn it on, choosing the location for the file. After that every new paper you’ll add to your collection is automatically exported in BibTeX and you don’t have to care about it at all 🙂

Paperpile BiBTeX setting

Go and Check it out.

Profiling python app

If you have to profile application, in python for example, it’s good to read this blog post which I found very useful information.

The profile is used to compare pytables, a python imlementation of HDF5 and pickle, which is a classic choice which you ran into if you are dealing with saving big files on the harddrive.

The best tool so far seems to be the massif profiler, which comes with the valgrind suite. How valgrind works:

This will run the script through valgrind

valgrind --tool=massif python test_scal.py

This produces a “massif.out.?????” file which is a text file, but not in a very readable format. To get a more human-readable file, use ms_print

ms_print massif.out.????? > profile.txt

So I’ve run some test to check the scalability of HDF5.

[sourcecode language=”python”]
import tables
import numpy as np

h5file = tables.openFile(‘test4.h5′, mode=’w’, title="Test Array")
array_len = 10000000
arrays = np.arange(1)

for x in arrays:
x_a = np.zeros(array_len, dtype=float)
h5file.createArray(h5file.root, "test" + str(x), x_a)

h5file.close()
[/sourcecode]

This is the memory used for one array

 

profile_one_array

Profiling one numpy array

This is for two arrays

profile_two_arrays

Profiling two numpy arrays

Four arrays

profiling_four_arrays

Profiling four numpy arrays

And this is for fifty

profile_fifty_arrays

Profiling fifty numpy arrays

As soon you enter the loop the efficiency is preserved in a really nice way
Summing up:

  • one ~ 87 Mb
  • two ~ 163 Mb
  • four ~ 163 Mb
  • fifty ~ 163 Mb

So the problem is not on pytables, but it lies somewhere else..

Fixing a bug. The power of opensource

 

If you used gnome 2.30 and used two screen, cloning the smaller in the bigger one,  you were annoyed by this bug. At least I was really annoyed. Nothing too bad, just the image was not drawn correctly. In my case was drawn twice at different resolution, one on top of the other. However this was a regression from gnome 2.28 where this was not present. The bug was up for a long time and was also reported upstream at gnome side.

I did some research on it and I had nailed down where was the problematic code, however I was unable to propose the solution because C is no my cup of tea.

Yesterday Florent proposed a fix which was tested by Thomas, which was kind enough to give the instruction how to recompile the package, making a deb out of it and install it. Therefore I just give it a try. Finally, I have the desktop fixed!!

The patch it’s already on the gnome bugzilla and everyone will get this back as it supposed to be.

The thing that I want to underline is the anarchic collaboration:

  • somebody open the bug,
  • other people reported it and the bug was confirmed
  • somebody else found which part of code was interest
  • somebody proposed the solution
  • other people tested on different system

This is the beauty of opensource. Just give an hand if you can and enjoy it.

Best LaTeX editor: Gedit on steroids

Looking for a really powerful editor in GNOME is one of my constant research.

However it seems now it’s close to an end and it need just a small tilt to achieve perfection.
Right now I’m using Gedit with LaTeX plugin . It works amazingly and it does it jobs. The spellchecker is available and everything works properly.
I’m using Evince to actually check the complied PDF instead of the third panel, but that is a preference thing.

However the best tool out there to enjoy creative writing is definitely Scrivener. The main features of Scrivener is the ability to completely shiedl the user from the managing of the files and names, giving the possibility to focus on:

  • the status of it’s work (todo, draft, revision…)
  • the ability to shuffle and reorder the pieces of work as it best fit.
  • the main idea to use scrivener, or autonomous chunk of text which can be combined in an easy way

Writing books or big documents from scientific papers to PhD thesis it’s a main effort, which need constantly the main vision, but also the attention to details. Some parts will be ready before others, some pieces have a different evolution than others. The chunked text is the best way to go and I think it will really make the users’ life easier while battling with writing massive document.

The main problems with Scrivener are three according to me:

  • is available only for Mac and Windows, although there is a not supported version for Linux
  • the way the references are managed is not ok for scientific papers (BibTex does a perfect job)
  • not able to control easily the results of the compiled files.

This is the impression I’ve got when I used it for a really small period of testing. Although the User Interface is amazing.

Therefore we should create our own Scrivener, where the three points over stated should be addressed.

Gedit is a very good candidate to evolve, due to use of plugins, to a similar User Experience. Using the LaTeX plugin is already possible to holds and manage complicated text and notation and have a top-notch quality results.

What we are missing is the managing of the files a la Scrivener, where each file is a just a chunk of text which can be a subsection, a section up to even a chapter. Each file should be indexed and the metadata of each file should be tracked, like the revision status and the part status. A project manager, which will holds all this file and it will open them and make them always available to the user. The best would be to have a project manager which holds all the files, and a third panel where the status of the file and the type of the file is tracked properly.

Any chunk of test should be written in LaTeX and could be combined according of the order in the Outline, using the  input command.

Unfortunaly I’m not too familiar with Gedit from the programming point of view, however if there is anyone who thinks is a good idea and want to give a try I’m happy to be a beta tester and give an hand.

If interested, leave a comment, or send me an email. There is a starting (hopefully) discussion also on the Gedit ML