Commit 8742f1f672a409342aa820c8af65b7218a800102

Authored by Benjamin Renard
2 parents 13848960 65bb1ab7
Exists in cu2022

Merge branch 'amdadev' into cu2022

config/kernel/log4cxx.config
... ... @@ -4,5 +4,4 @@ log4j.appender.stdout=org.apache.log4j.ConsoleAppender
4 4 log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
5 5  
6 6 # Pattern to output the caller's file name and line number.
7   -log4j.appender.stdout.layout.ConversionPattern=%X{PID} %r %5p [%t] (%r ms) (%F:%L) - %m%n
8   -
  7 +log4j.appender.stdout.layout.ConversionPattern=%X{PID} %r %5p [%t] (%r ms) (%F:%L) - %m%n
9 8 \ No newline at end of file
... ...
config/kernel/plugins.xml deleted
... ... @@ -1,2 +0,0 @@
1   -<?xml version="1.0" encoding="UTF-8"?>
2   -<plugins xml:id="plugins"><requestProcess type="paramGet" name="CONSTANT"><plugin>/home/hacene/amda/AMDA_Kernel/build/Release/plugin//libConstantInterface.so</plugin></requestProcess><requestProcess type="paramGet" name="DDBASE"><plugin>/home/hacene/amda/AMDA_Kernel/build/Release/plugin//libDDServerInterface.so</plugin></requestProcess><requestProcess type="paramGet" name="LOCALFILE"><plugin>/home/hacene/amda/AMDA_Kernel/build/Release/plugin//libLocalFileInterface.so</plugin></requestProcess><requestProcess type="paramOutputs" name="dataMining"><plugin>/home/hacene/amda/AMDA_Kernel/build/Release/plugin//libParamOutputDataMiningImpl.so</plugin></requestProcess><requestProcess type="paramOutputs" name="download"><plugin>/home/hacene/amda/AMDA_Kernel/build/Release/plugin//libParamOutputImpl.so</plugin></requestProcess><requestProcess type="paramOutputs" name="intervalTrue"><plugin>/home/hacene/amda/AMDA_Kernel/build/Release/plugin//libParamOutputIntervalTrueImpl.so</plugin></requestProcess><requestProcess type="paramOutputs" name="plot"><plugin>/home/hacene/amda/AMDA_Kernel/build/Release/plugin//libPlot.so</plugin></requestProcess><requestProcess type="paramOutputs" name="statistic"><plugin>/home/hacene/amda/AMDA_Kernel/build/Release/plugin//libParamOutputStatisticImpl.so</plugin></requestProcess><requestProcess type="process" name="GSE2GSM"><plugin>/home/hacene/amda/AMDA_Kernel/build/Release/plugin//libFramesTransformation.so</plugin></requestProcess><requestProcess type="process" name="GSM2GSE"><plugin>/home/hacene/amda/AMDA_Kernel/build/Release/plugin//libFramesTransformation.so</plugin></requestProcess><requestProcess type="process" name="attitude_gse"><plugin>/home/hacene/amda/AMDA_Kernel/build/Release/plugin//libtsyganenko96.so</plugin></requestProcess><requestProcess type="process" name="attitude_gsm"><plugin>/home/hacene/amda/AMDA_Kernel/build/Release/plugin//libtsyganenko96.so</plugin></requestProcess><requestProcess type="process" name="bcain"><plugin>/home/hacene/amda/AMDA_Kernel/build/Release/plugin//libCain_2003Process.so</plugin></requestProcess><requestProcess type="process" name="bowshock"><plugin>/home/hacene/amda/AMDA_Kernel/build/Release/plugin//libPlot_Curves.so</plugin></requestProcess><requestProcess type="process" name="bowshock_farris"><plugin>/home/hacene/amda/AMDA_Kernel/build/Release/plugin//libPlot_Curves.so</plugin></requestProcess><requestProcess type="process" name="boxcar"><plugin>/home/hacene/amda/AMDA_Kernel/build/Release/plugin//libBoxcar.so</plugin></requestProcess><requestProcess type="process" name="circle"><plugin>/home/hacene/amda/AMDA_Kernel/build/Release/plugin//libPlot_Curves.so</plugin></requestProcess><requestProcess type="process" name="covariance"><plugin>/home/hacene/amda/AMDA_Kernel/build/Release/plugin//libStatisticFunctions.so</plugin></requestProcess><requestProcess type="process" name="deriv"><plugin>/home/hacene/amda/AMDA_Kernel/build/Release/plugin//libDeriv.so</plugin></requestProcess><requestProcess type="process" name="energy_bounds"><plugin>/home/hacene/amda/AMDA_Kernel/build/Release/plugin//libEnergy_Bounds.so</plugin></requestProcess><requestProcess type="process" name="filter"><plugin>/home/hacene/amda/AMDA_Kernel/build/Release/plugin//libdataFiltring.so</plugin></requestProcess><requestProcess type="process" name="framesTransformation"><plugin>/home/hacene/amda/AMDA_Kernel/build/Release/plugin//libFramesTransformation.so</plugin></requestProcess><requestProcess type="process" name="getClbInfo"><plugin>/home/hacene/amda/AMDA_Kernel/build/Release/plugin//libGetClbInfo.so</plugin></requestProcess><requestProcess type="process" name="getClbInfoByIndex"><plugin>/home/hacene/amda/AMDA_Kernel/build/Release/plugin//libGetClbInfoByIndex.so</plugin></requestProcess><requestProcess type="process" name="getJunoJediUpperEnergy"><plugin>/home/hacene/amda/AMDA_Kernel/build/Release/plugin//libGetJunoJediEnergy.so</plugin></requestProcess><requestProcess type="process" name="getMavenStaticEnergy"><plugin>/home/hacene/amda/AMDA_Kernel/build/Release/plugin//libGetMavenStaticEnergy.so</plugin></requestProcess><requestProcess type="process" name="internalfield_cart"><plugin>/home/hacene/amda/AMDA_Kernel/build/Release/plugin//libinternalfieldProcess.so</plugin></requestProcess><requestProcess type="process" name="internalfield_mag"><plugin>/home/hacene/amda/AMDA_Kernel/build/Release/plugin//libinternalfieldProcess.so</plugin></requestProcess><requestProcess type="process" name="internalfield_pol"><plugin>/home/hacene/amda/AMDA_Kernel/build/Release/plugin//libinternalfieldProcess.so</plugin></requestProcess><requestProcess type="process" name="jupiter_JRM09_CAN81_bcart"><plugin>/home/hacene/amda/AMDA_Kernel/build/Release/plugin//libJupeter_JRM09_CAN_81Process.so</plugin></requestProcess><requestProcess type="process" name="jupiter_JRM09_CAN81_bmag"><plugin>/home/hacene/amda/AMDA_Kernel/build/Release/plugin//libJupeter_JRM09_CAN_81Process.so</plugin></requestProcess><requestProcess type="process" name="jupiter_JRM09_CAN81_bsphr"><plugin>/home/hacene/amda/AMDA_Kernel/build/Release/plugin//libJupeter_JRM09_CAN_81Process.so</plugin></requestProcess><requestProcess type="process" name="jupiter_bowshock_high"><plugin>/home/hacene/amda/AMDA_Kernel/build/Release/plugin//libPlot_Curves.so</plugin></requestProcess><requestProcess type="process" name="jupiter_bowshock_low"><plugin>/home/hacene/amda/AMDA_Kernel/build/Release/plugin//libPlot_Curves.so</plugin></requestProcess><requestProcess type="process" name="jupiter_magnetopause_high"><plugin>/home/hacene/amda/AMDA_Kernel/build/Release/plugin//libPlot_Curves.so</plugin></requestProcess><requestProcess type="process" name="jupiter_magnetopause_low"><plugin>/home/hacene/amda/AMDA_Kernel/build/Release/plugin//libPlot_Curves.so</plugin></requestProcess><requestProcess type="process" name="kendall"><plugin>/home/hacene/amda/AMDA_Kernel/build/Release/plugin//libStatisticFunctions.so</plugin></requestProcess><requestProcess type="process" name="maglib_invlat"><plugin>/home/hacene/amda/AMDA_Kernel/build/Release/plugin//libmaglibProcess.so</plugin></requestProcess><requestProcess type="process" name="maglib_lparam"><plugin>/home/hacene/amda/AMDA_Kernel/build/Release/plugin//libmaglibProcess.so</plugin></requestProcess><requestProcess type="process" name="maglib_mlt"><plugin>/home/hacene/amda/AMDA_Kernel/build/Release/plugin//libmaglibProcess.so</plugin></requestProcess><requestProcess type="process" name="magnetopause_shue"><plugin>/home/hacene/amda/AMDA_Kernel/build/Release/plugin//libPlot_Curves.so</plugin></requestProcess><requestProcess type="process" name="mars_bowshock"><plugin>/home/hacene/amda/AMDA_Kernel/build/Release/plugin//libPlot_Curves.so</plugin></requestProcess><requestProcess type="process" name="mars_bowshock_hall"><plugin>/home/hacene/amda/AMDA_Kernel/build/Release/plugin//libPlot_Curves.so</plugin></requestProcess><requestProcess type="process" name="mars_magnetopause"><plugin>/home/hacene/amda/AMDA_Kernel/build/Release/plugin//libPlot_Curves.so</plugin></requestProcess><requestProcess type="process" name="max"><plugin>/home/hacene/amda/AMDA_Kernel/build/Release/plugin//libStatisticFunctions.so</plugin></requestProcess><requestProcess type="process" name="max_sm"><plugin>/home/hacene/amda/AMDA_Kernel/build/Release/plugin//libStatisticFunctions.so</plugin></requestProcess><requestProcess type="process" name="median"><plugin>/home/hacene/amda/AMDA_Kernel/build/Release/plugin//libStatisticFunctions.so</plugin></requestProcess><requestProcess type="process" name="mercury_bowshock"><plugin>/home/hacene/amda/AMDA_Kernel/build/Release/plugin//libPlot_Curves.so</plugin></requestProcess><requestProcess type="process" name="mercury_magnetopause"><plugin>/home/hacene/amda/AMDA_Kernel/build/Release/plugin//libPlot_Curves.so</plugin></requestProcess><requestProcess type="process" name="merge"><plugin>/home/hacene/amda/AMDA_Kernel/build/Release/plugin//libMerge.so</plugin></requestProcess><requestProcess type="process" name="mex_els_decode"><plugin>/home/hacene/amda/AMDA_Kernel/build/Release/plugin//libmexvex_els_decode.so</plugin></requestProcess><requestProcess type="process" name="min"><plugin>/home/hacene/amda/AMDA_Kernel/build/Release/plugin//libStatisticFunctions.so</plugin></requestProcess><requestProcess type="process" name="min_sm"><plugin>/home/hacene/amda/AMDA_Kernel/build/Release/plugin//libStatisticFunctions.so</plugin></requestProcess><requestProcess type="process" name="morschhauser_bfield"><plugin>/home/hacene/amda/AMDA_Kernel/build/Release/plugin//libMorschhauserProcess.so</plugin></requestProcess><requestProcess type="process" name="morschhauser_bmag"><plugin>/home/hacene/amda/AMDA_Kernel/build/Release/plugin//libMorschhauserProcess.so</plugin></requestProcess><requestProcess type="process" name="pearson"><plugin>/home/hacene/amda/AMDA_Kernel/build/Release/plugin//libStatisticFunctions.so</plugin></requestProcess><requestProcess type="process" name="rms"><plugin>/home/hacene/amda/AMDA_Kernel/build/Release/plugin//libStatisticFunctions.so</plugin></requestProcess><requestProcess type="process" name="rms_sm"><plugin>/home/hacene/amda/AMDA_Kernel/build/Release/plugin//libStatisticFunctions.so</plugin></requestProcess><requestProcess type="process" name="sampling_classic"><plugin>/home/hacene/amda/AMDA_Kernel/build/Release/plugin//libInternLib.so</plugin></requestProcess><requestProcess type="process" name="sampling_under_refparam"><plugin>/home/hacene/amda/AMDA_Kernel/build/Release/plugin//libInternLib.so</plugin></requestProcess><requestProcess type="process" name="saturn_bowshock_went"><plugin>/home/hacene/amda/AMDA_Kernel/build/Release/plugin//libPlot_Curves.so</plugin></requestProcess><requestProcess type="process" name="saturn_magnetopause"><plugin>/home/hacene/amda/AMDA_Kernel/build/Release/plugin//libPlot_Curves.so</plugin></requestProcess><requestProcess type="process" name="shue"><plugin>/home/hacene/amda/AMDA_Kernel/build/Release/plugin//libshue.so</plugin></requestProcess><requestProcess type="process" name="skew"><plugin>/home/hacene/amda/AMDA_Kernel/build/Release/plugin//libStatisticFunctions.so</plugin></requestProcess><requestProcess type="process" name="skew_sm"><plugin>/home/hacene/amda/AMDA_Kernel/build/Release/plugin//libStatisticFunctions.so</plugin></requestProcess><requestProcess type="process" name="sliding_average"><plugin>/home/hacene/amda/AMDA_Kernel/build/Release/plugin//libSlidingAverage.so</plugin></requestProcess><requestProcess type="process" name="spearman"><plugin>/home/hacene/amda/AMDA_Kernel/build/Release/plugin//libStatisticFunctions.so</plugin></requestProcess><requestProcess type="process" name="spectrum"><plugin>/home/hacene/amda/AMDA_Kernel/build/Release/plugin//libspectrum.so</plugin></requestProcess><requestProcess type="process" name="standard"><plugin>/home/hacene/amda/AMDA_Kernel/build/Release/plugin//libInternLib.so</plugin></requestProcess><requestProcess type="process" name="sum_into_table_indexes"><plugin>/home/hacene/amda/AMDA_Kernel/build/Release/plugin//libsum_into_table_indexes.so</plugin></requestProcess><requestProcess type="process" name="sum_into_table_range"><plugin>/home/hacene/amda/AMDA_Kernel/build/Release/plugin//libsum_into_table_range.so</plugin></requestProcess><requestProcess type="process" name="tilt_angle"><plugin>/home/hacene/amda/AMDA_Kernel/build/Release/plugin//libtsyganenko96.so</plugin></requestProcess><requestProcess type="process" name="timeShift"><plugin>/home/hacene/amda/AMDA_Kernel/build/Release/plugin//libTime_Shifted.so</plugin></requestProcess><requestProcess type="process" name="tsyganenko_96"><plugin>/home/hacene/amda/AMDA_Kernel/build/Release/plugin//libtsyganenko96.so</plugin></requestProcess><requestProcess type="process" name="tsyganenko_96_gse"><plugin>/home/hacene/amda/AMDA_Kernel/build/Release/plugin//libtsyganenko96.so</plugin></requestProcess><requestProcess type="process" name="ttcat_to_param"><plugin>/home/hacene/amda/AMDA_Kernel/build/Release/plugin//libTTCatToParam.so</plugin></requestProcess><requestProcess type="process" name="var"><plugin>/home/hacene/amda/AMDA_Kernel/build/Release/plugin//libStatisticFunctions.so</plugin></requestProcess><requestProcess type="process" name="var_sm"><plugin>/home/hacene/amda/AMDA_Kernel/build/Release/plugin//libStatisticFunctions.so</plugin></requestProcess><requestProcess type="process" name="venus_bowshock"><plugin>/home/hacene/amda/AMDA_Kernel/build/Release/plugin//libPlot_Curves.so</plugin></requestProcess><requestProcess type="process" name="venus_magnetopause"><plugin>/home/hacene/amda/AMDA_Kernel/build/Release/plugin//libPlot_Curves.so</plugin></requestProcess><requestProcess type="process" name="vex_els_decode"><plugin>/home/hacene/amda/AMDA_Kernel/build/Release/plugin//libmexvex_els_decode.so</plugin></requestProcess><requestProcess type="statisticProcess" name="RMS"><plugin>/home/hacene/amda/AMDA_Kernel/build/Release/plugin//libStatisticProcesses.so</plugin></requestProcess><requestProcess type="statisticProcess" name="count"><plugin>/home/hacene/amda/AMDA_Kernel/build/Release/plugin//libStatisticProcesses.so</plugin></requestProcess><requestProcess type="statisticProcess" name="countNotNan"><plugin>/home/hacene/amda/AMDA_Kernel/build/Release/plugin//libStatisticProcesses.so</plugin></requestProcess><requestProcess type="statisticProcess" name="countTrue"><plugin>/home/hacene/amda/AMDA_Kernel/build/Release/plugin//libStatisticProcesses.so</plugin></requestProcess><requestProcess type="statisticProcess" name="firstValue"><plugin>/home/hacene/amda/AMDA_Kernel/build/Release/plugin//libStatisticProcesses.so</plugin></requestProcess><requestProcess type="statisticProcess" name="kurtosis"><plugin>/home/hacene/amda/AMDA_Kernel/build/Release/plugin//libStatisticProcesses.so</plugin></requestProcess><requestProcess type="statisticProcess" name="lastValue"><plugin>/home/hacene/amda/AMDA_Kernel/build/Release/plugin//libStatisticProcesses.so</plugin></requestProcess><requestProcess type="statisticProcess" name="max"><plugin>/home/hacene/amda/AMDA_Kernel/build/Release/plugin//libStatisticProcesses.so</plugin></requestProcess><requestProcess type="statisticProcess" name="mean"><plugin>/home/hacene/amda/AMDA_Kernel/build/Release/plugin//libStatisticProcesses.so</plugin></requestProcess><requestProcess type="statisticProcess" name="median"><plugin>/home/hacene/amda/AMDA_Kernel/build/Release/plugin//libStatisticProcesses.so</plugin></requestProcess><requestProcess type="statisticProcess" name="middleIntervalValue"><plugin>/home/hacene/amda/AMDA_Kernel/build/Release/plugin//libStatisticProcesses.so</plugin></requestProcess><requestProcess type="statisticProcess" name="min"><plugin>/home/hacene/amda/AMDA_Kernel/build/Release/plugin//libStatisticProcesses.so</plugin></requestProcess><requestProcess type="statisticProcess" name="minvar"><plugin>/home/hacene/amda/AMDA_Kernel/build/Release/plugin//libStatisticProcesses.so</plugin></requestProcess><requestProcess type="statisticProcess" name="skewness"><plugin>/home/hacene/amda/AMDA_Kernel/build/Release/plugin//libStatisticProcesses.so</plugin></requestProcess><requestProcess type="statisticProcess" name="variance"><plugin>/home/hacene/amda/AMDA_Kernel/build/Release/plugin//libStatisticProcesses.so</plugin></requestProcess></plugins>
src/InputOutput/IHMImpl/Params/PlotImpl/IHMInputOutputParamsPlotClass.php
... ... @@ -406,7 +406,7 @@ class IHMInputOutputParamsPlotClass extends IHMInputOutputParamsAbstractClass
406 406 $plotNode->setType($panelData->{RequestOutPutPlotElementPlotFunctionNodeClass::PLOT_FUNCTION_TYPE});
407 407 $plotNode->setScaleAbscisse($panelData->{RequestOutPutPlotElementPlotFunctionNodeClass::PLOT_FUNCTION_SCALE_ABSCISSE});
408 408 $plotNode->setScaleOrdonnee($panelData->{RequestOutPutPlotElementPlotFunctionNodeClass::PLOT_FUNCTION_SCALE_ORDONNEE});
409   - $plotNode->setParamsNbPoints($panelData->{RequestOutPutPlotElementPlotFunctionNodeClass::PLOT_FUNCTION_PARAMS_NB_POINTS});
  409 + //$plotNode->setParamsNbPoints($panelData->{RequestOutPutPlotElementPlotFunctionNodeClass::PLOT_FUNCTION_PARAMS_NB_POINTS});
