Index: /trunk/psModules/src/Makefile
===================================================================
--- /trunk/psModules/src/Makefile	(revision 1882)
+++ /trunk/psModules/src/Makefile	(revision 1883)
@@ -1,3 +1,544 @@
-
-cc -c -O0 -g2 -Wall -Werror -std=c99 -D_GNU_SOURCE -pipe  -fpic -I. -I../sysUtils -I../collections -I.. -I../image -I.. -o makedir/psSubtractBias.o psSubtractBias.c
-
+# Makefile.in generated by automake 1.7.8 from Makefile.am.
+# src/Makefile.  Generated from Makefile.in by configure.
+
+# Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003
+# Free Software Foundation, Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+
+
+srcdir = .
+top_srcdir = ..
+
+pkgdatadir = $(datadir)/psModule
+pkglibdir = $(libdir)/psModule
+pkgincludedir = $(includedir)/psModule
+top_builddir = ..
+
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+INSTALL = /usr/bin/install -c
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+host_triplet = i686-redhat-linux-gnu
+ACLOCAL = ${SHELL} /home/gusciora/dragon/PAN/CVS/psModule/missing --run aclocal-1.7
+AMDEP_FALSE = #
+AMDEP_TRUE = 
+AMTAR = ${SHELL} /home/gusciora/dragon/PAN/CVS/psModule/missing --run tar
+AR = ar
+AUTOCONF = ${SHELL} /home/gusciora/dragon/PAN/CVS/psModule/missing --run autoconf
+AUTOHEADER = ${SHELL} /home/gusciora/dragon/PAN/CVS/psModule/missing --run autoheader
+AUTOMAKE = ${SHELL} /home/gusciora/dragon/PAN/CVS/psModule/missing --run automake-1.7
+AWK = gawk
+CC = gcc
+CCDEPMODE = depmode=gcc3
+CFLAGS = -g -O2 -g2 -Wall -std=c99 -D_GNU_SOURCE -I/home/gusciora/dragon/PAN/CVS/psLib//include -I/usr/local/include
+CPP = gcc -E
+CPPFLAGS = 
+CXX = g++
+CXXCPP = g++ -E
+CXXDEPMODE = depmode=gcc3
+CXXFLAGS = -g -O2
+CYGPATH_W = echo
+DEFS = -DHAVE_CONFIG_H
+DEPDIR = .deps
+ECHO = echo
+ECHO_C = 
+ECHO_N = -n
+ECHO_T = 
+EGREP = grep -E
+EXEEXT = 
+F77 = g77
+FFLAGS = -g -O2
+GSL_CONFIG = /usr/local/bin/gsl-config
+INSTALL_DATA = ${INSTALL} -m 644
+INSTALL_PROGRAM = ${INSTALL}
+INSTALL_SCRIPT = ${INSTALL}
+INSTALL_STRIP_PROGRAM = ${SHELL} $(install_sh) -c -s
+LDFLAGS =  -L/home/gusciora/dragon/PAN/CVS/psLib//lib -L/usr/local/lib-L/usr/local/lib -lgsl -lgslcblas -lm
+LIBOBJS = 
+LIBS = -lpslib -lgslcblas -lgsl -lfftw3f -lcfitsio -lsla 
+LIBTOOL = $(SHELL) $(top_builddir)/libtool
+LN_S = ln -s
+LTLIBOBJS = 
+MAKEINFO = ${SHELL} /home/gusciora/dragon/PAN/CVS/psModule/missing --run makeinfo
+OBJEXT = o
+PACKAGE = psModule
+PACKAGE_BUGREPORT = 
+PACKAGE_NAME = 
+PACKAGE_STRING = 
+PACKAGE_TARNAME = 
+PACKAGE_VERSION = 
+PATH_SEPARATOR = :
+RANLIB = ranlib
+SET_MAKE = 
+SHELL = /bin/sh
+STRIP = strip
+VERSION = 0.1
+ac_ct_AR = ar
+ac_ct_CC = gcc
+ac_ct_CXX = g++
+ac_ct_F77 = g77
+ac_ct_RANLIB = ranlib
+ac_ct_STRIP = strip
+am__fastdepCC_FALSE = #
+am__fastdepCC_TRUE = 
+am__fastdepCXX_FALSE = #
+am__fastdepCXX_TRUE = 
+am__include = include
+am__leading_dot = .
+am__quote = 
+bindir = ${exec_prefix}/bin
+build = i686-redhat-linux-gnu
+build_alias = 
+build_cpu = i686
+build_os = linux-gnu
+build_vendor = redhat
+datadir = ${prefix}/share
+exec_prefix = ${prefix}
+host = i686-redhat-linux-gnu
+host_alias = 
+host_cpu = i686
+host_os = linux-gnu
+host_vendor = redhat
+includedir = ${prefix}/include
+infodir = ${prefix}/info
+install_sh = /home/gusciora/dragon/PAN/CVS/psModule/install-sh
+libdir = ${exec_prefix}/lib
+libexecdir = ${exec_prefix}/libexec
+localstatedir = ${prefix}/var
+mandir = ${prefix}/man
+oldincludedir = /usr/include
+prefix = /usr/local
+program_transform_name = s,x,x,
+sbindir = ${exec_prefix}/sbin
+sharedstatedir = ${prefix}/com
+sysconfdir = ${prefix}/etc
+target_alias = 
+lib_LIBRARIES = libpsmodule.a
+bin_PROGRAMS = tst_pmFlatField tst_pmMaskBadPixels
+
+libpsmodule_a_SOURCES = pmFlatField.c pmMaskBadPixels.c psTest.c
+libpsmodule_a_HEADERS = pmFlatField.h pmMaskBadPixels.h psTest.h
+libpsmodule_adir = .
+
+tst_pmFlatField_SOURCES = tst_pmFlatField.c
+tst_pmFlatField_LDFLAGS = libpsmodule.a
+
+tst_pmMaskBadPixels_SOURCES = tst_pmMaskBadPixels.c
+tst_pmMaskBadPixels_LDFLAGS = libpsmodule.a
+subdir = src
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
+CONFIG_HEADER = config.h
+CONFIG_CLEAN_FILES =
+LIBRARIES = $(lib_LIBRARIES)
+
+libpsmodule_a_AR = $(AR) cru
+libpsmodule_a_LIBADD =
+am_libpsmodule_a_OBJECTS = pmFlatField.$(OBJEXT) \
+	pmMaskBadPixels.$(OBJEXT) psTest.$(OBJEXT)
+libpsmodule_a_OBJECTS = $(am_libpsmodule_a_OBJECTS)
+bin_PROGRAMS = tst_pmFlatField$(EXEEXT) tst_pmMaskBadPixels$(EXEEXT)
+PROGRAMS = $(bin_PROGRAMS)
+
+am_tst_pmFlatField_OBJECTS = tst_pmFlatField.$(OBJEXT)
+tst_pmFlatField_OBJECTS = $(am_tst_pmFlatField_OBJECTS)
+tst_pmFlatField_LDADD = $(LDADD)
+tst_pmFlatField_DEPENDENCIES =
+am_tst_pmMaskBadPixels_OBJECTS = tst_pmMaskBadPixels.$(OBJEXT)
+tst_pmMaskBadPixels_OBJECTS = $(am_tst_pmMaskBadPixels_OBJECTS)
+tst_pmMaskBadPixels_LDADD = $(LDADD)
+tst_pmMaskBadPixels_DEPENDENCIES =
+
+DEFAULT_INCLUDES =  -I. -I$(srcdir) -I.
+depcomp = $(SHELL) $(top_srcdir)/depcomp
+am__depfiles_maybe = depfiles
+DEP_FILES = ./$(DEPDIR)/pmFlatField.Po \
+	./$(DEPDIR)/pmMaskBadPixels.Po \
+	./$(DEPDIR)/psTest.Po \
+	./$(DEPDIR)/tst_pmFlatField.Po \
+	./$(DEPDIR)/tst_pmMaskBadPixels.Po
+COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
+	$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+LTCOMPILE = $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) \
+	$(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+CCLD = $(CC)
+LINK = $(LIBTOOL) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
+	$(AM_LDFLAGS) $(LDFLAGS) -o $@
+DIST_SOURCES = $(libpsmodule_a_SOURCES) $(tst_pmFlatField_SOURCES) \
+	$(tst_pmMaskBadPixels_SOURCES)
+HEADERS = $(libpsmodule_a_HEADERS)
+
+DIST_COMMON = $(libpsmodule_a_HEADERS) $(srcdir)/Makefile.in \
+	Makefile.am config.h.in
+SOURCES = $(libpsmodule_a_SOURCES) $(tst_pmFlatField_SOURCES) $(tst_pmMaskBadPixels_SOURCES)
+
+all: config.h
+	$(MAKE) $(AM_MAKEFLAGS) all-am
+
+.SUFFIXES:
+.SUFFIXES: .c .lo .o .obj
+$(srcdir)/Makefile.in:  Makefile.am  $(top_srcdir)/configure.in $(ACLOCAL_M4)
+	cd $(top_srcdir) && \
+	  $(AUTOMAKE) --gnu  src/Makefile
+Makefile:  $(srcdir)/Makefile.in  $(top_builddir)/config.status
+	cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)
+
+config.h: stamp-h1
+	@if test ! -f $@; then \
+	  rm -f stamp-h1; \
+	  $(MAKE) stamp-h1; \
+	else :; fi
+
+stamp-h1: $(srcdir)/config.h.in $(top_builddir)/config.status
+	@rm -f stamp-h1
+	cd $(top_builddir) && $(SHELL) ./config.status src/config.h
+
+$(srcdir)/config.h.in:  $(top_srcdir)/configure.in $(ACLOCAL_M4) 
+	cd $(top_srcdir) && $(AUTOHEADER)
+	touch $(srcdir)/config.h.in
+
+distclean-hdr:
+	-rm -f config.h stamp-h1
+libLIBRARIES_INSTALL = $(INSTALL_DATA)
+install-libLIBRARIES: $(lib_LIBRARIES)
+	@$(NORMAL_INSTALL)
+	$(mkinstalldirs) $(DESTDIR)$(libdir)
+	@list='$(lib_LIBRARIES)'; for p in $$list; do \
+	  if test -f $$p; then \
+	    f="`echo $$p | sed -e 's|^.*/||'`"; \
+	    echo " $(libLIBRARIES_INSTALL) $$p $(DESTDIR)$(libdir)/$$f"; \
+	    $(libLIBRARIES_INSTALL) $$p $(DESTDIR)$(libdir)/$$f; \
+	  else :; fi; \
+	done
+	@$(POST_INSTALL)
+	@list='$(lib_LIBRARIES)'; for p in $$list; do \
+	  if test -f $$p; then \
+	    p="`echo $$p | sed -e 's|^.*/||'`"; \
+	    echo " $(RANLIB) $(DESTDIR)$(libdir)/$$p"; \
+	    $(RANLIB) $(DESTDIR)$(libdir)/$$p; \
+	  else :; fi; \
+	done
+
+uninstall-libLIBRARIES:
+	@$(NORMAL_UNINSTALL)
+	@list='$(lib_LIBRARIES)'; for p in $$list; do \
+	  p="`echo $$p | sed -e 's|^.*/||'`"; \
+	  echo " rm -f $(DESTDIR)$(libdir)/$$p"; \
+	  rm -f $(DESTDIR)$(libdir)/$$p; \
+	done
+
+clean-libLIBRARIES:
+	-test -z "$(lib_LIBRARIES)" || rm -f $(lib_LIBRARIES)
+libpsmodule.a: $(libpsmodule_a_OBJECTS) $(libpsmodule_a_DEPENDENCIES) 
+	-rm -f libpsmodule.a
+	$(libpsmodule_a_AR) libpsmodule.a $(libpsmodule_a_OBJECTS) $(libpsmodule_a_LIBADD)
+	$(RANLIB) libpsmodule.a
+binPROGRAMS_INSTALL = $(INSTALL_PROGRAM)
+install-binPROGRAMS: $(bin_PROGRAMS)
+	@$(NORMAL_INSTALL)
+	$(mkinstalldirs) $(DESTDIR)$(bindir)
+	@list='$(bin_PROGRAMS)'; for p in $$list; do \
+	  p1=`echo $$p|sed 's/$(EXEEXT)$$//'`; \
+	  if test -f $$p \
+	     || test -f $$p1 \
+	  ; then \
+	    f=`echo "$$p1" | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'`; \
+	   echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) --mode=install $(binPROGRAMS_INSTALL) $$p $(DESTDIR)$(bindir)/$$f"; \
+	   $(INSTALL_PROGRAM_ENV) $(LIBTOOL) --mode=install $(binPROGRAMS_INSTALL) $$p $(DESTDIR)$(bindir)/$$f || exit 1; \
+	  else :; fi; \
+	done
+
+uninstall-binPROGRAMS:
+	@$(NORMAL_UNINSTALL)
+	@list='$(bin_PROGRAMS)'; for p in $$list; do \
+	  f=`echo "$$p" | sed 's,^.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/'`; \
+	  echo " rm -f $(DESTDIR)$(bindir)/$$f"; \
+	  rm -f $(DESTDIR)$(bindir)/$$f; \
+	done
+
+clean-binPROGRAMS:
+	@list='$(bin_PROGRAMS)'; for p in $$list; do \
+	  f=`echo $$p|sed 's/$(EXEEXT)$$//'`; \
+	  echo " rm -f $$p $$f"; \
+	  rm -f $$p $$f ; \
+	done
+tst_pmFlatField$(EXEEXT): $(tst_pmFlatField_OBJECTS) $(tst_pmFlatField_DEPENDENCIES) 
+	@rm -f tst_pmFlatField$(EXEEXT)
+	$(LINK) $(tst_pmFlatField_LDFLAGS) $(tst_pmFlatField_OBJECTS) $(tst_pmFlatField_LDADD) $(LIBS)
+tst_pmMaskBadPixels$(EXEEXT): $(tst_pmMaskBadPixels_OBJECTS) $(tst_pmMaskBadPixels_DEPENDENCIES) 
+	@rm -f tst_pmMaskBadPixels$(EXEEXT)
+	$(LINK) $(tst_pmMaskBadPixels_LDFLAGS) $(tst_pmMaskBadPixels_OBJECTS) $(tst_pmMaskBadPixels_LDADD) $(LIBS)
+
+mostlyclean-compile:
+	-rm -f *.$(OBJEXT) core *.core
+
+distclean-compile:
+	-rm -f *.tab.c
+
+include ./$(DEPDIR)/pmFlatField.Po
+include ./$(DEPDIR)/pmMaskBadPixels.Po
+include ./$(DEPDIR)/psTest.Po
+include ./$(DEPDIR)/tst_pmFlatField.Po
+include ./$(DEPDIR)/tst_pmMaskBadPixels.Po
+
+.c.o:
+	if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" \
+	  -c -o $@ `test -f '$<' || echo '$(srcdir)/'`$<; \
+	then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; \
+	else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; \
+	fi
+#	source='$<' object='$@' libtool=no \
+#	depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' \
+#	$(CCDEPMODE) $(depcomp) \
+#	$(COMPILE) -c `test -f '$<' || echo '$(srcdir)/'`$<
+
+.c.obj:
+	if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" \
+	  -c -o $@ `if test -f '$<'; then $(CYGPATH_W) '$<'; else $(CYGPATH_W) '$(srcdir)/$<'; fi`; \
+	then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; \
+	else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; \
+	fi
+#	source='$<' object='$@' libtool=no \
+#	depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' \
+#	$(CCDEPMODE) $(depcomp) \
+#	$(COMPILE) -c `if test -f '$<'; then $(CYGPATH_W) '$<'; else $(CYGPATH_W) '$(srcdir)/$<'; fi`
+
+.c.lo:
+	if $(LTCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" \
+	  -c -o $@ `test -f '$<' || echo '$(srcdir)/'`$<; \
+	then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Plo"; \
+	else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; \
+	fi
+#	source='$<' object='$@' libtool=yes \
+#	depfile='$(DEPDIR)/$*.Plo' tmpdepfile='$(DEPDIR)/$*.TPlo' \
+#	$(CCDEPMODE) $(depcomp) \
+#	$(LTCOMPILE) -c -o $@ `test -f '$<' || echo '$(srcdir)/'`$<
+
+mostlyclean-libtool:
+	-rm -f *.lo
+
+clean-libtool:
+	-rm -rf .libs _libs
+
+distclean-libtool:
+	-rm -f libtool
+uninstall-info-am:
+libpsmodule_aHEADERS_INSTALL = $(INSTALL_HEADER)
+install-libpsmodule_aHEADERS: $(libpsmodule_a_HEADERS)
+	@$(NORMAL_INSTALL)
+	$(mkinstalldirs) $(DESTDIR)$(libpsmodule_adir)
+	@list='$(libpsmodule_a_HEADERS)'; for p in $$list; do \
+	  if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+	  f="`echo $$p | sed -e 's|^.*/||'`"; \
+	  echo " $(libpsmodule_aHEADERS_INSTALL) $$d$$p $(DESTDIR)$(libpsmodule_adir)/$$f"; \
+	  $(libpsmodule_aHEADERS_INSTALL) $$d$$p $(DESTDIR)$(libpsmodule_adir)/$$f; \
+	done
+
+uninstall-libpsmodule_aHEADERS:
+	@$(NORMAL_UNINSTALL)
+	@list='$(libpsmodule_a_HEADERS)'; for p in $$list; do \
+	  f="`echo $$p | sed -e 's|^.*/||'`"; \
+	  echo " rm -f $(DESTDIR)$(libpsmodule_adir)/$$f"; \
+	  rm -f $(DESTDIR)$(libpsmodule_adir)/$$f; \
+	done
+
+ETAGS = etags
+ETAGSFLAGS =
+
+CTAGS = ctags
+CTAGSFLAGS =
+
+tags: TAGS
+
+ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
+	list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '    { files[$$0] = 1; } \
+	       END { for (i in files) print i; }'`; \
+	mkid -fID $$unique
+
+TAGS:  $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \
+		$(TAGS_FILES) $(LISP)
+	tags=; \
+	here=`pwd`; \
+	list='$(SOURCES) $(HEADERS) config.h.in $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '    { files[$$0] = 1; } \
+	       END { for (i in files) print i; }'`; \
+	test -z "$(ETAGS_ARGS)$$tags$$unique" \
+	  || $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+	     $$tags $$unique
+
+ctags: CTAGS
+CTAGS:  $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \
+		$(TAGS_FILES) $(LISP)
+	tags=; \
+	here=`pwd`; \
+	list='$(SOURCES) $(HEADERS) config.h.in $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '    { files[$$0] = 1; } \
+	       END { for (i in files) print i; }'`; \
+	test -z "$(CTAGS_ARGS)$$tags$$unique" \
+	  || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+	     $$tags $$unique
+
+GTAGS:
+	here=`$(am__cd) $(top_builddir) && pwd` \
+	  && cd $(top_srcdir) \
+	  && gtags -i $(GTAGS_ARGS) $$here
+
+distclean-tags:
+	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+
+top_distdir = ..
+distdir = $(top_distdir)/$(PACKAGE)-$(VERSION)
+
+distdir: $(DISTFILES)
+	@srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
+	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
+	list='$(DISTFILES)'; for file in $$list; do \
+	  case $$file in \
+	    $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
+	    $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
+	  esac; \
+	  if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+	  dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
+	  if test "$$dir" != "$$file" && test "$$dir" != "."; then \
+	    dir="/$$dir"; \
+	    $(mkinstalldirs) "$(distdir)$$dir"; \
+	  else \
+	    dir=''; \
+	  fi; \
+	  if test -d $$d/$$file; then \
+	    if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+	      cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
+	    fi; \
+	    cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
+	  else \
+	    test -f $(distdir)/$$file \
+	    || cp -p $$d/$$file $(distdir)/$$file \
+	    || exit 1; \
+	  fi; \
+	done
+check-am: all-am
+check: check-am
+all-am: Makefile $(LIBRARIES) $(PROGRAMS) $(HEADERS) config.h
+
+installdirs:
+	$(mkinstalldirs) $(DESTDIR)$(libdir) $(DESTDIR)$(bindir) $(DESTDIR)$(libpsmodule_adir)
+install: install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
+
+install-am: all-am
+	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-am
+install-strip:
+	$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+	  INSTALL_STRIP_FLAG=-s \
+	  `test -z '$(STRIP)' || \
+	    echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+	-rm -f $(CONFIG_CLEAN_FILES)
+
+maintainer-clean-generic:
+	@echo "This command is intended for maintainers to use"
+	@echo "it deletes files that may require special tools to rebuild."
+clean: clean-am
+
+clean-am: clean-binPROGRAMS clean-generic clean-libLIBRARIES \
+	clean-libtool mostlyclean-am
+
+distclean: distclean-am
+	-rm -rf ./$(DEPDIR)
+	-rm -f Makefile
+distclean-am: clean-am distclean-compile distclean-generic distclean-hdr \
+	distclean-libtool distclean-tags
+
+dvi: dvi-am
+
+dvi-am:
+
+info: info-am
+
+info-am:
+
+install-data-am: install-libpsmodule_aHEADERS
+
+install-exec-am: install-binPROGRAMS install-libLIBRARIES
+
+install-info: install-info-am
+
+install-man:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+	-rm -rf ./$(DEPDIR)
+	-rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-compile mostlyclean-generic \
+	mostlyclean-libtool
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am: uninstall-binPROGRAMS uninstall-info-am \
+	uninstall-libLIBRARIES uninstall-libpsmodule_aHEADERS
+
+.PHONY: CTAGS GTAGS all all-am check check-am clean clean-binPROGRAMS \
+	clean-generic clean-libLIBRARIES clean-libtool ctags distclean \
+	distclean-compile distclean-generic distclean-hdr \
+	distclean-libtool distclean-tags distdir dvi dvi-am info \
+	info-am install install-am install-binPROGRAMS install-data \
+	install-data-am install-exec install-exec-am install-info \
+	install-info-am install-libLIBRARIES \
+	install-libpsmodule_aHEADERS install-man install-strip \
+	installcheck installcheck-am installdirs maintainer-clean \
+	maintainer-clean-generic mostlyclean mostlyclean-compile \
+	mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
+	tags uninstall uninstall-am uninstall-binPROGRAMS \
+	uninstall-info-am uninstall-libLIBRARIES \
+	uninstall-libpsmodule_aHEADERS
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
Index: /trunk/psModules/src/pmSubtractBias.c
===================================================================
--- /trunk/psModules/src/pmSubtractBias.c	(revision 1882)
+++ /trunk/psModules/src/pmSubtractBias.c	(revision 1883)
@@ -8,6 +8,6 @@
  *  @author George Gusciora, MHPCC
  *
- *  @version $Revision: 1.4 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2004-09-24 21:05:00 $
+ *  @version $Revision: 1.5 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2004-09-24 22:33:17 $
  *
  *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
@@ -22,16 +22,5 @@
 #include<math.h>
 #include "pslib.h"
-
-
-//#include "pmSubtractBias.h"
-//    PM_OVERSCAN_NONE,                         ///< No overscan subtraction
-//    PM_OVERSCAN_ROWS,                         ///< Subtract rows
-//    PM_OVERSCAN_COLUMNS,                      ///< Subtract columns
-//    PM_OVERSCAN_ALL                           ///< Subtract the statistic of all pixels in overscan region
-//} pmOverScanAxis;
-//typedef enum {
-//    PM_FIT_NONE,                              ///< No fit
-//    PM_FIT_POLYNOMIAL,                        ///< Fit polynomial
-//    PM_FIT_SPLINE                             ///< Fit cubic splines
+#include "pmSubtractBias.h"
 
 #define PM_SUBTRACT_BIAS_POLYNOMIAL_ORDER 2
@@ -73,5 +62,5 @@
 // XXX: Is there already a function which does this?
 psImage *p_psImageSubtractScalar(psImage *image,
-                                 float *scalar)
+                                 float scalar)
 {
     int i;
@@ -80,5 +69,5 @@
     for (i=0;i<image->numRows;i++) {
         for (j=0;j<image->numCols;j++) {
-            image->data.F32[i][j]-= scalar;
+            (image->data.F32[i][j])-= scalar;
         }
     }
@@ -95,5 +84,5 @@
 {
     int numOptions = 0;
-    psStatsOptions opt;
+    psStatsOptions opt = 0;
 
     if (stat->options & PS_STAT_SAMPLE_MEAN) {
@@ -137,20 +126,21 @@
     }
 
+    if (numOptions == 0) {
+        // XXX: psErrorMsg()
+    }
     if (numOptions != 1) {
-\\ XXX:
-        Generate warning message.
-    }
-
+        // XXX:Generate warning message.
+    }
     return(opt);
 }
 
 // XXX: Must scale the overscan vector
-psVector *ScaleOverscanVector(overscanVector,
-                              (in->image)->numCols,
+
+psVector *ScaleOverscanVector(psVector *overscanVector,
+                              int n,
                               pmFit fit)
 {
     return(overscanVector);
 }
-
 
 psReadout *pmSubtractBias(psReadout *in,
@@ -158,5 +148,5 @@
                           const psList *overscans,
                           pmOverscanAxis overScanAxis,
-                          const psStats *stat,
+                          psStats *stat,
                           int nBin,
                           pmFit fit,
@@ -165,13 +155,15 @@
     int i;
     int j;
-    int nBin;
-    int numBins;
+    int numBins = 0;
     static psVector *overscanVector = NULL;
     psVector *tmpRow = NULL;
     psVector *tmpCol = NULL;
-    psVector *tmpMask = NULL;
     psVector *myBin = NULL;
     psVector *binVec = NULL;
-    psList *tmpOverscan = NULL;
+    psListElem *tmpOverscan = NULL;
+    double statValue;
+    psImage *myOverscanImage = NULL;
+    psPolynomial1D *myPoly;
+    psSpline1D *mySpline;
 
     if (in == NULL) {
@@ -208,5 +200,6 @@
     if (overScanAxis == PM_OVERSCAN_ALL) {
         psImageStats(stat, in->image, in->mask, 0xffffffff);
-        p_psImageSubtractScalar(in->image, stat->value);
+        p_psGetStatValue(stat, &statValue);
+        p_psImageSubtractScalar(in->image, statValue);
         return(in);
     }
@@ -215,61 +208,57 @@
     // having to copy every element in that vector?
 
-    // XXX: If we get here, do we know that overScanAxis == PM_OVERSCAN_ROW
+    // XXX: If we get here, do we know that overScanAxis == PM_OVERSCAN_ROWS
     // or PM_OVERSCAN_COL?
 
     // XXX: How to use multiple overscans?  Currently, only the first is used.
-    if ((overScanAxis == PM_OVERSCAN_ROW) || (overScanAxis == PM_OVERSCAN_COL)) {
-        myOverscanImage = (psImage *) overscans->data;
-
-        if (overScanAxis == PM_OVERSCAN_ROW) {
-            overscanVector = psVectorAlloc((myOverscanImage->image)->numCols, PS_TYPE_F32);
+    if ((overScanAxis == PM_OVERSCAN_ROWS) || (overScanAxis == PM_OVERSCAN_COLUMNS)) {
+        myOverscanImage = (psImage *) ((overscans->head)->data);
+
+        if (overScanAxis == PM_OVERSCAN_ROWS) {
+            overscanVector = psVectorAlloc(myOverscanImage->numCols, PS_TYPE_F32);
             for (i=0;i<overscanVector->n;i++) {
                 overscanVector->data.F32[i] = 0.0;
             }
             tmpRow = psVectorAlloc((in->image)->numCols, PS_TYPE_F32);
-            tmpMask = psVectorAlloc((in->image)->numCols, PS_TYPE_U8);
-
-            tmpOverscan = (psList *) overscans;
+
+            tmpOverscan = (psListElem *) overscans->head;
             while (tmpOverscan) {
                 myOverscanImage = (psImage *) tmpOverscan->data;
-                for (i=0;i<(myOverscanImage->image)->numCols;i++) {
-                    for (j=0;j<(myOverscanImage->image)->numRows;j++) {
-                        tmpRow->data.F32[j] = (myOverscanImage->image)->data.F32[i][j];
-                        tmpMask->data.U8[j] = (myOverscanImage->mask)->data.U8[i][j];
+                for (i=0;i<myOverscanImage->numCols;i++) {
+                    for (j=0;j<myOverscanImage->numRows;j++) {
+                        tmpRow->data.F32[j] = myOverscanImage->data.F32[i][j];
                     }
-                    stat = psVectorStats(stat, tmpRow, tmpMask, 0xffffffff);
-                    overscanVector->data.F32[i] = stat->value;
-                }
-                //                tmpOverscan = tmpOverscan->next;
-tmpOverscan = NULL:
-                          }
-
-                          psFree(tmpRow);
-            psFree(tmpMask);
+                    stat = psVectorStats(stat, tmpRow, NULL, 0xffffffff);
+                    p_psGetStatValue(stat, &statValue);
+                    overscanVector->data.F32[i] = statValue;
+
+                }
+                // tmpOverscan = tmpOverscan->next;
+                tmpOverscan = NULL;
+            }
+            psFree(tmpRow);
             ScaleOverscanVector(overscanVector, (in->image)->numCols, fit);
         }
-        if (overScanAxis == PM_OVERSCAN_COL) {
-            overscanVector = psVectorAlloc((myOverscanImage->image)->numRows, PS_TYPE_F32);
+        if (overScanAxis == PM_OVERSCAN_COLUMNS) {
+            overscanVector = psVectorAlloc(myOverscanImage->numRows, PS_TYPE_F32);
             for (i=0;i<overscanVector->n;i++) {
                 overscanVector->data.F32[i] = 0.0;
             }
-            tmpcol = psVectorAlloc((in->image)->numRows, PS_TYPE_F32);
-            tmpMask = psVectorAlloc((in->image)->nuRows, PS_TYPE_U8);
-
-            tmpOverscan = (psList *) overscans;
+            tmpCol = psVectorAlloc((in->image)->numRows, PS_TYPE_F32);
+
+            tmpOverscan = (psListElem *) overscans->head;
             while (tmpOverscan) {
-                for (i=0;i<(myOverscanImage->image)->numRows;i++) {
-                    for (j=0;j<(myOverscanImage->image)->numCols;j++) {
-                        tmpRow->data.F32[j] = (myOverscanImage->image)->data.F32[i][j];
-                        tmpMask->data.U8[j] = (myOverscanImage->mask)->data.U8[i][j];
+                for (i=0;i<myOverscanImage->numRows;i++) {
+                    for (j=0;j<myOverscanImage->numCols;j++) {
+                        tmpRow->data.F32[j] = myOverscanImage->data.F32[i][j];
                     }
-                    stat = psVectorStats(stat, tmpRow, tmpMask, 0xffffffff);
-                    overscanVector->data.F32[i] = stat->value;
+                    stat = psVectorStats(stat, tmpRow, NULL, 0xffffffff);
+                    p_psGetStatValue(stat, &statValue);
+                    overscanVector->data.F32[i] = statValue;
                 }
                 //                tmpOverscan = tmpOverscan->next;
-tmpOverscan = NULL:
-                          }
-                          psFree(tmpCol);
-            psFree(tmpMask);
+                tmpOverscan = NULL;
+            }
+            psFree(tmpCol);
             ScaleOverscanVector(overscanVector, (in->image)->numRows, fit);
         }
@@ -277,5 +266,5 @@
         if ((nBin > 0) && (nBin < overscanVector->n)) {
             numBins = 1+((overscanVector->n)/nBin);
-            psVector *myBin = psVectorAlloc(numBins, PS_TYPE_F32);
+            myBin = psVectorAlloc(numBins, PS_TYPE_F32);
             binVec = psVectorAlloc(nBin, PS_TYPE_F32);
 
@@ -292,5 +281,7 @@
                 }
                 stat = psVectorStats(stat, binVec, NULL, 0);
-                myBin->data.F32[i] = stat->value;
+                p_psGetStatValue(stat, &statValue);
+                myBin->data.F32[i] = statValue;
+
             }
             // Change the effective size of overscanVector.
@@ -314,10 +305,10 @@
 
             } else if (fit == PM_FIT_SPLINE) {
-                mySpline = (psSPline1D *) fitSpec;
+                mySpline = (psSpline1D *) fitSpec;
                 // XXX: What is the point of doing this?
             }
         }
 
-        if (overScanAxis == PM_OVERSCAN_ROW) {
+        if (overScanAxis == PM_OVERSCAN_ROWS) {
             for (i=0;i<(in->image)->numCols;i++) {
                 for (j=0;j<(in->image)->numRows;j++) {
@@ -327,5 +318,5 @@
         }
 
-        if (overScanAxis == PM_OVERSCAN_COLUMN) {
+        if (overScanAxis == PM_OVERSCAN_COLUMNS) {
             for (i=0;i<(in->image)->numRows;i++) {
                 for (j=0;j<(in->image)->numCols;j++) {
@@ -343,4 +334,6 @@
 
     // XXX: psErrorMsg(): Shouldn't get here?
-}
-
+    return(in);
+}
+
+
Index: /trunk/psModules/src/pmSubtractBias.h
===================================================================
--- /trunk/psModules/src/pmSubtractBias.h	(revision 1882)
+++ /trunk/psModules/src/pmSubtractBias.h	(revision 1883)
@@ -8,6 +8,6 @@
  *  @author George Gusciora, MHPCC
  *
- *  @version $Revision: 1.1 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2004-09-23 06:48:30 $
+ *  @version $Revision: 1.2 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2004-09-24 22:33:17 $
  *
  *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
@@ -31,5 +31,5 @@
     PM_OVERSCAN_COLUMNS,                      ///< Subtract columns
     PM_OVERSCAN_ALL                           ///< Subtract the statistic of all pixels in overscan region
-} pmOverScanAxis;
+} pmOverscanAxis;
 
 typedef enum {
@@ -43,5 +43,5 @@
                           const psList *overscans,
                           pmOverscanAxis overScanAxis,
-                          const psStats *stat,
+                          psStats *stat,
                           int nBin,
                           pmFit fit,
