How does the Helioseismic and Magnetic Imager (HMI) compute the Magnetic Activity Index (MAI)? I am looking for a description about how this number called Magnetic Activity Index (MAI) is calculated. All I know is that the processing pipeline of the instrument HMI calculates it. But I would like to know how this quantity is defined and computed! I have not yet found anything on google about it, not even an article.
I found a quote from K. Jain et al.  which defines a Magnetic Activity Index might be pointing you in the correct direction - for me it still sounds rather abstract:

To obtain the MAI, we convert magnetogram data to absolute values, average over the length of a ring day and apodise them into circular areas to match the size of the Dopplergram patches used in the ring-diagram analysis.

However, I also found http://hmi.stanford.edu/teams/rings/modules/maicalc.html which contains a link a source code repository. The man-page of maicalc states:

maicalc takes as its input a dataset of records representing solar magnetograms during a selected interval, and produces as its output the values of the Magnetic Activity Index (MAI) appropriate for a selected set of target locations as they would be mapped and tracked by mtrack for the duration of the input data interval and apodized by pspec3.