Changeset 2830


Ignore:
Timestamp:
07/31/13 17:37:40 (11 years ago)
Author:
WataruKawasaki
Message:

New Development: Yes

JIRA Issue: Yes (CAS-3620)

Ready for Test: Yes

Interface Changes: No

What Interface Changed:

Test Programs:

Put in Release Notes: Yes

Module(s): sd

Description: a new simple plotter based on PGPLOT. the module name is sd.plotter2. only available on casapy (unavailable in the standalone ASAP)


Location:
trunk
Files:
4 added
7 edited

Legend:

Unmodified
Added
Removed
  • trunk/CMakeLists.txt

    r2587 r2830  
    418418message( STATUS "BOOST_INCLUDE_DIR = " ${Boost_INCLUDE_DIR} )
    419419message( STATUS "BOOST_LIBRARIES = " ${Boost_LIBRARIES} )
    420 
    421 
    422 #
    423 # Qt4   4.3.4 or later
    424 #
    425 find_package( Qt4 4.3.4
    426               COMPONENTS QtCore QtGui )
    427 if( NOT QT4_FOUND )
    428   message( FATAL_ERROR "Qt4 could not be found. Please check!" )
    429 endif()
    430 set( QT4_INCLUDE_DIRS ${QT_INCLUDES} CACHE PATH "QT4 include directories" FORCE )
    431 set( QT4_DEFINITIONS ${QT_DEFINITIONS} -DQT_NO_DEBUG CACHE STRING "QT4 preprocessor flags" FORCE )
    432 set( QT4_LIBRARIES
    433   ${QT_QTCORE_LIBRARY}
    434   ${QT_QTGUI_LIBRARY}
    435   CACHE FILEPATH "QT4 libraries" FORCE )
    436 list( REMOVE_ITEM QT4_LIBRARIES "optimized" )
    437 list( REMOVE_ITEM QT4_LIBRARIES "debug" )
    438 message( STATUS "QT4_INCLUDE_DIRS = " ${QT4_INCLUDE_DIRS} )
    439 message( STATUS "QT4_DEFINITIONS = " ${QT4_DEFINITIONS} )
    440 message( STATUS "QT4_LIBRARIES = " ${QT4_LIBRARIES} )
    441420
    442421
     
    527506endif()
    528507
     508# X11.
     509if( NOT APPLE )
     510  find_package( X11 REQUIRED )
     511  # Rename
     512  set( X11_INCLUDE_DIRS ${X11_INCLUDE_DIR} )
     513endif()
     514
     515# PGPLOT (FORTRAN plotting package).
     516# depends on X11
     517if( STANDALONE )
     518  ############
     519  find_path( PGPLOT_INCLUDE_DIRS cpgplot.h
     520             PATHS /usr
     521             PATH_SUFFIXES include )
     522  if( PGPLOT_INCLUDE_DIRS MATCHES "NOTFOUND$" )
     523    message( FATAL ERROR "cpgplot.h could not be found. Please check!" )
     524  endif()
     525  find_library( CPGPLOT_LIB libcpgplot.${SO}
     526                PATHS /usr
     527                PATH_SUFFIXES lib64 lib )
     528  if( CPGPLOT_LIB MATCHES "NOTFOUND$" )
     529    message( FATAL ERROR "libcpgplot could not be found. Please check!" )
     530  endif()
     531  find_library( PGPLOT_LIB libpgplot.${SO}
     532                PATHS /usr
     533                PATH_SUFFIXES lib64 lib )
     534  if( PGPLOT_LIB MATCHES "NOTFOUND$" )
     535    message( FATAL ERROR "libpgplot could not be found. Please check!" )
     536  endif()
     537  set( PGPLOT_LIBRARIES "${CPGPLOT_LIB} ${PGPLOT_LIB} ${X11_LIBRARIES} ${FORTRAN_LIBRARIES} " )
     538  ############
     539else()
     540  if( APPLE )
     541    set( _deps FORTRAN )
     542  else()
     543    set( _deps X11 FORTRAN )
     544  endif()
     545  if (CMAKE_SYSTEM MATCHES ^Darwin-11 AND NOT LLVMCOMPILER )
     546     set( CMAKE_SHARED_LINKER_FLAGS "-Wl,-undefined -Wl,error -framework AppKit -lgfortran" )
     547  else()
     548     if (APPLE)
     549        set( CMAKE_SHARED_LINKER_FLAGS "-Wl,-undefined -Wl,error -framework AppKit" )
     550     else()
     551        set( CMAKE_SHARED_LINKER_FLAGS "-Wl,-undefined -Wl,error" )
     552     endif()
     553  endif()
     554  casa_find( PGPLOT
     555    VERSION 5.3.1
     556    PREFIX_HINTS ${PGPLOT_ROOT_DIR}
     557    INCLUDES cpgplot.h
     558    LIBS pgplot${pgplot_ext} cpgplot${pgplot_ext}
     559    DEPENDS ${_deps} )
     560endif()
    529561
    530562#
     
    593625include_directories( ${CASACORE_INCLUDE_DIR}
    594626                     ${Boost_INCLUDE_DIR}
    595                      ${QT4_INCLUDE_DIRS}
     627                     ${X11_INCLUDE_DIRS}
     628                     ${PGPLOT_INCLUDE_DIRS}
    596629                     ${PYTHON_INCLUDE_DIRS}
    597630                     ${WCSLIB_INCLUDE_DIR}
  • trunk/python/CMakeLists.txt

    r2649 r2830  
    3535     ${PYTHONDIR}/opacity.py
    3636     ${PYTHONDIR}/parameters.py
    37 #     ${PYTHONDIR}/plotter2.py
     37     ${PYTHONDIR}/plotter2.py
    3838     ${PYTHONDIR}/sbseparator.py
    3939     ${PYTHONDIR}/scantable.py
  • trunk/python/__init__.py

    r2821 r2830  
    5454from asapgrid import asapgrid, asapgrid2
    5555from edgemarker import edgemarker
    56 #from plotter2 import plotter2
     56if is_casapy():
     57    from plotter2 import plotter2
    5758from sbseparator import sbseparator
    5859from _asap import srctype
  • trunk/src/CMakeLists.txt

    r2757 r2830  
    77set( SRCDIR ${ASAPROOT}/src )
    88
    9 # include QT_USE_FILE
    10 include( ${QT_USE_FILE} )
    11 
    129# include path
    1310include_directories( ${SRCDIR}
    1411                     ${Boost_INCLUDE_DIR}
    15                      ${QT4_INCLUDE_DIRS}
    1612                     ${ASAPROOT}/external-alma
    1713                     ${ASAPROOT}/external/libpyrap/pyrap-0.3.2 )
     
    2521# source files for libpyrap
    2622set( ASAP_SRCS
    27 #     ${SRCDIR}/Plotter2.cpp
     23     ${SRCDIR}/Plotter2.cpp
    2824     ${SRCDIR}/concurrent.cpp
    2925     ${SRCDIR}/MathUtils.cpp
     
    8581
    8682set( ASAP_PYSRCS
    87 #     ${SRCDIR}/python_Plotter2.cpp
     83     ${SRCDIR}/python_Plotter2.cpp
    8884     ${SRCDIR}/python_Scantable.cpp
    8985     ${SRCDIR}/python_STFiller.cpp
     
    121117target_link_libraries( ${ASAPLIB}
    122118                       #${Boost_LIBRARIES}
    123                        ${QT4_LIBRARIES}
     119                       ${X11_LIBRARIES}
     120                       ${PGPLOT_LIBRARIES}
    124121                       ${PYRAPLIB}
    125122                       ${ATNFLIB}
  • trunk/src/SConscript

    r2643 r2830  
    77# gather cpp files
    88cpps = env.SGlob("*.cpp")
     9cpps.remove("Plotter2.cpp")
    910pycpps = env.SGlob("python_*.cpp")
    1011for pf in pycpps:
    1112    cpps.remove(pf)
     13pycpps.remove("python_Plotter2.cpp")
    1214
    1315# location of libcasav.a
  • trunk/src/python_asap.cpp

    r2742 r2830  
    6868
    6969BOOST_PYTHON_MODULE(_asap) {
    70   //asap::python::python_Plotter2();
     70  asap::python::python_Plotter2();
    7171  asap::python::python_Scantable();
    7272  asap::python::python_STFiller();
  • trunk/src/python_asap.h

    r2742 r2830  
    3535  namespace python {
    3636    void translate_ex(const casa::AipsError& e);
    37     //void python_Plotter2();
     37    void python_Plotter2();
    3838    void python_Scantable();
    3939    void python_STFiller();
Note: See TracChangeset for help on using the changeset viewer.