diff -Naur orig/back.c src/back.c --- orig/back.c 2015-12-03 15:00:52.000000000 +0300 +++ src/back.c 2016-01-05 17:13:36.654578786 +0300 @@ -383,6 +383,9 @@ error(EXIT_FAILURE, "*Error*: The density range of this image is too large for ", "PHOTO mode"); + if (prefs.backmodewidth < 3.0 || prefs.backmodewidth > 6.0) + error(EXIT_FAILURE, + "*Error*: I cannot deal with wrong of backmodewidth!", ""); return; } @@ -398,8 +401,8 @@ { backstruct *bm, *wbm; - double pix,wpix, sig, mean,wmean, sigma,wsigma, step; - PIXTYPE *buft,*wbuft, + double pix,wpix, sig, mean,median,mad,wmean, sigma,wmedian,wmad,wsigma, step; + PIXTYPE *buft,*wbuft,*bufa,*wbufa,*bufta, *wbufta, lcut,wlcut, hcut,whcut; int m,h,x,y, npix,wnpix, offset, lastbite; @@ -408,7 +411,11 @@ wbm = wbackmesh; offset = w - bw; step = sqrt(2/PI)*QUANTIF_NSIGMA/QUANTIF_AMIN; - wmean = wsigma = wlcut = whcut = 0.0; /* to avoid gcc -Wall warnings */ + wmean = wsigma = wlcut = whcut = wmedian = wmad = 0.0; /* to avoid gcc -Wall warnings */ + + QCALLOC(bufa,PIXTYPE,bufsize); + QCALLOC(wbufa,PIXTYPE,bufsize); + for (m = n; m--; bm++,buf+=bw) { if (!m && (lastbite=w%bw)) @@ -416,14 +423,15 @@ bw = lastbite; offset = w-bw; } - mean = sigma = 0.0; - buft=buf; + mean = sigma = median = mad = 0.0; + buft=buf; bufta=bufa; + /*-- We separate the weighted case at this level to avoid penalty in CPU */ npix = 0; if (wbackmesh) { - wmean = wsigma = 0.0; - wbuft = wbuf; + wmean = wsigma = 0.0; + wbuft = wbuf; wbufta=wbufa; for (y=h; y--; buft+=offset,wbuft+=offset) for (x=bw; x--;) { @@ -435,8 +443,11 @@ mean += pix; sigma += pix*pix; npix++; + *(bufta++)=*(wbufta++)=pix; } } + mad = sigma_mad(bufa,npix,&median); + wmad = sigma_mad(wbufa,npix,&wmedian); } else for (y=h; y--; buft+=offset) @@ -446,7 +457,10 @@ mean += pix; sigma += pix*pix; npix++; + *(bufta++)=pix; } + mad = sigma_mad(bufa, npix, &median); + /*-- If not enough valid pixels, discard this mesh */ if ((float)npix < (float)(bw*h*BACK_MINGOODFRAC)) { @@ -463,20 +477,27 @@ { wmean /= (double)npix; wsigma = (sig = wsigma/npix - wmean*wmean)>0.0? sqrt(sig):0.0; - wlcut = wbm->lcut = (PIXTYPE)(wmean - 2.0*wsigma); - whcut = wbm->hcut = (PIXTYPE)(wmean + 2.0*wsigma); + +/* VCh: +- 2sigma change to +- 3AMD */ + + wlcut = wbm->lcut = (PIXTYPE)((wsigma > wmad? wmedian:wmean) - 3.0*wmad); + whcut = wbm->hcut = (PIXTYPE)((wsigma > wmad? wmedian:wmean) + 3.0*wmad); } mean /= (double)npix; sigma = (sig = sigma/npix - mean*mean)>0.0? sqrt(sig):0.0; - lcut = bm->lcut = (PIXTYPE)(mean - 2.0*sigma); - hcut = bm->hcut = (PIXTYPE)(mean + 2.0*sigma); - mean = sigma = 0.0; + + lcut = bm->lcut = (PIXTYPE)((sigma > mad? median:mean) - 3.0*mad); + hcut = bm->hcut = (PIXTYPE)((sigma > mad? median:mean) + 3.0*mad); +// +// fprintf(stderr,"mean=%-10g hodl=%-10g sigma=%-10g median=%-10g mad=%-10g\n",mean,fhodl(bufa,npix),sigma,median,mad); +// + mean = sigma = median = mad = 0.0; npix = wnpix = 0; - buft = buf; + buft = buf; bufta=bufa; if (wbackmesh) { - wmean = wsigma = 0.0; - wbuft=wbuf; + wmean = wsigma = wmedian = wmad = 0.0; + wbuft=wbuf; wbufta=wbufa; for (y=h; y--; buft+=offset, wbuft+=offset) for (x=bw; x--;) { @@ -486,14 +507,18 @@ mean += pix; sigma += pix*pix; npix++; + *(bufta++)=pix; if (wpix<=whcut && wpix>=wlcut) { wmean += wpix; wsigma += wpix*wpix; wnpix++; + *(wbufta++)=wpix; } } } + mad = sigma_mad(bufa,npix,&median); + wmad = sigma_mad(wbufa,wnpix,&wmedian); } else for (y=h; y--; buft+=offset) @@ -505,36 +530,63 @@ mean += pix; sigma += pix*pix; npix++; + *(bufta++)=pix; } } - + mad = sigma_mad(bufa,npix,&median); bm->npix = npix; mean /= (double)npix; sig = sigma/npix - mean*mean; sigma = sig>0.0 ? sqrt(sig):0.0; + bm->mean = mean; +// bm->mean = fhodl(bufa,npix); bm->sigma = sigma; + bm->median = median; + bm->mad = mad; + if ((bm->nlevels = (int)(step*npix+1)) > QUANTIF_NMAXLEVELS) bm->nlevels = QUANTIF_NMAXLEVELS; - bm->qscale = sigma>0.0? 2*QUANTIF_NSIGMA*sigma/bm->nlevels : 1.0; - bm->qzero = mean - QUANTIF_NSIGMA*sigma; + if (sigma < mad) + { + bm->qscale = sigma>0.0? 2*QUANTIF_NSIGMA*sigma/bm->nlevels : 1.0; + bm->qzero = mean - QUANTIF_NSIGMA*sigma; + } else { + bm->qscale = mad>0.0? 2*QUANTIF_NSIGMA*mad/bm->nlevels : 1.0; + bm->qzero = median - QUANTIF_NSIGMA*mad; + } +// +// fprintf(stderr,"mean=%-10g sigma=%-10g median=%-10g mad=%-10g\n",mean,sigma,median,mad); +// if (wbackmesh) { + wmad = sigma_mad(wbuf,npix,&wmedian); wbm->npix = wnpix; wmean /= (double)wnpix; sig = wsigma/wnpix - wmean*wmean; wsigma = sig>0.0 ? sqrt(sig):0.0; wbm->mean = wmean; wbm->sigma = wsigma; + wbm->median = wmedian; + wbm->mad = wmad; + if ((wbm->nlevels = (int)(step*wnpix+1)) > QUANTIF_NMAXLEVELS) wbm->nlevels = QUANTIF_NMAXLEVELS; - wbm->qscale = wsigma>0.0? 2*QUANTIF_NSIGMA*wsigma/wbm->nlevels : 1.0; - wbm->qzero = wmean - QUANTIF_NSIGMA*wsigma; + if (wsigma < wmad) + { + wbm->qscale = wsigma>0.0? 2*QUANTIF_NSIGMA*wsigma/wbm->nlevels : 1.0; + wbm->qzero = wmean - QUANTIF_NSIGMA*wsigma; + } else { + wbm->qscale = wmad>0.0? 2*QUANTIF_NSIGMA*wmad/wbm->nlevels : 1.0; + wbm->qzero = wmedian - QUANTIF_NSIGMA*wmad; + } wbm++; wbuf += bw; } } + QFREE(bufa); + QFREE(wbufa); return; } @@ -628,6 +680,8 @@ double ftemp, mea, sig, sig1, med, dpix; int i, n, lcut,hcut, nlevelsm1, pix; +//fprintf(stderr,"mean=%-10g sigma=%-10g median=%-10g mad=%-10g\n",bkg->mean,bkg->sigma,bkg->median,bkg->mad); + /* Leave here if the mesh is already classified as `bad' */ if (bkg->mean<=-BIG) { @@ -674,14 +728,16 @@ hcut = (ftemp=med+3.0*sig)0.0?ftemp+0.5:ftemp-0.5) : nlevelsm1; } + *mean = fabs(sig)>0.0? (fabs(bkg->sigma/(sig*bkg->qscale)-1) < 0.0 ? bkg->qzero+mea*bkg->qscale - :(fabs((mea-med)/sig)< 0.3 ? - bkg->qzero+(2.5*med-1.5*mea)*bkg->qscale - :bkg->qzero+med*bkg->qscale)) + :(fabs((mea-med)/sig)< 0.3 ? + bkg->qzero+(3.*med-2.*mea)*bkg->qscale - prefs.backmodewidth * (mea-med)/sig*bkg->mad + :bkg->qzero+med*bkg->qscale )) :bkg->qzero+mea*bkg->qscale; - *sigma = sig*bkg->qscale; + if ((*sigma = sig*bkg->qscale) > bkg->mad) *sigma=bkg->mad; + return *mean; } @@ -774,10 +830,15 @@ smask[i++] = sigma[x+y]; } } + + if (fabs((med=fqmedian(bmask, i))-back[px+py])>=fthresh) + +// if (fabs((med=fhodl(bmask, i))-back[px+py])>=fthresh) { back2[px+py] = med; - sigma2[px+py] = fqmedian(smask, i); + sigma2[px+py] = fqmedian(smask, i); +// sigma2[px+py] = fhodl(smask, i); } else { diff -Naur orig/back.h src/back.h --- orig/back.h 2015-12-03 18:18:31.000000000 +0300 +++ src/back.h 2015-12-28 15:24:39.812954024 +0300 @@ -30,7 +30,7 @@ #define BACK_BUFSIZE 1048576 /* bkgnd buffer */ #define BACK_MINGOODFRAC 0.5 /* min frac with good weights*/ #define QUANTIF_NSIGMA 5 /* histogram limits */ -#define QUANTIF_NMAXLEVELS 4096 /* max nb of quantif. levels */ +#define QUANTIF_NMAXLEVELS 16384 /* max nb of quantif. levels */ #define QUANTIF_AMIN 4 /* min nb of "mode pixels" */ #define BACK_WSCALE 1 /* Activate weight scaling */ @@ -46,7 +46,8 @@ /* Background info */ typedef struct structback { - float mode, mean, sigma; /* Background mode, mean and sigma */ + float mode, mean, sigma, median, mad ;/* Background mode, mean and sigma */ + /* added by VCh median and median absolute deviation */ LONG *histo; /* Pointer to a histogram */ int nlevels; /* Nb of histogram bins */ float qzero, qscale; /* Position of histogram */ @@ -69,6 +70,9 @@ float backguess(backstruct *, float *, float *), localback(picstruct *, objstruct *), - *makebackspline(picstruct *, float *); + *makebackspline(picstruct *, float *), + fhodl(float *, int); + +double sigma_mad(PIXTYPE *, int, double *); extern PIXTYPE back(picstruct *, int, int); diff -Naur orig/.deps/rang.Po src/.deps/rang.Po --- orig/.deps/rang.Po 1970-01-01 03:00:00.000000000 +0300 +++ src/.deps/rang.Po 2016-01-05 16:38:46.967947775 +0300 @@ -0,0 +1,111 @@ +rang.o: rang.c /usr/include/math.h /usr/include/features.h \ + /usr/include/sys/cdefs.h /usr/include/bits/wordsize.h \ + /usr/include/gnu/stubs.h /usr/include/gnu/stubs-64.h \ + /usr/include/bits/huge_val.h /usr/include/bits/huge_valf.h \ + /usr/include/bits/huge_vall.h /usr/include/bits/inf.h \ + /usr/include/bits/nan.h /usr/include/bits/mathdef.h \ + /usr/include/bits/mathcalls.h /usr/include/bits/mathinline.h \ + /usr/include/stdlib.h \ + /usr/lib/gcc/x86_64-redhat-linux/4.4.7/include/stddef.h \ + /usr/include/bits/waitflags.h /usr/include/bits/waitstatus.h \ + /usr/include/endian.h /usr/include/bits/endian.h \ + /usr/include/bits/byteswap.h /usr/include/sys/types.h \ + /usr/include/bits/types.h /usr/include/bits/typesizes.h \ + /usr/include/time.h /usr/include/sys/select.h /usr/include/bits/select.h \ + /usr/include/bits/sigset.h /usr/include/bits/time.h \ + /usr/include/sys/sysmacros.h /usr/include/bits/pthreadtypes.h \ + /usr/include/alloca.h define.h globals.h types.h /usr/include/stdio.h \ + /usr/include/libio.h /usr/include/_G_config.h /usr/include/wchar.h \ + /usr/lib/gcc/x86_64-redhat-linux/4.4.7/include/stdarg.h \ + /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \ + /usr/include/bits/stdio.h fits/fitscat.h fitswcs.h + +/usr/include/math.h: + +/usr/include/features.h: + +/usr/include/sys/cdefs.h: + +/usr/include/bits/wordsize.h: + +/usr/include/gnu/stubs.h: + +/usr/include/gnu/stubs-64.h: + +/usr/include/bits/huge_val.h: + +/usr/include/bits/huge_valf.h: + +/usr/include/bits/huge_vall.h: + +/usr/include/bits/inf.h: + +/usr/include/bits/nan.h: + +/usr/include/bits/mathdef.h: + +/usr/include/bits/mathcalls.h: + +/usr/include/bits/mathinline.h: + +/usr/include/stdlib.h: + +/usr/lib/gcc/x86_64-redhat-linux/4.4.7/include/stddef.h: + +/usr/include/bits/waitflags.h: + +/usr/include/bits/waitstatus.h: + +/usr/include/endian.h: + +/usr/include/bits/endian.h: + +/usr/include/bits/byteswap.h: + +/usr/include/sys/types.h: + +/usr/include/bits/types.h: + +/usr/include/bits/typesizes.h: + +/usr/include/time.h: + +/usr/include/sys/select.h: + +/usr/include/bits/select.h: + +/usr/include/bits/sigset.h: + +/usr/include/bits/time.h: + +/usr/include/sys/sysmacros.h: + +/usr/include/bits/pthreadtypes.h: + +/usr/include/alloca.h: + +define.h: + +globals.h: + +types.h: + +/usr/include/stdio.h: + +/usr/include/libio.h: + +/usr/include/_G_config.h: + +/usr/include/wchar.h: + +/usr/lib/gcc/x86_64-redhat-linux/4.4.7/include/stdarg.h: + +/usr/include/bits/stdio_lim.h: + +/usr/include/bits/sys_errlist.h: + +/usr/include/bits/stdio.h: + +fits/fitscat.h: + +fitswcs.h: diff -Naur orig/fits/Makefile src/fits/Makefile --- orig/fits/Makefile 2015-12-03 18:14:42.000000000 +0300 +++ src/fits/Makefile 2015-12-28 20:02:58.006441103 +0300 @@ -150,7 +150,7 @@ CPP = gcc -E CPPFLAGS = CYGPATH_W = echo -DATE2 = Thu Dec 03 2015 +DATE2 = Mon Dec 28 2015 DATE3 = December 2015 DEFS = -DHAVE_CONFIG_H DEPDIR = .deps diff -Naur orig/levmar/Makefile src/levmar/Makefile --- orig/levmar/Makefile 2015-12-03 18:14:42.000000000 +0300 +++ src/levmar/Makefile 2015-12-28 20:02:58.019441799 +0300 @@ -148,7 +148,7 @@ CPP = gcc -E CPPFLAGS = CYGPATH_W = echo -DATE2 = Thu Dec 03 2015 +DATE2 = Mon Dec 28 2015 DATE3 = December 2015 DEFS = -DHAVE_CONFIG_H DEPDIR = .deps diff -Naur orig/Makefile src/Makefile --- orig/Makefile 1970-01-01 03:00:00.000000000 +0300 +++ src/Makefile 2015-12-28 20:02:57.958438534 +0300 @@ -0,0 +1,846 @@ +# Makefile.in generated by automake 1.12.2 from Makefile.am. +# src/Makefile. Generated from Makefile.in by configure. + +# Copyright (C) 1994-2012 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. + + + +# +# Makefile.am +# +# src Makefile.am. Process this file with automake to generate a Makefile +# +#%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +# +# This file part of: SExtractor +# +# Copyright: (C) 2002-2013 Emmanuel Bertin -- IAP/CNRS/UPMC +# +# License: GNU General Public License +# +# SExtractor is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# SExtractor is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# You should have received a copy of the GNU General Public License +# along with SExtractor. If not, see . +# +# Last modified: 03/04/2013 +# +#%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + + +am__make_dryrun = \ + { \ + am__dry=no; \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ + | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ + *) \ + for am__flg in $$MAKEFLAGS; do \ + case $$am__flg in \ + *=*|--*) ;; \ + *n*) am__dry=yes; break;; \ + esac; \ + done;; \ + esac; \ + test $$am__dry = yes; \ + } +pkgdatadir = $(datadir)/sextractor +pkgincludedir = $(includedir)/sextractor +pkglibdir = $(libdir)/sextractor +pkglibexecdir = $(libexecdir)/sextractor +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +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 = : +build_triplet = x86_64-unknown-linux-gnu +host_triplet = x86_64-unknown-linux-gnu +bin_PROGRAMS = sex$(EXEEXT) ldactoasc$(EXEEXT) +check_PROGRAMS = sex$(EXEEXT) +subdir = src +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ + $(top_srcdir)/autoconf/depcomp \ + $(top_srcdir)/autoconf/mkinstalldirs +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/acx_atlas.m4 \ + $(top_srcdir)/acx_fftw.m4 $(top_srcdir)/acx_mkl.m4 \ + $(top_srcdir)/acx_prog_cc_optim.m4 \ + $(top_srcdir)/acx_pthread.m4 \ + $(top_srcdir)/acx_urbi_resolve_dir.m4 \ + $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(SHELL) $(top_srcdir)/autoconf/mkinstalldirs +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +am__installdirs = "$(DESTDIR)$(bindir)" +PROGRAMS = $(bin_PROGRAMS) +am_ldactoasc_OBJECTS = ldactoasc.$(OBJEXT) +ldactoasc_OBJECTS = $(am_ldactoasc_OBJECTS) +ldactoasc_DEPENDENCIES = $(srcdir)/fits/libfits.a +am__sex_SOURCES_DIST = analyse.c assoc.c astrom.c back.c bpro.c \ + catout.c check.c clean.c extract.c fft.c field.c filter.c \ + fitswcs.c flag.c graph.c growth.c header.c image.c \ + interpolate.c main.c makeit.c manobjlist.c misc.c neurro.c \ + pattern.c pc.c photom.c plist.c prefs.c profit.c psf.c \ + rang.c readimage.c refine.c retina.c scan.c som.c weight.c winpos.c \ + xml.c assoc.h astrom.h back.h bpro.h check.h clean.h define.h \ + extract.h fft.h field.h filter.h fitswcs.h flag.h globals.h \ + growth.h header.h image.h interpolate.h key.h neurro.h param.h \ + paramprofit.h pattern.h photom.h plist.h prefs.h preflist.h \ + profit.h psf.h retina.h sexhead1.h sexhead.h sexheadsc.h som.h \ + threads.h types.h wcscelsys.h weight.h winpos.h xml.h +am__objects_1 = fft.$(OBJEXT) +am__objects_2 = pattern.$(OBJEXT) +am__objects_3 = profit.$(OBJEXT) +am_sex_OBJECTS = analyse.$(OBJEXT) assoc.$(OBJEXT) astrom.$(OBJEXT) \ + back.$(OBJEXT) bpro.$(OBJEXT) catout.$(OBJEXT) check.$(OBJEXT) \ + clean.$(OBJEXT) extract.$(OBJEXT) $(am__objects_1) \ + field.$(OBJEXT) filter.$(OBJEXT) fitswcs.$(OBJEXT) \ + flag.$(OBJEXT) graph.$(OBJEXT) growth.$(OBJEXT) \ + header.$(OBJEXT) image.$(OBJEXT) interpolate.$(OBJEXT) \ + main.$(OBJEXT) makeit.$(OBJEXT) manobjlist.$(OBJEXT) \ + misc.$(OBJEXT) neurro.$(OBJEXT) $(am__objects_2) pc.$(OBJEXT) \ + photom.$(OBJEXT) plist.$(OBJEXT) prefs.$(OBJEXT) \ + $(am__objects_3) psf.$(OBJEXT) readimage.$(OBJEXT) \ + rang.$(OBJEXT) refine.$(OBJEXT) retina.$(OBJEXT) scan.$(OBJEXT) som.$(OBJEXT) \ + weight.$(OBJEXT) winpos.$(OBJEXT) xml.$(OBJEXT) +sex_OBJECTS = $(am_sex_OBJECTS) +sex_DEPENDENCIES = $(srcdir)/fits/libfits.a $(srcdir)/wcs/libwcs_c.a \ + $(LEVLIB) +DEFAULT_INCLUDES = -I. -I$(top_builddir) +depcomp = $(SHELL) $(top_srcdir)/autoconf/depcomp +am__depfiles_maybe = depfiles +am__mv = mv -f +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +CCLD = $(CC) +LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ +SOURCES = $(ldactoasc_SOURCES) $(sex_SOURCES) +DIST_SOURCES = $(ldactoasc_SOURCES) $(am__sex_SOURCES_DIST) +RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ + html-recursive info-recursive install-data-recursive \ + install-dvi-recursive install-exec-recursive \ + install-html-recursive install-info-recursive \ + install-pdf-recursive install-ps-recursive install-recursive \ + installcheck-recursive installdirs-recursive pdf-recursive \ + ps-recursive uninstall-recursive +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac +RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ + distclean-recursive maintainer-clean-recursive +AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \ + $(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \ + distdir +ETAGS = etags +CTAGS = ctags +DIST_SUBDIRS = fits levmar wcs +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +am__relativize = \ + dir0=`pwd`; \ + sed_first='s,^\([^/]*\)/.*$$,\1,'; \ + sed_rest='s,^[^/]*/*,,'; \ + sed_last='s,^.*/\([^/]*\)$$,\1,'; \ + sed_butlast='s,/*[^/]*$$,,'; \ + while test -n "$$dir1"; do \ + first=`echo "$$dir1" | sed -e "$$sed_first"`; \ + if test "$$first" != "."; then \ + if test "$$first" = ".."; then \ + dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ + dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ + else \ + first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ + if test "$$first2" = "$$first"; then \ + dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ + else \ + dir2="../$$dir2"; \ + fi; \ + dir0="$$dir0"/"$$first"; \ + fi; \ + fi; \ + dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ + done; \ + reldir="$$dir2" +ACLOCAL = ${SHELL} /users/vch/Src/Linux/sextractor-2.19.5/autoconf/missing --run aclocal-1.12 +AMTAR = $${TAR-tar} +AM_CFLAGS = +AM_CPPFLAGS = +AM_LDFLAGS = +AR = ar +ATLAS_CFLAGS = +ATLAS_ERROR = +ATLAS_LIBPATH = -L/usr/lib64/atlas +ATLAS_LIBS = -L/usr/lib64/atlas -llapack -lcblas -latlas +ATLAS_WARN = +AUTOCONF = ${SHELL} /users/vch/Src/Linux/sextractor-2.19.5/autoconf/missing --run autoconf +AUTOHEADER = ${SHELL} /users/vch/Src/Linux/sextractor-2.19.5/autoconf/missing --run autoheader +AUTOMAKE = ${SHELL} /users/vch/Src/Linux/sextractor-2.19.5/autoconf/missing --run automake-1.12 +AWK = gawk +CC = gcc +CCDEPMODE = depmode=gcc3 +CFLAGS = -g -O2 +CPP = gcc -E +CPPFLAGS = +CYGPATH_W = echo +DATE2 = Mon Dec 28 2015 +DATE3 = December 2015 +DEFS = -DHAVE_CONFIG_H +DEPDIR = .deps +DLLTOOL = false +DSYMUTIL = +DUMPBIN = +ECHO_C = +ECHO_N = -n +ECHO_T = +EGREP = /bin/grep -E +EXEEXT = +FFTW_ERROR = +FFTW_LIBS = -lfftw3f +FFTW_WARN = +FGREP = /bin/grep -F +GREP = /bin/grep +INSTALL = /usr/bin/install -c +INSTALL_DATA = ${INSTALL} -m 644 +INSTALL_PROGRAM = ${INSTALL} +INSTALL_SCRIPT = ${INSTALL} +INSTALL_STRIP_PROGRAM = $(install_sh) -c -s +LD = /usr/bin/ld -m elf_x86_64 +LDFLAGS = +LIBOBJS = +LIBS = -L/usr/lib64/atlas -llapack -lcblas -latlas -lfftw3f -lm +LIBTOOL = $(SHELL) $(top_builddir)/libtool +LIPO = +LN_S = ln -s +LTLIBOBJS = +MAKEINFO = ${SHELL} /users/vch/Src/Linux/sextractor-2.19.5/autoconf/missing --run makeinfo +MANIFEST_TOOL = : +MKDIR_P = /bin/mkdir -p +MKL_CFLAGS = +MKL_LDFLAGS = +MKL_LIBS = +MKL_WARN = +NM = /usr/bin/nm -B +NMEDIT = +OBJDUMP = objdump +OBJEXT = o +OTOOL = +OTOOL64 = +PACKAGE = sextractor +PACKAGER = Emmanuel Bertin +PACKAGE_BUGREPORT = bertin@iap.fr +PACKAGE_NAME = sextractor +PACKAGE_STRING = sextractor 2.19.5 +PACKAGE_TARNAME = sextractor +PACKAGE_URL = +PACKAGE_VERSION = 2.19.5 +PATH_SEPARATOR = : +PTHREAD_CC = +PTHREAD_CFLAGS = +PTHREAD_LIBS = +RANLIB = ranlib +SED = /bin/sed +SET_MAKE = +SHELL = /bin/sh +STRIP = strip +VERSION = 2.19.5 +abs_builddir = /users/vch/Src/Linux/sextractor-2.19.5/src +abs_srcdir = /users/vch/Src/Linux/sextractor-2.19.5/src +abs_top_builddir = /users/vch/Src/Linux/sextractor-2.19.5 +abs_top_srcdir = /users/vch/Src/Linux/sextractor-2.19.5 +ac_ct_AR = ar +ac_ct_CC = gcc +ac_ct_DUMPBIN = +am__include = include +am__leading_dot = . +am__quote = +am__tar = $${TAR-tar} chof - "$$tardir" +am__untar = $${TAR-tar} xf - +bindir = ${exec_prefix}/bin +build = x86_64-unknown-linux-gnu +build_alias = +build_cpu = x86_64 +build_os = linux-gnu +build_vendor = unknown +builddir = . +datadir = ${datarootdir} +datarootdir = ${prefix}/share +docdir = ${datarootdir}/doc/${PACKAGE_TARNAME} +dvidir = ${docdir} +exec_prefix = ${prefix} +host = x86_64-unknown-linux-gnu +host_alias = +host_cpu = x86_64 +host_os = linux-gnu +host_vendor = unknown +htmldir = ${docdir} +includedir = ${prefix}/include +infodir = ${datarootdir}/info +install_sh = ${SHELL} /users/vch/Src/Linux/sextractor-2.19.5/autoconf/install-sh +libdir = ${exec_prefix}/lib +libexecdir = ${exec_prefix}/libexec +localedir = ${datarootdir}/locale +localstatedir = ${prefix}/var +mandir = ${datarootdir}/man +mkdir_p = $(MKDIR_P) +oldincludedir = /usr/include +pdfdir = ${docdir} +prefix = /usr/local +program_transform_name = s,x,x, +psdir = ${docdir} +sbindir = ${exec_prefix}/sbin +sharedstatedir = ${prefix}/com +srcdir = . +sysconfdir = ${prefix}/etc +target_alias = +top_build_prefix = ../ +top_builddir = .. +top_srcdir = .. +FFTSOURCE = fft.c +PATTERNSOURCE = pattern.c +PROFITSOURCE = profit.c +LEVLIB = $(srcdir)/levmar/liblevmar.a +LEVDIR = levmar +SUBDIRS = fits $(LEVDIR) wcs +sex_SOURCES = analyse.c assoc.c astrom.c back.c bpro.c catout.c \ + check.c clean.c extract.c $(FFTSOURCE) field.c \ + filter.c fitswcs.c flag.c graph.c growth.c header.c \ + image.c interpolate.c main.c makeit.c manobjlist.c \ + misc.c neurro.c $(PATTERNSOURCE) pc.c photom.c \ + plist.c prefs.c $(PROFITSOURCE) psf.c readimage.c \ + rang.c refine.c retina.c scan.c som.c weight.c winpos.c \ + xml.c \ + assoc.h astrom.h back.h bpro.h check.h clean.h \ + define.h extract.h fft.h field.h filter.h fitswcs.h \ + flag.h globals.h growth.h header.h image.h \ + interpolate.h key.h neurro.h param.h paramprofit.h \ + pattern.h photom.h plist.h prefs.h preflist.h \ + profit.h psf.h retina.h sexhead1.h sexhead.h \ + sexheadsc.h som.h threads.h types.h wcscelsys.h \ + weight.h winpos.h xml.h + +ldactoasc_SOURCES = ldactoasc.c ldactoasc.h +sex_LDADD = $(srcdir)/fits/libfits.a \ + $(srcdir)/wcs/libwcs_c.a \ + $(LEVLIB) + +ldactoasc_LDADD = $(srcdir)/fits/libfits.a +DATE = `date +"%Y-%m-%d"` +all: all-recursive + +.SUFFIXES: +.SUFFIXES: .c .lo .o .obj +$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --foreign src/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): +install-binPROGRAMS: $(bin_PROGRAMS) + @$(NORMAL_INSTALL) + @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ + if test -n "$$list"; then \ + echo " $(MKDIR_P) '$(DESTDIR)$(bindir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(bindir)" || exit 1; \ + fi; \ + for p in $$list; do echo "$$p $$p"; done | \ + sed 's/$(EXEEXT)$$//' | \ + while read p p1; do if test -f $$p || test -f $$p1; \ + then echo "$$p"; echo "$$p"; else :; fi; \ + done | \ + sed -e 'p;s,.*/,,;n;h' -e 's|.*|.|' \ + -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ + sed 'N;N;N;s,\n, ,g' | \ + $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ + { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ + if ($$2 == $$4) files[d] = files[d] " " $$1; \ + else { print "f", $$3 "/" $$4, $$1; } } \ + END { for (d in files) print "f", d, files[d] }' | \ + while read type dir files; do \ + if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ + test -z "$$files" || { \ + echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \ + $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \ + } \ + ; done + +uninstall-binPROGRAMS: + @$(NORMAL_UNINSTALL) + @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ + files=`for p in $$list; do echo "$$p"; done | \ + sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ + -e 's/$$/$(EXEEXT)/' `; \ + test -n "$$list" || exit 0; \ + echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \ + cd "$(DESTDIR)$(bindir)" && rm -f $$files + +clean-binPROGRAMS: + @list='$(bin_PROGRAMS)'; test -n "$$list" || exit 0; \ + echo " rm -f" $$list; \ + rm -f $$list || exit $$?; \ + test -n "$(EXEEXT)" || exit 0; \ + list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ + echo " rm -f" $$list; \ + rm -f $$list + +clean-checkPROGRAMS: + @list='$(check_PROGRAMS)'; test -n "$$list" || exit 0; \ + echo " rm -f" $$list; \ + rm -f $$list || exit $$?; \ + test -n "$(EXEEXT)" || exit 0; \ + list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ + echo " rm -f" $$list; \ + rm -f $$list +ldactoasc$(EXEEXT): $(ldactoasc_OBJECTS) $(ldactoasc_DEPENDENCIES) $(EXTRA_ldactoasc_DEPENDENCIES) + @rm -f ldactoasc$(EXEEXT) + $(LINK) $(ldactoasc_OBJECTS) $(ldactoasc_LDADD) $(LIBS) +sex$(EXEEXT): $(sex_OBJECTS) $(sex_DEPENDENCIES) $(EXTRA_sex_DEPENDENCIES) + @rm -f sex$(EXEEXT) + $(LINK) $(sex_OBJECTS) $(sex_LDADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +include ./$(DEPDIR)/analyse.Po +include ./$(DEPDIR)/assoc.Po +include ./$(DEPDIR)/astrom.Po +include ./$(DEPDIR)/back.Po +include ./$(DEPDIR)/bpro.Po +include ./$(DEPDIR)/catout.Po +include ./$(DEPDIR)/check.Po +include ./$(DEPDIR)/clean.Po +include ./$(DEPDIR)/extract.Po +include ./$(DEPDIR)/fft.Po +include ./$(DEPDIR)/field.Po +include ./$(DEPDIR)/filter.Po +include ./$(DEPDIR)/fitswcs.Po +include ./$(DEPDIR)/flag.Po +include ./$(DEPDIR)/graph.Po +include ./$(DEPDIR)/growth.Po +include ./$(DEPDIR)/header.Po +include ./$(DEPDIR)/image.Po +include ./$(DEPDIR)/interpolate.Po +include ./$(DEPDIR)/ldactoasc.Po +include ./$(DEPDIR)/main.Po +include ./$(DEPDIR)/makeit.Po +include ./$(DEPDIR)/manobjlist.Po +include ./$(DEPDIR)/misc.Po +include ./$(DEPDIR)/neurro.Po +include ./$(DEPDIR)/pattern.Po +include ./$(DEPDIR)/pc.Po +include ./$(DEPDIR)/photom.Po +include ./$(DEPDIR)/plist.Po +include ./$(DEPDIR)/prefs.Po +include ./$(DEPDIR)/profit.Po +include ./$(DEPDIR)/psf.Po +include ./$(DEPDIR)/rang.Po +include ./$(DEPDIR)/readimage.Po +include ./$(DEPDIR)/refine.Po +include ./$(DEPDIR)/retina.Po +include ./$(DEPDIR)/scan.Po +include ./$(DEPDIR)/som.Po +include ./$(DEPDIR)/weight.Po +include ./$(DEPDIR)/winpos.Po +include ./$(DEPDIR)/xml.Po + +.c.o: + $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< + $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +# source='$<' object='$@' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(COMPILE) -c $< + +.c.obj: + $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` + $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +# source='$<' object='$@' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(COMPILE) -c `$(CYGPATH_W) '$<'` + +.c.lo: + $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< + $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +# source='$<' object='$@' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(LTCOMPILE) -c -o $@ $< + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + +# This directory's subdirectories are mostly independent; you can cd +# into them and run 'make' without going through this Makefile. +# To change the values of 'make' variables: instead of editing Makefiles, +# (1) if the variable is set in 'config.status', edit 'config.status' +# (which will cause the Makefiles to be regenerated when you run 'make'); +# (2) otherwise, pass the desired values on the 'make' command line. +$(RECURSIVE_TARGETS) $(RECURSIVE_CLEAN_TARGETS): + @fail= failcom='exit 1'; \ + for f in x $$MAKEFLAGS; do \ + case $$f in \ + *=* | --[!k]*);; \ + *k*) failcom='fail=yes';; \ + esac; \ + done; \ + dot_seen=no; \ + target=`echo $@ | sed s/-recursive//`; \ + case "$@" in \ + distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ + *) list='$(SUBDIRS)' ;; \ + esac; \ + for subdir in $$list; do \ + echo "Making $$target in $$subdir"; \ + if test "$$subdir" = "."; then \ + dot_seen=yes; \ + local_target="$$target-am"; \ + else \ + local_target="$$target"; \ + fi; \ + ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ + || eval $$failcom; \ + done; \ + if test "$$dot_seen" = "no"; then \ + $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ + fi; test -z "$$fail" +tags-recursive: + list='$(SUBDIRS)'; for subdir in $$list; do \ + test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ + done +ctags-recursive: + list='$(SUBDIRS)'; for subdir in $$list; do \ + test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ + done +cscopelist-recursive: + list='$(SUBDIRS)'; for subdir in $$list; do \ + test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) cscopelist); \ + done + +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; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + set x; \ + here=`pwd`; \ + if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ + include_option=--etags-include; \ + empty_fix=.; \ + else \ + include_option=--include; \ + empty_fix=; \ + fi; \ + list='$(SUBDIRS)'; for subdir in $$list; do \ + if test "$$subdir" = .; then :; else \ + test ! -f $$subdir/TAGS || \ + set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ + fi; \ + done; \ + 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; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: CTAGS +CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + 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; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" + +cscopelist: cscopelist-recursive $(HEADERS) $(SOURCES) $(LISP) + list='$(SOURCES) $(HEADERS) $(LISP)'; \ + case "$(srcdir)" in \ + [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ + *) sdir=$(subdir)/$(srcdir) ;; \ + esac; \ + for i in $$list; do \ + if test -f "$$i"; then \ + echo "$(subdir)/$$i"; \ + else \ + echo "$$sdir/$$i"; \ + fi; \ + done >> $(top_builddir)/cscope.files + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done + @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ + if test "$$subdir" = .; then :; else \ + $(am__make_dryrun) \ + || test -d "$(distdir)/$$subdir" \ + || $(MKDIR_P) "$(distdir)/$$subdir" \ + || exit 1; \ + dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ + $(am__relativize); \ + new_distdir=$$reldir; \ + dir1=$$subdir; dir2="$(top_distdir)"; \ + $(am__relativize); \ + new_top_distdir=$$reldir; \ + echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \ + echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \ + ($(am__cd) $$subdir && \ + $(MAKE) $(AM_MAKEFLAGS) \ + top_distdir="$$new_top_distdir" \ + distdir="$$new_distdir" \ + am__remove_distdir=: \ + am__skip_length_check=: \ + am__skip_mode_fix=: \ + distdir) \ + || exit 1; \ + fi; \ + done +check-am: all-am + $(MAKE) $(AM_MAKEFLAGS) $(check_PROGRAMS) +check: check-recursive +all-am: Makefile $(PROGRAMS) +installdirs: installdirs-recursive +installdirs-am: + for dir in "$(DESTDIR)$(bindir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done +install: install-recursive +install-exec: install-exec-recursive +install-data: install-data-recursive +uninstall: uninstall-recursive + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-recursive +install-strip: + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_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-recursive + +clean-am: clean-binPROGRAMS clean-checkPROGRAMS clean-generic \ + clean-libtool mostlyclean-am + +distclean: distclean-recursive + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-recursive + +dvi-am: + +html: html-recursive + +html-am: + +info: info-recursive + +info-am: + +install-data-am: + +install-dvi: install-dvi-recursive + +install-dvi-am: + +install-exec-am: install-binPROGRAMS + +install-html: install-html-recursive + +install-html-am: + +install-info: install-info-recursive + +install-info-am: + +install-man: + +install-pdf: install-pdf-recursive + +install-pdf-am: + +install-ps: install-ps-recursive + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-recursive + -rm -rf ./$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-recursive + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-recursive + +pdf-am: + +ps: ps-recursive + +ps-am: + +uninstall-am: uninstall-binPROGRAMS + +.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) check-am \ + cscopelist-recursive ctags-recursive install-am install-strip \ + tags-recursive + +.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ + all all-am check check-am clean clean-binPROGRAMS \ + clean-checkPROGRAMS clean-generic clean-libtool cscopelist \ + cscopelist-recursive ctags ctags-recursive distclean \ + distclean-compile distclean-generic distclean-libtool \ + distclean-tags distdir dvi dvi-am html html-am info info-am \ + install install-am install-binPROGRAMS install-data \ + install-data-am install-dvi install-dvi-am install-exec \ + install-exec-am install-html install-html-am install-info \ + install-info-am install-man install-pdf install-pdf-am \ + install-ps install-ps-am install-strip installcheck \ + installcheck-am installdirs installdirs-am maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-compile \ + mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ + tags tags-recursive uninstall uninstall-am \ + uninstall-binPROGRAMS + + +# 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: diff -Naur orig/Makefile.am src/Makefile.am --- orig/Makefile.am 2013-04-03 20:36:10.000000000 +0400 +++ src/Makefile.am 2015-12-24 15:41:05.462926694 +0300 @@ -41,7 +41,7 @@ filter.c fitswcs.c flag.c graph.c growth.c header.c \ image.c interpolate.c main.c makeit.c manobjlist.c \ misc.c neurro.c $(PATTERNSOURCE) pc.c photom.c \ - plist.c prefs.c $(PROFITSOURCE) psf.c readimage.c \ + plist.c prefs.c $(PROFITSOURCE) psf.c rang.c readimage.c \ refine.c retina.c scan.c som.c weight.c winpos.c \ xml.c \ assoc.h astrom.h back.h bpro.h check.h clean.h \ diff -Naur orig/Makefile.in src/Makefile.in --- orig/Makefile.in 2015-12-24 16:26:14.605574758 +0300 +++ src/Makefile.in 2015-12-24 16:26:14.608574918 +0300 @@ -107,7 +107,7 @@ fitswcs.c flag.c graph.c growth.c header.c image.c \ interpolate.c main.c makeit.c manobjlist.c misc.c neurro.c \ pattern.c pc.c photom.c plist.c prefs.c profit.c psf.c \ - readimage.c refine.c retina.c scan.c som.c weight.c winpos.c \ + rang.c readimage.c refine.c retina.c scan.c som.c weight.c winpos.c \ xml.c assoc.h astrom.h back.h bpro.h check.h clean.h define.h \ extract.h fft.h field.h filter.h fitswcs.h flag.h globals.h \ growth.h header.h image.h interpolate.h key.h neurro.h param.h \ @@ -127,7 +127,7 @@ misc.$(OBJEXT) neurro.$(OBJEXT) $(am__objects_2) pc.$(OBJEXT) \ photom.$(OBJEXT) plist.$(OBJEXT) prefs.$(OBJEXT) \ $(am__objects_3) psf.$(OBJEXT) readimage.$(OBJEXT) \ - refine.$(OBJEXT) retina.$(OBJEXT) scan.$(OBJEXT) som.$(OBJEXT) \ + rang.$(OBJEXT) refine.$(OBJEXT) retina.$(OBJEXT) scan.$(OBJEXT) som.$(OBJEXT) \ weight.$(OBJEXT) winpos.$(OBJEXT) xml.$(OBJEXT) sex_OBJECTS = $(am_sex_OBJECTS) sex_DEPENDENCIES = $(srcdir)/fits/libfits.a $(srcdir)/wcs/libwcs_c.a \ @@ -339,7 +339,7 @@ image.c interpolate.c main.c makeit.c manobjlist.c \ misc.c neurro.c $(PATTERNSOURCE) pc.c photom.c \ plist.c prefs.c $(PROFITSOURCE) psf.c readimage.c \ - refine.c retina.c scan.c som.c weight.c winpos.c \ + rang.c refine.c retina.c scan.c som.c weight.c winpos.c \ xml.c \ assoc.h astrom.h back.h bpro.h check.h clean.h \ define.h extract.h fft.h field.h filter.h fitswcs.h \ @@ -491,6 +491,7 @@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/prefs.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/profit.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/psf.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rang.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/readimage.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/refine.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/retina.Po@am__quote@ diff -Naur orig/preflist.h src/preflist.h --- orig/preflist.h 2014-01-31 14:50:33.000000000 +0400 +++ src/preflist.h 2016-01-05 17:31:38.235366451 +0300 @@ -71,6 +71,7 @@ 1, 2, &prefs.nback_type}, {"BACK_VALUE", P_FLOATLIST, prefs.back_val, 0,0, -BIG,BIG, {""}, 1, 2, &prefs.nback_val}, + {"BACK_MODEWIDTH", P_FLOAT, &prefs.backmodewidth, 0,0, 3.0,6.0}, {"CATALOG_NAME", P_STRING, prefs.cat_name}, {"CATALOG_TYPE", P_KEY, &prefs.cat_type, 0,0, 0.0,0.0, {"NONE", "ASCII","ASCII_HEAD", "ASCII_SKYCAT", "ASCII_VOTABLE", @@ -255,6 +256,8 @@ "*BACK_VALUE 0.0 # Default background value in MANUAL mode", "BACK_SIZE 64 # Background mesh: or ,", "BACK_FILTERSIZE 3 # Background filter: or ,", +"BACK_MODEWIDTH 5.2 # Default width of the distribution of values", +" # of the background, use value: 3.0-6.0", " ", "BACKPHOTO_TYPE GLOBAL # can be GLOBAL or LOCAL", "*BACKPHOTO_THICK 24 # thickness of the background LOCAL annulus", diff -Naur orig/prefs.h src/prefs.h --- orig/prefs.h 2014-01-31 14:50:23.000000000 +0400 +++ src/prefs.h 2016-01-05 16:12:17.975040603 +0300 @@ -135,6 +135,8 @@ double backfthresh; /* bkgnd fil. thresh */ enum {GLOBAL, LOCAL} pback_type; /* phot. bkgnd type */ int pback_size; /* rect. ann. width */ +/*--- extra background additions */ /* added by VCh */ + double backmodewidth; /* width of distribution*/ /*----- memory */ int clean_stacksize; /* size of buffer */ int mem_pixstack; /* pixel stack size */ diff -Naur orig/rang.c src/rang.c --- orig/rang.c 1970-01-01 03:00:00.000000000 +0300 +++ src/rang.c 2015-12-29 09:51:40.997999303 +0300 @@ -0,0 +1,86 @@ +#include +#include + +#include "define.h" +#include "globals.h" + +/* "Quick-sort algorithm" from system library */ + +/* compare two float for qsort() */ +inline static int pixcmp(const void *f1, const void *f2) +{ + return( ((*((PIXTYPE *)f1) - *((PIXTYPE *)f2)) >= 0.0)? 1 : -1 ); +} + +/* mdn=fqsrt(arr,k) */ +static double fqsrt(PIXTYPE *arr, int k) +/* float *arr sort k elements in arr */ +/* int k; returns median of arr */ +{ + int i = k/2; + qsort(arr, k, sizeof(PIXTYPE), pixcmp); + return( (k&01)? arr[i] : (arr[i-1]+arr[i])/2.0); +} + +/* MAD (Median Absolute Deviation) - robust estimation of "sigma"*/ + +double sigma_mad(PIXTYPE *vect, int n, double *med) + +/* n - size of window */ +/* vect - array of n elements */ +/* med - address of median calculated */ + +{ + double mad, b; + PIXTYPE *buf0, *pb0; + int i; + + QCALLOC(buf0, PIXTYPE, n ); + + for(pb0=buf0,i=0; i 0.0) ? b : -b; + } + /* 1/0.674 = the efficiency of AMD as dispersion */ + mad = fqsrt(buf0,n)/(0.674*sqrt((double)(n-1.)/n)); + QFREE(buf0); + return(mad); +} + +/* + * Vch & Co + * Hodges-Lehman estimation for ranged set (float case) */ +/* */ + +float fhodl(float *farr, int n) /* estimation of queuing set from n-elements */ +{ + int m = n*(n+1)>>1; /* the addition set from n */ + + float *f_bp; + float *pe = & farr[n-1]; + float hl, + *p11, *p22, *pb, + *p1,*p2; + +// fprintf(stderr,"n=%d m=%d\n",n,m); + + if (n < 2 ) return (farr[0]); + + QCALLOC(f_bp, float, m ); + + pb=f_bp; + *pb++ = *farr; + for(p2=farr+1; p2=farr)&&(p22!=pe); ) + *pb++ = (((*p11--)-(*p22))/2.)+(*p22++); + + hl = (float) fqsrt(f_bp, m); + QFREE(f_bp); + return(hl); +} + diff -Naur orig/wcs/Makefile src/wcs/Makefile --- orig/wcs/Makefile 2015-12-03 18:14:42.000000000 +0300 +++ src/wcs/Makefile 2015-12-28 20:02:58.032442494 +0300 @@ -150,7 +150,7 @@ CPP = gcc -E CPPFLAGS = CYGPATH_W = echo -DATE2 = Thu Dec 03 2015 +DATE2 = Mon Dec 28 2015 DATE3 = December 2015 DEFS = -DHAVE_CONFIG_H DEPDIR = .deps