HMI_Logo HMI Ring Diagrams
Pipeline Module Specifications

maicalc

Module Version
	1.1	9 IX 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 2.0

	Included in JSOC release 8.12
	In use for ring-diagram pipelines 2016.09.09? – 2017.09.28
	This version supersedes Version 1.0

	The source code and Makefile are in the JSOC CVS repository

Usage
	maicalc [-nrv] ds= DataDescriptor length= tracking length
	    scale= target tile mapping scale extent= target tile size
	    rec_step= sampling step length
	    [param= val ...]
	
Flags
	-n	turn off tracking, just correct for any observer drift
		in the latitudinal direction
	-r	turn off spatial apodization
	-t	turn on time range checks
	-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,
			cr, cl, and length parameters must also be supplied.
			No Default, must be provided

	interval	The length of the analysis interval, in Carrington degrees.
			No Default, must be provided

	scale		The scale of the mapped region(s) at map center, in
			heliographic degrees per pixel. No Default, must be provided

	extent		Extent of the integrating analysis region(s), in 
			heliographic degrees. No Default, must be provided

	rec_step	The sampling step, in units of the input record steps.
			No Default, must be provided

	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.

	qmask		A bit mask for image rejection aplied to the quality
			keyword specified by qual_key; Default: 0x80000000

	reject		Name of a file containing a list of input magnetograms to be
			rejected regardless of Quality.
			Default: unspecified, implies none

	max_reach	Maximum distance allowed from a rejected or missing record
			in the magnetogram dataset to an acceptable replacement record,
			in units of the rec_step value. Default: 0.5

	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, implies none

	qual_key	The key name to be used for the key value representing the
			data quality word (a 32-bit mask used in conjunction with
			the qmask value for image rejection;
			Default: Quality

	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
	- Added argument max_reach, with default value of 0.5 to control
	how far from target times to search for acceptable images
	- Added argument qmask, with default value of 0x80000000
	- Added argument qual_key, with default value "Quality"
	- Added ability to reject input magnetograms on basis of a
	quality mask, and to search for acceptable "nearby" records (within
	max_reach * rec_step (which no longer defaults to 64)
	- Added ability to reject individual input magnetograms from
	a "do not use" list in a file optionally specified by argument reject
	- Made time range check for acceptability optional, set by default,
	but with intent that it be an option requiring a flag, preserved
	only for backward compatability
	- removed default values for arguments interval, rec_step, scale,
	and extent

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