diff --git a/.cvsignore b/.cvsignore deleted file mode 100644 index 8484e9c..0000000 --- a/.cvsignore +++ /dev/null @@ -1 +0,0 @@ -sextractor-2.5.0.tar.gz diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..e18d876 --- /dev/null +++ b/.gitignore @@ -0,0 +1,4 @@ +sextractor-2.8.6.tar.gz +/sextractor-2.19.5.tar.gz +/sextractor-2.25.0.tar.gz +/sextractor-2.28.2.tar.gz diff --git a/Makefile b/Makefile deleted file mode 100644 index f627a18..0000000 --- a/Makefile +++ /dev/null @@ -1,21 +0,0 @@ -# Makefile for source rpm: sextractor -# $Id$ -NAME := sextractor -SPECFILE = $(firstword $(wildcard *.spec)) - -define find-makefile-common -for d in common ../common ../../common ; do if [ -f $$d/Makefile.common ] ; then if [ -f $$d/CVS/Root -a -w $$/Makefile.common ] ; then cd $$d ; cvs -Q update ; fi ; echo "$$d/Makefile.common" ; break ; fi ; done -endef - -MAKEFILE_COMMON := $(shell $(find-makefile-common)) - -ifeq ($(MAKEFILE_COMMON),) -# attept a checkout -define checkout-makefile-common -test -f CVS/Root && { cvs -Q -d $$(cat CVS/Root) checkout common && echo "common/Makefile.common" ; } || { echo "ERROR: I can't figure out how to checkout the 'common' module." ; exit -1 ; } >&2 -endef - -MAKEFILE_COMMON := $(shell $(checkout-makefile-common)) -endif - -include $(MAKEFILE_COMMON) diff --git a/changelog b/changelog new file mode 100644 index 0000000..6db61c8 --- /dev/null +++ b/changelog @@ -0,0 +1,144 @@ +* Sun Jan 19 2025 Fedora Release Engineering - 2.25.0-12 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild + +* Thu Jul 25 2024 Miroslav Suchý - 2.25.0-11 +- convert license to SPDX + +* Sat Jul 20 2024 Fedora Release Engineering - 2.25.0-10 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild + +* Sat Jan 27 2024 Fedora Release Engineering - 2.25.0-9 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild + +* Sat Jul 22 2023 Fedora Release Engineering - 2.25.0-8 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild + +* Sat Jan 21 2023 Fedora Release Engineering - 2.25.0-7 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild + +* Sat Jul 23 2022 Fedora Release Engineering - 2.25.0-6 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild + +* Sat Jan 22 2022 Fedora Release Engineering - 2.25.0-5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild + +* Fri Jul 23 2021 Fedora Release Engineering - 2.25.0-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild + +* Wed Jan 27 2021 Fedora Release Engineering - 2.25.0-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild + +* Wed Jul 29 2020 Fedora Release Engineering - 2.25.0-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild + +* Fri Feb 28 2020 Sergio Pascual - 2.25.0-1 +- New upstream release (2.25.0) +- Built with openblas (bz#1619130) +- Enable legacy_common_support (-fcommon) temporarely + +* Thu Jan 30 2020 Fedora Release Engineering - 2.19.5-14 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild + +* Fri Jul 26 2019 Fedora Release Engineering - 2.19.5-13 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild + +* Sat Feb 02 2019 Fedora Release Engineering - 2.19.5-12 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild + +* Sat Jul 14 2018 Fedora Release Engineering - 2.19.5-11 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild + +* Fri Feb 09 2018 Fedora Release Engineering - 2.19.5-10 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild + +* Thu Aug 03 2017 Fedora Release Engineering - 2.19.5-9 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild + +* Thu Jul 27 2017 Fedora Release Engineering - 2.19.5-8 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild + +* Sat Feb 11 2017 Fedora Release Engineering - 2.19.5-7 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild + +* Thu Feb 04 2016 Fedora Release Engineering - 2.19.5-6 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild + +* Fri Jun 19 2015 Fedora Release Engineering - 2.19.5-5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild + +* Mon Aug 18 2014 Fedora Release Engineering - 2.19.5-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild + +* Sun Jun 08 2014 Fedora Release Engineering - 2.19.5-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild + +* Fri Apr 04 2014 Sergio Pascual - 2.19.5-2 +- License is GPLv3+ + +* Wed Mar 26 2014 Sergio Pascual - 2.19.5-1 +- New upstream release (2.19.5) + +* Thu Dec 05 2013 Sergio Pascual - 2.8.6-8 +- Fix format-security error (bz #1037322) + +* Wed Oct 02 2013 Sergio Pascual - 2.8.6-7 +- Hack to build with monolithic ATLAS +- Cleanup of the specfile + +* Sun Aug 04 2013 Fedora Release Engineering - 2.8.6-6 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild + +* Thu Feb 14 2013 Fedora Release Engineering - 2.8.6-5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild + +* Sat Jul 21 2012 Fedora Release Engineering - 2.8.6-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild + +* Sat Jan 14 2012 Fedora Release Engineering - 2.8.6-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild + +* Wed Feb 09 2011 Fedora Release Engineering - 2.8.6-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild + +* Wed Aug 26 2009 Sergio Pascual - 2.8.6-1 +- New upstream source + +* Sun Jul 26 2009 Fedora Release Engineering - 2.5.0-9 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild + +* Wed Feb 25 2009 Fedora Release Engineering - 2.5.0-8 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild + +* Mon Dec 1 2008 Michael Schwendt - 2.5.0-7 +- Include unowned directory. + +* Tue Feb 19 2008 Fedora Release Engineering - 2.5.0-6.1 +- Autorebuild for GCC 4.3 + +* Mon Aug 27 2007 Sergio Pascual 2.5.0-5.1 +- Rebuild for Fedora 8 to get the build-id + +* Tue Sep 12 2006 Sergio Pascual 2.5.0-5 +- Rebuilt for FC6. + +* Wed Jul 26 2006 Sergio Pascual 2.5.0-4 +- Patch to resolve pointer aliasing problems (bug #199700) +- Removed -DXSL_URL flag, as the file sextractor.xsl does not exist yet + +* Mon Jul 24 2006 Sergio Pascual 2.5.0-3 +- Reverting optimization to -O2, it breaks debug infos + +* Fri Jul 21 2006 Sergio Pascual 2.5.0-2 +- fitsconv.c has correct permissions +- changed optimization from -O2 to -O1 (bug #199700) +- additional define allows VOTable output + +* Wed Jul 19 2006 Sergio Pascual 2.5.0-1 +- New upstream version 2.5.0 + +* Tue Jun 20 2006 Sergio Pascual 2.4.4-2 +- Fixed executable permission in src/fits/fitsconv.c +- default.sex and default.param moved to docs + +* Mon Jun 19 2006 Sergio Pascual 2.4.4-1 +- Initial spec file. diff --git a/sextractor-format-sec.patch b/sextractor-format-sec.patch new file mode 100644 index 0000000..99dcead --- /dev/null +++ b/sextractor-format-sec.patch @@ -0,0 +1,65 @@ +diff -ur sextractor-2.19.5/src/catout.c sextractor-2.19.5.prep/src/catout.c +--- sextractor-2.19.5/src/catout.c 2013-09-12 14:35:37.000000000 +0200 ++++ sextractor-2.19.5.prep/src/catout.c 2014-03-26 18:25:06.390874672 +0100 +@@ -999,7 +999,7 @@ + break; + + case ASCII_SKYCAT: +- fprintf(ascfile, skycattail); ++ fprintf(ascfile, "%s", skycattail); + if (!prefs.pipe_flag) + fclose(ascfile); + break; +diff -ur sextractor-2.19.5/src/xml.c sextractor-2.19.5.prep/src/xml.c +--- sextractor-2.19.5/src/xml.c 2013-04-27 15:22:23.000000000 +0200 ++++ sextractor-2.19.5.prep/src/xml.c 2014-03-26 18:29:36.122059320 +0100 +@@ -696,7 +696,7 @@ + name, ucd); + break; + case P_STRING: +- sprintf(value, (char *)key[i].ptr); ++ sprintf(value, "%s", (char *)key[i].ptr); + fprintf(file, " \n", + name, ucd, *value? value: " "); +@@ -705,13 +705,13 @@ + n = *(key[i].nlistptr); + if (n) + { +- sprintf(value, ((char **)key[i].ptr)[0]); ++ sprintf(value, "%s", ((char **)key[i].ptr)[0]); + fprintf(file, " \n"); +@@ -722,7 +722,7 @@ + name, ucd); + break; + case P_KEY: +- sprintf(value, key[i].keylist[*((int *)key[i].ptr)]); ++ sprintf(value, "%s", key[i].keylist[*((int *)key[i].ptr)]); + fprintf(file, " \n", + name, ucd, value); +@@ -731,13 +731,13 @@ + n = *(key[i].nlistptr); + if (n) + { +- sprintf(value, key[i].keylist[((int *)key[i].ptr)[0]]); ++ sprintf(value, "%s", key[i].keylist[((int *)key[i].ptr)[0]]); + fprintf(file, " \n"); diff --git a/sextractor-pointer-alias.patch b/sextractor-pointer-alias.patch deleted file mode 100644 index 8d703b7..0000000 --- a/sextractor-pointer-alias.patch +++ /dev/null @@ -1,1473 +0,0 @@ -diff -ur sextractor-2.5.0.old/src/analyse.c sextractor-2.5.0/src/analyse.c ---- sextractor-2.5.0.old/src/analyse.c 2006-06-29 19:58:03.000000000 +0200 -+++ sextractor-2.5.0/src/analyse.c 2006-07-25 23:26:51.000000000 +0200 -@@ -41,7 +41,7 @@ - #include "som.h" - #include "winpos.h" - --static obj2struct *obj2 = &outobj2; -+/* static obj2struct *obj2 = &outobj2; */ - - /********************************* analyse ***********************************/ - void analyse(picstruct *field, picstruct *dfield, int objnb, -@@ -403,11 +403,11 @@ - obj = &objlist->obj[n]; - - /* Current FITS extension */ -- obj2->ext_number = thecat.currext; -+ outobj2.ext_number = thecat.currext; - - /* Source position */ -- obj2->sposx = (float)(obj2->posx = obj->mx+1.0); /* That's standard FITS */ -- obj2->sposy = (float)(obj2->posy = obj->my+1.0); -+ outobj2.sposx = (float)(outobj2.posx = obj->mx+1.0); /* That's standard FITS */ -+ outobj2.sposy = (float)(outobj2.posy = obj->my+1.0); - - /* Integer coordinates */ - ix=(int)(obj->mx+0.49999); -@@ -415,11 +415,11 @@ - - /* Association */ - if (prefs.assoc_flag) -- obj2->assoc_number = do_assoc(field, obj2->sposx, obj2->sposy); -+ outobj2.assoc_number = do_assoc(field, outobj2.sposx, outobj2.sposy); - - if (prefs.assoc_flag && prefs.assocselec_type!=ASSOCSELEC_ALL) - selecflag = (prefs.assocselec_type==ASSOCSELEC_MATCHED)? -- obj2->assoc_number:!obj2->assoc_number; -+ outobj2.assoc_number:!outobj2.assoc_number; - else - selecflag = 1; - -@@ -450,9 +450,9 @@ - pmx2+=temp; - pmy2-=temp; - -- obj2->poserr_a = (float)sqrt(pmx2); -- obj2->poserr_b = (float)sqrt(pmy2); -- obj2->poserr_theta = theta*180.0/PI; -+ outobj2.poserr_a = (float)sqrt(pmx2); -+ outobj2.poserr_b = (float)sqrt(pmy2); -+ outobj2.poserr_theta = theta*180.0/PI; - } - - if (FLAG(obj2.poserr_cxx)) -@@ -462,32 +462,32 @@ - xm2 = obj->poserr_mx2; - ym2 = obj->poserr_my2; - xym = obj->poserr_mxy; -- obj2->poserr_cxx = (float)(ym2/(temp=xm2*ym2-xym*xym)); -- obj2->poserr_cyy = (float)(xm2/temp); -- obj2->poserr_cxy = (float)(-2*xym/temp); -+ outobj2.poserr_cxx = (float)(ym2/(temp=xm2*ym2-xym*xym)); -+ outobj2.poserr_cyy = (float)(xm2/temp); -+ outobj2.poserr_cxy = (float)(-2*xym/temp); - } - - /* ---- Aspect ratio */ - - if (FLAG(obj2.elong)) -- obj2->elong = obj->a/obj->b; -+ outobj2.elong = obj->a/obj->b; - - if (FLAG(obj2.ellip)) -- obj2->ellip = 1-obj->b/obj->a; -+ outobj2.ellip = 1-obj->b/obj->a; - - if (FLAG(obj2.polar)) -- obj2->polar = (obj->a*obj->a - obj->b*obj->b) -+ outobj2.polar = (obj->a*obj->a - obj->b*obj->b) - / (obj->a*obj->a + obj->b*obj->b); - - /*------------------------------- Photometry -------------------------------*/ - - /*-- Convert the father of photom. error estimates from variance to RMS */ -- obj2->flux_iso = obj->flux; -- obj2->fluxerr_iso = sqrt(obj->fluxerr); -+ outobj2.flux_iso = obj->flux; -+ outobj2.fluxerr_iso = sqrt(obj->fluxerr); - if (FLAG(obj.flux_prof)) - { -- obj2->flux_prof = obj->flux_prof; -- obj2->fluxerr_prof = sqrt(obj->fluxerr_prof); -+ outobj2.flux_prof = obj->flux_prof; -+ outobj2.fluxerr_prof = sqrt(obj->fluxerr_prof); - } - - if (FLAG(obj2.flux_isocor)) -@@ -526,14 +526,14 @@ - - if (FLAG(obj2.flux_auto)) - sexellips(check->pix, check->width, check->height, -- obj->mx, obj->my, obj->a*obj2->kronfactor, -- obj->b*obj2->kronfactor, obj->theta, -+ obj->mx, obj->my, obj->a*outobj2.kronfactor, -+ obj->b*outobj2.kronfactor, obj->theta, - check->overlay, obj->flag&OBJ_CROWDED); - - if (FLAG(obj2.flux_petro)) - sexellips(check->pix, check->width, check->height, -- obj->mx, obj->my, obj->a*obj2->petrofactor, -- obj->b*obj2->petrofactor, obj->theta, -+ obj->mx, obj->my, obj->a*outobj2.petrofactor, -+ obj->b*outobj2.petrofactor, obj->theta, - check->overlay, obj->flag&OBJ_CROWDED); - } - -@@ -555,7 +555,7 @@ - input[++j] = log10(obj->iso[i]? obj->iso[i]/fac2: 0.01); - input[++j] = log10(fwhm); - neurresp(input, &output); -- obj2->sprob = (float)output; -+ outobj2.sprob = (float)output; - } - - /*&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&*/ -@@ -604,8 +604,8 @@ - som_phot(thesom, obj->bkg, field->backsig, - (float)prefs.gain, obj->mx-ix, obj->my-iy, - FLAG(obj2.vector_somfit)?outobj2.vector_somfit:NULL, -1.0); -- obj2->stderr_somfit = thesom->stderror; -- obj2->flux_somfit = thesom->amp; -+ outobj2.stderr_somfit = thesom->stderror; -+ outobj2.flux_somfit = thesom->amp; - outobj2.fluxerr_somfit = thesom->sigamp; - } - -@@ -628,7 +628,7 @@ - double_psf_fit(ppsf, field, wfield, obj, thepsf, dfield, dwfield); - else - psf_fit(thepsf, field, wfield, obj); -- obj2->npsf = thepsfit->npsf; -+ outobj2.npsf = thepsfit->npsf; - if (prefs.psfdisplay_type == PSFDISPLAY_SPLIT) - { - nsub = thepsfit->npsf; -@@ -639,18 +639,18 @@ - for (j=0; jnpsf; j++) - { - if (FLAG(obj2.x_psf) && jx_psf[j] = thepsfit->x[j]; -+ outobj2.x_psf[j] = thepsfit->x[j]; - if (FLAG(obj2.y_psf) && jy_psf[j] = thepsfit->y[j]; -+ outobj2.y_psf[j] = thepsfit->y[j]; - if (FLAG(obj2.flux_psf) && jflux_psf[j] = thepsfit->flux[j]; -+ outobj2.flux_psf[j] = thepsfit->flux[j]; - if (FLAG(obj2.magerr_psf) && jmagerr_psf[j] = obj2->fluxerr_psf[j]>0.0? -- 1.086*obj2->fluxerr_psf[j]/thepsfit->flux[j] : 99.0; -+ outobj2.magerr_psf[j] = outobj2.fluxerr_psf[j]>0.0? -+ 1.086*outobj2.fluxerr_psf[j]/thepsfit->flux[j] : 99.0; - if (FLAG(obj2.fluxerr_psf) && jfluxerr_psf[j] = obj2->fluxerr_psf[j]; -+ outobj2.fluxerr_psf[j] = outobj2.fluxerr_psf[j]; - if (FLAG(obj2.mag_psf) && jmag_psf[j] = thepsfit->flux[j]>0.0? -+ outobj2.mag_psf[j] = thepsfit->flux[j]>0.0? - prefs.mag_zeropoint -2.5*log10(thepsfit->flux[j]) : 99.0; - } - } -@@ -670,20 +670,20 @@ - if (prefs.psf_flag && prefs.psfdisplay_type == PSFDISPLAY_SPLIT) - { - if (FLAG(obj2.x_psf)) -- obj2->x_psf[0] = thepsfit->x[j]; -+ outobj2.x_psf[0] = thepsfit->x[j]; - if (FLAG(obj2.y_psf)) -- obj2->y_psf[0] = thepsfit->y[j]; -+ outobj2.y_psf[0] = thepsfit->y[j]; - if (FLAG(obj2.flux_psf)) -- obj2->flux_psf[0] = thepsfit->flux[j]>0.0? thepsfit->flux[j]:0.0; /*?*/ -+ outobj2.flux_psf[0] = thepsfit->flux[j]>0.0? thepsfit->flux[j]:0.0; /*?*/ - if (FLAG(obj2.mag_psf)) -- obj2->mag_psf[0] = thepsfit->flux[j]>0.0? -+ outobj2.mag_psf[0] = thepsfit->flux[j]>0.0? - prefs.mag_zeropoint -2.5*log10(thepsfit->flux[j]) : 99.0; - if (FLAG(obj2.magerr_psf)) -- obj2->magerr_psf[0]= -- (thepsfit->flux[j]>0.0 && obj2->fluxerr_psf[j]>0.0) ? /*?*/ -- 1.086*obj2->fluxerr_psf[j]/thepsfit->flux[j] : 99.0; -+ outobj2.magerr_psf[0]= -+ (thepsfit->flux[j]>0.0 && outobj2.fluxerr_psf[j]>0.0) ? /*?*/ -+ 1.086*outobj2.fluxerr_psf[j]/thepsfit->flux[j] : 99.0; - if (FLAG(obj2.fluxerr_psf)) -- obj2->fluxerr_psf[0]= obj2->fluxerr_psf[j]; -+ outobj2.fluxerr_psf[0]= outobj2.fluxerr_psf[j]; - if (j) - obj->number = ++thecat.ntotal; - } -@@ -714,7 +714,7 @@ - { - if (prefs.somfit_flag && (check=prefs.check[CHECK_MAPSOM])) - blankcheck(check, obj->blank, obj->subw, obj->subh, -- obj->subx, obj->suby, (PIXTYPE)*(obj2->vector_somfit)); -+ obj->subx, obj->suby, (PIXTYPE)*(outobj2.vector_somfit)); - - } - blankimage(field, obj->blank, obj->subw, obj->subh, -diff -ur sextractor-2.5.0.old/src/astrom.c sextractor-2.5.0/src/astrom.c ---- sextractor-2.5.0.old/src/astrom.c 2006-07-13 19:13:09.000000000 +0200 -+++ sextractor-2.5.0/src/astrom.c 2006-07-25 23:27:21.000000000 +0200 -@@ -29,7 +29,7 @@ - #include "astrom.h" - #include "wcs/tnx.h" - --static obj2struct *obj2 = &outobj2; -+/* static obj2struct *obj2 = &outobj2; */ - - /****************************** initastrom **********************************/ - /* -@@ -169,32 +169,32 @@ - { - if (as->wcs_flag) - { -- wcspos = compute_wcs(field, obj2->posx, obj2->posy); -- obj2->alphas = obj2->mxw = wcspos[0]; -- obj2->deltas = obj2->myw = wcspos[1]; -+ wcspos = compute_wcs(field, outobj2.posx, outobj2.posy); -+ outobj2.alphas = outobj2.mxw = wcspos[0]; -+ outobj2.deltas = outobj2.myw = wcspos[1]; - if (FLAG(obj2.alpha2000)) - { - if (fabs(as->equinox-2000.0)>0.003) - precess(as->equinox, wcspos[0], wcspos[1], -- 2000.0, &obj2->alpha2000, &obj2->delta2000); -+ 2000.0, &outobj2.alpha2000, &outobj2.delta2000); - else - { -- obj2->alpha2000 = obj2->mxw; -- obj2->delta2000 = obj2->myw; -+ outobj2.alpha2000 = outobj2.mxw; -+ outobj2.delta2000 = outobj2.myw; - } - if (FLAG(obj2.alpha1950)) -- j2b(as->equinox, obj2->alpha2000, obj2->delta2000, -- &obj2->alpha1950, &obj2->delta1950); -+ j2b(as->equinox, outobj2.alpha2000, outobj2.delta2000, -+ &outobj2.alpha1950, &outobj2.delta1950); - } - } - else - { - double dx,dy; - -- dx = obj2->posx - as->crpix[0]; -- dy = obj2->posy - as->crpix[1]; -- obj2->mxw = as->crval[0]+ lm[0]*dx + lm[1]*dy; /* CDELT included! */ -- obj2->myw = as->crval[1]+ lm[2]*dx + lm[3]*dy; /* CDELT included! */ -+ dx = outobj2.posx - as->crpix[0]; -+ dy = outobj2.posy - as->crpix[1]; -+ outobj2.mxw = as->crval[0]+ lm[0]*dx + lm[1]*dy; /* CDELT included! */ -+ outobj2.myw = as->crval[1]+ lm[2]*dx + lm[3]*dy; /* CDELT included! */ - } - } - -@@ -204,21 +204,21 @@ - if (as->wcs_flag) - { - wcspos = compute_wcs(field, (double)obj->peakx, (double)obj->peaky); -- obj2->peakalphas = obj2->peakxw = wcspos[0]; -- obj2->peakdeltas = obj2->peakyw = wcspos[1]; -+ outobj2.peakalphas = outobj2.peakxw = wcspos[0]; -+ outobj2.peakdeltas = outobj2.peakyw = wcspos[1]; - if (FLAG(obj2.peakalpha2000)) - { - if (fabs(as->equinox-2000.0)>0.003) - precess(as->equinox, wcspos[0], wcspos[1], -- 2000.0, &obj2->peakalpha2000, &obj2->peakdelta2000); -+ 2000.0, &outobj2.peakalpha2000, &outobj2.peakdelta2000); - else - { -- obj2->peakalpha2000 = obj2->peakxw; -- obj2->peakdelta2000 = obj2->peakyw; -+ outobj2.peakalpha2000 = outobj2.peakxw; -+ outobj2.peakdelta2000 = outobj2.peakyw; - } - if (FLAG(obj2.peakalpha1950)) -- j2b(as->equinox, obj2->peakalpha2000, obj2->peakdelta2000, -- &obj2->peakalpha1950, &obj2->peakdelta1950); -+ j2b(as->equinox, outobj2.peakalpha2000, outobj2.peakdelta2000, -+ &outobj2.peakalpha1950, &outobj2.peakdelta1950); - } - } - else -@@ -227,8 +227,8 @@ - - dx = obj->peakx - as->crpix[0]; - dy = obj->peaky - as->crpix[1]; -- obj2->peakxw = as->crval[0]+ lm[0]*dx + lm[1]*dy; /* CDELT included! */ -- obj2->peakyw = as->crval[1]+ lm[2]*dx + lm[3]*dy; /* CDELT included! */ -+ outobj2.peakxw = as->crval[0]+ lm[0]*dx + lm[1]*dy; /* CDELT included! */ -+ outobj2.peakyw = as->crval[1]+ lm[2]*dx + lm[3]*dy; /* CDELT included! */ - } - } - -@@ -237,32 +237,32 @@ - { - if (as->wcs_flag) - { -- wcspos = compute_wcs(field, obj2->winpos_x, obj2->winpos_y); -- obj2->winpos_alphas = obj2->winpos_xw = wcspos[0]; -- obj2->winpos_deltas = obj2->winpos_yw = wcspos[1]; -+ wcspos = compute_wcs(field, outobj2.winpos_x, outobj2.winpos_y); -+ outobj2.winpos_alphas = outobj2.winpos_xw = wcspos[0]; -+ outobj2.winpos_deltas = outobj2.winpos_yw = wcspos[1]; - if (FLAG(obj2.winpos_alpha2000)) - { - if (fabs(as->equinox-2000.0)>0.003) - precess(as->equinox, wcspos[0], wcspos[1], -- 2000.0, &obj2->winpos_alpha2000, &obj2->winpos_delta2000); -+ 2000.0, &outobj2.winpos_alpha2000, &outobj2.winpos_delta2000); - else - { -- obj2->winpos_alpha2000 = obj2->winpos_xw; -- obj2->winpos_delta2000 = obj2->winpos_yw; -+ outobj2.winpos_alpha2000 = outobj2.winpos_xw; -+ outobj2.winpos_delta2000 = outobj2.winpos_yw; - } - if (FLAG(obj2.winpos_alpha1950)) -- j2b(as->equinox, obj2->winpos_alpha2000, obj2->winpos_delta2000, -- &obj2->winpos_alpha1950, &obj2->winpos_delta1950); -+ j2b(as->equinox, outobj2.winpos_alpha2000, outobj2.winpos_delta2000, -+ &outobj2.winpos_alpha1950, &outobj2.winpos_delta1950); - } - } - else - { - double dx,dy; - -- dx = obj2->winpos_x - as->crpix[0]; -- dy = obj2->winpos_y - as->crpix[1]; -- obj2->winpos_xw = as->crval[0]+ lm[0]*dx + lm[1]*dy;/* CDELT included! */ -- obj2->winpos_yw = as->crval[1]+ lm[2]*dx + lm[3]*dy;/* CDELT included! */ -+ dx = outobj2.winpos_x - as->crpix[0]; -+ dy = outobj2.winpos_y - as->crpix[1]; -+ outobj2.winpos_xw = as->crval[0]+ lm[0]*dx + lm[1]*dy;/* CDELT included! */ -+ outobj2.winpos_yw = as->crval[1]+ lm[2]*dx + lm[3]*dy;/* CDELT included! */ - } - } - -@@ -271,11 +271,11 @@ - { - double dx,dy; - -- dx = obj2->posx - 0.5; -- dy = obj2->posy - 0.5; -- obj2->mamaposx = (as->crval[1]+lm[2]*dx+lm[3]*dy) -+ dx = outobj2.posx - 0.5; -+ dy = outobj2.posy - 0.5; -+ outobj2.mamaposx = (as->crval[1]+lm[2]*dx+lm[3]*dy) - *(MAMA_CORFLEX+1.0); /* CDELT included! */ -- obj2->mamaposy = (as->crval[0]+lm[0]*dx+lm[1]*dy); /* CDELT included! */ -+ outobj2.mamaposy = (as->crval[0]+lm[0]*dx+lm[1]*dy); /* CDELT included! */ - } - - /* Express shape parameters in WORLD frame */ -@@ -291,12 +291,12 @@ - astrom_winerrparam(field, obj); - - if (FLAG(obj2.npixw)) -- obj2->npixw = obj->npix*as->pixscale*as->pixscale; -+ outobj2.npixw = obj->npix*as->pixscale*as->pixscale; - if (FLAG(obj2.fdnpixw)) -- obj2->fdnpixw = obj->fdnpix*as->pixscale*as->pixscale; -+ outobj2.fdnpixw = obj->fdnpix*as->pixscale*as->pixscale; - - if (FLAG(obj2.fwhmw)) -- obj2->fwhmw = obj->fwhm*as->pixscale; -+ outobj2.fwhmw = obj->fwhm*as->pixscale; - - return; - } -@@ -417,15 +417,15 @@ - dx2 = obj->mx2; - dy2 = obj->my2; - dxy = obj->mxy; -- obj2->mx2w = xm2 = lm0*lm0*dx2 + lm1*lm1*dy2 + lm0*lm1*dxy; -- obj2->my2w = ym2 = lm2*lm2*dx2 + lm3*lm3*dy2 + lm2*lm3*dxy; -- obj2->mxyw = xym = lm0*lm2*dx2 + lm1*lm3*dy2 + (lm0*lm3+lm1*lm2)*dxy; -+ outobj2.mx2w = xm2 = lm0*lm0*dx2 + lm1*lm1*dy2 + lm0*lm1*dxy; -+ outobj2.my2w = ym2 = lm2*lm2*dx2 + lm3*lm3*dy2 + lm2*lm3*dxy; -+ outobj2.mxyw = xym = lm0*lm2*dx2 + lm1*lm3*dy2 + (lm0*lm3+lm1*lm2)*dxy; - temp=xm2-ym2; - if (FLAG(obj2.thetaw)) - { -- obj2->thetaw = (temp == 0.0)? (45.0) : (0.5*atan2(2.0 * xym,temp)/DEG); -+ outobj2.thetaw = (temp == 0.0)? (45.0) : (0.5*atan2(2.0 * xym,temp)/DEG); - if (as->wcs_flag && FLAG(obj2.thetas)) -- obj2->thetas = obj2->thetaw + (obj2->thetaw>0.0?-90:90.0); -+ outobj2.thetas = outobj2.thetaw + (outobj2.thetaw>0.0?-90:90.0); - - /*-- Compute position angles in J2000 or B1950 reference frame */ - if (as->wcs_flag) -@@ -434,23 +434,23 @@ - - if (FLAG(obj2.theta2000)) - { -- da = as->ap2000 - obj2->alpha2000; -+ da = as->ap2000 - outobj2.alpha2000; - dd = (sin(as->dp2000*DEG) -- -sin(obj2->delta2000*DEG)*sin(obj2->deltas*DEG)) -- /(cos(obj2->delta2000*DEG)*cos(obj2->deltas*DEG)); -+ -sin(outobj2.delta2000*DEG)*sin(outobj2.deltas*DEG)) -+ /(cos(outobj2.delta2000*DEG)*cos(outobj2.deltas*DEG)); - dd = dd<1.0? (dd>-1.0?acos(dd)/DEG:180.0) : 0.0; -- obj2->theta2000 = obj2->thetas -+ outobj2.theta2000 = outobj2.thetas - + (((da>0.0 && da<180.0) || da<-180.0)?-dd:dd); - } - - if (FLAG(obj2.theta1950)) - { -- da = as->ap1950 - obj2->alpha1950; -+ da = as->ap1950 - outobj2.alpha1950; - dd = (sin(as->dp1950*DEG) -- -sin(obj2->delta1950*DEG)*sin(obj2->deltas*DEG)) -- /(cos(obj2->delta1950*DEG)*cos(obj2->deltas*DEG)); -+ -sin(outobj2.delta1950*DEG)*sin(outobj2.deltas*DEG)) -+ /(cos(outobj2.delta1950*DEG)*cos(outobj2.deltas*DEG)); - dd = dd<1.0? (dd>-1.0?acos(dd)/DEG:180.0) : 0.0; -- obj2->theta1950 = obj2->thetas -+ outobj2.theta1950 = outobj2.thetas - + (((da>0.0 && da<180.0) || da<-180.0)?-dd:dd); - } - } -@@ -460,9 +460,9 @@ - { - temp = sqrt(0.25*temp*temp+xym*xym); - pm2 = 0.5*(xm2+ym2); -- obj2->aw = (float)sqrt(pm2+temp); -- obj2->bw = (float)sqrt(pm2-temp); -- obj2->polarw = temp / pm2; -+ outobj2.aw = (float)sqrt(pm2+temp); -+ outobj2.bw = (float)sqrt(pm2-temp); -+ outobj2.polarw = temp / pm2; - } - - if (FLAG(obj2.cxxw)) -@@ -473,9 +473,9 @@ - temp = 1e-6; - xym *= 0.99999; - } -- obj2->cxxw = (float)(ym2/temp); -- obj2->cyyw = (float)(xm2/temp); -- obj2->cxyw = (float)(-2*xym/temp); -+ outobj2.cxxw = (float)(ym2/temp); -+ outobj2.cyyw = (float)(xm2/temp); -+ outobj2.cxyw = (float)(-2*xym/temp); - } - - return; -@@ -510,19 +510,19 @@ - lm3 = lm[lat+naxis*lat]; - - /* All WORLD params based on 2nd order moments have to pass through here */ -- dx2 = obj2->win_mx2; -- dy2 = obj2->win_my2; -- dxy = obj2->win_mxy; -- obj2->win_mx2w = xm2 = lm0*lm0*dx2 + lm1*lm1*dy2 + lm0*lm1*dxy; -- obj2->win_my2w = ym2 = lm2*lm2*dx2 + lm3*lm3*dy2 + lm2*lm3*dxy; -- obj2->win_mxyw = xym = lm0*lm2*dx2 + lm1*lm3*dy2 + (lm0*lm3+lm1*lm2)*dxy; -+ dx2 = outobj2.win_mx2; -+ dy2 = outobj2.win_my2; -+ dxy = outobj2.win_mxy; -+ outobj2.win_mx2w = xm2 = lm0*lm0*dx2 + lm1*lm1*dy2 + lm0*lm1*dxy; -+ outobj2.win_my2w = ym2 = lm2*lm2*dx2 + lm3*lm3*dy2 + lm2*lm3*dxy; -+ outobj2.win_mxyw = xym = lm0*lm2*dx2 + lm1*lm3*dy2 + (lm0*lm3+lm1*lm2)*dxy; - temp=xm2-ym2; - if (FLAG(obj2.win_thetaw)) - { -- obj2->win_thetaw = (temp == 0.0)? (45.0) : (0.5*atan2(2.0*xym,temp)/DEG); -+ outobj2.win_thetaw = (temp == 0.0)? (45.0) : (0.5*atan2(2.0*xym,temp)/DEG); - if (as->wcs_flag && FLAG(obj2.win_thetas)) -- obj2->win_thetas = obj2->win_thetaw + -- (obj2->win_thetaw>0.0?-90:90.0); -+ outobj2.win_thetas = outobj2.win_thetaw + -+ (outobj2.win_thetaw>0.0?-90:90.0); - - /*-- Compute position angles in J2000 or B1950 reference frame */ - if (as->wcs_flag) -@@ -531,23 +531,23 @@ - - if (FLAG(obj2.win_theta2000)) - { -- da = as->ap2000 - obj2->winpos_alpha2000; -+ da = as->ap2000 - outobj2.winpos_alpha2000; - dd = (sin(as->dp2000*DEG) -- -sin(obj2->winpos_delta2000*DEG)*sin(obj2->winpos_deltas*DEG)) -- /(cos(obj2->winpos_delta2000*DEG)*cos(obj2->winpos_deltas*DEG)); -+ -sin(outobj2.winpos_delta2000*DEG)*sin(outobj2.winpos_deltas*DEG)) -+ /(cos(outobj2.winpos_delta2000*DEG)*cos(outobj2.winpos_deltas*DEG)); - dd = dd<1.0? (dd>-1.0?acos(dd)/DEG:180.0) : 0.0; -- obj2->win_theta2000 = obj2->win_thetas -+ outobj2.win_theta2000 = outobj2.win_thetas - + (((da>0.0 && da<180.0) || da<-180.0)?-dd:dd); - } - - if (FLAG(obj2.win_theta1950)) - { -- da = as->ap1950 - obj2->winpos_alpha1950; -+ da = as->ap1950 - outobj2.winpos_alpha1950; - dd = (sin(as->dp1950*DEG) -- -sin(obj2->winpos_delta1950*DEG)*sin(obj2->winpos_deltas*DEG)) -- /(cos(obj2->winpos_delta1950*DEG)*cos(obj2->winpos_deltas*DEG)); -+ -sin(outobj2.winpos_delta1950*DEG)*sin(outobj2.winpos_deltas*DEG)) -+ /(cos(outobj2.winpos_delta1950*DEG)*cos(outobj2.winpos_deltas*DEG)); - dd = dd<1.0? (dd>-1.0?acos(dd)/DEG:180.0) : 0.0; -- obj2->win_theta1950 = obj2->win_thetas -+ outobj2.win_theta1950 = outobj2.win_thetas - + (((da>0.0 && da<180.0) || da<-180.0)?-dd:dd); - } - } -@@ -557,9 +557,9 @@ - { - temp = sqrt(0.25*temp*temp+xym*xym); - pm2 = 0.5*(xm2+ym2); -- obj2->win_aw = (float)sqrt(pm2+temp); -- obj2->win_bw = (float)sqrt(pm2-temp); -- obj2->win_polarw = temp / pm2; -+ outobj2.win_aw = (float)sqrt(pm2+temp); -+ outobj2.win_bw = (float)sqrt(pm2-temp); -+ outobj2.win_polarw = temp / pm2; - } - - if (FLAG(obj2.win_cxxw)) -@@ -570,9 +570,9 @@ - temp = 1e-6; - xym *= 0.99999; - } -- obj2->win_cxxw = (float)(ym2/temp); -- obj2->win_cyyw = (float)(xm2/temp); -- obj2->win_cxyw = (float)(-2*xym/temp); -+ outobj2.win_cxxw = (float)(ym2/temp); -+ outobj2.win_cyyw = (float)(xm2/temp); -+ outobj2.win_cxyw = (float)(-2*xym/temp); - } - - return; -@@ -610,16 +610,16 @@ - dx2 = obj->poserr_mx2; - dy2 = obj->poserr_my2; - dxy = obj->poserr_mxy; -- obj2->poserr_mx2w = xm2 = lm0*lm0*dx2 + lm1*lm1*dy2 + lm0*lm1*dxy; -- obj2->poserr_my2w = ym2 = lm2*lm2*dx2 + lm3*lm3*dy2 + lm2*lm3*dxy; -- obj2->poserr_mxyw = xym = lm0*lm2*dx2 + lm1*lm3*dy2 + (lm0*lm3+lm1*lm2)*dxy; -+ outobj2.poserr_mx2w = xm2 = lm0*lm0*dx2 + lm1*lm1*dy2 + lm0*lm1*dxy; -+ outobj2.poserr_my2w = ym2 = lm2*lm2*dx2 + lm3*lm3*dy2 + lm2*lm3*dxy; -+ outobj2.poserr_mxyw = xym = lm0*lm2*dx2 + lm1*lm3*dy2 + (lm0*lm3+lm1*lm2)*dxy; - temp=xm2-ym2; - if (FLAG(obj2.poserr_thetaw)) - { -- obj2->poserr_thetaw = (temp==0.0)? (45.0):(0.5*atan2(2.0*xym,temp)/DEG); -+ outobj2.poserr_thetaw = (temp==0.0)? (45.0):(0.5*atan2(2.0*xym,temp)/DEG); - if (as->wcs_flag && FLAG(obj2.poserr_thetas)) -- obj2->poserr_thetas = obj2->poserr_thetaw -- + (obj2->poserr_thetaw>0.0? -90:90.0); -+ outobj2.poserr_thetas = outobj2.poserr_thetaw -+ + (outobj2.poserr_thetaw>0.0? -90:90.0); - - /*-- Compute position angles in J2000 or B1950 reference frame */ - if (as->wcs_flag) -@@ -628,23 +628,23 @@ - - if (FLAG(obj2.poserr_theta2000)) - { -- da = as->ap2000 - obj2->alpha2000; -+ da = as->ap2000 - outobj2.alpha2000; - dd = (sin(as->dp2000*DEG) -- -sin(obj2->delta2000*DEG)*sin(obj2->deltas*DEG)) -- /(cos(obj2->delta2000*DEG)*cos(obj2->deltas*DEG)); -+ -sin(outobj2.delta2000*DEG)*sin(outobj2.deltas*DEG)) -+ /(cos(outobj2.delta2000*DEG)*cos(outobj2.deltas*DEG)); - dd = dd<1.0? (dd>-1.0?acos(dd)/DEG:180.0) : 0.0; -- obj2->poserr_theta2000 = obj2->poserr_thetas -+ outobj2.poserr_theta2000 = outobj2.poserr_thetas - + (((da>0.0 && da<180.0) || da<-180.0)?-dd:dd); - } - - if (FLAG(obj2.poserr_theta1950)) - { -- da = as->ap1950 - obj2->alpha1950; -+ da = as->ap1950 - outobj2.alpha1950; - dd = (sin(as->dp1950*DEG) -- -sin(obj2->delta1950*DEG)*sin(obj2->deltas*DEG)) -- /(cos(obj2->delta1950*DEG)*cos(obj2->deltas*DEG)); -+ -sin(outobj2.delta1950*DEG)*sin(outobj2.deltas*DEG)) -+ /(cos(outobj2.delta1950*DEG)*cos(outobj2.deltas*DEG)); - dd = dd<1.0? (dd>-1.0?acos(dd)/DEG:180.0) : 0.0; -- obj2->poserr_theta1950 = obj2->poserr_thetas -+ outobj2.poserr_theta1950 = outobj2.poserr_thetas - + (((da>0.0 && da<180.0) || da<-180.0)?-dd:dd); - } - } -@@ -654,8 +654,8 @@ - { - temp = sqrt(0.25*temp*temp+xym*xym); - pm2 = 0.5*(xm2+ym2); -- obj2->poserr_aw = (float)sqrt(pm2+temp); -- obj2->poserr_bw = (float)sqrt(pm2-temp); -+ outobj2.poserr_aw = (float)sqrt(pm2+temp); -+ outobj2.poserr_bw = (float)sqrt(pm2-temp); - } - - if (FLAG(obj2.poserr_cxxw)) -@@ -666,9 +666,9 @@ - temp = 1e-6; - xym *= 0.99999; - } -- obj2->poserr_cxxw = (float)(ym2/temp); -- obj2->poserr_cyyw = (float)(xm2/temp); -- obj2->poserr_cxyw = (float)(-2*xym/temp); -+ outobj2.poserr_cxxw = (float)(ym2/temp); -+ outobj2.poserr_cyyw = (float)(xm2/temp); -+ outobj2.poserr_cxyw = (float)(-2*xym/temp); - } - - return; -@@ -703,19 +703,19 @@ - lm3 = lm[lat+naxis*lat]; - - /* All WORLD params based on 2nd order moments have to pass through here */ -- dx2 = obj2->winposerr_mx2; -- dy2 = obj2->winposerr_my2; -- dxy = obj2->winposerr_mxy; -- obj2->winposerr_mx2w = xm2 = lm0*lm0*dx2 + lm1*lm1*dy2 + lm0*lm1*dxy; -- obj2->winposerr_my2w = ym2 = lm2*lm2*dx2 + lm3*lm3*dy2 + lm2*lm3*dxy; -- obj2->winposerr_mxyw = xym = lm0*lm2*dx2 + lm1*lm3*dy2 + (lm0*lm3+lm1*lm2)*dxy; -+ dx2 = outobj2.winposerr_mx2; -+ dy2 = outobj2.winposerr_my2; -+ dxy = outobj2.winposerr_mxy; -+ outobj2.winposerr_mx2w = xm2 = lm0*lm0*dx2 + lm1*lm1*dy2 + lm0*lm1*dxy; -+ outobj2.winposerr_my2w = ym2 = lm2*lm2*dx2 + lm3*lm3*dy2 + lm2*lm3*dxy; -+ outobj2.winposerr_mxyw = xym = lm0*lm2*dx2 + lm1*lm3*dy2 + (lm0*lm3+lm1*lm2)*dxy; - temp=xm2-ym2; - if (FLAG(obj2.winposerr_thetaw)) - { -- obj2->winposerr_thetaw = (temp==0.0)? (45.0):(0.5*atan2(2.0*xym,temp)/DEG); -+ outobj2.winposerr_thetaw = (temp==0.0)? (45.0):(0.5*atan2(2.0*xym,temp)/DEG); - if (as->wcs_flag && FLAG(obj2.winposerr_thetas)) -- obj2->winposerr_thetas = obj2->winposerr_thetaw -- + (obj2->winposerr_thetaw>0.0? -90:90.0); -+ outobj2.winposerr_thetas = outobj2.winposerr_thetaw -+ + (outobj2.winposerr_thetaw>0.0? -90:90.0); - - /*-- Compute position angles in J2000 or B1950 reference frame */ - if (as->wcs_flag) -@@ -724,23 +724,23 @@ - - if (FLAG(obj2.winposerr_theta2000)) - { -- da = as->ap2000 - obj2->winpos_alpha2000; -+ da = as->ap2000 - outobj2.winpos_alpha2000; - dd = (sin(as->dp2000*DEG) -- -sin(obj2->winpos_delta2000*DEG)*sin(obj2->winpos_deltas*DEG)) -- /(cos(obj2->winpos_delta2000*DEG)*cos(obj2->winpos_deltas*DEG)); -+ -sin(outobj2.winpos_delta2000*DEG)*sin(outobj2.winpos_deltas*DEG)) -+ /(cos(outobj2.winpos_delta2000*DEG)*cos(outobj2.winpos_deltas*DEG)); - dd = dd<1.0? (dd>-1.0?acos(dd)/DEG:180.0) : 0.0; -- obj2->winposerr_theta2000 = obj2->winposerr_thetas -+ outobj2.winposerr_theta2000 = outobj2.winposerr_thetas - + (((da>0.0 && da<180.0) || da<-180.0)?-dd:dd); - } - - if (FLAG(obj2.winposerr_theta1950)) - { -- da = as->ap1950 - obj2->winpos_alpha1950; -+ da = as->ap1950 - outobj2.winpos_alpha1950; - dd = (sin(as->dp1950*DEG) -- -sin(obj2->winpos_delta1950*DEG)*sin(obj2->winpos_deltas*DEG)) -- /(cos(obj2->winpos_delta1950*DEG)*cos(obj2->winpos_deltas*DEG)); -+ -sin(outobj2.winpos_delta1950*DEG)*sin(outobj2.winpos_deltas*DEG)) -+ /(cos(outobj2.winpos_delta1950*DEG)*cos(outobj2.winpos_deltas*DEG)); - dd = dd<1.0? (dd>-1.0?acos(dd)/DEG:180.0) : 0.0; -- obj2->winposerr_theta1950 = obj2->winposerr_thetas -+ outobj2.winposerr_theta1950 = outobj2.winposerr_thetas - + (((da>0.0 && da<180.0) || da<-180.0)?-dd:dd); - } - } -@@ -750,8 +750,8 @@ - { - temp = sqrt(0.25*temp*temp+xym*xym); - pm2 = 0.5*(xm2+ym2); -- obj2->winposerr_aw = (float)sqrt(pm2+temp); -- obj2->winposerr_bw = (float)sqrt(pm2-temp); -+ outobj2.winposerr_aw = (float)sqrt(pm2+temp); -+ outobj2.winposerr_bw = (float)sqrt(pm2-temp); - } - - if (FLAG(obj2.winposerr_cxxw)) -@@ -762,9 +762,9 @@ - temp = 1e-6; - xym *= 0.99999; - } -- obj2->winposerr_cxxw = (float)(ym2/temp); -- obj2->winposerr_cyyw = (float)(xm2/temp); -- obj2->winposerr_cxyw = (float)(-2*xym/temp); -+ outobj2.winposerr_cxxw = (float)(ym2/temp); -+ outobj2.winposerr_cyyw = (float)(xm2/temp); -+ outobj2.winposerr_cxyw = (float)(-2*xym/temp); - } - - return; -diff -ur sextractor-2.5.0.old/src/fits/fitsmisc.c sextractor-2.5.0/src/fits/fitsmisc.c ---- sextractor-2.5.0.old/src/fits/fitsmisc.c 2006-07-14 19:21:00.000000000 +0200 -+++ sextractor-2.5.0/src/fits/fitsmisc.c 2006-07-25 23:32:17.000000000 +0200 -@@ -114,48 +114,63 @@ - void swapbytes(void *ptr, int nb, int n) - { - char *cp; -+ char t; - int j; - -- cp = (char *)ptr; -+ cp = (char *)ptr; - -- if (nb&4) -- { -- for (j=n; j--; cp+=4) -- { -- cp[0] ^= (cp[3]^=(cp[0]^=cp[3])); -- cp[1] ^= (cp[2]^=(cp[1]^=cp[2])); -- } -- return; -- } -- -- if (nb&2) -- { -- for (j=n; j--; cp+=2) -- cp[0] ^= (cp[1]^=(cp[0]^=cp[1])); -- return; -- } -+ if (nb == 4) -+ { -+ for (j=n; j--; cp+=4) -+ { -+ t = cp[0]; -+ cp[0] = cp[3]; -+ cp[3] = t; -+ t = cp[1]; -+ cp[1] = cp[2]; -+ cp[2] = t; -+ } -+ } -+ else if (nb == 2) -+ { -+ for (j=n; j--; cp+=2) -+ { -+ t = cp[0]; -+ cp[0] = cp[1]; -+ cp[1] = t; -+ } -+ } -+ else if (nb == 8) -+ { -+ for (j=n; j--; cp+=8) -+ { -+ t = cp[0]; -+ cp[0] = cp[7]; -+ cp[7] = t; -+ t = cp[1]; -+ cp[1] = cp[6]; -+ cp[6] = t; -+ t = cp[2]; -+ cp[2] = cp[5]; -+ cp[5] = t; -+ t = cp[3]; -+ cp[3] = cp[4]; -+ cp[4] = t; -+ } -+ } -+ else if (nb == 1) -+ { -+ /* noop */ -+ } - -- if (nb&1) -- return; -- -- if (nb&8) -- { -- for (j=n; j--; cp+=8) -- { -- cp[0] ^= (cp[7]^=(cp[0]^=cp[7])); -- cp[1] ^= (cp[6]^=(cp[1]^=cp[6])); -- cp[2] ^= (cp[5]^=(cp[2]^=cp[5])); -- cp[3] ^= (cp[4]^=(cp[3]^=cp[4])); -- } -- return; -- } -- -- error(EXIT_FAILURE, "*Internal Error*: Unknown size in ", "swapbytes()"); -+ else -+ error(EXIT_FAILURE, "*Internal Error*: Unknown size in ", "swapbytes()"); - - return; - } - - -+ - /****** wstrncmp *************************************************************** - PROTO int wstrncmp(char *cs, char *ct, int n) - PURPOSE simple wildcard strcmp. -diff -ur sextractor-2.5.0.old/src/growth.c sextractor-2.5.0/src/growth.c ---- sextractor-2.5.0.old/src/growth.c 2005-10-24 13:48:52.000000000 +0200 -+++ sextractor-2.5.0/src/growth.c 2006-07-25 23:27:35.000000000 +0200 -@@ -32,7 +32,7 @@ - - static double *growth; - static int ngrowth; --static obj2struct *obj2 = &outobj2; -+/* static obj2struct *obj2 = &outobj2; */ - - /******************************** initgrowth *********************************/ - /* -@@ -45,7 +45,7 @@ - /* Quick (and dirty) fix to allow FLUX_RADIUS support */ - if (FLAG(obj2.flux_radius) && !prefs.flux_radiussize) - { -- QCALLOC(obj2->flux_radius, float, 1); -+ QCALLOC(outobj2.flux_radius, float, 1); - } - - return; -@@ -60,7 +60,7 @@ - { - free(growth); - if (FLAG(obj2.flux_radius) && !prefs.flux_radiussize) -- free(obj2->flux_radius); -+ free(outobj2.flux_radius); - - return; - } -@@ -284,8 +284,8 @@ - { - n = prefs.flux_growthsize; - if (FLAG(obj2.flux_growthstep)) -- obj2->flux_growthstep = rlim/n; -- fgrowth = obj2->flux_growth; -+ outobj2.flux_growthstep = rlim/n; -+ fgrowth = outobj2.flux_growth; - step2 = (double)GROWTH_NSTEP/n; - j = 1; - for (i=n; i--; j++) -@@ -305,8 +305,8 @@ - { - n = prefs.mag_growthsize; - if (FLAG(obj2.mag_growthstep)) -- obj2->mag_growthstep = rlim/n; -- fgrowth = obj2->mag_growth; -+ outobj2.mag_growthstep = rlim/n; -+ fgrowth = outobj2.mag_growth; - step2 = (double)GROWTH_NSTEP/n; - j = 1; - for (i=n; i--; j++) -@@ -328,10 +328,10 @@ - n = ngrowth-1; - for (j=0; jflux_auto; -+ tv = prefs.flux_frac[j]*outobj2.flux_auto; - growtht = growth-1; - for (i=0; iflux_radius[j] = step -+ outobj2.flux_radius[j] = step - *(i? ((dg=*growtht - *(growtht-1)) != 0.0 ? - i + (tv - *(growtht-1))/dg - : i) -@@ -343,10 +343,10 @@ - if (FLAG(obj2.hl_radius)) - { - n = ngrowth-1; -- tv = 0.5*obj2->flux_auto; -+ tv = 0.5*outobj2.flux_auto; - growtht = growth-1; - for (i=0; ihl_radius = step*(i? ((dg=*growtht - *(growtht-1)) != 0.0 ? -+ outobj2.hl_radius = step*(i? ((dg=*growtht - *(growtht-1)) != 0.0 ? - i + (tv - *(growtht-1))/dg - : i) - : (*growth !=0.0 ?tv/(*growth) : 0.0)); -diff -ur sextractor-2.5.0.old/src/pc.c sextractor-2.5.0/src/pc.c ---- sextractor-2.5.0.old/src/pc.c 2005-10-24 13:48:52.000000000 +0200 -+++ sextractor-2.5.0/src/pc.c 2006-07-25 23:27:45.000000000 +0200 -@@ -32,7 +32,7 @@ - #include "poly.h" - #include "psf.h" - --static obj2struct *obj2 = &outobj2; -+/* static obj2struct *obj2 = &outobj2; */ - - /****** pc_end *************************************************************** - PROTO void pc_end(pcstruct *pc) -@@ -361,22 +361,22 @@ - - /*-- Copy the derived physical quantities to output parameters */ - /*-- (subject to changes) */ -- obj2->flux_galfit = fscale; -- obj2->gdposang = fparam[1]; -- if (obj2->gdposang>90.0) -- obj2->gdposang -= 180.0; -- else if (obj2->gdposang<-90.0) -- obj2->gdposang += 180.0; -- obj2->gdscale = fparam[2]; -- obj2->gdaspect = fparam[3]; -- ellip = (1.0 - obj2->gdaspect)/(1.0 + obj2->gdaspect); -- obj2->gde1 = (float)(ellip*cos(2*obj2->gdposang*PI/180.0)); -- obj2->gde2 = (float)(ellip*sin(2*obj2->gdposang*PI/180.0)); -+ outobj2.flux_galfit = fscale; -+ outobj2.gdposang = fparam[1]; -+ if (outobj2.gdposang>90.0) -+ outobj2.gdposang -= 180.0; -+ else if (outobj2.gdposang<-90.0) -+ outobj2.gdposang += 180.0; -+ outobj2.gdscale = fparam[2]; -+ outobj2.gdaspect = fparam[3]; -+ ellip = (1.0 - outobj2.gdaspect)/(1.0 + outobj2.gdaspect); -+ outobj2.gde1 = (float)(ellip*cos(2*outobj2.gdposang*PI/180.0)); -+ outobj2.gde2 = (float)(ellip*sin(2*outobj2.gdposang*PI/180.0)); - /*---- Copy the best-fitting PCs to the VECTOR_PC output vector */ - if (FLAG(obj2.vector_pc)) - { - solt = sol; -- ppix = obj2->vector_pc; -+ ppix = outobj2.vector_pc; - for (c=prefs.pc_vectorsize>npc?npc:prefs.pc_vectorsize; c--;) - *(ppix++) = *(solt++); - } -@@ -397,9 +397,9 @@ - xym += val**(mxyt++); - } - -- obj2->mx2_pc = xm2; -- obj2->my2_pc = ym2; -- obj2->mxy_pc = xym; -+ outobj2.mx2_pc = xm2; -+ outobj2.my2_pc = ym2; -+ outobj2.mxy_pc = xym; - - if (FLAG(obj2.a_pc)) - { -@@ -421,9 +421,9 @@ - pmx2 += temp; - pmy2 -= temp; - -- obj2->a_pc = (float)sqrt(pmx2); -- obj2->b_pc = (float)sqrt(pmy2); -- obj2->theta_pc = (float)(theta*180.0/PI); -+ outobj2.a_pc = (float)sqrt(pmx2); -+ outobj2.b_pc = (float)sqrt(pmy2); -+ outobj2.theta_pc = (float)(theta*180.0/PI); - } - - /* CHECK-Images */ -diff -ur sextractor-2.5.0.old/src/photom.c sextractor-2.5.0/src/photom.c ---- sextractor-2.5.0.old/src/photom.c 2005-10-24 13:48:52.000000000 +0200 -+++ sextractor-2.5.0/src/photom.c 2006-07-25 23:27:55.000000000 +0200 -@@ -27,7 +27,7 @@ - #include "photom.h" - #include "plist.h" - --static obj2struct *obj2 = &outobj2; -+/* static obj2struct *obj2 = &outobj2; */ - - /***************************** computeaperflux********************************/ - /* -@@ -184,13 +184,13 @@ - } - - if (iflux_aper[i] = tv; -+ outobj2.flux_aper[i] = tv; - if (ifluxerr_aper[i] = sqrt(sigtv); -+ outobj2.fluxerr_aper[i] = sqrt(sigtv); - if (imag_aper[i] = tv>0.0? -2.5*log10(tv) + prefs.mag_zeropoint : 99.0; -+ outobj2.mag_aper[i] = tv>0.0? -2.5*log10(tv) + prefs.mag_zeropoint : 99.0; - if (imagerr_aper[i] = tv>0.0? 1.086*sqrt(sigtv)/tv:99.0; -+ outobj2.magerr_aper[i] = tv>0.0? 1.086*sqrt(sigtv)/tv:99.0; - - return; - } -@@ -346,12 +346,12 @@ - /*-- Go further only if some pixels are available !! */ - if (areanum && areaden && munum && muden) - { -- obj2->petrofactor = prefs.petroparam[0]*kmea; -- if (obj2->petrofactor < prefs.petroparam[1]) -- obj2->petrofactor = prefs.petroparam[1]; -+ outobj2.petrofactor = prefs.petroparam[0]*kmea; -+ if (outobj2.petrofactor < prefs.petroparam[1]) -+ outobj2.petrofactor = prefs.petroparam[1]; - } - else -- obj2->petrofactor = prefs.petroparam[1]; -+ outobj2.petrofactor = prefs.petroparam[1]; - - /*-- Flag if the Petrosian photometry can be strongly affected by neighhours */ - if ((float)areab/area > CROWD_THRESHOLD) -@@ -360,16 +360,16 @@ - /*-- Second step: integrate within the ellipse */ - /*-- Clip boundaries in x and y (bis) */ - /*-- We first check that the derived ellipse is large enough... */ -- if (obj2->petrofactor*sqrt(obj->a*obj->b)>prefs.autoaper[1]/2.0) -+ if (outobj2.petrofactor*sqrt(obj->a*obj->b)>prefs.autoaper[1]/2.0) - { - cx2 = obj->cxx; - cy2 = obj->cyy; - cxy = obj->cxy; - dxlim = cx2 - cxy*cxy/(4.0*cy2); -- dxlim = dxlim>0.0 ? obj2->petrofactor/sqrt(dxlim) : 0.0; -+ dxlim = dxlim>0.0 ? outobj2.petrofactor/sqrt(dxlim) : 0.0; - dylim = cy2 - cxy*cxy/(4.0*cx2); -- dylim = dylim > 0.0 ? obj2->petrofactor/sqrt(dylim) : 0.0; -- klim2 = obj2->petrofactor*obj2->petrofactor; -+ dylim = dylim > 0.0 ? outobj2.petrofactor/sqrt(dylim) : 0.0; -+ klim2 = outobj2.petrofactor*outobj2.petrofactor; - } - else - /*---- ...if not, use the circular aperture provided by the user */ -@@ -378,7 +378,7 @@ - cxy = 0.0; - dxlim = dylim = prefs.autoaper[1]/2.0; - klim2 = dxlim*dxlim; -- obj2->petrofactor = 0.0; -+ outobj2.petrofactor = 0.0; - } - - if ((xmin = RINT(mx-dxlim)) < 0) -@@ -479,19 +479,19 @@ - tv = sigtv = 0.0; - - -- obj2->flux_petro = tv; -- obj2->fluxerr_petro = sqrt(sigtv); -+ outobj2.flux_petro = tv; -+ outobj2.fluxerr_petro = sqrt(sigtv); - - if (FLAG(obj2.mag_petro)) -- obj2->mag_petro = obj2->flux_petro>0.0? -- -2.5*log10(obj2->flux_petro) + prefs.mag_zeropoint -+ outobj2.mag_petro = outobj2.flux_petro>0.0? -+ -2.5*log10(outobj2.flux_petro) + prefs.mag_zeropoint - :99.0; - if (FLAG(obj2.magerr_petro)) -- obj2->magerr_petro = obj2->flux_petro>0.0? -- 1.086*obj2->fluxerr_petro/obj2->flux_petro -+ outobj2.magerr_petro = outobj2.flux_petro>0.0? -+ 1.086*outobj2.fluxerr_petro/outobj2.flux_petro - :99.0; - if (tv<=0.0) -- obj2->petrofactor = 0.0; -+ outobj2.petrofactor = 0.0; - - return; - } -@@ -617,12 +617,12 @@ - /*-- Go further only if some pixels are available !! */ - if (r1>0.0 && v1>0.0) - { -- obj2->kronfactor = prefs.autoparam[0]*r1/v1; -- if (obj2->kronfactor < prefs.autoparam[1]) -- obj2->kronfactor = prefs.autoparam[1]; -+ outobj2.kronfactor = prefs.autoparam[0]*r1/v1; -+ if (outobj2.kronfactor < prefs.autoparam[1]) -+ outobj2.kronfactor = prefs.autoparam[1]; - } - else -- obj2->kronfactor = prefs.autoparam[1]; -+ outobj2.kronfactor = prefs.autoparam[1]; - - /*-- Flag if the Kron photometry can be strongly affected by neighhours */ - if ((float)areab/area > CROWD_THRESHOLD) -@@ -631,16 +631,16 @@ - /*-- Second step: integrate within the ellipse */ - /*-- Clip boundaries in x and y (bis) */ - /*-- We first check that the derived ellipse is large enough... */ -- if (obj2->kronfactor*sqrt(obj->a*obj->b)>prefs.autoaper[1]/2.0) -+ if (outobj2.kronfactor*sqrt(obj->a*obj->b)>prefs.autoaper[1]/2.0) - { - cx2 = obj->cxx; - cy2 = obj->cyy; - cxy = obj->cxy; - dxlim = cx2 - cxy*cxy/(4.0*cy2); -- dxlim = dxlim>0.0 ? obj2->kronfactor/sqrt(dxlim) : 0.0; -+ dxlim = dxlim>0.0 ? outobj2.kronfactor/sqrt(dxlim) : 0.0; - dylim = cy2 - cxy*cxy/(4.0*cx2); -- dylim = dylim > 0.0 ? obj2->kronfactor/sqrt(dylim) : 0.0; -- klim2 = obj2->kronfactor*obj2->kronfactor; -+ dylim = dylim > 0.0 ? outobj2.kronfactor/sqrt(dylim) : 0.0; -+ klim2 = outobj2.kronfactor*outobj2.kronfactor; - } - else - /*---- ...if not, use the circular aperture provided by the user */ -@@ -649,7 +649,7 @@ - cxy = 0.0; - dxlim = dylim = prefs.autoaper[1]/2.0; - klim2 = dxlim*dxlim; -- obj2->kronfactor = 0.0; -+ outobj2.kronfactor = 0.0; - } - - if ((xmin = RINT(mx-dxlim)) < 0) -@@ -750,19 +750,19 @@ - tv = sigtv = 0.0; - - -- obj2->flux_auto = tv; -- obj2->fluxerr_auto = sqrt(sigtv); -+ outobj2.flux_auto = tv; -+ outobj2.fluxerr_auto = sqrt(sigtv); - - if (FLAG(obj2.mag_auto)) -- obj2->mag_auto = obj2->flux_auto>0.0? -- -2.5*log10(obj2->flux_auto) + prefs.mag_zeropoint -+ outobj2.mag_auto = outobj2.flux_auto>0.0? -+ -2.5*log10(outobj2.flux_auto) + prefs.mag_zeropoint - :99.0; - if (FLAG(obj2.magerr_auto)) -- obj2->magerr_auto = obj2->flux_auto>0.0? -- 1.086*obj2->fluxerr_auto/obj2->flux_auto -+ outobj2.magerr_auto = outobj2.flux_auto>0.0? -+ 1.086*outobj2.fluxerr_auto/outobj2.flux_auto - :99.0; - if (tv<=0.0) -- obj2->kronfactor = 0.0; -+ outobj2.kronfactor = 0.0; - - return; - } -@@ -782,7 +782,7 @@ - ati = 1.0; - else if (ati<0.0) - ati = 0.0; -- obj2->flux_isocor = obj->flux/(1.0-0.196099*ati-0.751208*ati*ati); -+ outobj2.flux_isocor = obj->flux/(1.0-0.196099*ati-0.751208*ati*ati); - if (FLAG(obj2.fluxerr_isocor)) - { - if (obj->flux>0.0) -@@ -792,10 +792,10 @@ - sigtv = obj->fluxerr/(obj->flux*obj->flux); - dati = obj->fdnpix?ati*sqrt(sigtv+1.0/obj->fdnpix): 0.0; - dati = 0.196099*dati + 0.751208*2*ati*dati; -- obj2->fluxerr_isocor = sqrt(sigtv+dati*dati)*obj->flux; -+ outobj2.fluxerr_isocor = sqrt(sigtv+dati*dati)*obj->flux; - } - else -- obj2->fluxerr_isocor = sqrt(obj->fluxerr); -+ outobj2.fluxerr_isocor = sqrt(obj->fluxerr); - } - - return; -@@ -811,22 +811,22 @@ - { - /* Mag. isophotal */ - if (FLAG(obj2.mag_iso)) -- obj2->mag_iso = obj2->flux_iso>0.0? -- -2.5*log10(obj2->flux_iso) + prefs.mag_zeropoint -+ outobj2.mag_iso = outobj2.flux_iso>0.0? -+ -2.5*log10(outobj2.flux_iso) + prefs.mag_zeropoint - :99.0; - if (FLAG(obj2.magerr_iso)) -- obj2->magerr_iso = obj2->flux_iso>0.0? -- 1.086*obj2->fluxerr_iso/obj2->flux_iso -+ outobj2.magerr_iso = outobj2.flux_iso>0.0? -+ 1.086*outobj2.fluxerr_iso/outobj2.flux_iso - :99.0; - - /* Mag. isophotal corrected */ - if (FLAG(obj2.mag_isocor)) -- obj2->mag_isocor = obj2->flux_isocor>0.0? -- -2.5*log10(obj2->flux_isocor) + prefs.mag_zeropoint -+ outobj2.mag_isocor = outobj2.flux_isocor>0.0? -+ -2.5*log10(outobj2.flux_isocor) + prefs.mag_zeropoint - :99.0; - if (FLAG(obj2.magerr_isocor)) -- obj2->magerr_isocor = obj2->flux_isocor>0.0? -- 1.086*obj2->fluxerr_isocor/obj2->flux_isocor -+ outobj2.magerr_isocor = outobj2.flux_isocor>0.0? -+ 1.086*outobj2.fluxerr_isocor/outobj2.flux_isocor - :99.0; - - /* Choose the ``best'' flux according to the local crowding */ -@@ -835,63 +835,63 @@ - { - if (obj->flag&OBJ_CROWDED) - { -- obj2->flux_best = obj2->flux_isocor; -- obj2->fluxerr_best = obj2->fluxerr_isocor; -+ outobj2.flux_best = outobj2.flux_isocor; -+ outobj2.fluxerr_best = outobj2.fluxerr_isocor; - } - else - { -- obj2->flux_best = obj2->flux_auto; -- obj2->fluxerr_best = obj2->fluxerr_auto; -+ outobj2.flux_best = outobj2.flux_auto; -+ outobj2.fluxerr_best = outobj2.fluxerr_auto; - } - } - - /* Mag. Best */ - if (FLAG(obj2.mag_best)) -- obj2->mag_best = obj2->flux_best>0.0? -- -2.5*log10(obj2->flux_best) + prefs.mag_zeropoint -+ outobj2.mag_best = outobj2.flux_best>0.0? -+ -2.5*log10(outobj2.flux_best) + prefs.mag_zeropoint - :99.0; - if (FLAG(obj2.magerr_best)) -- obj2->magerr_best = obj2->flux_best>0.0? -- 1.086*obj2->fluxerr_best/obj2->flux_best -+ outobj2.magerr_best = outobj2.flux_best>0.0? -+ 1.086*outobj2.fluxerr_best/outobj2.flux_best - :99.0; - - /* Mag. SOM-fit */ - if (FLAG(obj2.mag_somfit)) -- obj2->mag_somfit = obj2->flux_somfit>0.0? -- -2.5*log10(obj2->flux_somfit) + prefs.mag_zeropoint -+ outobj2.mag_somfit = outobj2.flux_somfit>0.0? -+ -2.5*log10(outobj2.flux_somfit) + prefs.mag_zeropoint - :99.0; - if (FLAG(obj2.magerr_somfit)) -- obj2->magerr_somfit = obj2->flux_somfit>0.0? -- 1.086*obj2->fluxerr_somfit/obj2->flux_somfit -+ outobj2.magerr_somfit = outobj2.flux_somfit>0.0? -+ 1.086*outobj2.fluxerr_somfit/outobj2.flux_somfit - :99.0; - - /* Mag. PROFILE */ - if (FLAG(obj2.mag_prof)) -- obj2->mag_prof = obj2->flux_prof>0.0? -- -2.5*log10(obj2->flux_prof) + prefs.mag_zeropoint -+ outobj2.mag_prof = outobj2.flux_prof>0.0? -+ -2.5*log10(outobj2.flux_prof) + prefs.mag_zeropoint - :99.0; - if (FLAG(obj2.magerr_prof)) -- obj2->magerr_prof = obj2->flux_prof>0.0? -- 1.086*obj2->fluxerr_prof/obj2->flux_prof -+ outobj2.magerr_prof = outobj2.flux_prof>0.0? -+ 1.086*outobj2.fluxerr_prof/outobj2.flux_prof - :99.0; - - /* Mag. WINdowed */ - if (FLAG(obj2.mag_win)) -- obj2->mag_win = obj2->flux_win>0.0? -- -2.5*log10(obj2->flux_win) + prefs.mag_zeropoint -+ outobj2.mag_win = outobj2.flux_win>0.0? -+ -2.5*log10(outobj2.flux_win) + prefs.mag_zeropoint - :99.0; - if (FLAG(obj2.magerr_win)) -- obj2->magerr_win = obj2->flux_win>0.0? -- 1.086*obj2->fluxerr_win/obj2->flux_win -+ outobj2.magerr_win = outobj2.flux_win>0.0? -+ 1.086*outobj2.fluxerr_win/outobj2.flux_win - :99.0; - /* Mag. GALFIT */ - if (FLAG(obj2.mag_galfit)) -- obj2->mag_galfit = obj2->flux_galfit>0.0? -- -2.5*log10(obj2->flux_galfit) + prefs.mag_zeropoint -+ outobj2.mag_galfit = outobj2.flux_galfit>0.0? -+ -2.5*log10(outobj2.flux_galfit) + prefs.mag_zeropoint - :99.0; - if (FLAG(obj2.magerr_galfit)) -- obj2->magerr_galfit = obj2->flux_galfit>0.0? -- 1.086*obj2->fluxerr_galfit/obj2->flux_galfit -+ outobj2.magerr_galfit = outobj2.flux_galfit>0.0? -+ 1.086*outobj2.fluxerr_galfit/outobj2.flux_galfit - :99.0; - - /* SB units */ -@@ -902,7 +902,7 @@ - : 99.0; - - if (FLAG(obj2.threshmu)) -- obj2->threshmu = obj->thresh > 0.0 ? -+ outobj2.threshmu = obj->thresh > 0.0 ? - -2.5*log10((obj->thresh) - / (field->pixscale * field->pixscale)) + prefs.mag_zeropoint - : 99.0; -diff -ur sextractor-2.5.0.old/src/psf.c sextractor-2.5.0/src/psf.c ---- sextractor-2.5.0.old/src/psf.c 2006-07-14 20:22:44.000000000 +0200 -+++ sextractor-2.5.0/src/psf.c 2006-07-25 23:36:58.000000000 +0200 -@@ -309,7 +309,7 @@ - objstruct *obj) - { - checkstruct *check; -- static obj2struct *obj2 = &outobj2; -+ /* static obj2struct *obj2 = &outobj2; */ - static double x2[PSF_NPSFMAX],y2[PSF_NPSFMAX],xy[PSF_NPSFMAX], - deltax[PSF_NPSFMAX], - deltay[PSF_NPSFMAX],flux[PSF_NPSFMAX], -@@ -349,8 +349,8 @@ - thepsfit->npsf = 0; - for (j=0; jx[j] = obj2->posx; -- thepsfit->y[j] = obj2->posy; -+ thepsfit->x[j] = outobj2.posx; -+ thepsfit->y[j] = outobj2.posy; - thepsfit->flux[j] = 0.0; - } - -@@ -377,7 +377,7 @@ - if (prefs.psf_flag==1) - if (prefs.dpsf_flag!=1) - if(!FLAG(obj2.fluxerr_psf)) -- QMALLOC(obj2->fluxerr_psf, float, prefs.psf_npsfmax); -+ QMALLOC(outobj2.fluxerr_psf, float, prefs.psf_npsfmax); - - QMALLOC(weighth, PIXTYPE, npix); - QMALLOC(weight, double, npix); -@@ -556,7 +556,7 @@ - deltaxb[j] = deltax[j]; - deltayb[j] = deltay[j]; - fluxb[j] = flux[j]; -- obj2->fluxerr_psf[j]=fluxerr; -+ outobj2.fluxerr_psf[j]=fluxerr; - } - } - } -@@ -579,7 +579,7 @@ - - if (FLAG(obj2.poserrmx2_psf)) - { -- compute_poserr(j,var,sol,obj2,x2,y2,xy); -+ compute_poserr(j,var,sol,&outobj2,x2,y2,xy); - } - else - var += 3*PSF_NA+3; -@@ -604,7 +604,7 @@ - chi2 += pix*pix; - if (chi2>1E29) chi2=1E28; - } -- obj2->chi2_psf = obj->sigbkg>0.? -+ outobj2.chi2_psf = obj->sigbkg>0.? - chi2/((npix - 3*npsf)*obj->sigbkg*obj->sigbkg):999999; - - } -@@ -623,7 +623,7 @@ - chi2 += pix*pix; - if (chi2>1E29) chi2=1E28; - } -- obj2->chi2_psf = flux[j]>0? -+ outobj2.chi2_psf = flux[j]>0? - chi2/((npix - 3*npsf)*obj->sigbkg*obj->sigbkg):999999; - - } -@@ -755,7 +755,7 @@ - ival,npsfmax; - double *pvar; - -- static obj2struct *obj2 = &outobj2; -+ /* static obj2struct *obj2 = &outobj2; */ - checkdata = NULL; /* To avoid gcc -Wall warnings */ - pdx = pdy =dx = dy = 0.0; - ppixstep = 1.0/ppsf->pixstep; -@@ -773,13 +773,13 @@ - ppsfit->niter = 0; - ppsfit->npsf = 0; - if(!FLAG(obj2.fluxerr_psf)) -- QMALLOC(obj2->fluxerr_psf, float, npsfmax); -+ QMALLOC(outobj2.fluxerr_psf, float, npsfmax); - for (j=0; jx[j] = 999999.0; - ppsfit->y[j] = 999999.0; - ppsfit->flux[j] = 0.0; -- obj2->fluxerr_psf[j] = 0.0; -+ outobj2.fluxerr_psf[j] = 0.0; - pdeltax[j]= pdeltay[j]=psol[j]= pwmat[j]=pflux[j]=0.0; - - } -@@ -923,7 +923,7 @@ - { - svdvar(pvmat, pwmat, j, pcovmat); - pvar = pcovmat; -- obj2->fluxerr_psf[k]= sqrt(*pvar)>0.0 && sqrt(*pvar)<99? -+ outobj2.fluxerr_psf[k]= sqrt(*pvar)>0.0 && sqrt(*pvar)<99? - sqrt(*pvar):99; - } - } -@@ -940,7 +940,7 @@ - chi2 += ppix*ppix; - if (chi2>1E29) chi2=1E28; - } -- obj2->chi2_psf = obj->sigbkg>0.? -+ outobj2.chi2_psf = obj->sigbkg>0.? - chi2/((npix - 3*npsf)*obj->sigbkg*obj->sigbkg):999999; - - } -@@ -960,7 +960,7 @@ - chi2 += ppix*ppix; - if (chi2>1E29) chi2=1E28; - } -- obj2->chi2_psf = pflux[j]>0? -+ outobj2.chi2_psf = pflux[j]>0? - chi2/((npix - 3*npsf)*obj->sigbkg*obj->sigbkg):999999; - - } -@@ -1192,11 +1192,11 @@ - covab = *(++var); - varb = *(var += PSF_NA); - var += PSF_NA+1; -- obj2->poserrmx2_psf = (vara*x2[j]*x2[j]+varb*xy[j]*xy[j] -+ outobj2.poserrmx2_psf = (vara*x2[j]*x2[j]+varb*xy[j]*xy[j] - +2*covab*x2[j]*xy[j])/(sol[0]*sol[0]); -- obj2->poserrmy2_psf = (varb*y2[j]*y2[j]+vara*xy[j]*xy[j] -+ outobj2.poserrmy2_psf = (varb*y2[j]*y2[j]+vara*xy[j]*xy[j] - +2*covab*y2[j]*xy[j])/(sol[0]*sol[0]); -- obj2->poserrmxy_psf = (vara*x2[j]*xy[j]+varb*y2[j]*xy[j] -+ outobj2.poserrmxy_psf = (vara*x2[j]*xy[j]+varb*y2[j]*xy[j] - +covab*(x2[j]*y2[j]+xy[j]*xy[j])) - /(sol[0]*sol[0]); - -@@ -1205,19 +1205,19 @@ - { - double pmx2,pmy2,temp,theta; - -- if (fabs(temp=obj2->poserrmx2_psf-obj2->poserrmy2_psf) > 0.0) -- theta = atan2(2.0 * obj2->poserrmxy_psf,temp) / 2.0; -+ if (fabs(temp=outobj2.poserrmx2_psf-outobj2.poserrmy2_psf) > 0.0) -+ theta = atan2(2.0 * outobj2.poserrmxy_psf,temp) / 2.0; - else - theta = PI/4.0; - -- temp = sqrt(0.25*temp*temp+obj2->poserrmxy_psf*obj2->poserrmxy_psf); -- pmy2 = pmx2 = 0.5*(obj2->poserrmx2_psf+obj2->poserrmy2_psf); -+ temp = sqrt(0.25*temp*temp+outobj2.poserrmxy_psf*outobj2.poserrmxy_psf); -+ pmy2 = pmx2 = 0.5*(outobj2.poserrmx2_psf+outobj2.poserrmy2_psf); - pmx2+=temp; - pmy2-=temp; - -- obj2->poserra_psf = (float)sqrt(pmx2); -- obj2->poserrb_psf = (float)sqrt(pmy2); -- obj2->poserrtheta_psf = theta*180.0/PI; -+ outobj2.poserra_psf = (float)sqrt(pmx2); -+ outobj2.poserrb_psf = (float)sqrt(pmy2); -+ outobj2.poserrtheta_psf = theta*180.0/PI; - } - - /*------ ...Or ellipse parameters */ -@@ -1225,12 +1225,12 @@ - { - double xm2,ym2, xym, temp; - -- xm2 = obj2->poserrmx2_psf; -- ym2 = obj2->poserrmy2_psf; -- xym = obj2->poserrmxy_psf; -- obj2->poserrcxx_psf = (float)(ym2/(temp=xm2*ym2-xym*xym)); -- obj2->poserrcyy_psf = (float)(xm2/temp); -- obj2->poserrcxy_psf = (float)(-2*xym/temp); -+ xm2 = outobj2.poserrmx2_psf; -+ ym2 = outobj2.poserrmy2_psf; -+ xym = outobj2.poserrmxy_psf; -+ outobj2.poserrcxx_psf = (float)(ym2/(temp=xm2*ym2-xym*xym)); -+ outobj2.poserrcyy_psf = (float)(xm2/temp); -+ outobj2.poserrcxy_psf = (float)(-2*xym/temp); - } - return; - } diff --git a/sextractor.spec b/sextractor.spec index 5285818..b7d327c 100644 --- a/sextractor.spec +++ b/sextractor.spec @@ -1,14 +1,20 @@ Name: sextractor -Version: 2.5.0 -Release: 9%{?dist} +Version: 2.28.2 +Release: %autorelease Summary: Extract catalogs of sources from astronomical images -Group: Applications/Engineering -License: GPLv2 -URL: http://terapix.iap.fr/soft/%{name} -Source0: ftp://ftp.iap.fr/pub/from_users/bertin/sextractor/%{name}-%{version}.tar.gz -Patch0: sextractor-pointer-alias.patch -Buildroot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX) +# Automatically converted from old format: GPLv3+ - review is highly recommended. +License: GPL-3.0-or-later +URL: http://astromatic.iap.fr/software/%{name} +Source0: https://github.com/astromatic/%{name}/archive/%{version}.tar.gz#/%{name}-%{version}.tar.gz +Patch0: sextractor-format-sec.patch + +BuildRequires: make +BuildRequires: gcc +BuildRequires: automake autoconf libtool +BuildRequires: fftw-devel >= 3.1 +BuildRequires: flexiblas-devel +BuildRequires: cfitsio-devel %description SExtractor is a program that builds a catalogue of objects from an @@ -18,62 +24,27 @@ well on moderately crowded star fields. %prep %setup -q -%patch0 -p1 +%patch -P0 -p1 +sh ./autogen.sh +sed -i 's/openblas/flexiblas/g' configure %build -%configure - -%{__make} %{?_smp_mflags} +%configure --enable-flexiblas --with-flexiblas-incdir=%{_includedir}/flexiblas +%make_build %install -%{__rm} -fr %{buildroot} -%{__make} DESTDIR=%{buildroot} install -%{__mkdir_p} %{buildroot}%{_datadir}/%{name} -%{__install} -m 644 -p config/*.conv %{buildroot}%{_datadir}/%{name} -%{__install} -m 644 -p config/default.nnw %{buildroot}%{_datadir}/%{name} - - -%clean -%{__rm} -fr %{buildroot} +%make_install +mkdir -p %{buildroot}%{_datadir}/%{name} +install -m 644 -p config/*.conv %{buildroot}%{_datadir}/%{name} +install -m 644 -p config/default.nnw %{buildroot}%{_datadir}/%{name} %files -%defattr(-,root,root) -%doc AUTHORS BUGS COPYING HISTORY README THANKS doc/README.DOC doc/sextractor.pdf config/default.sex config/default.param +%doc AUTHORS BUGS COPYRIGHT HISTORY README.md THANKS config/default.sex config/default.param config/README +%license LICENSE %{_bindir}/* %{_mandir}/man1/* %{_mandir}/manx/* %{_datadir}/%{name}/ %changelog -* Sun Jul 26 2009 Fedora Release Engineering - 2.5.0-9 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild - -* Wed Feb 25 2009 Fedora Release Engineering - 2.5.0-8 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild - -* Mon Dec 1 2008 Michael Schwendt - 2.5.0-7 -- Include unowned directory. - -* Tue Feb 19 2008 Fedora Release Engineering - 2.5.0-6.1 -- Autorebuild for GCC 4.3 - -* Mon Aug 27 2007 Sergio Pascual 2.5.0-5.1 -- Rebuild for Fedora 8 to get the build-id -* Tue Sep 12 2006 Sergio Pascual 2.5.0-5 -- Rebuilt for FC6. -* Wed Jul 26 2006 Sergio Pascual 2.5.0-4 -- Patch to resolve pointer aliasing problems (bug #199700) -- Removed -DXSL_URL flag, as the file sextractor.xsl does not exist yet -* Mon Jul 24 2006 Sergio Pascual 2.5.0-3 -- Reverting optimization to -O2, it breaks debug infos -* Fri Jul 21 2006 Sergio Pascual 2.5.0-2 -- fitsconv.c has correct permissions -- changed optimization from -O2 to -O1 (bug #199700) -- additional define allows VOTable output -* Wed Jul 19 2006 Sergio Pascual 2.5.0-1 -- New upstream version 2.5.0 -* Tue Jun 20 2006 Sergio Pascual 2.4.4-2 -- Fixed executable permission in src/fits/fitsconv.c -- default.sex and default.param moved to docs -* Mon Jun 19 2006 Sergio Pascual 2.4.4-1 -- Initial spec file. +%autochangelog diff --git a/sources b/sources index e310657..32e1aac 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -3dede44685b582ad5ee03f5b69423530 sextractor-2.5.0.tar.gz +SHA512 (sextractor-2.28.2.tar.gz) = f54b9e69944e582c68769c0d01534fc437f03fa5fc9dcb59bc680baed429983ebaa4c2422570b0f424b25c6c44cdf54a6587819ab2bc524aa33ed5c9f2595e62