moment_maps
Computes moment 0/1/2, peak intensity, and quadratic peak velocity maps from a FITS cube, with velocity-range channel selection, masking, and optional clipping.
Instructions
Moment 0/1/2, peak intensity and a quadratic peak velocity from a FITS cube.
Velocity range v_min_kms..v_max_kms selects channels. rms per channel comes from rms, or the robust (MAD)
rms of line_free_channels ([[start, end], ...], inclusive indices after the cube is sorted by increasing
velocity), or of channels outside the velocity range, or of the whole cube (warned). Masking: an optional
mask cube (non-zero = keep, same shape), else clip_sigma_m0 (None = no clip, the unbiased default for
moment 0) and clip_sigma_m12 (default 3 sigma) for moments 1 and 2.
M0 = sum I dv (BUNIT km/s); noise map = rms dv sqrt(N_chan in mask); M1 = sum I v / sum I;
M2 = sqrt(sum I (v - M1)^2 / sum I); peak = max I; v_peak from a parabola through the peak channel and its
neighbours (Teague and Foreman-Mackey 2018, bettermoments-style). Writes FITS maps ..fits into
out_dir (default: the cube's folder). All paths must lie inside the allowed folder (env ALMA_MCP_WORKDIR,
default the server's working directory); existing map files are refused unless overwrite=true.
Limits: hard clips bias M0 low and M1 toward bright gas; M2 includes beam smearing and channel width, not
only turbulence; one centroid averages multi-component lines; interferometer-only maps miss extended flux.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"fits_path": "<fits_path>"
},
"name": "moment_maps"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| rms | No | ||
| out_dir | No | ||
| fits_path | Yes | ||
| mask_path | No | ||
| overwrite | No | ||
| v_max_kms | No | ||
| v_min_kms | No | ||
| clip_sigma_m0 | No | ||
| rest_freq_ghz | No | ||
| clip_sigma_m12 | No | ||
| line_free_channels | No |