410 410 break;
411 411 default:
412 412 throw new Exception('Plot type not implemented.');
... ... @@ -1920,11 +1920,131 @@ class IHMInputOutputParamsPlotClass extends IHMInputOutputParamsAbstractClass
1920 1920  
1921 1921 $panel->{RequestOutPutPlotElementPlotFunctionNodeClass::PLOT_FUNCTION_ABSCISSE} = $input->abscisse;
1922 1922 $panel->{RequestOutPutPlotElementPlotFunctionNodeClass::PLOT_FUNCTION_TYPE} = $input->type;
1923   - $panel->{RequestOutPutPlotElementPlotFunctionNodeClass::PLOT_FUNCTION_SCALE_ABSCISSE} = $input->scale_abscisse;
1924   - $panel->{RequestOutPutPlotElementPlotFunctionNodeClass::PLOT_FUNCTION_SCALE_ORDONNEE} = $input->scale_ordonnee;
1925   - $panel->{RequestOutPutPlotElementPlotFunctionNodeClass::PLOT_FUNCTION_PARAMS_NB_POINTS} = $input->param_nb_points;
  1923 + $scale_abscisse = $input->scale_abscisse;
  1924 + $scale_ordonnee = $input->scale_ordonnee;
1926 1925 $panel->{'panel-plot-type'} = RequestOutPutPlotElementPlotFunctionNodeClass::REQUESTOUTPUTPLOTELEMENT_PLOTFUNCTION_NAME;
  1926 +
  1927 + /**
  1928 + * @var object $crtParam
  1929 + */
  1930 + $crtParam = NULL;
  1931 + $isSpectro = false;
  1932 + //Find serie/spectra parameter
  1933 + foreach ($panel->{'params'} as $param) {
  1934 + if ($param->{'param-drawing-type'} == 'spectro') {
  1935 + $crtParam = $param;
  1936 + $isSpectro = true;
  1937 + break;
  1938 + }
  1939 + if ($param->{'param-drawing-type'} == 'serie') {
  1940 + $crtParam = $param;
  1941 + break;
  1942 + }
  1943 + }
  1944 +
  1945 + if ($isSpectro && RequestOutPutPlotElementPlotFunctionNodeClass::isFourier($input->type))
  1946 + throw new Exception('Cannot apply FFT/DFT on Spectro.');
  1947 +
  1948 + if (!$crtParam)
  1949 + throw new Exception('Cannot retrieve panel parameters for Plot function.');
  1950 +
  1951 + //Find X-axis
  1952 + $crtXAxis = NULL;
  1953 + foreach ($panel->{'axes'} as $axis) {
  1954 + if ("time" == $axis->{'id'}) {
  1955 + $crtXAxis = $axis;
  1956 + break;
  1957 + }
  1958 + }
  1959 +
  1960 + //Find Y-axis
  1961 + $crtYAxis = NULL;
  1962 + foreach ($panel->{'axes'} as $axis) {
  1963 + if ($crtParam->{'param-drawing-object'}->{'spectro-yaxis'} == $axis->{'id'}) {
  1964 + $crtYAxis = $axis;
  1965 + break;
  1966 + }
  1967 +
  1968 + if ($crtParam->{'param-drawing-object'}->{'serie-yaxis'} == $axis->{'id'}) {
  1969 + $crtYAxis = $axis;
  1970 + break;
  1971 + }
  1972 + }
  1973 +
  1974 + if (!$crtYAxis)
  1975 + throw new Exception('Cannot retrieve y Axis for Plot Function.');
  1976 +
  1977 + //Find color Z-axis
  1978 + $crtColorAxis = NULL;
  1979 + foreach ($panel->{'axes'} as $axis) {
  1980 + if ($axis->{'id'} == 'color') {
  1981 + $crtColorAxis = $axis;
  1982 + break;
  1983 + }
  1984 + }
  1985 +
  1986 + if ($isSpectro && !$crtColorAxis)
  1987 + throw new Exception('Cannot retrieve color Axis for Plot function.');
  1988 +
