HMI_Logo HMI Ring Diagrams
Pipeline Module Specifications

mtrack

Module Version
	0.7	11 VII 2009

General Description
	mtrack takes as its input a dataset of records representing solar
	image data observed at a uniform temporal cadence, and produces as
	its output a set of records representing mapped cubes at selected 
	heliographic coordinates, tracked at selected rates for the duration
	of the input data interval. The tracked data cubes provide the input
	to pspec3 and all subsequent ring-diagram analysis procedures; they
	also provide input to the time-distance analysis pipeline and possibly
	other local analysis procedures. They may also be used for animations.

Status
	This version has been superseded by Version 0.8

	The source code and Makefile is in ~rick/src/mtrack

Usage
	mtrack_v07 [-cnorvxGM] in= InputDescriptor out= OutputDescriptor
	    [param= val ...]
	
Flags
	-c	track at Carrington rate (a0 = a2 = a4 = merid_v = 0)
	-n	turn off tracking, just correct for any observer motion
		(a0 = -2.8653291, a2 = a4 = merid_v = 0)
	-o	remove line-of-sight component of observer velocity from input data
			not currently implemented
	-r	remove line-of-sight component of solar rotation from input data
			not currently implemented
	-v	run verbose
	-x	experimental run (do not insert records in output series)
	-G	use GONG keywords for input; not currently implemented
	-M	use MDI keywords for input and correct for MDI distortion;
			not currently implemented

Parameters
	in		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.

	segment		the name of the data segment to be used as input;
			required if the input data series has more than one data
			segment per record, otherwise ignored

	out		the name of the output data series, which must already
			exist; record selection is based on runtime parameters
			and the series prime keywords

	bckgn		The file name of a  background  image  to  be  subtracted
			from  the data for purposes of detrending. If no value
			is supplied, no detrending is performed. The background
			image must be in the same format as the images.
			Detrending is performed before the images are mapped.

	reject		not currently implemented
	qmask		not currently implemented

	tmid		The target midpoint of the tracking interval, which may
			be expressed in either standard Date_Time format or in
			CarringtonRotation:Longitude format, e.g. 1988:150.0
			in which case it refers to the central meridian crossing
			time appropriate to the observing platform.
			Must be usedmod_mtrack_07.html in conjunction with the length parameter.
			Ignored if the in value is a specific data recordset.

	length		The length of the tracking interval, in units of the
			input data cadence.

	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.

	map		The mapping projection option; recognized values are:
			carree, Cassini, Mercator, cyleqa, sineqa, gnomonic,
			Postel, stereographic, orthographic, and Lambert
			Default: Postel. This parameter, along with all of the
			succeeding ones, applies to all output regions.

	scale		The scale of the tracked regions at map center, in
			heliographic degrees per pixel. No default.

	cols		Number of columns in the output maps (pixels). Default: 0,
			but at least one of cols and rows must be set non-zero; if
			either is 0, it will be set to the value of the other, so
			that the tracked region maps will be square.

	rows		Number of rows in the output maps (pixels). Default: 0;
			see cols.

	map_pa		The position angle of heliographic north on the output
			maps, measured westward (counter-clockwise), in deg.
			Default: 0.

	a0		The 0 order term in an expansion in sin^2 (latitude) of the
			assumed rotation rate for tracking, minus the Carrington rate,
			in μrad/sec. Default: -0.02893, which corresponds, along with
			the defaults for a2 and a4, to the Snodgrass 1982/84 photospheric
			Doppler rate. This parameter, along with a2, a4 and merid_v, is
			ignored if either of the flags -c or -n is set.

	a2		The 1st order term in the assumed rotation rate profile for
			tracking.Default: -0.3441. See a0.

	a4		The 2nd order term in the assumed rotation rate profile for
			tracking .Default: -0.5037. See a0.

	merid_v		The assumed meridional velocity for tracking, in μrad/sec,
			positive northward. Default: 0. See a0. Note that the
			velocity in μrad/sec is about 0.0014368 times the meridional
			rate in m/sec.

	bscale		The scaling to be applied to output data stored externally as
			short integers to convert to floating-pont values. Default: 1.0

	bzero		The offset to be applied to output data stored externally as
			short integers, after multiplication by bscale, to convert to
			floating-pont values. Default: 0.0

	trec_key	The key name to be used for the prime key of the input data
			series, assumed to be a slotted time series; Default: T_REC

	tobs_key	The key name to be used for the key value representing the
			midpoint of the record observation times in the input data
			series; Default: T_OBS

	qual_key	The key name for a 32-bit image quality field in the input data
			series;  Default: Quality.not currently implemented

	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

