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

Wednesday, 25 March 2020

Slowly does it

And now back to our regular service on galaxy dynamics and whether or not MOND is a thing.

Galaxies typically have rotation curves which are approximately flat in their outer regions. They usually rise steeply in the innermost regions, often going a bit crazy at first, but then settle down to something that's basically flat and boring. Dwarf galaxies are an exception, often showing curves which are still (slowly) rising, possibly because the stars and gas don't probe the full dark matter halo. But even a few larger galaxies also show curves which are weakly rising or declining.

Recently we looked at massive galaxies which are rotating more quickly than expected, and whether these challenge alternative theories of gravity. It seems to me that they probably do, but critics are right to point out that it matters a great deal as to which value you use to define the rotation of a galaxy, i.e. the peak or the flat part of the curve.

This latest paper looks at galaxies with declining rotation curves. They choose their sample so as to avoid the usual causes of this, like interactions or having a strong bar or bulge in the centre (such that the mass of the innermost baryons becomes significant compared to the extended dark matter). They also select them to have well-resolved rotation curves, so it's not a data artifact or anything daft like that. And unlike the previous paper, they show all of their curves, rather than coyly hiding them away like in the last one.

What I cannot for the life of me understand are their quoted ratios of peak to outermost velocity. Looking at their rotation curves, I'd guestimate the ratios to be no more than a factor of two at the very most, but they give values of 10-40 ! I'm tempted to email them because I can't make sense of that, but the text has been translated from the original Russian so that might make things difficult.

When it comes to the inevitable Tully-Fisher relation (a comparison of rotation speed and luminous mass), they show that their galaxies agree with the standard relation if they use the peak velocity, but are significantly slower than the standard relation predicts if they use the flat velocity. This is exactly the opposite of what Milgrom said when criticising the fast rotators : these authors have done exactly as he suggested, and find the opposite sort of problem ! So the claim of MOND enthusiasts that the Tully-Fisher relation actually has some miniscule scatter if you get the measurements right looks extremely suspicious to me : galaxies actually seem to deviate in all directions, even very massive ones. And furthermore, since the peak velocities here do agree with the standard relation, that makes it rather unlikely that there's been some systematic error in the velocity estimate.

The nice thing about rotation curves, though, is that you're not limited by global relations like Tully-Fisher. You can directly compare a galaxy's observed and predicted rotation throughout its whole disc. For this sample, they find most galaxies agree with MOND's predictions, but not all*. A few require the galaxies to have significantly different stellar mass from the measured value, and/or a different acceleration constant - in the worst case by a factor of six. And it would be a pretty stupid theory indeed if you had to change a fundamental constant for each galaxy.

* And they're interesting curves in their own right : some look flat to me, while others are very clearly and consistently declining, and still others show sudden decreases and then remain flat further out.

There is some scope for a MOND rebuttal here. The galaxies are not all truly isolated (one is even in a cluster). The authors say they have no nearby massive companions capable of creating a significant external field effect, but it could be that they've interacted in the recent past and are still out of equilibrium (I don't know if anyone's modelled how this would affect rotation curves, but I'd be a bit surprised if this caused them to rotate more slowly though). There's enough scope of the complexity in the modelling of disc mass and the structure of the curves and so on that the findings could be challenged. Their most deviant galaxy is interesting in its own right : visually it looks disturbed, but also lonely. MOND or not, something interesting is definitely going on here.

Galaxies with Declining Rotation Curves

A sample of 22 spiral galaxies compiled from published data is studied. The galaxy rotation curves pass through a maximum distance of more than $\sim 1$ kpc from the center with a subsequent decrease in the rotation velocity.

Tuesday, 24 March 2020

Don't let your space Nazis die of thirst

It's not all technical critiques of MOND over here. Just occasionally, it's important to step back and think of the bigger picture, like how much water you'd need to supply for an interstellar mission populated by Nazi space milfs.

Haven't got a sodding clue what I'm on about ? Then you must be unaware of my small involvement in a project to simulate the voyage of an interstellar, multi-generational spaceship. This began as an estimate of how many people you'd need to avoid extinction due to inbreeding and whether any breeding controls would be necessary (hence the Nazis), and expanded to consider how much food the population would need. But you can read all about that here.

Having established how many crew you need (about 100 to start, sustainable for millenia at a few times this) and how much food they require, this latest paper looks at air and water. Air consumption depends mainly on mass, whereas water is also strongly temperature dependent, so the code now allows you to set the spaceship temperature.

For this paper, the authors decided to move away from the minimum possible number and use a 1,000-strong crew, about the same as the starship Enterprise (D).  Why this number, I'm not sure, but we're now well into the range of guaranteed survivability. The crew begins as a gender-balanced bunch of thirty-somethings (with a few older and younger) and sets them to have different activity levels (which affect food and water consumption) for different age groups. Temperature varies randomly between 18 and 21 C.

The result of this is that the crew need about 300 tonnes of oxygen and 1,000 tonnes of water per year - just for the humans, never mind the plants and animals. Add in nitrogen to the air and the total air mass is not that far off the water.

It's at this point I have to say I respectfully disagree with the authors on the rest of their approach. Once you establish a minimal level needed per some time period, the next step should be to estimate how this is affected by your recycling capabilities. It's already pretty obvious that our spaceship must be in the range of many millions of tonnes to sustain the crew, but obviously, you want to minimise the mass of water and oxygen as much as possible (especially since we may expect the mass to be totally dominated by the requirements of agriculture). So you could then consider the different cycles in play : how much is lost over different timeframes, e.g. some oxygen is combined with carbon in each breath, plants absorb nitrogen, water is lost rapidly through sweating and breathing but much less frequently through urination. Different recycling procedures will be necessary in all of these, so there will be different recovery timescales and efficiencies at work. Accounting for these would get you a handle on the important number : how much of each you need aboard the ship at any given moment.

Somehow I just wasn't able to persuade the authors of this. So instead they look at other techniques of water and oxygen production via chemical reactions. But these are, I have to say, both unnecessary and counterproductive. Water and oxygen can be stored indefinitely with literally zero risk of contamination, because you're in deep space... and, as we all know :