1927 1989 $panel->{"axes"} = [];
  1990 + /**
  1991 + * @var object $plotFctXAxisDigital, digital x axis for plot function, used for spectro and Fourier
  1992 + */
  1993 + $plotFctXAxisDigital = NULL;
  1994 + /**
  1995 + * @var object $plotFctXAxisTime, this axis is used only for Series
  1996 + */
  1997 + $plotFctXAxisTime = clone ($crtXAxis);
  1998 + $plotFctXAxisTime->{"id"} = RequestOutPutPlotElementPlotFunctionNodeClass::PLOT_FUNCTION_TIMEAXIS_ID;
  1999 + /**
  2000 + * @var object $plotFctYAxis, y axis for plot fucntion
  2001 + */
  2002 + $plotFctYAxis = clone ($crtYAxis);
  2003 +
  2004 + if ($isSpectro) {
  2005 + $plotFctXAxisDigital = clone ($crtYAxis);
  2006 + $plotFctXAxisDigital->{"id"} = RequestOutPutPlotElementPlotFunctionNodeClass::PLOT_FUNCTION_DIGITALAXIS_ID;
  2007 + $plotFctXAxisDigital->{"axis-type"} = "x";
  2008 + if (RequestOutPutPlotElementPlotFunctionNodeClass::isFourier($input->type))
  2009 + $plotFctXAxisDigital->{'axis-legend-text'} = RequestOutPutPlotElementPlotFunctionNodeClass::getTextLegend($input->abscisse);
  2010 +
  2011 + $plotFctYAxis = clone ($crtColorAxis);
  2012 + $plotFctYAxis->{"id"} = RequestOutPutPlotElementPlotFunctionNodeClass::PLOT_FUNCTION_YAXIS_ID;
  2013 + $plotFctYAxis->{"axis-type"} = RequestOutPutPlotElementPlotFunctionNodeClass::PLOT_FUNCTION_YAXIS_ID;
  2014 +
  2015 + $panel->{"axes"}[] = $plotFctXAxisDigital;
  2016 + $panel->{"axes"}[] = $plotFctYAxis;
  2017 + $panel->{"axes"}[] = $plotFctXAxisTime;
  2018 + } else {
  2019 + $panel->{"axes"}[] = $plotFctXAxisTime;
  2020 + $panel->{"axes"}[] = $plotFctYAxis;
  2021 + if (RequestOutPutPlotElementPlotFunctionNodeClass::isFourier($input->type)) {
  2022 + $plotFctXAxisDigital = clone ($crtXAxis);
  2023 + $plotFctXAxisDigital->{"id"} = RequestOutPutPlotElementPlotFunctionNodeClass::PLOT_FUNCTION_DIGITALAXIS_ID;
  2024 + $plotFctXAxisDigital->{"axis-type"} = "x";
  2025 + $plotFctXAxisDigital->{'axis-legend-text'} = RequestOutPutPlotElementPlotFunctionNodeClass::getTextLegend($input->abscisse);
  2026 + $plotFctYAxis->{'axis-legend-text'} = "";
  2027 + $panel->{"axes"}[] = $plotFctXAxisDigital;
  2028 + }
  2029 + }
  2030 +
  2031 + /**
  2032 + * In this block, I will update the axis scale depending on the user choice hosted in thess variables $scale_abscisse and scale_ordonnee.
  2033 + * If 'Inherites' is selected then the scale of axis of the current time plot are used.
  2034 + */
  2035 + if ($scale_abscisse == RequestOutPutPlotElementPlotFunctionNodeClass::PLOT_FUNCTION_IHERITS)
  2036 + $scale_abscisse = $plotFctXAxisDigital->{"axis-scale"};
  2037 + else
  2038 + $plotFctXAxisDigital->{"axis-scale"} = $scale_abscisse;
  2039 +
  2040 + if ($scale_ordonnee == RequestOutPutPlotElementPlotFunctionNodeClass::PLOT_FUNCTION_IHERITS)
  2041 + $scale_ordonnee = $plotFctYAxis->{"axis-scale"};
  2042 + else
  2043 + $plotFctYAxis->{"axis-scale"} = $scale_ordonnee;
  2044 +
  2045 + $panel->{RequestOutPutPlotElementPlotFunctionNodeClass::PLOT_FUNCTION_SCALE_ABSCISSE} = $scale_abscisse;
  2046 + $panel->{RequestOutPutPlotElementPlotFunctionNodeClass::PLOT_FUNCTION_SCALE_ORDONNEE} = $scale_ordonnee;
  2047 +
