SEARCH
ARCHIVE · NEW PARADIGM SERIES

Astronomical software is a black hole

BY GERARDO BLANCO · · 7 MIN
KOSMOSLOGOS ARCHIVEAutomatic translation of the original Spanish post by Gerardo Blanco (KosmosLogos, CC BY-SA 3.0). Read the original in Spanish. /2011/02/el-software-astronomico-es-un-agujero.html

Scientists in general, not just astronomers, must develop increasingly complex programs for which they would not be properly prepared, according to various papers on the subject.

SoftAstro

The issue is not new. The climate scandal, sometimes called climategate, gave rise to this discussion. Some of the emails from the case reported the difficulties some scientists had with software.

The problems seem to be several and not necessarily that scientific programs are useless, but that they are poorly documented (or not at all), that they are not easy to operate by non-experts, or simply that after publication they are forgotten or deleted.

On the other hand, it is pointed out that, in the particular case of astronomers, what they know about programming they learn on their own, as needs arise, and they are aware that their programming skills are poor.

Last year Nature published an article on the subject by freelance writer Zeeya Merali. There she points out that "as a rule, researchers do not test or document their programs rigorously and rarely release their codes, making it almost impossible to reproduce and verify published results generated by scientific software".

Of course, a not minor issue is the waste of time and the headache it causes astronomers to have to deal with increasingly complex matters.

That article quotes Greg Wilson, leader of Software Carpentry, a website with educational materials on software design and construction aimed at scientists. Wilson points out that he became aware of the problem in the 1980s, but in 2008 he wanted to know how widespread the issue was and together with some colleagues conducted an online survey of nearly 2,000 researchers, from students to seniors, who worked with computers in some area of science.

Some of the results were that 45% said they "lost" more time developing today than five years ago. 38% indicated that they spent at least a fifth of their time on software development.

But only 34% thought that formal training in programming was important.

Excerpt from a Software Carpentry presentation video
Excerpt from a Software Carpentry presentation video

Another paper on the subject was presented for the ADASS-XX meeting, written by Igor Chilingarian and Ivan Zolotukhin of the Sternberg Astronomical Institute in Moscow (arXiv:1012.4119v1 [astro-ph.IM]).

Nowadays, they begin by saying, astronomical instruments and large surveys produce data flows that grow exponentially over time. The CPU power required to analyze this data is also growing in line with Moore's Law, and the same is true for storage. However, in astronomy we do not see the exponential avalanche of results produced by this computing power. This suggests the presence of a bottleneck in the cycle: if we consider a system with three modules A, B, C such that A is connected to C via B, then optimizing features in module A or C will not produce a change in the system's performance until the problems in B are solved.

Where is the real bottleneck in scientific computing? Astronomers, like many other scientists, prefer to develop their own codes and systems (including database solutions) themselves, usually without having the required skills in algorithms and computer science.

Here too, some of the shortcomings of scientific software are pointed out, regarding documentation, the repeated use of GOTO every 10-20 lines, variable names that follow no convention, illegible code, without indentation, etc., but they highlight that, in the end, the program fulfills its function.

This paper also points out something that is known and controversial in the development world: they differentiate "true" languages from those that are not. C, C++, Java vs Fortran or IDL.

It is also indicated that IT engineers, however, often do not understand the physical principles behind an algorithm or a particular feature of the instrumentation, which leads to errors or bugs such as arithmetic ones, errors of several orders of magnitude because for a software engineer "it's just a number".

GOTO
GOTO. Credit: XKCD

The worst example, according to the Russians, in software solutions are databases developed by researchers.

Beyond the generalized statements, they give some bad and good examples, without citing the corresponding references for the former:

A bad example: A scientifically very interesting and recognized project in the community, but...
-It has no web access interface
-The data is distributed as a set of dozens of FITS tables with a total volume greater than 10 Gb and IDL access routines to perform queries on the tables.

-It is necessary to download almost everything to study a set of objects and that requires a lot of memory, etc.

Another bad example:
A Database administration and ingestion interface has a function with more than 250 arguments.
To delete a record from a table in a restoration script, instead of:
DELETE FROM table1 WHERE field1=value1, the authors do:
pg dump -t table1 mydb | grep -v value1 | pg restore -c mydb

They also point out good examples such as the Hubble Legacy Archive, GalexView, SDSS CasJobs, the Millennium simulation, GalMer.

GalexView

Speaking of GalMer: it is a database with access to numerical simulations of galaxy interactions. Wasn't there a project like that in Argentina a couple of years ago?

Other good examples mentioned are GADGET-2 by Volker Springel, a cosmological simulation code, CDS Aladin and SAOImage DS9.

The conclusion of the paper is that the good examples seem to have been developed by professional astronomers with strong background knowledge in IT or by professionals in that field who worked closely with astronomers for years.

A possible solution, according to the Russian authors, is to change the paradigm of education for astronomy students.

When I was studying to be a systems analyst, we complained about being taught C and C++. We learned little anyway, but even so, we wanted to be taught "more used" programs like Java or C#.

I say this because it would be important to consult the students themselves, the more advanced ones at least, the scholarship holders, but their point of view will be subjective, tied to ideas that will not always be the best. The researchers themselves, those who produce several papers and work more strongly with algorithms, should be listened to, along with the advice of professors and IT professionals.

However, I don't have a clear idea of what the landscape is like in Argentina and even less so in Ibero-America.

It also occurs to me that it's possible, I don't know if there are any statistics on this, that the students who pass the entrance exam for astronomy don't come from just anywhere. It's likely, perhaps it's a prejudice on my part, that the participation in astronomy in La Plata of students from Colegio Nacional or Carlos Pellegrini is not insignificant, where they also study and do software.

And habits, good and bad, stay for life. It's hard to learn a new language if you already handle one quite well (in that sense, asking those who use Fortran or IDL to stop using them and switch to C++ is almost utopian), but it's much harder to get rid of bad habits like some of those mentioned before.

Speaking of Argentine astronomy statistics, the list of members of the AAA seems to be hosted on a database from La Plata... which cannot be accessed. Even so, it's possible to make some estimate of the number of professional astronomers in the country, considering that those listed in the IAU are about 130. You'd have to add a bit more for new PhDs, those not affiliated with the IAU, and if we add fellows who, although still learning, are already doing astronomy, will it be 200?

Perhaps, if the landscape in the country is similar to the rest of the world, it wouldn't be so difficult to seek solutions through workshops, seminars, etc.

That said, the solution should be
{una secuencia de pasos finitos, definidos y ordenados};

Learn to cook
Learn to cook. Credit: XKCD

Sources and related links

About the images

KOSMOSLOGOS ARCHIVEOriginally published on KosmosLogos by Gerardo Blanco · License CC BY-SA 3.0 · Adapted format, original text unchanged
GERARDO BLANCOAuthor of the KosmosLogos blog, written from Argentina about astronomy, astrophysics, cosmology, and related sciences.