It is very cold in space.

Star Trek II: The Wrath of Khan (1982) - Yarn is the best way to find video clips by quote. Find the exact moment in a TV show, movie, or music video you want to share. Easily move forward or backward to get to the perfect spot.

So the only effect of producing water and oxygen chemically is to bring along a significant amount of extra mass. You're better off by far simply storing the entire supply needed for the journey and assuming no recycling at all, which, we've established, is already a bad idea. Now I do like the approach suggested of integrating the different processes, which sometimes share different resources and produce outputs the other requires, but this is not much developed, and again, it would be better by far to just recycle. Nor do I understand why they object to bringing in water and other supplies from Solar System bodies prior to the mission - the need to do this is absolutely unavoidable, and the mass of bringing in anything other than pure water must be larger than the optimum case of bringing in pure H2O. It doesn't make any sense.

So how much water will the Nazis need ? Dunno. I can tell you they'll need to use a thousand tonnes per year, but how much they'll actually have to bring along could be completely different. No idea at all. Perhaps future papers will look at that.

Water and air consumption aboard interstellar arks

The architecture of a large interstellar spaceship, which is capable of serving as a living environment for a population over many generations, is mainly dictated by the needs of said population in terms of food, water and breathable gases.

Monday, 23 March 2020

A field guide to mapping the Milky Way

How do you go about mapping the galaxy you happen to live inside of ? There's a hell of a lot of information on GalaxyMap.org, but it's not quite what I'm after. So in this post I'll do a step-by-step guide as to how to construct a map using 21 cm neutral atomic hydrogen data. If you actually want to try this for yourself, I'm going to be assuming some familiarity with Python (especially numpy and astropy/pyfits). Otherwise this post should describe the theoretical aspect well enough to be of interest by itself.


Working in Galactic coordinates

HI data has two main advantages : first, it's not at all subject to extinction by intervening stars and dust, and second, it gives us an easy way to measure velocities. Using trigonometry and a few reasonable assumptions, we can convert velocity into distance, with some limitations.

But before that we need to define a coordinate system. The convention for all-sky HI data is to use Galactic coordinates. In this system, the centre of the Galaxy is defined to be at longitude and latitude of 0. Galactic latitude l and longitude b are defined as follows :

Optical image of the Milky Way overlaid with all-sky data from LAB, with the Magellanic Stream highlighted in orange.
There are two main all-sky Galactic HI surveys : the Leiden-Argentine-Bonn survey and the HI4PI survey*. Both have been gridded in a nice friendly way, such that the pixel size is fixed in latitude, longitude, and velocity. Thus once you know the pixel size in each dimension and the world coordinates of any given pixel, you can very easily calculate the exact coordinates of every other pixel.

* It's 4π steradians, but I always read it to mean "HI For Principal Investigator".

For reference, both surveys have the origin at the bottom left  (l = +180, b = -90). For the LAB survey, the maximum x-pixel (l) range is 720 and the y-pixel (b) range is 360. The pixel size is 0.5 degrees for both axes. For HI4PI, the x and y ranges are 4320 and 2160 respectively, while the pixel size is 5 arcminutes.

And velocity ? For LAB data this spans the velocity range -458.6 km/s (z = 0) to +458.6 km/s (z = 890), with a channel size of 1.03 km/s. For HI4PI the velocity range is -600.0 km/s  (z = 0) to +600 km/s  (z = 945*), with a channel size of 1.288 km/s.

* This value may be slightly off. At the time of writing, I can't access the files I need to check.

Note that these values refer explicitly to the gridded pixel values. These are slightly different from the true resolution values, which are more often quoted in the papers. For the researcher, the real resolution is what matters, but for the data visualiser, it's all about the pixels.


Converting to distance

Once we've found the world coordinates of a pixel, and its flux value, we can then convert this to true 3D position, as follows. First we'll need some assumptions. The Sun is reckoned to be rotating around the centre of the Galaxy with speed V= 220.0 km/s, at a distance R= 8.5 km/s. The rotation curve of the Milky Way we can approximate to be totally flat, so that the velocity at any point Vpnt is also always 220.0 km/s. Given the velocity (vel) of any point, we can then calculate is distance R from the Galactic centre :
Note that this further assumes that this is independent of galactic latitude.This is reasonable because the disc is quite thin, but causes problems for structures which are outside the disc completely.

Next we can calculate the distance of the point from the observer :

Where d1,2 refers to the fact that the equation has two solutions. However, it turns out that this is only really true within side the solar circle, so we don't need to do the calculations twice. Rather we should accept that this region of distance ambiguity is inaccessible to us, so we should only do this calculation if R > R (we'll see what happens if we disregard this sage advice later on).

If that's so, we can proceed to calculate Cartesian coordinates of our pixel in PPP (position-position-position) space :
These will be in kpc since those are the units we've been working with. We can now iterate over every pixel in our data set and create a full PPP map from our original PPV (position-position-velocity) cube. This is relatively easy to do, and you can find the Python code to do so for LAB data here (note that some simple extra transform is applied to these final equations, just to ensure the data appears in a sensible position in our PPP cube). We just have to specify the size of the cube we want to make and hardly have to worry about anything else at all. Sounds great ! We'll be using the full information from the original data, so we should get a nice, clean, super detailed map at the end, without even having to specify the pixel resolution or anything even slightly complicated, right ?

