Mode Parameters (and Asymmetry) Deployment
Science Testing Document
Input
 static_leakage_matrix has 3 inputs at command line. One integer L such that the static part of the leakage matrix is computed for target modes in the degree range [0,L]. One integer d such that leaks are computed only for modes in lrange [Ld,L+d] and mrange [md,m+d] and the name of a fits file where to write into the staticleakagematrix coefficients.
Example of inputs : 15 3 /users/Mike/static_leakage_matrix.fits.
 leakage_matrix has 4 inputs at command line. 2 integers L and d as previously described, the name of a fits file containing staticleakagematrix coefficients as output by static_leakage_matrix and the name of a fits file where to write into the leakage matrix elements. Example of a fits file of staticleakagematrix coefficients for L=50 and d=10: static_leakage_50_10.fits.
 optimal_sph_coeff has 9 inputs at command line: 3 integers l,m and n which are target mode degree, azimuthal order and order, respectively, and L and d as previously described. 3 filenames for 3 files which will contain the filtered time series for the target, the target mode profile and the parameters, respectively
opt_sph_coeff requests also as inputs :
Optional inputs
 static_leakage_matrix, leakage_matrix and optimal_sph_coeff include a file of constants (constants.h).
#define L_MAX (20) /* highest degree */
#define DELTA_LM (10) /* width of the leakage ll' and mm'*/
#define PSF_WIDTH ((double) 0.0098) /* width of the gaussian PSF in radius unit*/
#define R_IN ((double) 0.83) /* Apodization between R_IN
and R_OUT */
#define R_OUT ((double) 0.87) /* in unit of radius */
#define N_GRID1 ((long) 1000) /* number of grid points for integration eqs.15,16 */
#define N_GRID2 ((long) 1000000) /* number of grid points for integration eqs.2224 */
#define T_LIM ((double) 0.2) /* upper limit for using Taylor expansion to compute Phi_M */
#define PI ((double) 3.141592654)
#define PRINT_RESULTS FALSE /* result printing flag*/
#define TEST_SUITE TRUE /* when compiled with AllTests.c */
Only L_MAX, DELTA_LM, PRINT_RESULTS and TEST_SUITE might be changed by the user.
Leakage matrix coefficients are then accordingly computed for target modes of degree l in the range 0L_MAX and azimuthal order m<=l
and for leakmodes of degree l' and aimuthal order m' satisfying ll'<=DELTA_LM and mm'<=DELTA_LM.
If PRINT_RESULTS is set to
true
the coefficients are printed out on the standard output.
Set TEST_SUITE to
true
when compiling with
CuTest for test purpose.
PSF_WIDTH, R_IN and R_OUT shall be fixed once given by HMI team. The constant T_LIM shall be fixed accordingly.
The current numbers are those of MDI.
N_GRID1 and N_GRID2 if changed affect the precision of the output and the computation time.
 optimal_sph_coeff includes in addition another file of constants (optimal_constants.h).
#define FRE_WIN (double)(10.0) /*+/FRE_WIN (in uHz) is frequency window around target
to clean for leakmodes */
#define NB_ROWS (long)(4) /* number of parameters in MDI table */
#define NB_COLS (long)(305065) /*number of modes in MDI table */
#define SVD_LIM (1.0e6) /* limit below which singular values are discarded*/
#define REGULARIZATION (0.0) /* parameter used for regularization
0 means no regularization*/
#define MDI_FILENAME "mdi_frequencies_with_m.fits"
#define LEAKAGE_MATRIX_FILENAME "Mlk.fits"
Compilation and Execution:
 gcc compilation:
 % gcc lm lcfitsio o static_leakage_matrix static_leakage_matrix.c
 % gcc lm lcfitsio o leakage_matrix leakage_matrix.c
 % gcc lm lcfitsio lgsl lgslcblas o optimal_sph_coeff optimal_sph_coeff.c
 commandline execution:
 % static_leakage_matrix L d output_filename
or
% static_leakage_matrix L d output_filename/overwrite
 % leakage_matrix L d input_filename output_filename
or
% leakage_matrix input L d input_filename output_filename/overwrite
 % optimal_sph_coeff l m n L d input_filename output_filename1 output_filename2 output_filename3
* AstroGrid workflow instructions:

 Open AstroGrid workbench and click "Task Launcher"
 Tasks: find application, specify variables as input, specify files as output, launch
 Task Launcher search: mode parameters or "Global Helioseismology Mode Parameters
 Input:
 Output:
 TargetModeParameters (file reference; MySpace .dat file: l1_m1_n20_parameters.dat)
Expected Output
 final output:
 output for static_leakage_matrix is a fits file containing the static leakage matrix coefficients as an array of size (L+1).(L+1)x(2d+1)x(2d+1).
Example of such a fits file for L=50 and d=10: static_leakage_50_10.fits.
/overwrite allows to overwrite the output file if it already exists.
 output for leakage_matrix is a fits file containing the leakage matrix coefficients as an array of size (L+1).(L+1)x(2d+1)x(2d+1).
