Where to start

The rest of this site is organised by what Mera has. This page is organised by what you want to do.

Nothing here is a tutorial. Each row names the one or two functions that do the job and points at the page that explains them properly. Find your row, run the call, read the page when the call raises a question.

If you have a snapshot and no idea what is in it
using Mera
quicklook(400, path="/path/to/simulation")

One call. It reads within a budget, maps the box along all three axes, draws a density and temperature diagram, and reports masses, densities and temperatures. See First Look. New to Mera? First Steps is a guided first session, and Coming from Other Tools translates habits you bring.

Getting data in

I want to …start withread
see what is in an output I have never openedquicklookFirst Look
a first-look summary with the panels I choose, and its cost before it runsreportComposable Reports
know which outputs exist and are completecheckoutputs, checksimulations, gettimeData Inspection
read the gasgetinfo then gethydroLoad by Selection
read stars, dark matter, gravity, clumps, sinks or radiative transfergetparticles, getgravity, getclumps, getsinks, getrtParticles, Gravity
read everything the snapshot holds, in one callloadallPipelines
read only part of the boxxrange, yrange, zrange with center=[:bc], range_unit=:kpcLoad by Selection
stop waiting for the same read every timesavedata, loaddata, convertdataMera Files, Converter
restart RAMSES on a different number of CPUsrepartition, then compareramses to check; writeramses from Mera data or a mera fileRAMSES restart, any CPUs
practise on data with a known answerdownload_testdata (fifteen small RAMSES runs)Test simulations

Asking for numbers

I want to …start withread
a total mass, or any totalmsumBasic Calculations
a centre or a bulk velocitycenter_of_mass, bulk_velocityBasic Calculations
a derived quantity: temperature, sound speed, Machgetvar(obj, :T, :K)Basic Calculations
to see every quantity availablegetvar(), list_fields(obj), list_units()Derived Fields, Units & Constants
mean, median, spread, weighted or maskedwstatBasic Calculations
a quantity of my own, usable everywhereadd_fieldDerived Fields & add_field
to check that my run resolves the Jeans lengthgetvar(gas, :jeansnumber_iso)How Quantities Are Computed
a centre or a radius in a periodic boxcenter_of_mass(...; periodic=true), getvar(gas, :r_sphere_periodic)Periodic Boxes

Say the unit. getvar(gas, :T) gives code units, which mean something different in the next simulation. getvar(gas, :T, :K) is a statement about physics.

Choosing what to look at

I want to …start withread
a sphere, a box, a cylinder, a shellsubregion with sphere, cuboid, cylinder, sphericalshell, cylindricalshellGet Subregions
a ring, or one region minus another∩ ∪ \ ! between regionsGet Subregions §5
everything above 10⁴ K, or between two densitiesfilterdata with Above, Below, InRangeMasking & Filtering
to keep the whole object but mark rowsgetmask, then pass mask=Masking & Filtering
to reuse one selection across a whole scriptArgumentsType, passed as myargs=; withargsBundling Arguments
a region boundary that looks sharp in a figuresubregion(..., refine_to=[px, :kpc])Get Subregions §7

The operators are set intersection, union, difference and complement. Type ∩ as \cap then TAB and ∪ as \cup then TAB, or avoid Unicode entirely: A & B, A | B, intersect(A, B), union(A, B), setdiff(A, B) and !A all mean the same.

With region values (sphere(...), cuboid(...) and the others), boundary cells are split by default, so a region and its complement add up to the parent exactly. That is worth checking once in any new script: msum(subregion(gas, reg), :Msol) + msum(subregion(gas, !reg), :Msol).

Making pictures

I want to …start withread
a surface-density mapprojection(gas, :sd, :Msol_pc2, pxsize=[50.0, :pc])Projection
a map of the stars or the dark matterprojection(part, :sd, :Msol_pc2, pxsize=[100.0, :pc])Projection: Particles
the galaxy seen from any angleprojection(...; inclination, azimuth)Off-axis Projection, Cheatsheet
the galaxy centre and a face-on or edge-on view, found from the datacenter_of, face_on, edge_on, angmomAuto-Frame
values in one plane instead of summed along the line of sightsliceWhich tool?
to know which projection tool fits my case(reading only)Which tool?
a 3-D picture in which dense gas hides what is behind itvolumerender; volumeorbit or volumepath for a movieVolume Rendering
a radial or vertical profileprofileProfiles & Phase Diagrams
a density-temperature diagramphaseProfiles & Phase Diagrams
profiles over many snapshots, or binned in three quantitiesprofiletimeseries, profile3dProfiles & Phase Diagrams
a velocity-dispersion profile, with or without the thermal partvelocitydispersion, localdispersionProfiles & Phase
a density PDF, mass- or volume-weightedpdfStatistics
a uniform grid for an FFT or a power spectrumcovering_grid, covering_grid_memoryCovering Grid
to open it in ParaViewexport_vtkParaView

Use pxsize=[value, :unit] rather than res=: it says how large a pixel is in physical units, not how many pixels there are.

Bigger jobs

I want to …start withread
find clumps or coresclumpfindClump Finding
a star-formation rate or historysfr, sfr_snapshot, depletion_timeStar-Formation Rate
the same analysis over fifty outputstimeseriesTime Series
a moviegetmovie, savemovie, rotation_sequenceMovies, Which tool?
ages and redshifts on a cosmological runcosmic_time, lookback_time, iscosmologicalCosmological Runs
magnetic fields, or radiative-transfer datagetvar(gas, :bmag), getrtMagnetic Fields, Radiative Transfer
to use all my coresstart Julia with -t 8; max_threads where it mattersMulti-Threading
quieter output, or no progress barsoutput_mode(false)Verbose & Progress Switches
to be told when a long run finishesnotifyme, bellNotifications

Making the result defensible

I want to …start withread
to record what produced a numberprovenance(obj), provenance_string, mera_buildProvenance
someone else to reproduce ita Project.toml beside the script, and its Manifest.tomlReproducibility
to check I did not invert a conditionthe partition check aboveMasking & Filtering
to know how a number is computed before I quote it(reading only)How Quantities Are Computed

When the row you want is not here

A gallery recipe is a whole workflow rather than one function: download it, change the path, run it. If you are working with an AI assistant, Using an AI Assistant has a file to give it so that what it writes runs, and the checks worth keeping.

And when something goes wrong, the error messages are written to be read: they suggest near matches, list what the object actually holds, and name the function that reports the details. Troubleshooting covers common first-hour errors.