Wrong. The problem is that PPV maps to PPP in a very strange way, which is not at all intuitive from the equations (unless you're some sort of trigonometric super freak, I guess). There's no guarantee that every pixel in our PPP cube even corresponds to one in our PPV cube. And not all our PPV pixels will contribute anything, since many of them will lie well outside the Galactic disc where our equations are invalid.

Here's what we get from the LAB data if we do this :

Slice through a PPP cube created from LAB data.
In some regions things are relatively good and we can see some nice astrophysical structures, but other parts are hugely undersampled while others have downright weird artifacts. We can do quite a bit better with HI4PI, which has higher resolution and so more fully samples PPP space, but it's still far from perfect.


Why mapping from PPV to PPP is a bad idea

Let's start with the artifacts. Our observations give us velocity along our line of sight, that is, how fast the gas is moving towards or away from us. In reality, the gas is also moving across the sky, but we can't measure that. We can get these "proper motions" for stars with considerable effort, but we just can't get it for gas.

The first problem is not so much that we'd like to know the proper motion (although that'd be nice), but that the equations assume our line of sight velocity measurements are accurate. But because we're inside the disc of the Galaxy, this is not always true. When we look towards the Galactic centre, or in the opposite direction, the only motion of the gas is across the sky - except for a little bit of random motion (~10 km/s). This means that in those regions of low measured velocity, our data is just too inaccurate for our equations to properly convert line of sight to true velocity. Better instrumentation won't help, it's a fundamental limitation of the structure of the Galaxy and our method.

Velocity vectors relative to the centre in green. Blue and red show the components
towards and away from us, respectively.
The second problem is that the equations have that annoying distance ambiguity within the solar radius, where the equation gives two solutions. Although we might be able to break this degeneracy using other data (e.g. by associating the gas with stars of known distances), by itself there's nothing much we can do to save the HI data. So this region, like the low velocity regions, has to be thrown away.

It might help to visualise how velocity maps to distance. One way of doing this is to plot isovelocity lines : lines of constant velocity.


Being inside the disc has weird consequences for what we can detect and where. Since everything's so darn close, sensitivity is extraordinarily high : we can detect essentially all Galactic gas. Looking through our original data cube, we see tonnes of stuff at very low velocities across the entire sky, because gas at high latitudes is only found when it's close to us and, therefore, moving slowly relative to us, due to the thin nature of the disc. But at the same velocities we can also be detecting material on the far side of the Galaxy !

The bottom line for visualisation is that if we start with the PPV map, we don't necessarily fully sample the PPP cube. This explains the other even more serious problem of the image - all those ugly black lines. How can we fix this ? One answer would be to interpolate extra velocity channels and/or spatial pixels in the PPV cube, so that we'd have more points that map to the PPP data. This does help, but it's inefficient and far from perfect. Even using the enormous HI4PI data set, which has vastly better spatial resolution (though similar velocity resolution) gives only a modest improvement in the sampling.


Alternatively, go directly from PPP to PPV

A much better approach is to work backwards. Beginning with a blank PPP cube, we can calculate the corresponding pixel in the PPV cube and use that to fill in the flux values. This essentially knocks all the problems on the head. By iterating every pixel in the PPP cube, we guarantee that we'll sample the whole thing. Although our calculated pixel positions in the PPV cube won't be integer values, all we have to do is simple rounding and we effectively interpolate the missing data (there are more sophisticated ways to do this, but they can wait for another time).

How exactly do we go about this ? We define the coordinate system of the PPP cube arbitrarily. Then, knowing our Galactic coordinate system, we can use some basic trig to calculate the longitude and latitude of any given pixel. We need to get R first, but this is easy because we know the position relative to the galactic centre gc :

I work in degrees, hence the +90 for convention. The pixel positions xyz must be in physical units (kpc). The tan2 function is a wonderful programmatic convention that simplifies things enormously. Using the usual arctan returns values ±90 degrees, since there's a degeneracy in the tan function. Atan2 gets around this by providing two values, returning values ±180 degrees, which is exactly in accordance with Galactic data gridding conventions (we could convery this easily enough to the range 0-360 if we wanted to, but there's absolutely no need).

All we need now is the line of sight velocity. We can get that by rearranging the earlier equation to calculate R :
Since the original PPV data is gridded in a nice friendly way, the hard part's over. Now that we know the longitude, latitude, and velocity of a pixel in the PPP cube, it's trivial to convert this to the pixel in the PPV cube - remember, the original data has pixel size of constant latitude/longitude/velocity.

Voila. We can now extract the corresponding flux value and create a fully sampled PPP cube.


What to do if your data set is feckin' enormous

But wait ! There's one extra complication. If we want to use the LAB data, we can go right ahead and use the final code. Of course, it's always going to be better to use the HI4PI data, but this is difficult to work with because of its gargantuan 35 GB size. The astropy "pyfits" module is not at all good at dealing with large data sets, so we'll need to convert it into a format it can handle. We can do this using the much older miriad software, which was written from an era when a 100 MB file was considered hefty. Consequently it's massively superior in terms of memory management and can process 35 GB files without breaking a sweat, even on a system with 16 GB RAM.

This bit is trivial. First, we convert the FITS file to miriad's own format using the FITS task. Next, we use the same task to extract individual channels, by setting the region parameter to give single-channel slices (unfortunately, this only works when converting from miriad->FITS, not the other way around, which is why we had to convert the file). Annoyingly, miriad insists on producing FITS files of not one but two channels. We can either accept this and have the script only work with the first velocity channel of each cube (it's super simple to slice the data for this), or first process the files and save ourselves from an extra 35 GB of data we don't actually need. Both steps are easy anyway.

Right. We're pretty much there. We've converted our 35 GB single data file into 944 smaller, more manageable files. All we need to do now is modify our PPP code to work with multiple files - and here it is. As a result of all this, we get the following :


Ta-da ! Lovely. Doesn't quite eliminate all of the artifacts, but we can get rid of those in the visualisation stage.

(For the enthusiast : we could in principle go through every pixel in the PPP cube and open the necessary FITS file every time, but this is hugely inefficient - it means opening the files hundreds of millions of times. I estimated it would take the code 4 months to complete, which made me sad. So instead the code precalculates which pixels it needs to extract for each file. It then orders the list, opens each file, extracts all the pixels it needs from that file, and moves on to the next one. This means it only needs a maximum number of 945 file-opening operations and runs in an hour or so. An extra complication is that a list of hundreds of millions of entries starts to cause memory issues, so the code can work in chunks. The user then has to specify the pixel range of the PPP cube they want to search.)


