added to possibilty to use a parameter rather than a number in the phase Fourier block: now all what is needed. Elimated debug flag from the Makefiles

This commit is contained in:
nemu 2009-04-24 15:07:54 +00:00
parent f22ac96fe7
commit 8e4ee09aee
5 changed files with 15 additions and 6 deletions

View File

@ -34,7 +34,7 @@ endif
# -- Linux # -- Linux
ifeq ($(OS),LINUX) ifeq ($(OS),LINUX)
CXX = g++ CXX = g++
CXXFLAGS = -g -Wall -fPIC CXXFLAGS = -Wall -fPIC
PMUSRPATH = ./include PMUSRPATH = ./include
MNPATH = $(ROOTSYS)/include MNPATH = $(ROOTSYS)/include
INCLUDES = -I $(PMUSRPATH) -I $(MNPATH) INCLUDES = -I $(PMUSRPATH) -I $(MNPATH)

View File

@ -42,7 +42,7 @@ endif
# -- Linux # -- Linux
ifeq ($(OS),LINUX) ifeq ($(OS),LINUX)
CXX = g++ CXX = g++
CXXFLAGS = -g -O3 -Wall -Wno-trigraphs -fPIC CXXFLAGS = -O3 -Wall -Wno-trigraphs -fPIC
PMUSRPATH = ../include PMUSRPATH = ../include
MNPATH = $(ROOTSYS)/include MNPATH = $(ROOTSYS)/include
GSLPATH = /usr/include/gsl GSLPATH = /usr/include/gsl

View File

@ -35,7 +35,7 @@ endif
# -- Linux # -- Linux
ifeq ($(OS),LINUX) ifeq ($(OS),LINUX)
CXX = g++ CXX = g++
CXXFLAGS = -g -Wall -Wno-trigraphs -fPIC CXXFLAGS = -Wall -Wno-trigraphs -fPIC
INCLUDES = -I../include INCLUDES = -I../include
LD = g++ LD = g++
LDFLAGS = -g LDFLAGS = -g
@ -45,7 +45,7 @@ endif
# -- Darwin # -- Darwin
ifeq ($(OS),DARWIN) ifeq ($(OS),DARWIN)
CXX = g++ CXX = g++
CXXFLAGS = -g -Wall -Wno-trigraphs -fPIC CXXFLAGS = -Wall -Wno-trigraphs -fPIC
INCLUDES = -I../include INCLUDES = -I../include
LD = g++ LD = g++
LDFLAGS = -g LDFLAGS = -g

View File

@ -758,10 +758,15 @@ int PMsrHandler::WriteMsrLogFile(TString ext)
} }
// write 'phase' if present // write 'phase' if present
if (fFourier.fPhaseParamNo > 0) {
f << endl << "phase par" << fFourier.fPhaseParamNo;
CheckAndWriteComment(f, ++lineNo);
} else {
if (fFourier.fPhase != -999.0) { if (fFourier.fPhase != -999.0) {
f << endl << "phase " << fFourier.fPhase; f << endl << "phase " << fFourier.fPhase;
CheckAndWriteComment(f, ++lineNo); CheckAndWriteComment(f, ++lineNo);
} }
}
// write 'range_for_phase_correction' if present // write 'range_for_phase_correction' if present
if (fFourier.fRangeForPhaseCorrection[0] != -1.0) { if (fFourier.fRangeForPhaseCorrection[0] != -1.0) {
@ -1937,6 +1942,7 @@ void PMsrHandler::InitFourierParameterStructure(PMsrFourierStructure &fourier)
fourier.fFourierPower = -1; // zero padding, default: -1 = NOT GIVEN fourier.fFourierPower = -1; // zero padding, default: -1 = NOT GIVEN
fourier.fApodization = FOURIER_APOD_NOT_GIVEN; // apodization, default: NOT GIVEN fourier.fApodization = FOURIER_APOD_NOT_GIVEN; // apodization, default: NOT GIVEN
fourier.fPlotTag = FOURIER_PLOT_NOT_GIVEN; // initial plot tag, default: NOT GIVEN fourier.fPlotTag = FOURIER_PLOT_NOT_GIVEN; // initial plot tag, default: NOT GIVEN
fourier.fPhaseParamNo = 0; // initial parameter no = 0 means not a parameter
fourier.fPhase = -999.0; // fourier phase: -999 = NOT GIVEN fourier.fPhase = -999.0; // fourier phase: -999 = NOT GIVEN
for (unsigned int i=0; i<2; i++) { for (unsigned int i=0; i<2; i++) {
fourier.fRangeForPhaseCorrection[i] = -1.0; // frequency range for phase correction, default: {-1, -1} = NOT GIVEN fourier.fRangeForPhaseCorrection[i] = -1.0; // frequency range for phase correction, default: {-1, -1} = NOT GIVEN
@ -2095,6 +2101,8 @@ bool PMsrHandler::HandleFourierEntry(PMsrLines &lines)
error = true; error = true;
continue; continue;
} }
// keep the parameter number
fourier.fPhaseParamNo = no;
// get parameter value // get parameter value
fourier.fPhase = fParam[no-1].fValue; fourier.fPhase = fParam[no-1].fValue;
} else { } else {

View File

@ -289,6 +289,7 @@ typedef struct {
int fFourierPower; ///< i.e. zero padding up to 2^fFourierPower, default = 0 which means NO zero padding int fFourierPower; ///< i.e. zero padding up to 2^fFourierPower, default = 0 which means NO zero padding
int fApodization; ///< tag indicating the kind of apodization wished, 0=no appodization (default), 1=weak, 2=medium, 3=strong (for details see the docu) int fApodization; ///< tag indicating the kind of apodization wished, 0=no appodization (default), 1=weak, 2=medium, 3=strong (for details see the docu)
int fPlotTag; ///< tag used for initial plot. 0=real, 1=imaginary, 2=real & imaginary (default), 3=power, 4=phase int fPlotTag; ///< tag used for initial plot. 0=real, 1=imaginary, 2=real & imaginary (default), 3=power, 4=phase
int fPhaseParamNo; ///< parameter number if used instead of a phase value
double fPhase; ///< phase double fPhase; ///< phase
double fRangeForPhaseCorrection[2]; ///< field/frequency range for automatic phase correction double fRangeForPhaseCorrection[2]; ///< field/frequency range for automatic phase correction
double fPlotRange[2]; ///< field/frequency plot range double fPlotRange[2]; ///< field/frequency plot range