diff --git a/CMakeLists.txt b/CMakeLists.txt index c89c60e..b0ad1f0 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -98,6 +98,7 @@ set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake/modules/") add_subdirectory(src/ExternLib/PlotCurves) add_subdirectory(src/ExternLib/StatisticProcesses) add_subdirectory(src/ExternLib/FramesTransformation) + add_subdirectory(src/ExternLib/EISCATDataFilter) find_package(CSlim) IF ( CSLIM_FOUND ) add_subdirectory(test/DD_Client/CSlimFixtures) diff --git a/src/ExternLib/EISCATDataFilter/CMakeLists.txt b/src/ExternLib/EISCATDataFilter/CMakeLists.txt new file mode 100644 index 0000000..f0d7da5 --- /dev/null +++ b/src/ExternLib/EISCATDataFilter/CMakeLists.txt @@ -0,0 +1,23 @@ + +PROJECT(EISCATDataFilter) + +set(LIBRARY_OUTPUT_PATH ${PLUGIN_OUTPUT_PATH}/EISCATDataFilter) + +include_directories( +) + +#Library configuration +file( + GLOB_RECURSE + source_files + ./* +) + +#ADD_LIBRARY( EISCATDataFilter SHARED ${source_files} ) + + #target_link_libraries( + #EISCATDataFilter +#) + +FILE( GLOB_RECURSE PROJ_HEADERS *.hh ) +INSTALL(FILES ${PROJ_HEADERS} DESTINATION ${LIBRARY_OUTPUT_PATH} PERMISSIONS OWNER_READ GROUP_READ WORLD_READ) diff --git a/src/ExternLib/EISCATDataFilter/EISCATDataFilter.hh b/src/ExternLib/EISCATDataFilter/EISCATDataFilter.hh new file mode 100644 index 0000000..696cf37 --- /dev/null +++ b/src/ExternLib/EISCATDataFilter/EISCATDataFilter.hh @@ -0,0 +1,37 @@ +/** + * EISCATDataFilter.hh + * + * Created on: 31 oct. 2012 + * Author: AKKA IS + */ + +#ifndef EISCATDATAFILTER_HH_ +#define EISCATDATAFILTER_HH_ + +#include + +/** + * @bried filetr EISCAT data in relation with the requested mode + */ + +// Mode : +// * -1 : No filter +// * 0 : Keep only Field-aligned +// * 1 : Keep only Other +// * 2 : Keep only Multi +// * 3 : Keep only Scan + +std::vector EISCATDataFilter(const std::vector& data, short crtMode, short mode = -1, int corrected = false) +{ + std::vector result; + result = data; + if ((mode != -1) && (crtMode != mode)) { + for (std::vector::iterator it = result.begin(); it != result.end(); ++it) { + (*it) = 0./0.; + } + } + + return result; +} + +#endif /* EISCATDATAFILTER_HH_ */ -- libgit2 0.21.2