Making things look pretty

For visuals, we have two options. We can either make a volume render using FRELLED, or we can try and pick out the major features using isosurfaces. Volume renders look prettier and use all of the data, but isosurfaces can make it easier to reveal the important structures and are small enough to display as interactive on-line sections of a web page.

Volume rendering via FRELLED need not be explained in any detail here. Let's skip straight to the render :

Sun position in yellow and the galactic centre in green.

What about isosurfaces ? These are something I've struggled with for a while. Eventually I stumbled on a couple of different Python modules that specialise in this. The one I'm using is scikit-image, which can produce meshes in a format that Blender can recognise. It's also fast and deals with large, complicated meshes pretty darn well. It's not 100% foolproof -  sometimes meshes have their normal vectors pointing the wrong way, but generally this is easy to fix manually.

(I tried other solutions - extensively - like using metaballs and point cloud skinning scripts, and I'd strongly advise everyone else not to try this. They just don't work very well, at best giving ugly results and at worst being useless and inaccurate. Use a dedicated module and save your sanity !)

The code to generate isosurfaces is a bit of a hack at this stage - incorporating it into the next generation of FRELLED is definitely happening, but that's still a ways off. But for now, it works. You'll need this .blend file (containing an internal script and some pre-set materials) and this external Python script, plus this readme file. Eventually I'll make something less hacky, but not today.

Last but not least - exporting to the web. I wanted to use Sketchfab, which I've been very impressed with, but then I discovered it has a stupid 50 MB file size limit. So I spent a weekend investigating Blend4Web, which is free and totally awesome. It's one of those nice things that just works. So here's an interactive 3D model of the HI content of the Milky Way. It'll work on mobiles (it even has a VR mode option !) but it's better on PC - the labels tend to get cut off on a phone. Click on the buttons in the top left panel to toggle different components, and on the annotations for a bit more information.

It's a 28 MB file, may take a few minutes to load, and Blogger won't let me
embed it correctly, so click here for the interactive version.
It's far from perfect yet  - the bloom effect is a bit strong and the anti-aliasing is lousy. But this is my first attempt, so I'm pretty pleased with it. Expect updates on this and lots more interactive content.

So that's it : you now know absolutely everything about how to map the hydrogen content of the Milky Way disc. In a future post I'll look at how to do something similar for the surrounding clouds, which are a lot more fun in 3D because they're found across the entire sky.

Thursday, 27 February 2020

A lack of midgets

Ah, another paper on everyone's favourite problem with local cosmology : the chronic lack of dwarf galaxies. By rights, the Local Group should be more crowded with dwarfs than a Smurf convention or the mines of Moria in their heyday. There ought, say simulations, to be hundreds and hundreds of the little hairy sparkly buggers running around orbiting the Milky Way, but there aren't.

An ever-present question as to the significance of this is whether the Milky Way has been visited by the galactic equivalent of Gargamel or if all galaxies have this same problem. Are they all missing their expected dwarfs, or did something peculiar happen to the Milky Way ? Without knowing what things are like for galaxies in general, any purported explanation is largely speculative.

This paper extends this to the nearby spiral M101. At 6 Mpc, it's well within the Local Volume but well outside the Local Group. So if the dwarf-killer is peculiar to our most local environment, M101 shouldn't be affected. From a previous survey they identified potential candidate satellite galaxies of M101, and here they try and establish the distance to the four faintest objects using Hubble.

All four objects appear to be distant background galaxies. Known satellite galaxies at this distance are resolved into individual stars by Hubble observations, but these ones remain stubbornly diffuse. They even simulate what the colour-magnitude diagram for these objects should look like if they were as close as M101, and it's clearly different.

While they don't rule out that future surveys might change their results, since completeness at these very faint magnitudes is always a problem, for now it looks like M101 has an even worse problem than the Milky Way. If the Milky Way doesn't have enough dwarfs, then M101 is positively racist. They also show a comparison with other nearby galaxies where it's possible to measure dwarf abundances with some accuracy (the Milky Way, Andromeda, M94, M81, and Centaurus A). All paint much the same picture.

Wisely, they don't speculate or comment on the astrophysical significance of this. So I'll do their dirty work and point out that this does not constitute any kind of crisis or catastrophe for the standard model. First, we knew this was a problem for the Milky Way anyway, and second, virtually all so-called "problems" for the dark matter paradigm are nothing of the sort : they're problems for the baryonic physics. If Gargamel can't be everywhere at once, it's perfectly plausible that every galaxy has its own Gargamel - a universal property of galaxy formation that prevents star formation in the smallest dark matter halos. Yes, it could also be that the whole dang model is wrong, but much more likely we just don't understand the complicated lives of those pesky little dwarfs. We'll just have to wait and see.

The Satellite Luminosity Function of M101 into the Ultra-Faint Dwarf Galaxy Regime

We have obtained deep Hubble Space Telescope (HST) imaging of four faint and ultra-faint dwarf galaxy candidates in the vicinity of M101 - Dw21, Dw22, Dw23 and Dw35, originally discovered by Bennet et al. (2017).

Wednesday, 26 February 2020

Looks broken if you ask me

Late last year there was a paper which claimed that the fastest rotating "super spiral" galaxies deviate from the standard Tully-Fisher relation. They're not only enormously massive, but also rotating even more quickly than expected. Since MOND predicts a tight relation between baryonic mass and rotation speed, this is potentially a big problem.

It's taken a while, but Mordehai Milgrom, MOND's creator, has responded on arXiv, and he's very cross about it. He says the problem is all due to the way they measured the rotation speed. Rotation varies as a function of galacto-centric distance, so there are a number of different values one could use : the peak, the flat part, or the extrapolated value to infinity. These last two are normally the same, and this is what MOND predicts. But the previous authors used the peak value, which can be substantially different. He also notes that this sort of deviation has been seen many times before, and is well-understood to be due to using the wrong sort of rotation velocity. It's the flat rotation section, he says, which minimises the scatter in the TFR, not some other parameter.

