# Maximum spherical harmonic degree *l*_{max}

The *l*_{max} value refers to the highest harmonic order \(l\) included
in the Spherical Harmonics series. It determines the highest angular
frequency band to be included in the series: higher *l*_{max} values allow
sharper details to be represented, but require more coefficients to be stored
and processed.

## What determines *l*_{max} for my image data?

For any command or script operating on data in the spherical harmonic
basis, it should be possible to manually set the maximum harmonic degree
of the output using the `-lmax`

command-line option. If this is *not*
provided, then an appropriate value will be determined automatically.

The mechanisms by which this automatic determination of *l*_{max} occurs
are as follows:

Determine the maximum value for

*l*_{max}that is supported by the number of DWI volumes in the shell being processed (or the total number of non-*b*=0 volumes in a single-shell acquisition). This is the number of coefficients required to store an antipodally-symmetric spherical harmonic function:

lmax |
Required volumes |
---|---|

2 |
6 |

4 |
15 |

6 |
28 |

8 |
45 |

10 |
66 |

12 |
91 |

… |
… |

If

*l*_{max}exceeds 8, reduce to 8. This is primarily based on the findings in this paper.Check the condition of the transformation between DWIs and spherical harmonics. If the transformation is ill-conditioned (usually indicating that the diffusion sensitisation gradient directions are not evenly distributed over the sphere or half-sphere), reduce

*l*_{max}until the transformation is well-conditioned.As an example: concatenating two repeats of a 30 direction acquisition to produce 60 volumes will

*not*support an*l*_{max}=8 fit: the angular resolution of the data set is equivalent to 30*unique*directions, and so*l*_{max}=6 would be selected (and this would be accompanied by a command-line warning to the user).In the case of spherical deconvolution, the

*l*_{max}selected for FOD estimation will also be reduced if*l*_{max}of the provided response function is less than that calculated as above.

The *exception* to these rules is the new `amp2response`

command, which
is now called by default in all `dwi2response`

script algorithms. This
command converts *amplitudes* on the half-sphere (most likely in the form
of raw DWI image intensities) into a *response function* intended for use
in spherical deconvolution. This command behaves differently for two
reasons in combination:

The image data from multiple voxels are combined together in a single fitting procedure, therefore having a much greater number of samples when performing the transformation.

The data are transformed not to the spherical harmonic basis, but directly to the

*zonal*spherical harmonic basis (this is the spherical harmonic basis containing only the`m = 0`

terms). This basis requires far fewer coefficients for any given value of*l*_{max}: 2 for*l*_{max}=2, 3 for*l*_{max}=4, 4 for*l*_{max}=6, 5 for*l*_{max}=8 and so on.

The value of *l*_{max} that can be used in this command is therefore
practically unconstrained; though the power in higher harmonic degrees
is much smaller than that in lower degrees. The command is currently
configured to select *l*_{max}=10 by default, regardless of *b*-value;
interested readers can find the discussion here.

## Reduced *l*_{max} in particular subjects

If you find that certain subjects within a cohort have a reduced *l*_{max}
compared to the rest of the cohort when using any command relating to
spherical harmonics, the most likely cause is premature termination of the
diffusion sequence during scanning of those subjects, resulting in a reduced
number of diffusion volumes, and therefore a reduced *l*_{max} according to
the table above.

## Setting *l*_{max} in different applications

The range of permissible values for *l*_{max} depends on the particular
command being used; e.g.:

For any command that maps image data directly to spherical harmonics, it is impossible to set

*l*_{max}to a value higher than that supported by the image data. The transformation from DWI data to spherical harmonics simply cannot be done in such a case, as the problem is under-determined. You can of course set*l*_{max}to a lower value than that supported by the data.In spherical deconvolution, it

*is*possible to set a higher*l*_{max}than that supported by the data - so-called*super-resolved*spherical deconvolution. Here, additional information is provided by the non-negativity constraint to make estimation of additional spherical harmonic coefficients possible.If performing Track Orientation Density Imaging (TODI) using

`tckmap -tod`

, then the apodized point spread functions (aPSFs) can be generated at any value of*l*_{max}for which aPSF data are available (currently*l*_{max}=16, since the angular resolution of the original image data is not a limiting factor here.As described previously, the

`amp2response`

command is a special case, and the maximum permissible*l*_{max}is vastly greater than the maximum practical value.