Input Data series class:
	slotted time series of solar image data

Sample input series:
	mdi.fd_V_lev18

Output Data series class:
	tracked mapped data cubes from solar image data

Sample output series:
	mdi.rdVtrack_dp

Sample command:
	mtrack_v07 -v in= mdi.fd_V_lev18 out= mdi.rdVtrack_dp \
	  tmid= 1988:180.0 length= 1664 cols= 128 rows= 128 scale= 0.125 \
	  bckgn= ~rick/avgs/vel/mdi/lev15/1988/1988:180/mean.fits \
	  lat= "{-30.0, -22.5, -15.0,  -7.5,   0.0,   7.5,  15.0,  22.5,  30.0}" \
	  lon= "{150.0, 157.5, 165.0, 172.5, 180.0, 187.5, 195.0, 202.5, 210.0}" 

Key Differences from fastrack
	The input and output data must be in DRMS data series rather than DSDS
	data sets.

	The target locations are calculated for the midpoint of the tracking
	interval, not the start.

	In order to support compression of the output FITS data cubes using the
	DRMS API, the cubes must be retained in memory until completion of all
	input, rather than having time slices appended as the input records are
	processed. This requires significant dynamic memory allocation for long
	time series of many large tracked cubes. The storage savings resulting
	from compression is in the range 33.1 — 37.4% for typical MDI Doppler
	dense-pack data cubes.

Testing
	The current version has been run successfully on a local workstation
	and on a cluster node with input from typical MDI level 1.8 full-disk
	Dynamics Doppler data (95.6% coverage) and up to 70 1664-step 128*128
	tracked cubes. Processing times:

	host	tspan	rgns	rgn-size	u	s	clock	cpu
	rick	1664	14	128*128      101.927   2.580	1:56.54	89.6%
	rick	1664	32	128*128      177.850   5.181	3:31.75	86.4%
	rick	1664	43	128*128      226.106   5.832	4:15.63	88.7%
	rick	1664	58	128*128      281.863   8.575	5:33.11	87.1%
	rick	1664	69	128*128      350.534  13.539	7:23.55	82.0%
	rick	1664	70	128*128      356.750  15.727	7:45.69 79.9%
	rick	 832	69	256*256      686.279  54.265   27:57.00 39.3%
	rick	1024	69	256*256      killed (?) after ~900 time steps
	rick	1664	71	128*128      failed

	n02	1664	14	128*128      104.467  13.530	6:54.57	28.7%
	n02	1664	32	128*128      191.674  16.440	3:47.78	91.3%
	n02	1664	58	128*128      289.861  21.951	5:43.47	90.7%
	n02	1664	67	128*128      334.980  24.281	6:45.76	88.5%
	n02	 768	69	256*256      555.284  29.954   10:38.87 91.6%
	n02	1024	69	256*256      seg fault
	n02	1664	71	128*128      failed

Bugs in current version
	The keyword unit for "Duration" in the output series is ignored, and
	assumed to be "sec"; there are probably a few other keywords for which
	there is a similar issue.
	
	With 71 output regions, fails in drms_record.c, line 3569:
	Assertion "(seriesname)" failed; this may be related to a DRMS
	problem, Ticket 176

	The linux_ia32 binary fails in the first call to drms_segment_read();
	this may be due to linking against a bad version of the cfitsio library.

	There is no checking for gaps in the input data set; it is assumed
	slotted with at least one record per timestep, including those without
	image data. This is especially a problem for the current mdi.fd_V_lev18
	data series, for which there are no records if there were no images in
	a given hour.

	There must be a segment named "V" (or "v", keywords are case insenitive)
	in the output data series; the module does not die gracefully if there
	isn't.

Valid HTML 4.01 Transitional HMI Ring Diagrams 2 Mar 2018, 17:37-0800