00001 /* 00002 * FileMapAndParameters.h 00003 * 00004 * Created on: May 12, 2010 00005 * Author: Brenda Javornik (e-mail: brendaj (at) nwra.com) 00006 */ 00007 00008 #ifndef FILEMAPANDPARAMETERS_H_ 00009 #define FILEMAPANDPARAMETERS_H_ 00010 00011 #include <stdio.h> 00012 #include "lambda.h" 00017 typedef struct { 00018 char *InputKernelFileName; 00019 char *InputMapFileName; 00020 } D1; 00021 00026 typedef struct { 00027 char *InputKernelBaseDirName; 00028 char *InputMapBaseDirName; 00029 char *InputMaskBaseDirName; 00030 char *AvgKernelIndices; 00031 int nKernelMapFiles; 00032 char **KernelFilenames; 00033 char **MapFilenames; 00034 char **MaskFilenames; 00035 } D3; 00036 00042 typedef struct { 00043 int nTargetFiles; 00044 char **TargetFilenames; 00045 } TargetInfo; 00050 typedef enum {RLS_INV, OLA_INV, LSQR_INV, FWD_CALC, CALCQ_CALC} CalculationType; 00051 00058 typedef struct { 00059 00060 D1 d1; 00061 D3 d3; 00062 00063 00064 CalculationType whichCalc; 00065 // modifiers to the calculation. Constrained modifies LSQR. 00066 // Crosstalk modifies OLA and LSQR 00067 bool constrained; 00068 bool spread; 00069 bool xt; 00070 bool noMaps; 00071 00072 // used for 3D problem 00073 char *outputBaseDirName; 00074 char *outputBaseDirNameOrig; 00075 char *InputICovarFileName; 00076 char *InputRegFileName; 00077 LambdaSet lambdaSet1; 00078 LambdaSet lambdaSet2; 00079 LambdaSet lambdaSet3; 00080 LambdaSet lambdaSet4; 00081 char *OptionalFile; 00082 TargetInfo targetInfo; 00083 char *InitialGuessFile; 00084 int scatterer; 00085 } InputParms; 00086 00087 int getInputFromFile(char *inputFilename, InputParms *iParms, bool copyInputFiles); 00088 00089 void freeInputParms(InputParms ip); 00090 00091 #endif /* FILEMAPANDPARAMETERS_H_ */