← Latest papers
🔭 astrophysics

PHANTOM: A MATLAB and Octave Toolbox Connecting Linear Field Statistics to Dark Matter Halo Observables

This paper introduces PHANTOM, a validated MATLAB and Octave toolbox that connects linear density field statistics to dark matter halo observables across various cosmological scenarios, filling a gap for native implementations in these environments by offering consistent calculations of power spectra, mass functions, and halo properties with sub-percent agreement against established Python packages.

Original authors: Mohammad Abu Thaher Chowdhury

Published 2026-06-18
📖 5 min read🧠 Deep dive

Original authors: Mohammad Abu Thaher Chowdhury

Original paper licensed under CC BY 4.0 (http://creativecommons.org/licenses/by/4.0/). This is an AI-generated explanation of the paper below. It is not written or endorsed by the authors. For technical accuracy, refer to the original paper. Read full disclaimer

Imagine the universe as a giant, invisible ocean made of "dark matter." We can't see this ocean directly, but we know it's there because it holds galaxies together like invisible glue. Astronomers have spent decades building mathematical maps to understand how this dark matter clumps together into giant bubbles called "halos," which act as the scaffolding for all the stars and galaxies we see.

For a long time, if you wanted to use these maps, you had to speak the language of Python (a specific computer programming language). But many astronomers and instrument builders still work in MATLAB or Octave (other popular programming languages). It was like trying to use a Swiss Army knife designed for a left-handed person with your right hand—you could make it work, but it was awkward and required a lot of manual translation.

Enter "phantom."

This paper introduces phantom, a new, free toolbox designed specifically for MATLAB and Octave users. Think of phantom as a universal translator and a master chef's kitchen rolled into one. It takes the complex, pre-calculated recipes for how dark matter behaves and serves them up in a language MATLAB users already speak fluently.

Here is how phantom works, broken down into simple parts:

1. The "Cosmology Structure" (The Master Blueprint)

Imagine you are building a house. Before you lay a single brick, you need a blueprint that tells you the size of the lot, the type of soil, and the weather patterns.
In phantom, this is called the cosmology structure. You create this "blueprint" once at the start of your work. It contains all the rules of your universe (how fast it's expanding, how much dark matter there is, etc.). Once built, this blueprint is passed to every other tool in the toolbox, ensuring that every calculation you do is consistent with the same set of rules. You don't have to worry about mixing up the rules halfway through.

2. The Three Layers of the Kitchen

The toolbox is organized like a kitchen with three distinct stations, where the output of one station becomes the ingredient for the next:

  • Station 1: The Linear Field (The Raw Ingredients)
    This station takes your blueprint and calculates the basic "flavor" of the universe. It produces things like the power spectrum (a map of how much "clumpiness" exists at different sizes) and the variance (how much things wiggle). It's like measuring the temperature and humidity of the kitchen before you start cooking.
  • Station 2: The Halo Statistics (The Recipe Book)
    Now that we know the ingredients, this station asks: "How many dark matter halos will form, and how big will they be?" It uses the data from Station 1 to predict the abundance of these halos and how they cluster together. It's like a recipe book that says, "If the temperature is X, you will get Y number of cookies."
  • Station 3: The Halo Observables (The Final Dish)
    This is the final step. It takes a specific halo (a specific cookie) and calculates what we would actually see if we looked at it through a telescope. It calculates the density (how packed the cookie is), the speed of stars orbiting inside it, and how it bends light (gravitational lensing). This is the plate of food ready to be served to the observer.

3. Cooking with Different "Doughs" (Dark Matter Types)

Most recipes assume the dough is standard "Cold Dark Matter" (CDM). But phantom is versatile; it can also cook with two other types of dough:

  • Warm Dark Matter (WDM): This dough is a bit "fluffier" and doesn't clump as easily on small scales.
  • Fuzzy Dark Matter (FDM): This is a very strange, quantum dough. Instead of a solid core, these halos have a fuzzy, wave-like center called a soliton.

phantom is unique because it is the first tool in MATLAB that can handle all three types of dough seamlessly. It can even show you how a "fuzzy" halo looks different from a standard one, predicting that the fuzzy ones have a distinct, dense core that might change how light bends around them.

4. Why It Matters (The "Sub-Percent" Promise)

The author didn't just write this from scratch; they tested it rigorously. They compared phantom's results against the gold standard Python tool called colossus.

  • The Result: The two tools agreed to within less than 1% of each other.
  • The Analogy: If you and a friend both bake a cake using different ovens and different recipes, but the cakes taste 99.9% identical, you know both recipes are correct. This gives scientists confidence that they can switch to phantom without worrying about their results being wrong.

5. Real-World Examples in the Paper

The paper shows two ways scientists can use this new kitchen:

  • Gravitational Lensing: It calculates how a dark matter halo bends light from a distant galaxy. The paper shows that if the halo is made of "fuzzy" dough, it creates a tiny, specific bump in the bending of light that standard dough wouldn't create. This could help astronomers spot fuzzy dark matter in the future.
  • Galaxy Rotation: It calculates how fast stars should orbit inside a galaxy. The paper compares this to real data from the SPARC database (a collection of real galaxy measurements). It shows that while standard dough fits the outer edges of galaxies well, the "fuzzy" dough creates a little bump in the center that might explain certain observations better.

Summary

phantom is a bridge. It connects the complex, theoretical math of how the universe is built to the practical, everyday work of astronomers who use MATLAB. It allows them to stop translating code by hand and start cooking up new discoveries about the invisible universe right where they are already working. It is fast, accurate, and ready to serve the next generation of dark matter research.

Drowning in papers in your field?

Get daily digests of the most novel papers matching your research keywords — with technical summaries, in your language.

Try Digest →