1928 2048 break;
1929 2049 } else {
1930 2050 throw new Exception('Cannot retrieve plot panel for Plot Function.');
... ...
src/Request/ParamsRequestImpl/Nodes/Requests/RequestOutPutPlotElementPlotFunctionNodeClass.php
... ... @@ -11,6 +11,14 @@ class RequestOutPutPlotElementPlotFunctionNodeClass extends RequestOutputPlotEle
11 11 const PLOT_FUNCTION_SCALE_ORDONNEE = "scale_ordonnee";
12 12 const PLOT_FUNCTION_PARAMS_NB_POINTS = "param_nb_points";
13 13 const PLOT_FUNCTION_TYPE = "type";
  14 + const PLOT_FUNCTION_TIMEAXIS_ID = "xaxis_id1";
  15 + const PLOT_FUNCTION_YAXIS_ID = "y-left";
  16 + const PLOT_FUNCTION_DIGITALAXIS_ID = "xaxis_id";
  17 + const PLOT_FUNCTION_FFT = "FFT";
  18 + const PLOT_FUNCTION_DFT = "DFT";
  19 + const PLOT_FUNCTION_IHERITS = "Inherits";
  20 + const PLOT_FUNCTION_FREQUNECY = "Frequency";
  21 + const PLOT_FUNCTION_PERIOD = "Period";
14 22  
15 23 public function __construct()
16 24 {
... ... @@ -21,6 +29,30 @@ class RequestOutPutPlotElementPlotFunctionNodeClass extends RequestOutputPlotEle
21 29 $this->getAxes()->getColorAxis();
22 30 }
23 31  
  32 + public function getTimeAxis()
  33 + {
  34 + $timeAxis = $this->getAxes()->getTimeAxis();
  35 + $timeAxis->setId(RequestOutPutPlotElementPlotFunctionNodeClass::PLOT_FUNCTION_TIMEAXIS_ID);
  36 + return $timeAxis;
  37 + }
  38 +
  39 + /**
  40 + * Check if the function to apply is Fourier
  41 + */
  42 + public static function isFourier($value)
  43 + {
  44 + return $value == RequestOutPutPlotElementPlotFunctionNodeClass::PLOT_FUNCTION_FFT
  45 + || $value == RequestOutPutPlotElementPlotFunctionNodeClass::PLOT_FUNCTION_DFT;
  46 + }
  47 +
  48 + /**
  49 + * Get a label to assoiciated with getAbscisse type when using Fourier
  50 + */
  51 + public static function getTextLegend($abscisse)
  52 + {
  53 + return $abscisse === RequestOutPutPlotElementPlotFunctionNodeClass::PLOT_FUNCTION_FREQUNECY ? "Freq, Hz" : "Period, S";
  54 + }
  55 +
24 56 public function getXAxis()
25 57 {
26 58 return $this->getAxes()->getDigitalAxis(RequestOutputPlotAxisTypeEnum::XAXIS, REQUESTOUTPUTPLOTELEMENTXY_XAXISID);
... ... @@ -110,19 +142,19 @@ class RequestOutPutPlotElementPlotFunctionNodeClass extends RequestOutputPlotEle
110 142 $this->getAttribute(RequestOutPutPlotElementPlotFunctionNodeClass::PLOT_FUNCTION_SCALE_ORDONNEE);
111 143 }
112 144  
113   - /**
  145 + /*
114 146 * Set Param's nb points for FFT
115   - */
  147 +
116 148 public function setParamsNbPoints($nb)
117 149 {
118 150 $this->setAttribute(RequestOutPutPlotElementPlotFunctionNodeClass::PLOT_FUNCTION_PARAMS_NB_POINTS, $nb);
119 151 }
120 152  
121   - /**
122   - * GET Param's nb points for FFT
123   - */
  153 +
  154 + GET Param's nb points for FFT
  155 +
124 156 public function getParamsNbPoints()
125 157 {
126   - $this->getAttribute(RequestOutPutPlotElementPlotFunctionNodeClass::PLOT_FUNCTION_NB_POINTS);
127   - }
  158 + $this->getAttribute(RequestOutPutPlotElementPlotFunctionNodeClass::PLOT_FUNCTION_PARAMS_NB_POINTS);
  159 + }*/
