Moment key

This file defines “moments” calculated by the pipeline. These are derived two dimensional map products created by applying a mask to the cube and then collapsing it using some algorithm.

This file should be space or tab delimited. Each entry should have 3 columns, as described below.

  • Column 1: Moment name as used in the derived_key. This can be anything, it’s used for cross-linking. Avoid spaces and other problem characters.

  • Column 2: Parameter being defined. There are a number of options:

    • algorithm: a tag fed to the moment routines to return the function used to calculate the moment. Needs to be one of the known routines. See those programs or the PHANGS-ALMA examples for viable routines.

    • mask: strictmask or broadmask or none or some other viable extension. Notes which mask to apply. Generally use strictmask or broadmask.

    • ext: the extension added to the end of the moment map file name. Can be anything, though pick something that can sensibly work in a file name - avoid _ or spaces.

    • ext_error: the extension added to the end of the uncertainty map file name. e.g., emom0 for the error on the “mom0” map.

    • round: the order of the calculation. Calculations start with round 1 and count up to the maximum round. This is needed when subsequent calculations depend on a first round of moments (e.g., velocity field priors or intensity-based pruning). Generally, this will be 1 unless there’s a reason for it to be a higher value.

    • kwargs: a dictionary of kwargs passed to the moment calculation call. The value here is a dictionary read literally. Enter it with no spaces or other problem characters.

  • Column 3: Value. Should be appropriate for the parameter above.

Example moment key file

##########################################################################
# MOMENT DEFINITION KEY
##########################################################################

# This key defines "moments" calculated by the pipeline. These are
# derived two dimensional map products created by applying a mask to
# the cube and then collapsing it using some algorithm.

# Column 1: moment name as used in the derived key. This can be
# anything, it's used for cross-linking. Avoid spaces and other
# problem characters.

# Column 2: parameter being defined. Notes:

# algorithm : a tag fed to the moment routines to return the function
# used to calculate the moment. Needs to be one of the known
# routines. See those programs or the PHANGS-ALMA examples for viable
# routines.

# mask : strict or broad or none or some other viable extension. Notes
# which mask to apply. Generally use strictmask or broadmask.

# ext : the extension added to the end of the moment map file
# name. Can be anything, though pick something that can sensibly work
# in a file name, likely avoiding _ or spaces.

# ext_error : the extension added to the end of the uncertainty map
# file name. e.g., "emom0" for the error on the "mom0" map.

# round : the order of the calculation. Calculations start with round
# 1 and count up to the maximum round. This is needed when subsequent
# calculations depnd on a first round of moments (e.g., velocity field
# priors or intensity-based pruning). Generally, this will be 1 unless
# there's a reason for it to be a higher value.

# kwargs : a dictionary of kwargs passed to the moment calculation
# call. The value here is a dictionary read literally. Enter it with
# no spaces or other problem characters.

# Column 3: value. Enter appropriate to the field name above.

##########################################################################

##########################################################################
# STRICT MASK MOMENTS
##########################################################################

strictmom0      algorithm       mom0
strictmom0      mask            strictmask
strictmom0      ext             _strict_mom0
strictmom0      ext_error       _strict_emom0
strictmom0      round           1
strictmom0      kwargs          {}

strictmom1      algorithm       mom1
strictmom1      mask            strictmask
strictmom1      ext             _strict_mom1
strictmom1      ext_error       _strict_emom1
strictmom1      round           1
strictmom1      kwargs          {}

strictvpeak     algorithm       vpeak
strictvpeak     mask            strictmask
strictvpeak     ext             _strict_vpeak
strictvpeak     ext_error       _strict_evpeak
strictvpeak     round           1
strictvpeak     kwargs          {}

strictvquad     algorithm       vquad
strictvquad     mask            strictmask
strictvquad     ext             _strict_vquad
strictvquad     ext_error       _strict_evquad
strictvquad     round           1
strictvquad     kwargs          {}

strictmom2      algorithm       mom2
strictmom2      mask            strictmask
strictmom2      ext             _strict_mom2
strictmom2      ext_error       _strict_emom2
strictmom2      round           1
strictmom2      kwargs          {}

strictew        algorithm       ew
strictew        mask            strictmask
strictew        ext             _strict_ew
strictew        ext_error       _strict_eew
strictew        round           1
strictew        kwargs          {}

##########################################################################
# BROAD MASK MOMENTS
##########################################################################

broadmom0       algorithm       mom0
broadmom0       mask            broadmask
broadmom0       ext             _broad_mom0
broadmom0       ext_error       _broad_emom0
broadmom0       round           1
broadmom0       kwargs          {}

broadmom1       algorithm       mom1
broadmom1       mask            broadmask
broadmom1       ext             _broad_mom1
broadmom1       ext_error       _broad_emom1
broadmom1       round           1
broadmom1       kwargs          {}

broadtpeak      algorithm       tpeak
broadtpeak      mask            broadmask
broadtpeak      ext             _broad_tpeak
broadtpeak      ext_error       _broad_etpeak
broadtpeak      round           1
broadtpeak      kwargs          {}

broadtpeak12p5  algorithm       tpeak
broadtpeak12p5  mask            broadmask
broadtpeak12p5  ext             _broad_tpeak12p5
broadtpeak12p5  ext_error       _broad_etpeak12p5
broadtpeak12p5  round           1
broadtpeak12p5  kwargs          {'window':'12.5km/s'}

##########################################################################
# SECONDARY MOMENTS - THESE DEPEND ON OTHER MAPS AS INPUT
##########################################################################

mom1wprior      algorithm       mom1wprior
mom1wprior      mask            None
mom1wprior      round           2
mom1wprior      ext             _mom1wprior
mom1wprior      ext_error       _emom1wprior
mom1wprior      maps_to_pass    ['strict_mom1','strict_emom1','broad_mom1','broad_emom1','broad_mom0','broad_emom0']
mom1wprior      other_exts      {'vfield_prior':'_7m+tp_co21_15as_strict_mom1.fits'}
mom1wprior      kwargs          {'vfield_reject_thresh':'20km/s','mom0_thresh':2.0}

##########################################################################
# FLAT MAPS - THESE CAN DEPEND ON OTHER MAPS AS INPUT
##########################################################################

flatstrictmom0  algorithm       mom0
flatstrictmom0  mask            flatstrictmask
flatstrictmom0  ext                 _flatstrict_mom0
flatstrictmom0  ext_error       _flatstrict_emom0
flatstrictmom0  round           3
flatstrictmom0  kwargs          {}

flatbroadmom0   algorithm       mom0
flatbroadmom0   mask            flatbroadmask
flatbroadmom0   ext                 _flatbroad_mom0
flatbroadmom0   ext_error       _flatbroad_emom0
flatbroadmom0   round           3
flatbroadmom0   kwargs          {}