He may well be right. But at first blush, it's difficult to believe the difference could be that strong in this case. The example rotation curve the previous authors show extends to a not inconsiderable 40 kpc, and it's still rising. It's difficult to believe that the flat part could be substantially lower than the rising part, and goodness only knows how far out we'd have to go to find it if it's still rising at 40 kpc.

Milgrom also raises a fair point in that the sample of the Ogle results is small, so what looks like a deviating relationship to them looks like a handful of a few outliers to him. That is, some of their sample lie near the standard TFR but a few are offset, so it might just be creating the illusion of a true change of slope. On the other hand, almost all of their sample are found to be rotating more quickly than the standard slope, so I think it can still be convincingly argued that there really is a change of slope here. At the very least, both interpretations are consistent with the data. And the rotation curve Ogle shows is a nice one, so outlier or not, it's far from obviously wrong. Just because a galaxy is unusual doesn't mean its data can or should be discarded; that it's an outlier from the general trend does not necessarily grant it immunity from causing problems for MOND.

So just how different can the peak and flat velocities really be ? Milgrom is right to point out that it would have been far better for Ogle et al. to show all their rotation curves and not just one galaxy from their sample. For comparison, he references this paper*, which clearly shows a very different set of curves : generally, they rise steeply in the very centre, go a bit crazy for a short radius (a few kpc), and then quickly stabilise at levels a bit below their peak. The one Ogle et al. show is one is nothing like those. True, they're measuring the curve in the innermost regions (given the scale length of the disc**), but it hardly seems likely that a smoothly-rising curve over 40 kpc (!) is likely to plateau at a much lower value, given that it never even peaks at all in the measured radius.

* He also references this one, which plots the overall relationship between the different velocity measures. But I found the relevant figure hard to interpret, as it appears to show an almost perfectly linear relationship between maximum and flat velocities, with only miniscule deviations from a 1-1 correlation. Perhaps I'm reading it wrong.
** EDIT : Milgrom says that Ogle et al. measure the rotation at less than one scale length of the disc. This appears to be simply wrong : Ogle measure the rotation out to a radius of 40 kpc, whereas they say the scale length is 22 kpc. I also wonder how accurate this scale length is, as it seems exceptionally large while the galaxy doesn't look all that unusual.

