Sister blog of Physicists of the Caribbean. Shorter, more focused posts specialising in astronomy and data visualisation.

Wednesday 14 October 2020

Coming soon : FRELLED version 5

I had two lockdown projects. One was to develop an interactive model of Arecibo, which I more-or-less have working but just have to find the time and inclination to get into a useable format (which is tedious and boring). The second was to recode FRELLED, my Python script that imports 3D FITS files into Blender. This was originally written for Blender 2.49, released back in 2009 (!), but Blender 2.5 has a completely different Python syntax - more like using another language than making minor modifications. So it took a global pandemic to force me to re-write the bloody thing in a modern version of Blender.

After several months, I'm pleased to announce that this is done. Well, sort of.

The new version uses Blender 2.79. This isn't the very latest version, but for a very good reason. Blender 2.8+ doesn't support the OpenGL realtime shaders that FRELLED relies on, and unfortunately neither Cycles nor Eevee are suitable replacements. Apparently it will get a modern OpenGL equivalent at some point though, and the Python syntax is almost identical to that used in 2.79. This means the next update won't be anything like burdensome as recoding the entire thing again.

FRELLED version 5 looks like this :


This is the main display section with an example cube loaded. Blender's GUI now enables adjustable panels, so the user won't be overwhelmed with information. Presets are now such that loading a cube should be a matter of about five mouse clicks. This, I hope, will be easy enough to persuade people that it's worth installing and using.

Incidentally, installation should now be MUCH simpler. Blender 2.79 comes with its own internal Python and PIP kept completely separate from system Python (you can download it in a zip file, no other installation needed). So installing the modules FRELLED needs is now trivial... at least it was for me on Windows. It should even work on Linux networks.

Loading cubes is now much faster, hence there's generally not so much need to worry about which projections are being imported, so this is all hidden by default. But all that is still there for enthusiasts and those using very large or weird data sets. In particular, the "sparse sampling" option now lets you import only every nth slice of the data, adaptive to the size of the cube in different directions, so in principle even arbitrarily large data sets should be no problem. Contrary to expectations, loading in less of the data often makes the appearance better rather than worse.

Not every feature in the GUI is currently functional - the major one being multi-component rendering, but also the quick import and preview buttons. Both of these are actually fairly simple -  they just requires me to work out the most efficient way to do it (for multi-compment/volume rendering, the GUI buttons will greatly simplify what used to be a rather ugly, hacky process that worked but was unpleasant to use). 2D mode, though, is fully functional.

The Analysis menu does look a bit scary, but you can hide any panels you're not using and most of them should be simple enough. A big advance is that you can change the spectral axis units and it's no longer hardcoded to assume the data is HI, so the velocity of any molecular line just needs the rest frequency (a drop-down menu provides a few preset values and also access to Spatalogue). It's also possible to hide the axes with a single button, which used to be a much sillier process.

Region analysis tools remain much the same as in the original FRELLED but with improvements. Contours are now much faster and true isosurfaces are supported (and are fast enough that you could even show these for an entire cube, as an alternative to volume renders). You can also show velocity maps as well as much nicer-looking flux maps that use the requested colour scheme rather than only greyscale. There's a simple toggle for using a geometrical progression for contours (or logarithmic display for maps), with built-in safeguards to stop the user trying to display unfeasibly large and complex contours. And SDSS maps are now opaque, making them very much easier to see.

Isosurfaces are functional, though currently with only limited display capabilities. The mbspect section also has limited (but significantly improved) capabilities : it can only produce the input files and not run interactively, but it does allow all the options to be set directly in the GUI. The interactive version will be restored once I have access to a Linux system to test it on. Finally, users can also set some options for NED queries instead of just having it return absolutely everything.

I've tried as much as possible to test everything and test again. But as you can imagine, it's just not possible to test everything to destruction. So before making an official release, it's time for some beta testing. Volunteers are welcome ! Preferably those who aren't scared of working with FITS files. I can provide instructions and example cubes to try, but I'm especially keen to see what happens with data sets I've never tried, and with using it in anger : doing things in odd sequences and using features in unexpected ways. So if anyone out there wants to help, do get in touch. Leave a comment on social media or this blog, or contact me directly at feedback @ rhysy . net, and I'll add you to a beta-testing email list for next week.

No comments:

Post a Comment

Back from the grave ?

I'd thought that the controversy over NGC 1052-DF2 and DF4 was at least partly settled by now, but this paper would have you believe ot...