Skip to content

Instantly share code, notes, and snippets.

@jzuhone
Created July 24, 2014 15:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jzuhone/978ea6e08a62e40fdb85 to your computer and use it in GitHub Desktop.
Save jzuhone/978ea6e08a62e40fdb85 to your computer and use it in GitHub Desktop.

There are several different styles of projections that can be made either when creating a projection with ds.proj() or when making a ProjectionPlot.

"integrate": This is the default projection style. It simply integrates the requested field f(x) along a line of sight $\textbf{\hat{n}}$, given by the axis parameter:

$$g(\textbf{X}) = {\Big\int\ {f(\textbf{r})\textbf{\hat{n}}\cdot{\mathrm{d\textbf{x}}}}}$$

The units of the projected field g(X) will be the units of the unprojected field f(x) multiplied by the appropriate length unit, e.g., density in g cm − 3 will be projected to g cm − 2. When using this style, a "weight_field" argument may also be specified, which will produce a weighted projection by

$$g(\textbf{X}) = \frac{\Big\int\ {f(\textbf{x})w(\textbf{x})\textbf{\hat{n}}\cdot{\mathrm{d\textbf{x}}}}}{\Big\int\ {w(\textbf{x})\textbf{\hat{n}}\cdot{\mathrm{d\textbf{x}}}}}$$

where w(x) is the field used as a weight. One common example would be to weight the "temperature" field by the "density" field. In this case, the units of the projected field are the same as the unprojected field.

"mip": This style picks out the maximum value of a field along the line of sight given by the axis parameter.

"sum": This style is the same as "integrate", except that it does not multiply by a path length when performing the integration, and is just a straight summation of the field along the given axis. The units of the projected field will be the same as those of the unprojected field. This style is typically only useful for datasets such as 3D FITS cubes where the third axis of the dataset is something like velocity or frequency.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment