Changeset 5512
- Timestamp:
- Nov 14, 2005, 12:18:48 PM (20 years ago)
- Location:
- trunk/psLib
- Files:
-
- 10 edited
-
Makefile.am (modified) (1 diff)
-
configure.ac (modified) (12 diffs)
-
etc/pslib/Makefile.am (modified) (1 diff)
-
src/Makefile.am (modified) (1 diff)
-
src/psErrorText_en.dat (modified) (2 diffs)
-
src/pslib_strict.h (modified) (2 diffs)
-
test/fits/verified/tst_psFits.stderr (modified) (4 diffs)
-
test/imageops/tst_psImageGeomManip.c (modified) (3 diffs)
-
test/sys/table.fits (modified) (1 diff)
-
test/sys/tst_psMemory.c (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psLib/Makefile.am
r5221 r5512 15 15 autogen.sh 16 16 17 if DOXYGEN 17 18 docs: Doxyfile $(prefix)/docs/pslib $(mandir)/man3 18 $(DOXYGEN)19 doxygen Doxyfile 19 20 mv -f $(prefix)/docs/pslib/man/man3/* $(mandir)/man3 20 21 rm -rf $(prefix)/docs/pslib/man 22 endif 21 23 22 24 $(prefix)/docs/pslib: -
trunk/psLib/configure.ac
r5318 r5512 1 AC_PREREQ(2.5 7)1 AC_PREREQ(2.59) 2 2 3 3 AC_INIT([pslib],[0.8.99],[http://pan-starrs.ifa.hawaii.edu/bugzilla]) … … 6 6 7 7 AM_INIT_AUTOMAKE([1.7 foreign dist-bzip2]) 8 A M_CONFIG_HEADER(src/config.h)8 AC_CONFIG_HEADERS([src/config.h]) 9 9 AM_MAINTAINER_MODE 10 10 … … 12 12 AC_SUBST(PSLIB_LT_VERSION,$PSLIB_LT_VERSION) 13 13 14 dnl Determine the location of GNU sed 15 AC_CHECK_PROGS([SED],[gsed sed]) 16 if test "${SED}" == "" 17 then 18 AC_MSG_ERROR([GNU SED is required.]) 19 fi 20 AC_SUBST(SED,[${SED}]) 14 dnl ------------------- PERL options --------------------- 15 AC_ARG_WITH(perl, 16 [AS_HELP_STRING(--with-perl=FILE,Specify location of PERL executable.)], 17 [AC_CHECK_PROG(PERL, $withval, $withval)], 18 [AC_CHECK_PROG(PERL, perl, `which perl`)]) 19 if test "$PERL" == "" 20 then 21 AC_MSG_ERROR([PERL is required. Use --with-perl to specify its install location.]) 22 fi 23 AC_SUBST(PERL,$PERL) 21 24 22 25 SUBDIR="etc src test" dnl don't include 'swig', as it is optional … … 24 27 SRCPATH='${top_srcdir}/src' 25 28 SRCDIRS="sys astro db fft fits imageops math mathtypes types xml" 26 SRCINC=`echo "${SRCDIRS=}" | ${SED} "s|\(\\w\+\)|-I\${SRCPATH=}/\1|g"` 29 # escape two escapes at this level so \\ gets passed to the shell and \ to perl 30 SRCINC=`echo "${SRCDIRS=}" | ${PERL} -pe "s|(\w+)|-I\\\\${SRCPATH=}/\1|g"` 27 31 SRCINC="-I${SRCPATH=} ${SRCINC=}" 28 SRCSUBLIBS=`echo "${SRCDIRS=}" | ${ SED} "s|\(\\w\+\)|\1/libpslib\1.la|g"`32 SRCSUBLIBS=`echo "${SRCDIRS=}" | ${PERL} -pe "s|(\w+)|\1/libpslib\1.la|g"` 29 33 AC_SUBST(SRCSUBLIBS,${SRCSUBLIBS=}) 30 34 AC_SUBST(SRCINC,${SRCINC=}) … … 49 53 ) 50 54 51 case $host in52 *-apple-darwin*)53 dnl CFLAGS="${CFLAGS=} -Wno-long-double -fno-strict-aliasing"54 dnl GCC 4.0 on OSX seems to hate that.55 ;;56 esac57 58 55 AC_LANG(C) 59 56 AC_PROG_CC … … 69 66 70 67 dnl check for standard language functionality 71 AC_HEADER_STDC 72 AC_HEADER_SYS_WAIT 73 AC_CHECK_HEADERS([float.h limits.h stdint.h stdlib.h string.h sys/time.h unistd.h]) 74 AC_HEADER_STDBOOL 68 AC_CHECK_HEADERS([fcntl.h float.h limits.h stdint.h stdlib.h string.h sys/time.h unistd.h]) 75 69 AC_C_CONST 76 70 AC_C_INLINE 77 AC_TYPE_PID_T 78 AC_C_RESTRICT 79 AC_TYPE_SIZE_T 71 AC_HEADER_STDBOOL 72 AC_HEADER_SYS_WAIT 80 73 AC_HEADER_TIME 81 74 AC_STRUCT_TM 75 AC_TYPE_SIZE_T 82 76 83 77 dnl Checks for library functions. … … 160 154 [CFITSIO_LDFLAGS="-L$withval"]) 161 155 PSLIB_CFLAGS="${PSLIB_CFLAGS=} ${CFITSIO_CFLAGS}" 162 PSLIB_LIBS="${PSLIB_LIBS=} $CFITSIO_LDFLAGS -lcfitsio" 156 PSLIB_LIBS="${PSLIB_LIBS=} $CFITSIO_LDFLAGS -lcfitsio -lm" 157 158 dnl Store off CFLAGS/LDFLAGS so that they can be restored after tests 163 159 TMP_CFLAGS=${CFLAGS} 164 CFLAGS=${CFITSIO_CFLAGS} 160 TMP_LDFLAGS=${LDFLAGS} 161 162 CFLAGS=${PSLIB_CFLAGS} 163 LDFLAGS=${PSLIB_LIBS} 165 164 AC_CHECK_HEADERS([fitsio.h],[], 166 [AC_MSG_ERROR([CFITSIO is required. Obtain it at http://heasarc.gsfc.nasa.gov/docs/software/fitsio or use --with-cfitsio to specify location.])]) 165 [AC_MSG_ERROR([CFITSIO headers not found. Obtain CFITSIO at http://heasarc.gsfc.nasa.gov/docs/software/fitsio or use --with-cfitsio to specify location.])] 166 ) 167 TMP_LIBS=${LIBS} 168 AC_CHECK_LIB(cfitsio,ffopen,[], 169 [AC_MSG_ERROR([CFITSIO library not found. Obtain it at http://heasarc.gsfc.nasa.gov/docs/software/fitsio or use --with-cfitsio to specify location.])] 170 ) 171 dnl Now check if CFITSIO supports fits_open_diskfile, i.e., is at least version 2.501 172 AC_CHECK_LIB(cfitsio,ffdkopen, 173 [CFITSIO_DISKFILE=1], 174 [AC_MSG_WARN([The CFITSIO library version is rather old. Suggested version is 2.501 or greater.]) 175 CFITSIO_DISKFILE=0] 176 ) 177 LIBS=${TMP_LIBS} 178 179 dnl restore the CFLAGS/LDFLAGS 167 180 CFLAGS=${TMP_CFLAGS} 168 181 LDFLAGS=${TMP_LDFLAGS} 182 183 AC_DEFINE_UNQUOTED([CFITSIO_DISKFILE],${CFITSIO_DISKFILE},[Define to 1 if you have fits_open_diskfile in CFITSIO]) 169 184 AC_SUBST([CFITSIO_CFLAGS]) 170 185 … … 182 197 PSLIB_CFLAGS="${PSLIB_CFLAGS=} ${FFTW3_CFLAGS}" 183 198 PSLIB_LIBS="${PSLIB_LIBS=} $FFTW3_LDFLAGS -lfftw3f" 199 200 dnl Store off CFLAGS/LDFLAGS so that they can be restored after tests 184 201 TMP_CFLAGS=${CFLAGS} 185 CFLAGS=${FFTW3_CFLAGS} 202 TMP_LDFLAGS=${LDFLAGS} 203 204 CFLAGS="${TMP_CFLAGS} ${PSLIB_CFLAGS}" 205 LDFLAGS="${TMP_LDFLAGS} ${PSLIB_LIBS}" 186 206 AC_CHECK_HEADERS([fftw3.h],[], 187 [AC_MSG_ERROR([FFTW version 3 with float support is required. Obtain it at http://www.fftw.org/or use --with-fftw3 to specify location.])]) 207 [AC_MSG_ERROR([FFTW version 3 (--withfloat) headers not found. Obtain it at http://www.fftw.org/or use --with-fftw3 to specify location.])] 208 ) 209 TMP_LIBS=${LIBS} 210 AC_CHECK_LIB(fftw3f,fftwf_plan_dft_2d,[], 211 [AC_MSG_ERROR([FFTW version 3 (--withfloat) library not found. Obtain it at http://www.fftw.org/or use --with-fftw3 to specify location.])] 212 ) 213 LIBS=${TMP_LIBS} 214 215 dnl restore the CFLAGS/LDFLAGS 188 216 CFLAGS=${TMP_CFLAGS} 217 LDFLAGS=${TMP_LDFLAGS} 189 218 190 219 AC_SUBST([FFTW3_CFLAGS]) … … 197 226 AC_CHECK_FILE($GSL_CONFIG,[], 198 227 [AC_MSG_ERROR([GSL is required. Obtain it at http://www.gnu.org/software/gsl or use --with-gsl-config to specify location.])]) 228 199 229 AC_MSG_CHECKING([GSL cflags]) 200 230 GSL_CFLAGS="`${GSL_CONFIG} --cflags`" 201 231 AC_MSG_RESULT([${GSL_CFLAGS}]) 232 233 AC_MSG_CHECKING([GSL ldflags]) 234 GSL_LDFLAGS="`${GSL_CONFIG} --libs`" 235 AC_MSG_RESULT([${GSL_LDFLAGS}]) 236 202 237 PSLIB_CFLAGS="${PSLIB_CFLAGS=} ${GSL_CFLAGS}" 203 PSLIB_LIBS="${PSLIB_LIBS=} `${GSL_CONFIG} --libs`"238 PSLIB_LIBS="${PSLIB_LIBS=} ${GSL_LDFLAGS}" 204 239 205 240 AC_SUBST([GSL_CFLAGS]) … … 212 247 AC_CHECK_FILE($XML_CONFIG,[], 213 248 [AC_MSG_ERROR([GNOME XML C parser is required. Obtain it at http://www.xmlsoft.org or use --with-xml2-config to specify location.])]) 249 214 250 AC_MSG_CHECKING([xml2 cflags]) 215 251 XML_CFLAGS="`${XML_CONFIG} --cflags`" 216 252 AC_MSG_RESULT([${XML_CFLAGS}]) 253 254 AC_MSG_CHECKING([xml2 ldflags]) 255 XML_LDFLAGS="`${XML_CONFIG} --libs`" 256 AC_MSG_RESULT([${XML_LDFLAGS}]) 257 217 258 PSLIB_CFLAGS="${PSLIB_CFLAGS=} ${XML_CFLAGS}" 218 PSLIB_LIBS="${PSLIB_LIBS=} `${XML_CONFIG} --libs`"259 PSLIB_LIBS="${PSLIB_LIBS=} ${XML_LDFLAGS}" 219 260 220 261 AC_SUBST([XML_CFLAGS]) … … 239 280 SUBDIR="${SUBDIR=} swig" 240 281 241 dnl ------------------- PERL options ---------------------242 AC_ARG_WITH(perl,243 [AS_HELP_STRING(--with-perl=FILE,Specify location of PERL executable.)],244 [AC_CHECK_PROG(PERL, $withval, $withval)],245 [AC_CHECK_PROG(PERL, perl, `which perl`)])246 if test "$PERL" == ""247 then248 AC_MSG_ERROR([PERL is required. Use --with-perl to specify its install location.])249 fi250 AC_SUBST(PERL,$PERL)251 252 282 dnl ---------------- PERLPREFIX option ------------------- 253 283 AC_ARG_WITH(perlprefix, … … 262 292 fi 263 293 264 dnl for MacOSX, check if sqrtf is in mx library. 294 dnl for MacOSX suppport -- check if sqrtf is in mx library. 295 TMP_LIBS=${LIBS} 265 296 AC_CHECK_LIB(mx,sqrtf, 266 297 [PSLIB_LIBS="${PSLIB_LIBS=} -lmx"]) 298 LIBS=${TMP_LIBS} 267 299 AC_CHECK_FUNC(atoll, [], 268 [AC_MSG_ERROR([The C99 function, atoll, is required; update your compiler?])]) 269 270 DOXYGEN="doxygen Doxyfile" 271 AC_CHECK_PROG(DOXYGEN,doxygen,[echo Doxygen not detected in configure stage.]) 272 AC_SUBST(DOXYGEN,$DOXYGEN) 273 274 CFLAGS="${CFLAGS=} -Wall -Werror" 300 [AC_MSG_ERROR([The C99 function, atoll, is required; update your compiler version?])]) 301 302 AC_CHECK_PROG(doxygen,[doxygen],[true],[false]) 303 AM_CONDITIONAL(DOXYGEN, test x$doxygen = xtrue) 304 305 306 dnl ------- restore CFLAGS / LDFLAGS (tests done) -------- 307 CFLAGS="${CFLAGS} -Wall -Werror" 308 AC_MSG_RESULT([CFLAGS is ${CFLAGS}]) 309 AC_MSG_RESULT([LDFLAGS is ${LDFLAGS}]) 275 310 276 311 dnl ---------------- export variables -------------------- -
trunk/psLib/etc/pslib/Makefile.am
r5016 r5512 8 8 9 9 pslib.config: pslib.config.template 10 sed's|PREFIX|$(prefix)|' $? > $@10 $(PERL) -pe 's|PREFIX|$(prefix)|' $? > $@ 11 11 12 12 $(sysconfdir)/pslib: -
trunk/psLib/src/Makefile.am
r5231 r5512 25 25 26 26 install-exec-hook: libpslib.la 27 sed "s|\(^dependency_libs=.*\)|dependency_libs=\'$(PSLIB_LIBS)\'|" $(libdir)/libpslib.la > libpslib.la.temp27 $(PERL) -pe "s|(^dependency_libs=.*)|dependency_libs=\'$(PSLIB_LIBS)\'|" $(libdir)/libpslib.la > libpslib.la.temp 28 28 $(INSTALL) libpslib.la.temp $(libdir)/libpslib.la -
trunk/psLib/src/psErrorText_en.dat
r4971 r5512 127 127 psFits_FILENAME_NULL Specified filename can not be NULL. 128 128 psFits_EXTNAME_NULL Specified extension name can not be NULL. 129 psFits_EXTNAME_INVALID Could not find HDU '%s' in file %s.\nCFITSIO Error: %s130 psFits_EXTNUM_ABS_MOVE_FAILED Could not move to specified HDU #%d in file %s.\nCFITSIO Error: %s131 psFits_EXTNUM_REL_MOVE_FAILED Could not move %d HDUs from current position in file %s.\nCFITSIO Error: %s129 psFits_EXTNAME_INVALID Could not find HDU '%s'.\nCFITSIO Error: %s 130 psFits_EXTNUM_ABS_MOVE_FAILED Could not move to specified HDU #%d.\nCFITSIO Error: %s 131 psFits_EXTNUM_REL_MOVE_FAILED Could not move %d HDUs from current position.\nCFITSIO Error: %s 132 132 psFits_GET_EXTNUM_FAILED Failed to determine the current HDU number in file %s.\nCFITSIO Error: %s 133 psFits_GETNUMHDUS_FAILED Failed to determine the number of HDUs in file %s.\nCFITSIO Error: %s134 psFits_GETHDUTYPE_FAILED Failed to determine an HDU type in file %s.\nCFITSIO Error: %s133 psFits_GETNUMHDUS_FAILED Failed to determine the number of HDUs.\nCFITSIO Error: %s 134 psFits_GETHDUTYPE_FAILED Failed to determine an HDU type.\nCFITSIO Error: %s 135 135 psFits_GETNUMKEYS_FAILED Failed to determine the number of header keys in file %s.\nCFITSIO Error: %s 136 136 psFits_GET_TABLE_SIZE_FAILED Failed to determine the size of the current HDU table.\nCFITSIO Error: %s … … 145 145 psFits_METATYPE_INVALID Specified FITS metadata type, %c, is not supported. 146 146 psFits_METADATA_ADD_FAILED Failed to add metadata item, %s. 147 psFits_WRITE_FAILED Could not write data to file ,'%s'.\nCFITSIO Error: %s147 psFits_WRITE_FAILED Could not write data to file.\nCFITSIO Error: %s 148 148 psFits_IMAGE_NULL The input psImage was NULL. Need a non-NULL psImage for operation to be performed. 149 149 psFits_METADATA_NULL The input psMetadata was NULL. Need a non-NULL psMetadata for operation to be performed. -
trunk/psLib/src/pslib_strict.h
r5446 r5512 9 9 * @author Eric Van Alst, MHPCC 10 10 * 11 * @version $Revision: 1.1 0$ $Name: not supported by cvs2svn $12 * @date $Date: 2005-1 0-26 01:20:14$11 * @version $Revision: 1.11 $ $Name: not supported by cvs2svn $ 12 * @date $Date: 2005-11-14 22:18:05 $ 13 13 * 14 14 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii … … 48 48 /// @{ 49 49 #include "psFits.h" 50 #include "psFitsHeader.h" 51 #include "psFitsImage.h" 52 #include "psFitsTable.h" 50 53 /// @} 51 54 -
trunk/psLib/test/fits/verified/tst_psFits.stderr
r4547 r5512 1 1 /***************************** TESTPOINT ******************************************\ 2 2 * TestFile: tst_psFits.c * 3 * TestPoint: psImage{psFits Alloc}*4 * TestType: Positive * 5 \**********************************************************************************/ 6 7 <DATE><TIME>|<HOST>|I|tst_psFits Alloc3 * TestPoint: psImage{psFitsOpen} * 4 * TestType: Positive * 5 \**********************************************************************************/ 6 7 <DATE><TIME>|<HOST>|I|tst_psFitsOpen 8 8 Following should generate an error message 9 <DATE><TIME>|<HOST>|E|psFits Alloc(FILE:LINENO)9 <DATE><TIME>|<HOST>|E|psFitsOpen (FILE:LINENO) 10 10 Specified filename can not be NULL. 11 12 ---> TESTPOINT PASSED (psImage{psFitsAlloc} | tst_psFits.c) 11 <DATE><TIME>|<HOST>|I|tst_psFitsOpen 12 Following should generate an error message 13 <DATE><TIME>|<HOST>|E|psFitsOpen (FILE:LINENO) 14 Specified mode, 'b+', is invalid. Supported modes are r, r+, rw, w, w+, a, or a+. 15 16 ---> TESTPOINT PASSED (psImage{psFitsOpen} | tst_psFits.c) 13 17 14 18 /***************************** TESTPOINT ******************************************\ … … 21 25 Following should be an error. 22 26 <DATE><TIME>|<HOST>|E|psFitsMoveExtName (FILE:LINENO) 23 Could not find HDU 'bogus' in file multi.fits.27 Could not find HDU 'bogus'. 24 28 CFITSIO Error: illegal HDU number 25 29 <DATE><TIME>|<HOST>|I|tst_psFitsMoveExtName … … 51 55 Following should be an error. 52 56 <DATE><TIME>|<HOST>|E|psFitsMoveExtNum (FILE:LINENO) 53 Could not move to specified HDU #-1 in file multi.fits.57 Could not move to specified HDU #-1. 54 58 CFITSIO Error: illegal HDU number 55 59 <DATE><TIME>|<HOST>|I|tst_psFitsMoveExtNum 56 60 Following should be an error. 57 61 <DATE><TIME>|<HOST>|E|psFitsMoveExtNum (FILE:LINENO) 58 Could not move -1 HDUs from current position in file multi.fits.62 Could not move -1 HDUs from current position. 59 63 CFITSIO Error: illegal HDU number 60 64 <DATE><TIME>|<HOST>|I|tst_psFitsMoveExtNum 61 65 Following should be an error. 62 66 <DATE><TIME>|<HOST>|E|psFitsMoveExtNum (FILE:LINENO) 63 Could not move to specified HDU #8 in file multi.fits.67 Could not move to specified HDU #8. 64 68 CFITSIO Error: tried to move past end of file 65 69 <DATE><TIME>|<HOST>|I|tst_psFitsMoveExtNum 66 70 Following should be an error. 67 71 <DATE><TIME>|<HOST>|E|psFitsMoveExtNum (FILE:LINENO) 68 Could not move 1 HDUs from current position in file multi.fits.72 Could not move 1 HDUs from current position. 69 73 CFITSIO Error: tried to move past end of file 70 74 <DATE><TIME>|<HOST>|I|tst_psFitsMoveExtNum … … 171 175 Following should be an error. 172 176 <DATE><TIME>|<HOST>|E|psFitsUpdateTable (FILE:LINENO) 173 Could not write data to file ,'table.fits'.177 Could not write data to file. 174 178 CFITSIO Error: bad first row number 175 179 -
trunk/psLib/test/imageops/tst_psImageGeomManip.c
r5303 r5512 6 6 * @author Robert DeSonia, MHPCC 7 7 * 8 * @version $Revision: 1. 4$ $Name: not supported by cvs2svn $9 * @date $Date: 2005-1 0-13 00:38:53$8 * @version $Revision: 1.5 $ $Name: not supported by cvs2svn $ 9 * @date $Date: 2005-11-14 22:18:46 $ 10 10 * 11 11 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii … … 537 537 // write results of various rotates to a file and verify with truth images 538 538 mkdir("temp",0777); 539 remove540 ("fOut.fits");541 remove542 ("sOut.fits");543 remove544 ("fBiOut.fits");545 remove546 ("sBiOut.fits");547 539 psS32 index = 0; 548 540 psBool fail = false; 549 541 psF32 radianRot; 550 542 551 psFits* fOutFile = psFits Alloc("fOut.fits");552 psFits* sOutFile = psFits Alloc("sOut.fits");553 psFits* fBiOutFile = psFits Alloc("fBiOut.fits");554 psFits* sBiOutFile = psFits Alloc("sBiOut.fits");543 psFits* fOutFile = psFitsOpen("fOut.fits","w"); 544 psFits* sOutFile = psFitsOpen("sOut.fits","w"); 545 psFits* fBiOutFile = psFitsOpen("fBiOut.fits","w"); 546 psFits* sBiOutFile = psFitsOpen("sBiOut.fits","w"); 555 547 if (fOutFile == NULL ||sOutFile == NULL || fBiOutFile == NULL || sBiOutFile == NULL) { 556 548 psError(PS_ERR_UNKNOWN, true, "Can not create output files, so why continue!?"); … … 558 550 } 559 551 560 psFits* fTruthFile = psFits Alloc(VERIFIED_DIR "/fOut.fits");561 psFits* sTruthFile = psFits Alloc(VERIFIED_DIR "/sOut.fits");562 psFits* fBiTruthFile = psFits Alloc(VERIFIED_DIR "/fBiOut.fits");563 psFits* sBiTruthFile = psFits Alloc(VERIFIED_DIR "/sBiOut.fits");552 psFits* fTruthFile = psFitsOpen(VERIFIED_DIR "/fOut.fits","r"); 553 psFits* sTruthFile = psFitsOpen(VERIFIED_DIR "/sOut.fits","r"); 554 psFits* fBiTruthFile = psFitsOpen(VERIFIED_DIR "/fBiOut.fits","r"); 555 psFits* sBiTruthFile = psFitsOpen(VERIFIED_DIR "/sBiOut.fits","r"); 564 556 if (fTruthFile == NULL ||sTruthFile == NULL || fBiTruthFile == NULL || sBiTruthFile == NULL) { 565 557 psError(PS_ERR_UNKNOWN, true, "Can not open truth files, so why continue!?"); -
trunk/psLib/test/sys/table.fits
r4899 r5512 1 SIMPLE = T / file does conform to FITS standard BITPIX = -32 / number of bits per data pixel NAXIS = 2 / number of data axes NAXIS1 = 16 / length of data axis 1 NAXIS2 = 16 / length of data axis 2 EXTEND = T / FITS dataset may contain extensions COMMENT FITS (Flexible Image Transport System) format is defined in 'AstronomyCOMMENT and Astrophysics', volume 376, page 359; bibcode: 2001A&A...376..359H END
