HMI_Logo HMI Ring Diagrams
Pipeline Module Specifications

maicalc

Module Version
	1.0	10 III 2016

General Description
	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. The MAI values may be used as a set of input parameter values
	to mtrack, and will be used to set appropriate keyword values in its
	output data records.  Also writes an output file containing values at
	grid points of integrated values of Bz as well as |Bz| and the
	time derivatives of both.

Status
	This version has been superseded by Version 1.1

	Not included in any JSOC release
	In use for ring-diagram pipelines 2016.03.10 – 2016.09.09 ?
	This version supersedes Version 0.9

	The source code and Makefile is in ~rick/hmi/rings/src/versions/maicalc

Usage
	maicalc [-nrv] ds= DataDescriptor
	    [param= val ...]
	
Flags
	-n	turn off tracking, just correct for any observer drift
		in the latitudinal direction
	-r	turn off spatial apodization
	-v	run verbose

Parameters
	ds		either the name of an input data set (record selection)
			or the name of an input data series; in the latter case,
			tmid and length parameters must also be supplied.
			Default: mdi.fd_M_96m_lev18

	cr		The Carrington rotation number at the target midpoint
			of the analysis interval. Default: current value.

	cl		The Carrington longitude of central meridian at the target
			midpoint of the tracking interval. Default: current value.

	interval	The length of the analysis interval, in Carrington degrees.
			Default: 15.0

	rec_step	The sampling step, in units of the input record steps.
			Default: 64

	scale		The scale of the mapped region(s) at map center, in
			heliographic degrees per pixel. Default:  0.04

	extent		Extent of the integrating analysis region(s), in 
			heliographic degrees. Default: 15.36

	lat		An array of heliographic latitudes (in degrees) of the
			centers of regions at the midpoint of the tracking.
			Default: [0.0] (If there is only one target,
			the enclosing characters, which may be brackets, braces, or
			parentheses, may be omitted. Target values are separated by
			commas.) If there are more lon values than lat values,
			the final lat value is replicated.

	lon		An array of heliographic longitudes (in degrees) of the
			centers of regions at the midpoint of the tracking.
			Default: [0.0]  If there are more lat values than lon
			values, the final lon value is replicated. Note that
			the longitudes are Carrington, not Stonyhurst.

	mask_in		The inner edge for a (1-r^2) apodization to be applied
			to the mapped regions; Default: 0.9765625

	mask_ex		The outer edge for a (1-r^2) apodization to be applied
			to the mapped regions; Default: 1.0

	floor		The "noise" floor below which data values are ignored for
			the sake of integration (gauss); Default: 50.0

	file		The output file name for diagnostics, if any.
			Default: unspecified

	clon_key	The key name to be used for the key value representing the
			observer Carrington longitude at the time of observation in
			the input data series; Default: CRLN_OBS

	clat_key	The key name to be used for the key value representing the
			observer heliographic latitude at the time of observation in
			the input data series; Default: CRLT_OBS

	crot_key	The key name to be used for the key value representing the
			Carrington rotation number appropriate to the observer
			central meridian at the time of observation in the input
			data series; Default: CAR_ROT

	rsun_key	The key name to be used for the image semi-diameter in
			pixels in the input data series; Default: R_SUN

	apsd_key	The key name to be used for the solar semi-diameter in
			arcsec in the input data series; Default: RSUN_OBS

	dsun_key	The key name to be used for the sun-observer distance in
			meters (to be used in conjunction with rsun_key in default
			of a keyword for apsd_key; Default: DSUN_OBS

Input Data series class:
	time series of solar magnetogram data

Sample input series:
	mdi.fd_M_96m_lev18

Comments:
	If tracking is turned off, the location of the target region will be
	appropriate for the midpoint of the tracking interval. For example, if
	the target interval ranges from central meridian longitudes 190–170
	and a target region is at Carrington longitude 150, the Stonyhurst
	longitude of the target would remain at 30° east for the duration of
	the analysis interval.

Sample command:
	maicalc ds= hmi.M_45s cr= 2100 cl= 180.0 \
          scale= 0.04 extent= 30.72 interval= 30 \
          lat= "{-60.0, -60.0, -45.0, -45.0, -30.0, -30.0, -15.0, -15.0, \
	      +00.0, +15.0, +15.0, +30.0, +30.0, +45.0, +45.0, +60.0, +60.0}" \
	  lon= "{120.0, 240.0, 135.0, 225.0, 150.0, 210.0, 165.0, 195.0, \
	       180.0, 195.0, 165.0, 210.0, 150.0, 225.0, 135.0, 240.0, 120.0}"

Significant changes from Previous Version
	none — only changes were cleanup, more complete error checking,
	and ensuring proper return status

Bugs in current version
	There is no option for tracking at rates other than the Carrington rate
	(or not at all).

	There is no option for mapping using a projection other than the Lambert
	azimuthal equivalent projection.

	Selection of input data records as a DRMS DataSet name is not supported;
	the ds parameter must be a DataSeries name, and values for the cr, cl,
	and interval parameters must be supplied

	Calculation of a Carrington rotation interval corresponding to the
	requested time interval is based on a crude approximation of the synodic
	rate as 13°.20/d — it actually varies by ±0°.03/d (for Earth) from that
	value. But it is unnecessary, the input data should be selected based
	directly on the time interval.

	The default values are appropriate for the MDI ring-diagrams SSW ("densepack")
	analysis. In any case, the algorithm for calculating the MAI will doubtless
	need to be modified for use with HMI (or other) magnetograms.

Valid HTML 4.01 Transitional HMI Ring Diagrams 22 Feb 2021, 13:20-0800