Milgrom further points out an earlier paper of massive galaxies, in which the fastest rotator in that sample has a maximum speed twice as high as its flat value. But that peak, and also in the case of the few others which vaguely resemble it, is found in the innermost few kpc or so, and the curve is already almost flat by 20 kpc, never mind 40. And that particular galaxy is almost face-on, which makes rotation hard to measure (though I'm not going to dig so deeply as to check how accurate the values are). The next two fastest rotators in the sample have ratios that only differ by 20%.

So when Milgrom says that he expects the even faster rotators in Ogle to show even higher ratios, I think he's making a completely unjustified extrapolation. I don't see any evidence at all that faster rotators have different max/flat speed ratios; the various curves presented don't really resemble each other very much. Most galaxies show the curve going a bit wild in the innermost few kpc, not a few tens of kpc. His argument would be a lot more convincing if he gave an example of a galaxy with a peak velocity at several tens of kpc which then substantially declined, but as far as I know, no such galaxies are known to exist. So Ogle's data looks just fine to me, and it's Milgrom's comparison sample that doesn't stand up.

Fast-rotating galaxies do not depart from the MOND mass-asymptotic-speed relation

Ogle et al. have fallaciously argued recently that fast-rotating disc galaxies break with the predictions of MOND: the 6 fastest rotators of the 23 galaxies in their sample appear to have higher rotational speeds than is consistent with the MOND relation between the baryonic mass of a galaxy, $M$, and its `rotational speed', $V$.

Wednesday, 19 February 2020

No rest for the wicked

A few months ago there was a very interesting paper showing a striking trend : the HI content of galaxies does not vary as a function of star formation rate. Even at very low levels of activity, galaxies apparently remain gas-rich. So apparently there's a substantial population of really gassy galaxies that just don't do anything. What's stopping the gas from forming stars ?

"Nothing", say the authors of this latest paper, "it's because the gormless twits used a really daft way to estimate star formation activity, and they should be ashamed of themselves."

... okay, they don't actually say that. But they have two very nice figures where they compare the trend using two different ways to estimate star formation rate : using optical SDSS data as the previous paper did, and using a combination of UV and mid IR. It's clear that the optical data gives crappy results, with there being almost no correlation at all between SFR and and HI content, whereas using the other data gives a very clear correlation indeed - i.e. low star formation activity always means a low HI content; gas-rich passive galaxies are not a thing. They show a visual sample of the so-called passive galaxies identified previously, and it's clear that they're absolutely normal star-forming discs.

It's pretty damning stuff. There are two things I didn't quite understand though :
1) The previous authors showed that there was a clear trend between SFR and molecular gas. How does the "correct" SFR alter this ?
2) The previous authors did at least try using alternative methods to estimate SFR and found that this didn't make much difference, except to reduce the number of passive galaxies. It's not clear to me what they did wrong here.

Oh well, science marches on...

xGASS: passive disks do not host unexpectedly large reservoirs of cold atomic hydrogen

We use the extended GALEX Arecibo SDSS Survey (xGASS) to quantify the relationship between atomic hydrogen (HI) reservoir and current star formation rate (SFR) for central disk galaxies. This is primarily motivated by recent claims for the existence, in this sample, of a large population of passive disks harbouring HI reservoirs as large as those observed in main sequence galaxies.

Tuesday, 18 February 2020

MOND goes back to the future

A long-standing issue with MOdified Newtonian Dynamics, everyone's favourite alternative to dark matter, is that there are no good numerical simulations showing how galaxies could actually form and evolve in that framework. For example, MOND advocates are apt to cry that the missing satellite problem* is a serious difficulty for the standard model, but there's been very little indication of whether MOND would actually do any better. The same could be said for just about any cosmological problems.

* Standard models predict about ten times as many small galaxies as we actually detect.

To be fair, the nature of MOND makes running simulations difficult. The strength of gravitational acceleration in MOND varies in a more complex way than in standard Newtonian gravity, being much more dependent on the distribution of matter. Work on this problem has been ongoing for some time, and now at last the first MONDian simulations of galaxy formation have been unleashed. And... they're eerily familiar.

I have to say I found this paper really excessively long at 58 pages so I had to skip over large parts of it, which mainly seem to consist on tedious descriptions that could be better expressed with figures alone. But the gist of it is this : they simulate a big blob of gas, let it evolve, find that it goes phwhooop and out pops a healthy spiral galaxy that spins around nicely.

To be fair, in some ways this is no mean feat. You may remember my own efforts to construct a spiral galaxy from scratch (using standard models). Without dark matter, this is extremely difficult to set up. Get anything slightly wrong and the whole thing can become horribly unstable, blasting itself apart in a whole variety of interesting ways. Dark matter is great at stabilising everything, but without it, specifying the parameters of a disc and having it remain stable is feckin' hard.

And dark matter makes it pretty easy to start off with something that looks nothing much like a galaxy and get a very convincing spiral with minimal effort. Start with a big rotating blob of gas and let it do its thing, and bam! out comes a spiral : I should know, because I've run such simulations myself. Pretty much all the major properties of a typical disc galaxy emerge quite naturally. No need to fine-tune anything very much - it just works.

Twenty years ago, this "monolithic collapse" approach was interesting, but even by then, the rival theory of hierarchical merging and more-or-less replaced it. Monolithic collapse is elegant, but nobody could see how such giant monolithic clouds could ever form. Far more natural to suppose a series of smaller objects could gradually merge, an approach which has by and large been very successful (albeit not without plenty of hiccups and occasional bouts of serious illness).

So MOND's revist of this idea looks decidedly odd. It's reasonable of them to say that the different MONDian gravity should mean we expect fundamentally different initial conditions than the standard model, though this does open a pandora's box of free parameters : not only is gravity different, but so are all the initial conditions. It would be nice if they at least postulated what the new initial conditions should be, but they don't speculate on that here.

But it's not at all reasonable to claim that these results - their major one being the formation of an exponential stellar disc - constitutes much of a success for MOND. We did this twenty years ago using dark matter and got the same thing. True, this won't work with purely Newtonian gravity without dark matter, but no-one is claiming such a scenario. Instead, since MOND mimics the effects of dark matter quite precisely, in effect all these simulations have done is recreate the dark matter's gravity by another method. Their claims that the results don't depend on the precise baryonic physics is true, but misleading : that violent relaxation phase is going to wipe out the initial conditions, and it's that which is going to set the final outcome. That realistic-looking galaxies are a "generic outcome of collapsing gas clouds" is as true for the standard model as it is for MOND. Nothing new under the Sun...

The formation of exponential disk galaxies in MOND

The formation and evolution of galaxies is highly dependent on the dynamics of stars and gas, which is governed by the underlying law of gravity. To investigate how the formation and evolution of galaxies takes place in Milgromian gravity (MOND), we present full hydrodynamical simulations with the Phantom of Ramses (POR) code.

Friday, 14 February 2020

Accidental optical illusions

I have a fun little side-project to make a 3D model of the Milky Way using all-sky HI data. By measuring how fast the gas is moving and doing some trigonometry, it's possible to convert velocity into distance. The equations are a bit awkward, and if you get things a bit off, the end result looks very strange. They also have a limitation that they give a meaningless double solution for any point closer to the centre of the Galaxy than the Sun.

This meant there was quite a bit of trial and error involved until I got the correct result (more on that in a future post). To check I where things were going wrong, I had the code output the calculated galactic coordinates (latitude and longitude across the sky, measured from the galactic centre, as well as velocity along the line of sight), with the data set to zero inside the solar circle where the solutions would be garbage. Actually I'm pretty sure I got the position of the solar circle wrong, so this is just a complete mistake.

But it did produce a couple of fun little optical illusions :

Raw image here.

Both are quite similar. The colour in the grey circle looks like its varies, but it doesn't : it's completely uniform.

The effect is strongest with the left figure, which is velocity. The right side of the circle appears significantly brighter and the left significantly darker, a bit like looking at a crater in partial shadow (or, if you take the inverse perspective, a dome). Cover everything except the circle with your hands and you'll see this is entirely the result of your brain inventing stuff.

The figure on the right (galactic longitude) can be subtle at first, but once you see it, it's very hard indeed to make it stop. This time the right side of the circle appears darker and the left brighter, especially when you focus on the edges. I find that I can more-or-less control how strong this appears by concentrating on different parts of the circle, but sometimes it becomes so strong that I can barely make it stop even by covering the edges.

If we apply an animated mask to the regions outside the circles then things get even more fun (apologies for the small radial artifacts caused by gif compression) :

Raw image here.
It really is quite hard to graphically prove that the circles are always of constant colour. The only way to show it for sure is to download the images and an examine them in extreme close-up for yourself.

Wednesday, 22 January 2020

The clusters that went RAR !

Not much has been said about the radial acceleration lately. It seems to be a problem which is thoroughly licked, but these authors decide that the dead horse is worth flogging a bit more.

The RAR is the relation between the acceleration due to baryons and the acceleration due to dark matter. This has been measured in galaxies and it's found that there's a very tight relation between the two. This is surprising, since the mass of dark matter is heavily dominant over the baryons - you might expect that there should be a lot more scatter. But then people realised that this happened in their simulations anyway, pretty much exactly in agreement with observation.

What seems to be going on is that there's a characteristic regime in which galaxies form. You don't get galaxies above or below certain mass thresholds, thus avoiding extremely high and low accelerations, and the density profiles of dark matter halos tends to be similar. So as you move radially outwards in any galaxy, the acceleration experienced changes in the same characteristic way. Furthermore, although the baryons don't interact with dark matter except through gravity, that interaction can be strong enough to cause selection effects as to where stars form. The RAR, then, is just the result of several quite subtle but powerful and entirely expected selection effects.

The RAR was initially very interesting to modified gravity supporters, who'd predicted it ahead of time. At best, it now looks as though there's no way to distinguish between the predictions of standard dark matter theories and those of modified gravity - both give identical results. But what if we looked at totally different systems ?

This paper extends the results to galaxy clusters. If RAR is the result of modified gravity theories that predict a characteristic acceleration, the same sort of relation ought to be visible in any system, on any scale, bound by gravity. Hence the effort here to test it in galaxy clusters.

The procedure needs some adaptations. In individual galaxies, you can measure how fast the gas and stars are actually moving and directly measure their densities. So you can calculate their acceleration due to their observed baryonic mass and compare this with their actual acceleration (knowing their velocity, distance from the centre of the galaxy, and assuming stable circular orbits), which is dominated by the dark matter.

In clusters things aren't so elegant. Galaxy orbits can be trick to compute, and it's not safe to assume they're moving in neat circles. Instead, the authors use measurements of the hot intracluster gas. Unlike galaxies, the gas motion is heavily influenced by its own thermal pressure keeping it from collapsing into a dense lump in the centre, so its actual acceleration is not dominated by the dark matter. It seems the authors are able to account for this and estimate the acceleration due to dark matter without the pressure from the baryons, as well as the acceleration from the baryonic mass alone. So this should be a fair comparison with the galaxy-based RAR, which is based on only gravitational effects.

They find that the cluster-based RAR is strongly deviant from the galaxy-based relation. It seems that it does not behave in a universal, acceleration-dependent way : there is no evidence for a universal acceleration scale. Which is very odd if this is due to gravity, as MOND predicts.

Case closed for alternative theories of gravity ? They say their result does impact certain theories, but not necessarily MOND itself. Here it gets highly confused. I applaud the authors sterling efforts to remain impartial, but I think they may be going too far, exploring too many ifs and buts in too short a space, sacrificing clarity for brevity. For instance they say the calculated characteristic acceleration is almost ten times larger than the expected standard MOND value, but then immediately say that this is also somehow consistent with MOND. In support of this they cite two enormously long papers, and I'm just not interested enough to read either of them. They mention all sorts of possible modifications to MOND, like relativistic versions or even including some dark matter, which just makes the whole message hard to discern. Does the damn thing work or not ?

I know MOND behaves in a radically different way to Newtonian gravity, but I'm having an increasingly hard time buying it as a sensible theory. Gravity that works differently on different scales and still requires dark matter ? Were the issue just about galaxy rotation curves, there would be no philosophical advantage to either MOND or dark matter. But the more complex things get, the more contrived the alterations to MOND seem to become. MOND feels ever more like a bizarre and unnecessary solution, offering not a single advantage over dark matter - it now seems so complex that it's little better than magic. I'd rather postulate an unknown type of matter than accept a theory that breaks basic physics like this. I could be wrong, of course, but basic intuition is hard to surrender.

EDIT : Barely days later, here's another paper trying much the same thing. It's somewhat easier to follow in its conclusions but more difficult for its method. They use lensing for the total mass and the hot gas for the baryons, but I cannot see anywhere where they describe how they calculate the accelerations. They seem to find a broadly similar RAR as the first paper and conclude that there is no universal RAR. Their acceleration constant is much closer to the ordinary MOND value - the slope of their RAR is similar to previous calculations but the intercept is different. They say their results are consistent with CDM, but they completely avoid any discussion on MOND (probably wisely).

The radial acceleration relation in galaxy clusters

Recently, the discovery of the radial acceleration relation (RAR) in galaxies has been regarded as an indirect support of alternative theories of gravity such as Modified Newtonian Dynamics (MOND) and modified gravity. This relation indicates a tight correlation between dynamical mass and baryonic mass in galaxies with different sizes and morphology.

Tuesday, 14 January 2020

The Joy Of Stacks

Sensitivity is somewhat of a recurring topic, and I don't mean the kind where people whinge about offensive statements about Nazi-themed beards on twitter. I mean the sort where you look at your data and try and work out what the hell it is you've managed to detect, if anything.

I've already covered that sensitivity can't really be given as a single number when you're dealing with real data. You have to account for how complete your catalogue is (how many sources present you've detected) and how reliable it is (what fraction of sources you identify correctly). I've also examined in some length how quantifying this can be arguably impossible, which is philosophically interesting even if practically there's bugger all you can do about it.

But I've glossed over sensitivity itself : the capacity to detect things in the first place, even if you don't actually detect anything at all. This is generally easier to grapple with than the statistical problems of completeness and reliability, but there are still subtleties that need to be dealt with. One particular aspect had me tearing my hair out during my PhD, and recent developments have made me realise that this wasn't just me who was thoroughly perplexed. It's one of those features which will seem, I hope, quite obvious when it's stated, but can be completely non-intuitive if no-one tells you what's going on... to some people at least.


Stacking Made Simple

Suppose you target a well-studied region of space with a nice shiny new HI survey. You've already got a lovely optical catalogue, and notwithstanding the problem of completeness, there are plenty of galaxies there you already know the positions and redshifts and all that other gubbins for. You spend ages and ages doing your radio survey, and behold ! Nothing. Nada. Not a single bloody detection. What's an astronomer to do ?

Well, the most obvious answer is to panic and run around the room tearing other people's hair out extract the radio data at the positions of all the known galaxies, add them together and divide the result by the number of objects. This process of averaging the data is called stacking. The idea is that by combining all the different signals, you're essentially doing the equivalent to taking a longer exposure. You're increasing your sensitivity and should be able to detect fainter emission than you could otherwise. Depending on the qualities of your data and the number of galaxies you detect, you might well be able to increase your sensitivity by, oh, say, a factor ten, which is pretty awesome since you don't need to do any new observations. Woohoo, free sensitivity !

Formally, the noise level of your stacked data scales by a factor n-0.5, where n is the number of galaxies you stack (at least that's the theoretical best expectation; it will usually be a bit worse). In the ideal case, if you have a signal present that's too weak to detect in any individual sections, then averaging those weak values will give you the average value of the signal. In contrast, if you average noise values together, they should be purely random and the more noise you combine the closer you get to zero. So your signal to noise increases, as long as your noise really is purely random or nearly so.

It's well-known that the penalty you pay for stacking is that, in the event you manage to detect something, you don't know which objects actually contain the gas you've detected. Some individual objects might have a bit more gas than your final detection, while others might have less. The crucial thing is that the stacked data tells you about the average amount of stuff present, and absolutely nothing about individual galaxies. After all, the process of adding up and dividing by the total number is the very definition of averaging.


Stacking Made Unnecessarily Complicated

What's all too easy to forget is that this means you do not improve your sensitivity to the total amount of gas present. In fact, your sensitivity to the total gets worse : it's only your capability to detect the average mass per object which improves. You have, after all, averaged your signal, so your new measurement must be an average measurement by definition. I'm going to keep repeating that.

Perhaps the simplest way to understand this is to imagine you had two galaxies with clear detections. If you wanted their total mass, you'd simply add their signals together. If you wanted their average mass, you'd add them and divide by two. Exactly the same principle applies when stacking non-detections : the sum gives you the total mass, the stack gives you the average. And the total mass cannot possibly be less than either of the individual components.

When you put it like this it might seem so buggeringly obvious that you'd laugh in the face of anyone who doesn't understand it, which is very mean* considering the massive confusion I got myself in when trying to work it out from first principles (see chapter 7). The thing is, when you do a stack and you calculate how much stuff you're sensitive too, it's awfully tempting to assume this means your sensitivity to the total, because that's how things normally work. Thinking in terms of averages isn't natural.

* Pun NOT intended.

Or we can look at this mathematically. In any survey, the mass sensitivity is governed by the noise of the data :
M ≡ σrms
Where  σrms is the noise level. Note the equivalent sign rather than an equals sign : the precise equation will depend on the exact nature of the data. It doesn't even have to be mass - it can be whatever quantity we're studying - but I'll use this as it's probably the easiest thing to understand.

Let's alter this slightly and let σbe the rms noise level for an single observation. We know that if we stack n galaxies, the new noise level becomes σ1n-0.5, so our new average mass becomes :
Mav ≡ σ1n-0.5
Which is clearly an improvement over what we started with - we can detect smaller masses than we could before, which is good. But remember, this is our average mass. The total mass is simply n*Mav, so :
Mtot ≡ σ1n+0.5
Keeping in the plus sign so it's easier to see the difference compared to the average. But look - this is worse than what we had originally ! The more galaxies we add, the better our average mass sensitivity, but the worse things get for total mass.

Averaged noise level as a function of the number of objects stacked.
Equivalent noise level for the total number of objects stacked.
A final way to think about it is to consider information. To get better sensitivity to the total mass, we'd need more information per individual object, and obviously we can't do that just by adding in data from other objects.

It's high time we had a visual example. In the data below, I injected a faint source into 100 images. The left panel shows the raw individual images with no further processing. The middle panel shows the cumulative sum of the images, while the right panel shows the averaged result. Exactly the same colour scale is used for all images.


You can see the source is never detected in any of the raw images, but it's quickly visible in the summed and averaged images. But you can also see that the values are much more extreme in the simple summed panel compared to the averaged image. The averaged value is simply the sum divided by the total number of images, so, essentially, the averaged image is simply a scaled version of the summed image. This means that despite appearances, it's really the summation that improves detectability, not the averaging. We can see this if we use an adaptive colour scale that sets the colour range based on the minimum and maximum value in each image :


Then we see that the summed and averaged images are visually identical. The actual values shown are of course different, but how we display them matters a great deal. The noise averages to zero, but it doesn't necessarily sum to zero; the source sums to ever-greater values for each image it's present in, but averages to its true value.


Stacking Made Subtle

To re-iterate : stacking is the same as averaging, so while it improves your sensitivity to the average, it makes things worse for the total. Summing improves your signal strength and thus detectability, but only for data points in which a source is present.

Of course, once we get beyond that, things get more complicated. Normally you wouldn't necessarily do such a simple averaging, because the noise isn't usually the same everywhere. So you'd weight each source by its local rms value and then divide by the sum of the weights rather than the numerical total. This decreases the contribution of the noisiest regions and maximises the benefit from the ones with the lowest noise.

Another issue is whether you go for sheer noise level or actual physical mass. For the former, you want as many objects as possible. But for the latter, you want to account for the distance of your targets - the further away, the less sensitive to mass you'll be, so you might not want to combine them with closer objects. Remember, the equations had an equivalent sign, not an equals sign. Mass sensitivity does not directly equate with simple rms value, though it may be directly proportional to it.

Finally, it's important to realise that this is a general case and a fundamental property of stacking. If you smooth your data spatially you're doing much the same thing : your sensitivity to the average mass per pixel improves, but at the cost of not knowing quite so well where that mass is precisely located, and your total mass sensitivity gets worse. This is why spatially smoothing isn't guaranteed to detect anything if you go nuts with it and smooth it to hell : sure, your surface brightness sensitivity can be phenomenally good, but yer total mass sensitivity is crappy. You're hoping not only that there's some big diffuse material lurking around, but that material is also very substantial : sure it can be thin, but it also has to be present over a larger area.

The same goes for stacking in velocity space in radio data, which is what prompted this post. Integrated flux maps actually have worse mass sensitivity than individual channel maps, despite containing information from more channels. Of course if you were to average them by the number of channels you'd see an improvement : again, you increase your sensitivity to the average column density of the gas but at the expense of your sensitivity to total mass. In essence, your average mass sensitivity represents the mass you could detect if it was present in every stacked location.


So that's it. Stacking is a useful addition in the arsenal of Tools For Detecting Stuff, but like everything else, it's got limits.

Why Bother ?

It's rare that I manage to read any longer pieces on arXiv that aren't strictly about galaxy evolution, but today I indulge myself. ...