128 160 }
... ...
src/Request/ParamsRequestImpl/Nodes/Requests/RequestOutputPlotTimeAxisNodeClass.php
... ... @@ -22,6 +22,11 @@ class RequestOutputPlotTimeAxisNodeClass extends RequestOutputPlotAxisElementNod
22 22 $this->setAttribute(REQUESTOUTPUTPLOTTIMEAXIS_FORMAT, $format);
23 23 }
24 24  
  25 + public function setId($id)
  26 + {
  27 + $this->setAttribute("id", $id);
  28 + }
  29 +
25 30 public function getFormat()
26 31 {
27 32 return $this->getAttribute(REQUESTOUTPUTPLOTTIMEAXIS_FORMAT);
... ... @@ -33,5 +38,3 @@ class RequestOutputPlotTimeAxisNodeClass extends RequestOutputPlotAxisElementNod
33 38 parent::loadFromNode($xmlNode);
34 39 }
35 40 }
36   -
37   -?>
38 41 \ No newline at end of file
... ...
src/Request/ParamsRequestImpl/ParamsRequestClass.php
1 1 <?php
  2 +
2 3 /**
3 4 * @class ParamsRequestClass
4 5 * @brief Treats a param request. This class inherits from ProcessRequestClass
... ... @@ -13,63 +14,55 @@ class ParamsRequestClass extends ProcessRequestClass
13 14 {
14 15 if (!isset($this->requestData))
15 16 return false;
16   -
  17 +
17 18 if ($this->requestData->getType(ProcessTypeEnumClass::KILL))
18 19 return true;
19   -
  20 +
20 21 $this->requestData->setType(ProcessTypeEnumClass::RUN);
21   -
22   - switch ($this->requestData->getRequestType())
23   - {
24   - case ParamsRequestTypeEnumClass::XMLREQUEST :
  22 +
  23 + switch ($this->requestData->getRequestType()) {
  24 + case ParamsRequestTypeEnumClass::XMLREQUEST:
25 25 $cmd = "";
26   - foreach ($this->requestData->getRequestNodes() as $request_index => $requestNode)
27   - {
  26 + foreach ($this->requestData->getRequestNodes() as $request_index => $requestNode) {
28 27 if ($cmd != "")
29 28 $cmd .= " && ";
30   - $cmd .= KernelConfigClass::getKernelBinPath()."amdaXMLRequestorTool ".$this->getRequestFilePath($request_index);
  29 + $cmd .= KernelConfigClass::getKernelBinPath() . "amdaXMLRequestorTool " . $this->getRequestFilePath($request_index);
31 30 }
32 31 $this->requestData->setCmd($cmd);
33 32 break;
34   - case ParamsRequestTypeEnumClass::PARAMGEN :
35   - $this->requestData->setCmd(KernelConfigClass::getKernelBinPath()."amdaParameterGenerator -p ".$this->requestData->getParamId());
  33 + case ParamsRequestTypeEnumClass::PARAMGEN:
  34 + $this->requestData->setCmd(KernelConfigClass::getKernelBinPath() . "amdaParameterGenerator -p " . $this->requestData->getParamId());
  35 + break;
  36 + case ParamsRequestTypeEnumClass::PARAMSINFOGEN:
  37 + $this->requestData->setCmd(KernelConfigClass::getKernelBinPath() . "amdaParameterInfo -p " . $this->requestData->getParamId());
36 38 break;
37   - case ParamsRequestTypeEnumClass::PARAMSINFOGEN :
38   - $this->requestData->setCmd(KernelConfigClass::getKernelBinPath()."amdaParameterInfo -p ".$this->requestData->getParamId());
39   - break;
40 39 }
41 40 $this->requestData->setEnvVars(KernelConfigClass::getExecEnvVarArray());
42   -
  41 +
43 42 if (!parent::init())
44 43 return false;
45   -
  44 +
46 45 $this->requestData->setSuccess(false);
47 46 $this->requestData->setLastErrorMessage('Cannot init params request');
48 47  
49   - if ($this->requestData->getCompilationPath() == '')
50   - {
  48 + if ($this->requestData->getCompilationPath() == '') {
51 49 $this->requestData->setLastErrorMessage('Compilation path for params request not defined');
52 50 return false;
53 51 }
54 52  
55   - if (!is_dir($this->requestData->getCompilationPath()))
56   - {
57   - if (!mkdir($this->requestData->getCompilationPath(),0777))
58   - {
  53 + if (!is_dir($this->requestData->getCompilationPath())) {
  54 + if (!mkdir($this->requestData->getCompilationPath(), 0777)) {
59 55 $this->requestData->setLastErrorMessage('Cannot create compilation path for params request');
60 56 return false;
61 57 }
62 58 }
63 59  
64   - if ($this->requestData->getRequestType() == ParamsRequestTypeEnumClass::XMLREQUEST)
65   - {
66   - foreach ($this->requestData->getRequestNodes() as $request_index => $requestNode)
67   - {
  60 + if ($this->requestData->getRequestType() == ParamsRequestTypeEnumClass::XMLREQUEST) {
  61 + foreach ($this->requestData->getRequestNodes() as $request_index => $requestNode) {
68 62 //inject time restriction
69 63 if (count($this->requestData->getParamsTimeRestrictions()) > 0) {
70 64 //Here
71   - foreach ($this->requestData->getParamsTimeRestrictions() as $paramId => $timeRestriction)
72   - {
  65 + foreach ($this->requestData->getParamsTimeRestrictions() as $paramId => $timeRestriction) {
73 66 $requestNode->getParamsTimeRestrictions()->addParamTimeRestriction($paramId, strtotime($timeRestriction));
74 67 }
75 68 }
... ... @@ -79,33 +72,30 @@ class ParamsRequestClass extends ProcessRequestClass
79 72 $doc->preserveWhiteSpace = false;
80 73 $doc->formatOutput = true;
81 74  
82   - if (!$xmlNode = $requestNode->toXMLNode($doc))
83   - {
  75 + if (!$xmlNode = $requestNode->toXMLNode($doc)) {
84 76 $this->requestData->setLastErrorMessage('Cannot create params request XML file for request');
85 77 return false;
86 78 }
87   -
  79 +
88 80 $doc->appendChild($xmlNode);
89 81  
90   - if (!$doc->save($this->getRequestFilePath($request_index)))
91   - {
  82 + if (!$doc->save($this->getRequestFilePath($request_index))) {
92 83 $this->requestData->setLastErrorMessage('Cannot save params request XML file for request');
93 84 return false;
94 85 }
95   -
96   - //libxml_use_internal_errors(true);
97   - if (!$doc->schemaValidate(KernelConfigClass::getXSDRequestFilePath()))
98   - {
99   - //$error_msg = "";
100   - //$errors = libxml_get_errors();
101   - //foreach ($errors as $error) {
102   - // if ($error_msg != "")
103   - // $error_msg .= PHP_EOL;
104   - // $error_msg .= 'XML error "'.$error->message.'" ['.$error->level.'] (Code '.$error->code.') in '.$error->file.' on line '.$error->line.' column '.$error->column;
105   - //}
106   - //libxml_clear_errors();
107   -
108   - $this->requestData->setLastErrorMessage('Params request XML file not valid for request'/*.' ('.$error_msg.')'*/);
  86 +
  87 + libxml_use_internal_errors(true);
  88 + if (!$doc->schemaValidate(KernelConfigClass::getXSDRequestFilePath())) {
  89 + $error_msg = "";
  90 + $errors = libxml_get_errors();
  91 + foreach ($errors as $error) {
  92 + if ($error_msg != "")
  93 + $error_msg .= PHP_EOL;
  94 + $error_msg .= 'XML error "' . $error->message . '" [' . $error->level . '] (Code ' . $error->code . ') in ' . $error->file . ' on line ' . $error->line . ' column ' . $error->column;
  95 + }
  96 + libxml_clear_errors();
  97 +
  98 + $this->requestData->setLastErrorMessage('Params request XML file not valid for request' . ' (' . $error_msg . ')');
109 99 return false;
110 100 }
111 101 //libxml_use_internal_errors(false);
... ... @@ -116,22 +106,19 @@ class ParamsRequestClass extends ProcessRequestClass
116 106 KernelConfigClass::write($this->requestData->getWorkingPath(), $this->requestData->getCompilationPath(), $this->requestData->getLocalBasePath());
117 107  
118 108 //copy parameters files
119   - foreach ($this->requestData->getParamsToCopy() as $key => $value)
120   - {
121   - if (!file_exists($value))
122   - {
123   - $this->requestData->setLastErrorMessage('Cannot find param definition file for '.$key);
  109 + foreach ($this->requestData->getParamsToCopy() as $key => $value) {
  110 + if (!file_exists($value)) {
  111 + $this->requestData->setLastErrorMessage('Cannot find param definition file for ' . $key);
124 112 return false;
125 113 }
126   -
127   - $destinationFile = KernelConfigClass::getRequestParamsPath($this->requestData->getWorkingPath()).$key.".xml";
128   - if (!copy($value,$destinationFile))
129   - {
130   - $this->requestData->setLastErrorMessage('Cannot copy param definition file for '.$key);
  114 +
  115 + $destinationFile = KernelConfigClass::getRequestParamsPath($this->requestData->getWorkingPath()) . $key . ".xml";
  116 + if (!copy($value, $destinationFile)) {
  117 + $this->requestData->setLastErrorMessage('Cannot copy param definition file for ' . $key);
131 118 return false;
132 119 }
133 120 // get datasetID for statistics
134   - $doc = new DOMDocument("1.0", "UTF-8");
  121 + $doc = new DOMDocument("1.0", "UTF-8");
135 122 if (@$doc->load($value)) {
136 123 $dsID = $doc->getElementsByTagName('dataset_id');
137 124 if ($dsID->length > 0) {
... ... @@ -141,27 +128,25 @@ class ParamsRequestClass extends ProcessRequestClass
141 128 $dsName = 'impex';
142 129 else
143 130 $dsName = 'unknown';
144   -
  131 +
145 132 $this->requestData->addDatasetForStat($dsName);
146 133 }
147 134 }
148   -
  135 +
149 136 touch($destinationFile, filemtime($value));
150 137 }
151 138  
152 139 //create processed params files
153   - foreach ($this->requestData->getProcessParamsToCreate() as $key => $value)
154   - {
  140 + foreach ($this->requestData->getProcessParamsToCreate() as $key => $value) {
155 141 $doc = new DOMDocument("1.0", "UTF-8");
156 142 $doc->preserveWhiteSpace = false;
157 143 $doc->formatOutput = true;
158 144  
159   - if (!$xmlNode = $value["param"]->toXMLNode($doc))
160   - {
161   - $this->requestData->setLastErrorMessage('Cannot create params XML file for '.$key);
  145 + if (!$xmlNode = $value["param"]->toXMLNode($doc)) {
  146 + $this->requestData->setLastErrorMessage('Cannot create params XML file for ' . $key);
162 147 return false;
163 148 }
164   -
  149 +
165 150 $doc->appendChild($xmlNode);
166 151  
167 152 /*if (!$doc->schemaValidate(KernelConfigClass::getXSDParameterFilePath()))
... ... @@ -170,67 +155,60 @@ class ParamsRequestClass extends ProcessRequestClass
170 155 return false;
171 156 }*/
172 157  
173   - $destinationFile = KernelConfigClass::getRequestParamsPath($this->requestData->getWorkingPath()).$key.".xml";
174   - if (!$doc->save($destinationFile))
175   - {
176   - $this->requestData->setLastErrorMessage('Cannot save params XML file for '.$key);
  158 + $destinationFile = KernelConfigClass::getRequestParamsPath($this->requestData->getWorkingPath()) . $key . ".xml";
  159 + if (!$doc->save($destinationFile)) {
  160 + $this->requestData->setLastErrorMessage('Cannot save params XML file for ' . $key);
177 161 return false;
178 162 }
179   -
  163 +
180 164 touch($destinationFile, $value["dateModif"]);
181 165 }
182   -
  166 +
183 167 //create local params files
184   - foreach ($this->requestData->getLocalParamsToCreate() as $key => $value)
185   - {
  168 + foreach ($this->requestData->getLocalParamsToCreate() as $key => $value) {
186 169 $doc = new DOMDocument("1.0", "UTF-8");
187 170 $doc->preserveWhiteSpace = false;
188 171 $doc->formatOutput = true;
189 172  
190 173  
191   - if (!$xmlNode = $value["param"]->toXMLNode($doc))
192   - {
193   - $this->requestData->setLastErrorMessage('Cannot create params XML file for '.$key);
  174 + if (!$xmlNode = $value["param"]->toXMLNode($doc)) {
  175 + $this->requestData->setLastErrorMessage('Cannot create params XML file for ' . $key);
194 176 return false;
195 177 }
196   -
  178 +
197 179 $doc->appendChild($xmlNode);
198 180  
199   - $destinationFile = KernelConfigClass::getRequestParamsPath($this->requestData->getWorkingPath()).$key.".xml";
200   - if (!$doc->save($destinationFile))
201   - {
202   - $this->requestData->setLastErrorMessage('Cannot save params XML file for '.$key);
  181 + $destinationFile = KernelConfigClass::getRequestParamsPath($this->requestData->getWorkingPath()) . $key . ".xml";
  182 + if (!$doc->save($destinationFile)) {
  183 + $this->requestData->setLastErrorMessage('Cannot save params XML file for ' . $key);
203 184 return false;
204 185 }
205   -
  186 +
206 187 $this->requestData->addDatasetForStat('uploadedData');
207   -
  188 +
208 189 touch($destinationFile, $value["dateModif"]);
209 190 }
210 191 //create and copy local params files
211   - foreach ($this->requestData->getLocalParamsToCreateAndCopy() as $key => $value)
212   - {
  192 + foreach ($this->requestData->getLocalParamsToCreateAndCopy() as $key => $value) {
213 193 $doc = new DOMDocument("1.0", "UTF-8");
214 194 $doc->preserveWhiteSpace = false;
215 195 $doc->formatOutput = true;
216 196  
217   - if (!$xmlNode = $value["param"]->toXMLNode($doc))
218   - {
219   - $this->requestData->setLastErrorMessage('Cannot create params XML file for '.$key);
  197 + if (!$xmlNode = $value["param"]->toXMLNode($doc)) {
  198 + $this->requestData->setLastErrorMessage('Cannot create params XML file for ' . $key);
220 199 return false;
221 200 }
222   -
  201 +
223 202 $doc->appendChild($xmlNode);
224   -
225   - $originFile = IHMConfigClass::getUserWSPath().$key.".xml";
226   - $destinationFile = KernelConfigClass::getRequestParamsPath($this->requestData->getWorkingPath()).$key.".xml";
227   -
228   - if (!$doc->save($destinationFile) || !$doc->save($originFile))
229   - {
230   - $this->requestData->setLastErrorMessage('Cannot save params XML file for '.$key);
  203 +
  204 + $originFile = IHMConfigClass::getUserWSPath() . $key . ".xml";
  205 + $destinationFile = KernelConfigClass::getRequestParamsPath($this->requestData->getWorkingPath()) . $key . ".xml";
  206 +
  207 + if (!$doc->save($destinationFile) || !$doc->save($originFile)) {
  208 + $this->requestData->setLastErrorMessage('Cannot save params XML file for ' . $key);
231 209 return false;
232 210 }
233   -
  211 +
234 212 touch($originFile, $value["dateModif"]);
235 213 touch($destinationFile, $value["dateModif"]);
236 214 }
... ... @@ -242,10 +220,10 @@ class ParamsRequestClass extends ProcessRequestClass
242 220 public function run()
243 221 {
244 222 $amdaStat = new AmdaStats($this->requestData->getUser());
245   -
  223 +
246 224 if (count($this->requestData->getDatasetForStat()) > 0)
247 225 $amdaStat->addTask(IHMConfigClass::getUserName(), $this->requestData->getTask(), $this->requestData->getDatasetForStat());
248   -
  226 +
249 227 return parent::run();
250 228 }
251 229  
... ... @@ -254,7 +232,6 @@ class ParamsRequestClass extends ProcessRequestClass
254 232 */
255 233 private function getRequestFilePath($request_index)
256 234 {
257   - return $this->requestData->getWorkingPath()."request_".$request_index.".xml";
  235 + return $this->requestData->getWorkingPath() . "request_" . $request_index . ".xml";
258 236 }
259 237 }
260   -?>
... ...