Example of such a fits file for L=50 and d=10: http://msslxx.mssl.ucl.ac.uk:8080/eSDO/algorithms/ModeParameters/leakage_matrix_50_10.fits">leakage_matrix_50_10.fits".
/overwrite allows to overwrite the output if it already exists.
 outputs for optimal_sph_coeff are:

 limitations of algorithm: Currently the algorithm is li,ited to degrees up to l=10
Unit Testing
Classes with unit tests:
 leakage_matrix.c (contains currently 105 tests).
 optimal_sph_coeff.c (contains currently 76 tests).
 static_leakage_matrix.c (contains currently 48 tests).
Science Test Cases
Case 1: Optimal time series for a target
a. Target l=1 m=1 n=20
Description
The aim of this science test is to produce a time series of 2 years with a sampling of 60sec. which is optimal for a given target mode.
Optimal means that modes adjacent (leakmodes) to the target are filtered out in a frequency window of +/ FRE_WIN as provided into the optimal_constant.h header file.
The target mode is a lowdegree mode l=1, m=1, n=20 located around 2963 uHz.
The timeseries is produced using existing MDI (SHT) time series. The timeseries are combined using weights coefficients provided by
optimal_sph_coeff
Input
The inputs used to make the timeseries are :
Output
The output is the file
l1_m1_n20_timeseries.fits
containing a string of data which is a timeseries of 2 years with a sampling of 60sec and optimized for the target .
b. Target l=10 m=0 n=15
Description
The aim of this science test is to produce a time series of 2 years with a sampling of 60sec. which is optimal for a given target mode.
Optimal means that modes adjacent (leakmodes) to the target are filtered out in a frequency window of +/ FRE_WIN as provided into the optimal_constant.h header file.
The target mode is a lowdegree mode l=10, m=0, n=15 located around 2716 uHz.
The timeseries is produced using existing MDI (SHT) time series. The timeseries are combined using weights coefficients provided by
optimal_sph_coeff
Input
The inputs used to make the timeseries are :
Output
The output is the file
l10_m0_n15_timeseries.fits
containing a string of data which is a timeseries of 2 years with a sampling of 60sec and optimized for the target .
Case 2: Optimal power spectrum for a target
a. Target l=1 m=1 n=20
Description
The aim of this science test is to produce a power spectrum which is optimal for the given target mode.
Optimal means that modes adjacent (leakmodes) to the target are filtered out in a frequency window of +/ FRE_WIN as provided into the optimal_constant.h header file.
The target mode is the lowdegree mode l=1, m=1, n=20 located around 2963 uHz.
The power spectrum is produced using the optimal timeseries of the Case 1.
Input
The input is the optimized timeseries for the target :
l1_m1_n20_timeseries.fits
Output
The output is a file containing the profile of the target in the power spectrum
l1_m1_n20_profile.dat.
It contains 2 columns : the left one is for the frequency and the right is the mode power.
b. Target l=10 m=0 n=15
Description
The aim of this science test is to produce a power spectrum which is optimal for the given target mode.
Optimal means that modes adjacent (leakmodes) to the target are filtered out in a frequency window of +/ FRE_WIN as provided into the optimal_constant.h header file.
The target mode is the lowdegree mode l=10, m=0, n=15 located around 2716uHz.
The power spectrum is produced using the optimal timeseries of the Case 1.
Input
The input is the optimized timeseries for the target :
l10_m0_n15_timeseries.fits
Output
The output is a file containing the profile of the target in the power spectrum
l10_m0_n15_profile.dat.
It contains 2 columns : the left one is for the frequency and the right is the mode power.
Case 3: Mode parameters for a target
Target l=1 m=1 n=20
Description
The aim of this science case is to extract the parameters of the target mode : its frequency, amplitude, linewidth
and background nioise by fitting the mode profile
l1_m1_n20_profile.dat
with a method of likelihood maximization. The current model is that of an asymmetrical Lorentzian profile.
Input
The input is the profile of the target mode in the power spectrum
l1_m1_n20_profile.dat
Expected Output
the output is file containing the mode parameters with the correspondings error bars
l1_m1_n20_parameters.dat of
optimal_sph_coeff
which prints out the results of the fitting.
Target l=10 m=0 n=15
Description
The aim of this science case is to extract the parameters of the target mode : its frequency, amplitude, linewidth
and background nioise by fitting the mode profile
l10_m0_n15_profile.dat
with a method of likelihood maximization. The current model is that of a Lorentzian profile.
Input
The input is the profile of the target mode in the power spectrum
l10_m0_n15_profile.dat
Expected Output
the output is file containing the mode parameters with the correspondings error bars
l10_m0_n15_parameters.dat of
optimal_sph_coeff
which prints out the results of the fitting.
NOTE: All .fits files have been moved from the attachments table to http://msslxx.mssl.ucl.ac.uk:8080/eSDO/algorithms/ModeParameters/ModeParameters.html.
 ElizabethAuden  04 Aug 2006