diff --git a/.gitignore b/.gitignore index e18d876..f5532b4 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,2 @@ 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/changelog b/changelog deleted file mode 100644 index 6db61c8..0000000 --- a/changelog +++ /dev/null @@ -1,144 +0,0 @@ -* 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-cflags.patch b/sextractor-cflags.patch new file mode 100644 index 0000000..155c99e --- /dev/null +++ b/sextractor-cflags.patch @@ -0,0 +1,29 @@ +diff -ur sextractor-2.8.6/configure sextractor-2.8.6.new/configure +--- sextractor-2.8.6/configure 2009-04-09 15:30:14.000000000 +0200 ++++ sextractor-2.8.6.new/configure 2009-08-26 16:39:05.000000000 +0200 +@@ -2487,10 +2487,10 @@ + cclist="cc gcc" + + # Backup and reset the input CFLAGS and LDFLAGS +-mycflags="$CFLAGS" +-CFLAGS="" +-myldflags="$LDFLAGS" +-LDFLAGS="" ++#mycflags="$CFLAGS" ++#CFLAGS="" ++#myldflags="$LDFLAGS" ++#LDFLAGS="" + + # Provide special option for the Linux Intel C compiler + { echo "$as_me:$LINENO: checking for Linux Intel C compiler mode" >&5 +@@ -4358,8 +4358,8 @@ + rm -f conftest.* + fi + if test -n "$prog_cc_optim_flags"; then +- CFLAGS="$CFLAGS $prog_cc_optim_flags" +- LDFLAGS="$LDFLAGS $prog_ld_optim_flags" ++ prog_cc_optim_flags="" ++ prog_ld_optim_flags="" + else + prog_cc_optim_flags="" + prog_ld_optim_flags="" diff --git a/sextractor-pointer-alias.patch b/sextractor-pointer-alias.patch new file mode 100644 index 0000000..7a3900d --- /dev/null +++ b/sextractor-pointer-alias.patch @@ -0,0 +1,2034 @@ +diff -ur sextractor-2.8.6/src/analyse.c sextractor-2.8.6.new/src/analyse.c +--- sextractor-2.8.6/src/analyse.c 2009-01-29 14:51:59.000000000 +0100 ++++ sextractor-2.8.6.new/src/analyse.c 2009-05-24 00:07:07.000000000 +0200 +@@ -42,7 +42,6 @@ + #include "som.h" + #include "winpos.h" + +-static obj2struct *obj2 = &outobj2; + extern profitstruct *theprofit; + + /********************************* analyse ***********************************/ +@@ -392,11 +391,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); +@@ -404,11 +403,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; + +@@ -439,9 +438,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)) +@@ -451,28 +450,28 @@ + 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(obj2.flux_isocor)) + computeisocorflux(field, obj); +@@ -510,14 +509,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); + } + +@@ -539,7 +538,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; + } + + /*&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&*/ +@@ -588,8 +587,8 @@ + som_phot(thesom, obj->bkg, field->backsig, + (float)field->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; + } + +@@ -609,7 +608,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; +@@ -620,18 +619,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; + } + } +@@ -639,7 +638,7 @@ + /*----------------------------- Profile fitting -----------------------------*/ + nsub = 1; + if (prefs.prof_flag) +- profit_fit(theprofit, field, wfield, obj, obj2); ++ profit_fit(theprofit, field, wfield, obj, &outobj2); + + /*--- Express everything in magnitude units */ + computemags(field, obj); +@@ -659,20 +658,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; + } +@@ -722,7 +721,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, +Only in sextractor-2.8.6.new/src: analyse.o +diff -ur sextractor-2.8.6/src/astrom.c sextractor-2.8.6.new/src/astrom.c +--- sextractor-2.8.6/src/astrom.c 2009-01-29 14:52:00.000000000 +0100 ++++ sextractor-2.8.6.new/src/astrom.c 2009-05-24 00:07:27.000000000 +0200 +@@ -30,7 +30,6 @@ + #include "fitswcs.h" + #include "wcs/tnx.h" + +-static obj2struct *obj2 = &outobj2; + + /****************************** initastrom **********************************/ + /* +@@ -99,46 +98,46 @@ + /* If working with WCS, compute WORLD coordinates and local matrix */ + if (FLAG(obj2.mxw)) + { +- rawpos[0] = obj2->posx; +- rawpos[1] = obj2->posy; ++ rawpos[0] = outobj2.posx; ++ rawpos[1] = outobj2.posy; + raw_to_wcs(wcs, rawpos, wcspos); +- obj2->mxw = wcspos[0]; +- obj2->myw = wcspos[1]; ++ outobj2.mxw = wcspos[0]; ++ outobj2.myw = wcspos[1]; + if (lng != lat) + { +- obj2->alphas = lngmxw : obj2->myw; +- obj2->deltas = lngmyw : obj2->mxw; ++ outobj2.alphas = lngequinox-2000.0)>0.003) + precess(wcs->equinox, wcspos[lngalpha2000, &obj2->delta2000); ++ 2000.0, &outobj2.alpha2000, &outobj2.delta2000); + else + { +- obj2->alpha2000 = lngmxw : obj2->myw; +- obj2->delta2000 = lngmyw : obj2->mxw; ++ outobj2.alpha2000 = lngap2000 - obj2->alpha2000; ++ da = wcs->ap2000 - outobj2.alpha2000; + dd = (sin(wcs->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->dtheta2000 = (((da>0.0 && da<180.0) || da<-180.0)?-dd:dd); ++ outobj2.dtheta2000 = (((da>0.0 && da<180.0) || da<-180.0)?-dd:dd); + } + if (FLAG(obj2.alpha1950)) + { +- j2b(wcs->equinox, obj2->alpha2000, obj2->delta2000, +- &obj2->alpha1950, &obj2->delta1950); ++ j2b(wcs->equinox, outobj2.alpha2000, outobj2.delta2000, ++ &outobj2.alpha1950, &outobj2.delta1950); + if (FLAG(obj2.dtheta1950)) + { +- da = wcs->ap1950 - obj2->alpha1950; ++ da = wcs->ap1950 - outobj2.alpha1950; + dd = (sin(wcs->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->dtheta1950 = (((da>0.0 && da<180.0) || da<-180.0)?-dd:dd); ++ outobj2.dtheta1950 = (((da>0.0 && da<180.0) || da<-180.0)?-dd:dd); + } + } + } +@@ -151,25 +150,25 @@ + rawpos[0] = obj->peakx; + rawpos[1] = obj->peaky; + raw_to_wcs(wcs, rawpos, wcspos); +- obj2->peakxw = wcspos[0]; +- obj2->peakyw = wcspos[1]; ++ outobj2.peakxw = wcspos[0]; ++ outobj2.peakyw = wcspos[1]; + if (lng != lat) + { +- obj2->peakalphas = lngpeakxw : obj2->peakyw; +- obj2->peakdeltas = lngpeakyw : obj2->peakxw; ++ outobj2.peakalphas = lngequinox-2000.0)>0.003) + precess(wcs->equinox, wcspos[lngpeakalpha2000, &obj2->peakdelta2000); ++ 2000.0, &outobj2.peakalpha2000, &outobj2.peakdelta2000); + else + { +- obj2->peakalpha2000 = lngpeakxw : obj2->peakyw; +- obj2->peakdelta2000 = lngpeakyw : obj2->peakxw; ++ outobj2.peakalpha2000 = lngequinox, obj2->peakalpha2000, obj2->peakdelta2000, +- &obj2->peakalpha1950, &obj2->peakdelta1950); ++ j2b(wcs->equinox, outobj2.peakalpha2000, outobj2.peakdelta2000, ++ &outobj2.peakalpha1950, &outobj2.peakdelta1950); + } + } + } +@@ -177,28 +176,28 @@ + /* Idem for Windowed positions */ + if (FLAG(obj2.winpos_xw)) + { +- rawpos[0] = obj2->winpos_x; +- rawpos[1] = obj2->winpos_y; ++ rawpos[0] = outobj2.winpos_x; ++ rawpos[1] = outobj2.winpos_y; + raw_to_wcs(wcs, rawpos, wcspos); +- obj2->winpos_xw = wcspos[0]; +- obj2->winpos_yw = wcspos[1]; ++ outobj2.winpos_xw = wcspos[0]; ++ outobj2.winpos_yw = wcspos[1]; + if (lng != lat) + { +- obj2->winpos_alphas = lngwinpos_xw : obj2->winpos_yw; +- obj2->winpos_deltas = lngwinpos_yw : obj2->winpos_xw; ++ outobj2.winpos_alphas = lngequinox-2000.0)>0.003) + precess(wcs->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 = lngwinpos_xw : obj2->winpos_yw; +- obj2->winpos_delta2000 = lngwinpos_yw : obj2->winpos_xw; ++ outobj2.winpos_alpha2000 = lngequinox, obj2->winpos_alpha2000, obj2->winpos_delta2000, +- &obj2->winpos_alpha1950, &obj2->winpos_delta1950); ++ j2b(wcs->equinox, outobj2.winpos_alpha2000, outobj2.winpos_delta2000, ++ &outobj2.winpos_alpha1950, &outobj2.winpos_delta1950); + } + } + } +@@ -206,28 +205,28 @@ + /* Idem for Model-fitted positions */ + if (FLAG(obj2.xw_prof)) + { +- rawpos[0] = obj2->x_prof; +- rawpos[1] = obj2->y_prof; ++ rawpos[0] = outobj2.x_prof; ++ rawpos[1] = outobj2.y_prof; + raw_to_wcs(wcs, rawpos, wcspos); +- obj2->xw_prof = wcspos[0]; +- obj2->yw_prof = wcspos[1]; ++ outobj2.xw_prof = wcspos[0]; ++ outobj2.yw_prof = wcspos[1]; + if (lng != lat) + { +- obj2->alphas_prof = lngxw_prof : obj2->yw_prof; +- obj2->deltas_prof = lngyw_prof : obj2->xw_prof; ++ outobj2.alphas_prof = lngequinox-2000.0)>0.003) + precess(wcs->equinox, wcspos[0], wcspos[1], +- 2000.0, &obj2->alpha2000_prof, &obj2->delta2000_prof); ++ 2000.0, &outobj2.alpha2000_prof, &outobj2.delta2000_prof); + else + { +- obj2->alpha2000_prof = lngxw_prof : obj2->yw_prof; +- obj2->delta2000_prof = lngyw_prof : obj2->xw_prof; ++ outobj2.alpha2000_prof = lngequinox, obj2->alpha2000_prof, obj2->delta2000_prof, +- &obj2->alpha1950_prof, &obj2->delta1950_prof); ++ j2b(wcs->equinox, outobj2.alpha2000_prof, outobj2.delta2000_prof, ++ &outobj2.alpha1950_prof, &outobj2.delta1950_prof); + } + } + } +@@ -235,11 +234,11 @@ + /* Custom coordinate system for the MAMA machine */ + if (FLAG(obj2.mamaposx)) + { +- rawpos[0] = obj2->posx - 0.5; +- rawpos[1] = obj2->posy - 0.5; ++ rawpos[0] = outobj2.posx - 0.5; ++ rawpos[1] = outobj2.posy - 0.5; + raw_to_wcs(wcs, rawpos, wcspos); +- obj2->mamaposx = wcspos[1]*(MAMA_CORFLEX+1.0); +- obj2->mamaposy = wcspos[0]*(MAMA_CORFLEX+1.0); ++ outobj2.mamaposx = wcspos[1]*(MAMA_CORFLEX+1.0); ++ outobj2.mamaposy = wcspos[0]*(MAMA_CORFLEX+1.0); + } + + if (FLAG(obj2.mx2w) +@@ -252,9 +251,9 @@ + || FLAG(obj2.fdnpixw) + || FLAG(obj2.fwhmw)))) + { +- rawpos[0] = obj2->posx; +- rawpos[1] = obj2->posy; +- pixscale2 = wcs_jacobian(wcs, rawpos, obj2->jacob); ++ rawpos[0] = outobj2.posx; ++ rawpos[1] = outobj2.posy; ++ pixscale2 = wcs_jacobian(wcs, rawpos, outobj2.jacob); + } + + /* Express shape parameters in WORLD frame */ +@@ -274,14 +273,14 @@ + astrom_proferrparam(field, obj); + + if (FLAG(obj2.npixw)) +- obj2->npixw = obj->npix * (prefs.pixel_scale? ++ outobj2.npixw = obj->npix * (prefs.pixel_scale? + field->pixscale/3600.0*field->pixscale/3600.0 : pixscale2); + if (FLAG(obj2.fdnpixw)) +- obj2->fdnpixw = obj->fdnpix * (prefs.pixel_scale? ++ outobj2.fdnpixw = obj->fdnpix * (prefs.pixel_scale? + field->pixscale/3600.0*field->pixscale/3600.0 : pixscale2); + + if (FLAG(obj2.fwhmw)) +- obj2->fwhmw = obj->fwhm * (prefs.pixel_scale? ++ outobj2.fwhmw = obj->fwhm * (prefs.pixel_scale? + field->pixscale/3600.0 : sqrt(pixscale2)); + + return; +@@ -307,36 +306,36 @@ + lng = 0; + lat = 1; + } +- lm0 = obj2->jacob[lng+naxis*lng]; +- lm1 = obj2->jacob[lat+naxis*lng]; +- lm2 = obj2->jacob[lng+naxis*lat]; +- lm3 = obj2->jacob[lat+naxis*lat]; ++ lm0 = outobj2.jacob[lng+naxis*lng]; ++ lm1 = outobj2.jacob[lat+naxis*lng]; ++ lm2 = outobj2.jacob[lng+naxis*lat]; ++ lm3 = outobj2.jacob[lat+naxis*lat]; + + + /* All WORLD params based on 2nd order moments have to pass through here */ + 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 = fmod_m90_p90((temp == 0.0)? ++ outobj2.thetaw = fmod_m90_p90((temp == 0.0)? + (45.0) : (0.5*atan2(2.0 * xym,temp)/DEG)); + + /*-- Compute position angles in J2000 or B1950 reference frame */ + if (wcs->lng != wcs->lat) + { + if (FLAG(obj2.thetas)) +- obj2->thetas = fmod_m90_p90(lngthetaw>0.0?90:-90.0) - obj2->thetaw) +- : obj2->thetaw); ++ outobj2.thetas = fmod_m90_p90(lng0.0?90:-90.0) - outobj2.thetaw) ++ : outobj2.thetaw); + if (FLAG(obj2.theta2000)) +- obj2->theta2000 = fmod_m90_p90(obj2->thetas + obj2->dtheta2000); ++ outobj2.theta2000 = fmod_m90_p90(outobj2.thetas + outobj2.dtheta2000); + if (FLAG(obj2.theta1950)) +- obj2->theta1950 = fmod_m90_p90(obj2->thetas + obj2->dtheta1950); ++ outobj2.theta1950 = fmod_m90_p90(outobj2.thetas + outobj2.dtheta1950); + } + } + +@@ -344,9 +343,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)) +@@ -357,9 +356,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; +@@ -385,35 +384,35 @@ + lng = 0; + lat = 1; + } +- lm0 = obj2->jacob[lng+naxis*lng]; +- lm1 = obj2->jacob[lat+naxis*lng]; +- lm2 = obj2->jacob[lng+naxis*lat]; +- lm3 = obj2->jacob[lat+naxis*lat]; ++ lm0 = outobj2.jacob[lng+naxis*lng]; ++ lm1 = outobj2.jacob[lat+naxis*lng]; ++ lm2 = outobj2.jacob[lng+naxis*lat]; ++ lm3 = outobj2.jacob[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 = fmod_m90_p90((temp == 0.0)? ++ outobj2.win_thetaw = fmod_m90_p90((temp == 0.0)? + (45.0) : (0.5*atan2(2.0*xym,temp)/DEG)); + + /*-- Compute position angles in J2000 or B1950 reference frame */ + if (wcs->lng != wcs->lat) + { + if (FLAG(obj2.win_thetas)) +- obj2->win_thetas = fmod_m90_p90(lngwin_thetaw>0.0?90:-90.0) - obj2->win_thetaw) +- : obj2->win_thetaw); ++ outobj2.win_thetas = fmod_m90_p90(lng0.0?90:-90.0) - outobj2.win_thetaw) ++ : outobj2.win_thetaw); + if (FLAG(obj2.win_theta2000)) +- obj2->win_theta2000 = fmod_m90_p90(obj2->win_thetas + obj2->dtheta2000); ++ outobj2.win_theta2000 = fmod_m90_p90(outobj2.win_thetas + outobj2.dtheta2000); + if (FLAG(obj2.win_theta1950)) +- obj2->win_theta1950 = fmod_m90_p90(obj2->win_thetas + obj2->dtheta1950); ++ outobj2.win_theta1950 = fmod_m90_p90(outobj2.win_thetas + outobj2.dtheta1950); + } + } + +@@ -421,9 +420,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)) +@@ -434,9 +433,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; +@@ -462,37 +461,37 @@ + lng = 0; + lat = 1; + } +- lm0 = obj2->jacob[lng+naxis*lng]; +- lm1 = obj2->jacob[lat+naxis*lng]; +- lm2 = obj2->jacob[lng+naxis*lat]; +- lm3 = obj2->jacob[lat+naxis*lat]; ++ lm0 = outobj2.jacob[lng+naxis*lng]; ++ lm1 = outobj2.jacob[lat+naxis*lng]; ++ lm2 = outobj2.jacob[lng+naxis*lat]; ++ lm3 = outobj2.jacob[lat+naxis*lat]; + + /* All WORLD params based on 2nd order moments have to pass through here */ + 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 = fmod_m90_p90((temp==0.0)? ++ outobj2.poserr_thetaw = fmod_m90_p90((temp==0.0)? + (45.0):(0.5*atan2(2.0*xym,temp)/DEG)); + + /*-- Compute position angles in J2000 or B1950 reference frame */ + if (wcs->lng != wcs->lat) + { + if (FLAG(obj2.poserr_thetas)) +- obj2->poserr_thetas = fmod_m90_p90(lngposerr_thetaw>0.0?90:-90.0) - obj2->poserr_thetaw) +- : obj2->poserr_thetaw); ++ outobj2.poserr_thetas = fmod_m90_p90(lng0.0?90:-90.0) - outobj2.poserr_thetaw) ++ : outobj2.poserr_thetaw); + if (FLAG(obj2.poserr_theta2000)) +- obj2->poserr_theta2000 = fmod_m90_p90(obj2->poserr_thetas +- + obj2->dtheta2000); ++ outobj2.poserr_theta2000 = fmod_m90_p90(outobj2.poserr_thetas ++ + outobj2.dtheta2000); + if (FLAG(obj2.poserr_theta1950)) +- obj2->poserr_theta1950 = fmod_m90_p90(obj2->poserr_thetas +- + obj2->dtheta1950); ++ outobj2.poserr_theta1950 = fmod_m90_p90(outobj2.poserr_thetas ++ + outobj2.dtheta1950); + } + } + +@@ -500,8 +499,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)) +@@ -512,9 +511,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; +@@ -540,37 +539,37 @@ + lng = 0; + lat = 1; + } +- lm0 = obj2->jacob[lng+naxis*lng]; +- lm1 = obj2->jacob[lat+naxis*lng]; +- lm2 = obj2->jacob[lng+naxis*lat]; +- lm3 = obj2->jacob[lat+naxis*lat]; ++ lm0 = outobj2.jacob[lng+naxis*lng]; ++ lm1 = outobj2.jacob[lat+naxis*lng]; ++ lm2 = outobj2.jacob[lng+naxis*lat]; ++ lm3 = outobj2.jacob[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 = (fmod_m90_p90(temp==0.0)? ++ outobj2.winposerr_thetaw = (fmod_m90_p90(temp==0.0)? + (45.0):(0.5*atan2(2.0*xym,temp)/DEG)); + + /*-- Compute position angles in J2000 or B1950 reference frame */ + if (wcs->lng != wcs->lat) + { + if (FLAG(obj2.winposerr_thetas)) +- obj2->winposerr_thetas = fmod_m90_p90(lngwinposerr_thetaw>0.0?90:-90.0) - obj2->winposerr_thetaw) +- : obj2->winposerr_thetaw); ++ outobj2.winposerr_thetas = fmod_m90_p90(lng0.0?90:-90.0) - outobj2.winposerr_thetaw) ++ : outobj2.winposerr_thetaw); + if (FLAG(obj2.winposerr_theta2000)) +- obj2->winposerr_theta2000 = fmod_m90_p90(obj2->winposerr_thetas +- + obj2->dtheta2000); ++ outobj2.winposerr_theta2000 = fmod_m90_p90(outobj2.winposerr_thetas ++ + outobj2.dtheta2000); + if (FLAG(obj2.winposerr_theta1950)) +- obj2->winposerr_theta1950 = fmod_m90_p90(obj2->winposerr_thetas +- + obj2->dtheta1950); ++ outobj2.winposerr_theta1950 = fmod_m90_p90(outobj2.winposerr_thetas ++ + outobj2.dtheta1950); + } + } + +@@ -578,8 +577,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)) +@@ -590,9 +589,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; +@@ -618,37 +617,37 @@ + lng = 0; + lat = 1; + } +- lm0 = obj2->jacob[lng+naxis*lng]; +- lm1 = obj2->jacob[lat+naxis*lng]; +- lm2 = obj2->jacob[lng+naxis*lat]; +- lm3 = obj2->jacob[lat+naxis*lat]; ++ lm0 = outobj2.jacob[lng+naxis*lng]; ++ lm1 = outobj2.jacob[lat+naxis*lng]; ++ lm2 = outobj2.jacob[lng+naxis*lat]; ++ lm3 = outobj2.jacob[lat+naxis*lat]; + + /* All WORLD params based on 2nd order moments have to pass through here */ +- dx2 = obj2->poserrmx2_prof; +- dy2 = obj2->poserrmy2_prof; +- dxy = obj2->poserrmxy_prof; +- obj2->poserrmx2w_prof = xm2 = lm0*lm0*dx2+lm1*lm1*dy2+lm0*lm1*dxy; +- obj2->poserrmy2w_prof = ym2 = lm2*lm2*dx2+lm3*lm3*dy2+lm2*lm3*dxy; +- obj2->poserrmxyw_prof = xym = lm0*lm2*dx2+lm1*lm3*dy2+(lm0*lm3+lm1*lm2)*dxy; ++ dx2 = outobj2.poserrmx2_prof; ++ dy2 = outobj2.poserrmy2_prof; ++ dxy = outobj2.poserrmxy_prof; ++ outobj2.poserrmx2w_prof = xm2 = lm0*lm0*dx2+lm1*lm1*dy2+lm0*lm1*dxy; ++ outobj2.poserrmy2w_prof = ym2 = lm2*lm2*dx2+lm3*lm3*dy2+lm2*lm3*dxy; ++ outobj2.poserrmxyw_prof = xym = lm0*lm2*dx2+lm1*lm3*dy2+(lm0*lm3+lm1*lm2)*dxy; + temp=xm2-ym2; + if (FLAG(obj2.poserrthetaw_prof)) + { +- obj2->poserrthetaw_prof = (fmod_m90_p90(temp==0.0)? ++ outobj2.poserrthetaw_prof = (fmod_m90_p90(temp==0.0)? + (45.0):(0.5*atan2(2.0*xym,temp)/DEG)); + + /*-- Compute position angles in J2000 or B1950 reference frame */ + if (wcs->lng != wcs->lat) + { + if (FLAG(obj2.poserrthetas_prof)) +- obj2->poserrthetas_prof = fmod_m90_p90(lngposerrthetaw_prof>0.0?90:-90.0)-obj2->poserrthetaw_prof) +- : obj2->poserrthetaw_prof); ++ outobj2.poserrthetas_prof = fmod_m90_p90(lng0.0?90:-90.0)-outobj2.poserrthetaw_prof) ++ : outobj2.poserrthetaw_prof); + if (FLAG(obj2.poserrtheta2000_prof)) +- obj2->poserrtheta2000_prof = fmod_m90_p90(obj2->poserrthetas_prof +- + obj2->dtheta2000); ++ outobj2.poserrtheta2000_prof = fmod_m90_p90(outobj2.poserrthetas_prof ++ + outobj2.dtheta2000); + if (FLAG(obj2.poserrtheta1950_prof)) +- obj2->poserrtheta1950_prof = fmod_m90_p90(obj2->poserrthetas_prof +- + obj2->dtheta1950); ++ outobj2.poserrtheta1950_prof = fmod_m90_p90(outobj2.poserrthetas_prof ++ + outobj2.dtheta1950); + } + } + +@@ -656,8 +655,8 @@ + { + temp = sqrt(0.25*temp*temp+xym*xym); + pm2 = 0.5*(xm2+ym2); +- obj2->poserraw_prof = (float)sqrt(pm2+temp); +- obj2->poserrbw_prof = (float)sqrt(pm2-temp); ++ outobj2.poserraw_prof = (float)sqrt(pm2+temp); ++ outobj2.poserrbw_prof = (float)sqrt(pm2-temp); + } + + if (FLAG(obj2.poserrcxxw_prof)) +@@ -668,9 +667,9 @@ + temp = 1e-6; + xym *= 0.99999; + } +- obj2->poserrcxxw_prof = (float)(ym2/temp); +- obj2->poserrcyyw_prof = (float)(xm2/temp); +- obj2->poserrcxyw_prof = (float)(-2*xym/temp); ++ outobj2.poserrcxxw_prof = (float)(ym2/temp); ++ outobj2.poserrcyyw_prof = (float)(xm2/temp); ++ outobj2.poserrcxyw_prof = (float)(-2*xym/temp); + } + + return; +@@ -696,178 +695,178 @@ + lng = 0; + lat = 1; + } +- lm0 = obj2->jacob[lng+naxis*lng]; +- lm1 = obj2->jacob[lat+naxis*lng]; +- lm2 = obj2->jacob[lng+naxis*lat]; +- lm3 = obj2->jacob[lat+naxis*lat]; ++ lm0 = outobj2.jacob[lng+naxis*lng]; ++ lm1 = outobj2.jacob[lat+naxis*lng]; ++ lm2 = outobj2.jacob[lng+naxis*lat]; ++ lm3 = outobj2.jacob[lat+naxis*lat]; + + /* Spheroid World coordinates */ +- obj2->prof_spheroid_thetaerrw=obj2->prof_spheroid_thetaerr; /* quick & dirty*/ ++ outobj2.prof_spheroid_thetaerrw=outobj2.prof_spheroid_thetaerr; /* quick & dirty*/ + if (FLAG(obj2.prof_spheroid_reffw)) + { +- ct = cos(obj2->prof_spheroid_theta*DEG); +- st = sin(obj2->prof_spheroid_theta*DEG); +- dx2 = obj2->prof_spheroid_reff*obj2->prof_spheroid_reff * (ct*ct +- + st*st * obj2->prof_spheroid_aspect*obj2->prof_spheroid_aspect); +- dy2 = obj2->prof_spheroid_reff*obj2->prof_spheroid_reff * (st*st +- + ct*ct * obj2->prof_spheroid_aspect*obj2->prof_spheroid_aspect); +- dxy = ct*st * obj2->prof_spheroid_reff*obj2->prof_spheroid_reff +- *(1.0 - obj2->prof_spheroid_aspect*obj2->prof_spheroid_aspect); ++ ct = cos(outobj2.prof_spheroid_theta*DEG); ++ st = sin(outobj2.prof_spheroid_theta*DEG); ++ dx2 = outobj2.prof_spheroid_reff*outobj2.prof_spheroid_reff * (ct*ct ++ + st*st * outobj2.prof_spheroid_aspect*outobj2.prof_spheroid_aspect); ++ dy2 = outobj2.prof_spheroid_reff*outobj2.prof_spheroid_reff * (st*st ++ + ct*ct * outobj2.prof_spheroid_aspect*outobj2.prof_spheroid_aspect); ++ dxy = ct*st * outobj2.prof_spheroid_reff*outobj2.prof_spheroid_reff ++ *(1.0 - outobj2.prof_spheroid_aspect*outobj2.prof_spheroid_aspect); + xm2 = lm0*lm0*dx2 + lm1*lm1*dy2 + lm0*lm1*dxy; + ym2 = lm2*lm2*dx2 + lm3*lm3*dy2 + lm2*lm3*dxy; + xym = lm0*lm2*dx2 + lm1*lm3*dy2 + (lm0*lm3+lm1*lm2)*dxy; + temp=xm2-ym2; + if (FLAG(obj2.prof_spheroid_thetaw)) + { +- obj2->prof_spheroid_thetaw = fmod_m90_p90((temp == 0.0)? ++ outobj2.prof_spheroid_thetaw = fmod_m90_p90((temp == 0.0)? + (45.0) : (0.5*atan2(2.0 * xym,temp)/DEG)); + + if (wcs->lng != wcs->lat) + { + if (FLAG(obj2.prof_spheroid_thetas)) +- obj2->prof_spheroid_thetas = fmod_m90_p90(lngprof_spheroid_thetaw>0.0?90:-90.0) +- - obj2->prof_spheroid_thetaw) +- : obj2->prof_spheroid_thetaw); ++ outobj2.prof_spheroid_thetas = fmod_m90_p90(lng0.0?90:-90.0) ++ - outobj2.prof_spheroid_thetaw) ++ : outobj2.prof_spheroid_thetaw); + if (FLAG(obj2.prof_spheroid_theta2000)) +- obj2->prof_spheroid_theta2000=fmod_m90_p90(obj2->prof_spheroid_thetas +- + obj2->dtheta2000); ++ outobj2.prof_spheroid_theta2000=fmod_m90_p90(outobj2.prof_spheroid_thetas ++ + outobj2.dtheta2000); + if (FLAG(obj2.prof_spheroid_theta1950)) +- obj2->prof_spheroid_theta1950=fmod_m90_p90(obj2->prof_spheroid_thetas +- + obj2->dtheta1950); ++ outobj2.prof_spheroid_theta1950=fmod_m90_p90(outobj2.prof_spheroid_thetas ++ + outobj2.dtheta1950); + } + } + temp = sqrt(0.25*temp*temp+xym*xym); + pm2 = 0.5*(xm2+ym2); +- obj2->prof_spheroid_reffw = sqrt(pm2+temp); +- obj2->prof_spheroid_refferrw = obj2->prof_spheroid_reff > 0.0? +- obj2->prof_spheroid_refferr/obj2->prof_spheroid_reff +- *obj2->prof_spheroid_reffw ++ outobj2.prof_spheroid_reffw = sqrt(pm2+temp); ++ outobj2.prof_spheroid_refferrw = outobj2.prof_spheroid_reff > 0.0? ++ outobj2.prof_spheroid_refferr/outobj2.prof_spheroid_reff ++ *outobj2.prof_spheroid_reffw + : 0.0; +- obj2->prof_spheroid_aspectw = obj2->prof_spheroid_reffw>0.0? +- sqrt(pm2-temp) / obj2->prof_spheroid_reffw +- : obj2->prof_spheroid_aspect; +- obj2->prof_spheroid_aspecterrw = obj2->prof_spheroid_aspect > 0.0? +- obj2->prof_spheroid_aspecterr/obj2->prof_spheroid_aspect +- *obj2->prof_spheroid_aspectw ++ outobj2.prof_spheroid_aspectw = outobj2.prof_spheroid_reffw>0.0? ++ sqrt(pm2-temp) / outobj2.prof_spheroid_reffw ++ : outobj2.prof_spheroid_aspect; ++ outobj2.prof_spheroid_aspecterrw = outobj2.prof_spheroid_aspect > 0.0? ++ outobj2.prof_spheroid_aspecterr/outobj2.prof_spheroid_aspect ++ *outobj2.prof_spheroid_aspectw + : 0.0; + } + + /* Disk World coordinates */ +- obj2->prof_disk_thetaerrw = obj2->prof_disk_thetaerr; /* quick & dirty*/ ++ outobj2.prof_disk_thetaerrw = outobj2.prof_disk_thetaerr; /* quick & dirty*/ + if (FLAG(obj2.prof_disk_scalew)) + { +- ct = cos(obj2->prof_disk_theta*DEG); +- st = sin(obj2->prof_disk_theta*DEG); +- dx2 = obj2->prof_disk_scale*obj2->prof_disk_scale * (ct*ct +- + st*st * obj2->prof_disk_aspect*obj2->prof_disk_aspect); +- dy2 = obj2->prof_disk_scale*obj2->prof_disk_scale * (st*st +- + ct*ct * obj2->prof_disk_aspect*obj2->prof_disk_aspect); +- dxy = ct*st * obj2->prof_disk_scale*obj2->prof_disk_scale +- *(1.0 - obj2->prof_disk_aspect*obj2->prof_disk_aspect); ++ ct = cos(outobj2.prof_disk_theta*DEG); ++ st = sin(outobj2.prof_disk_theta*DEG); ++ dx2 = outobj2.prof_disk_scale*outobj2.prof_disk_scale * (ct*ct ++ + st*st * outobj2.prof_disk_aspect*outobj2.prof_disk_aspect); ++ dy2 = outobj2.prof_disk_scale*outobj2.prof_disk_scale * (st*st ++ + ct*ct * outobj2.prof_disk_aspect*outobj2.prof_disk_aspect); ++ dxy = ct*st * outobj2.prof_disk_scale*outobj2.prof_disk_scale ++ *(1.0 - outobj2.prof_disk_aspect*outobj2.prof_disk_aspect); + xm2 = lm0*lm0*dx2 + lm1*lm1*dy2 + lm0*lm1*dxy; + ym2 = lm2*lm2*dx2 + lm3*lm3*dy2 + lm2*lm3*dxy; + xym = lm0*lm2*dx2 + lm1*lm3*dy2 + (lm0*lm3+lm1*lm2)*dxy; + temp=xm2-ym2; + if (FLAG(obj2.prof_disk_thetaw)) + { +- obj2->prof_disk_thetaw = fmod_m90_p90((temp == 0.0)? ++ outobj2.prof_disk_thetaw = fmod_m90_p90((temp == 0.0)? + (45.0) : (0.5*atan2(2.0 * xym,temp)/DEG)); + + /*---- Compute position angles in J2000 or B1950 reference frame */ + if (wcs->lng != wcs->lat) + { + if (FLAG(obj2.prof_disk_thetas)) +- obj2->prof_disk_thetas = fmod_m90_p90(lngprof_disk_thetaw>0.0?90:-90.0) +- - obj2->prof_disk_thetaw) +- : obj2->prof_disk_thetaw); ++ outobj2.prof_disk_thetas = fmod_m90_p90(lng0.0?90:-90.0) ++ - outobj2.prof_disk_thetaw) ++ : outobj2.prof_disk_thetaw); + if (FLAG(obj2.prof_disk_theta2000)) +- obj2->prof_disk_theta2000 = fmod_m90_p90(obj2->prof_disk_thetas +- + obj2->dtheta2000); ++ outobj2.prof_disk_theta2000 = fmod_m90_p90(outobj2.prof_disk_thetas ++ + outobj2.dtheta2000); + if (FLAG(obj2.prof_disk_theta1950)) +- obj2->prof_disk_theta1950 = fmod_m90_p90(obj2->prof_disk_thetas +- + obj2->dtheta1950); ++ outobj2.prof_disk_theta1950 = fmod_m90_p90(outobj2.prof_disk_thetas ++ + outobj2.dtheta1950); + } + } + temp = sqrt(0.25*temp*temp+xym*xym); + pm2 = 0.5*(xm2+ym2); +- obj2->prof_disk_scalew = sqrt(pm2+temp); +- obj2->prof_disk_scaleerrw = obj2->prof_disk_scale > 0.0? +- obj2->prof_disk_scaleerr/obj2->prof_disk_scale*obj2->prof_disk_scalew ++ outobj2.prof_disk_scalew = sqrt(pm2+temp); ++ outobj2.prof_disk_scaleerrw = outobj2.prof_disk_scale > 0.0? ++ outobj2.prof_disk_scaleerr/outobj2.prof_disk_scale*outobj2.prof_disk_scalew + : 0.0; +- obj2->prof_disk_aspectw = obj2->prof_disk_scalew>0.0? +- sqrt(pm2-temp) / obj2->prof_disk_scalew +- : obj2->prof_disk_aspect; +- obj2->prof_disk_aspecterrw = obj2->prof_disk_aspect > 0.0? +- obj2->prof_disk_aspecterr/obj2->prof_disk_aspect*obj2->prof_disk_aspectw ++ outobj2.prof_disk_aspectw = outobj2.prof_disk_scalew>0.0? ++ sqrt(pm2-temp) / outobj2.prof_disk_scalew ++ : outobj2.prof_disk_aspect; ++ outobj2.prof_disk_aspecterrw = outobj2.prof_disk_aspect > 0.0? ++ outobj2.prof_disk_aspecterr/outobj2.prof_disk_aspect*outobj2.prof_disk_aspectw + : 0.0; + /*-- Arms World coordinates */ + if (FLAG(obj2.prof_arms_scalew)) + { +- obj2->prof_arms_scalew = (obj2->prof_disk_scale > 0.0) ? +- obj2->prof_arms_scale*obj2->prof_disk_scalew/obj2->prof_disk_scale ++ outobj2.prof_arms_scalew = (outobj2.prof_disk_scale > 0.0) ? ++ outobj2.prof_arms_scale*outobj2.prof_disk_scalew/outobj2.prof_disk_scale + : 0.0; +- obj2->prof_arms_scaleerrw = (obj2->prof_arms_scale > 0.0) ? +- obj2->prof_arms_scaleerr/obj2->prof_arms_scale*obj2->prof_arms_scalew ++ outobj2.prof_arms_scaleerrw = (outobj2.prof_arms_scale > 0.0) ? ++ outobj2.prof_arms_scaleerr/outobj2.prof_arms_scale*outobj2.prof_arms_scalew + : 0.0; +- obj2->prof_arms_startw = (obj2->prof_disk_scale > 0.0) ? +- obj2->prof_arms_start*obj2->prof_disk_scalew/obj2->prof_disk_scale ++ outobj2.prof_arms_startw = (outobj2.prof_disk_scale > 0.0) ? ++ outobj2.prof_arms_start*outobj2.prof_disk_scalew/outobj2.prof_disk_scale + : 0.0; +- obj2->prof_arms_starterrw = (obj2->prof_arms_start > 0.0) ? +- obj2->prof_arms_starterr/obj2->prof_arms_start*obj2->prof_arms_startw ++ outobj2.prof_arms_starterrw = (outobj2.prof_arms_start > 0.0) ? ++ outobj2.prof_arms_starterr/outobj2.prof_arms_start*outobj2.prof_arms_startw + : 0.0; + } + } + + /* Bar World coordinates */ +- obj2->prof_bar_thetaerrw = obj2->prof_bar_thetaerr; ++ outobj2.prof_bar_thetaerrw = outobj2.prof_bar_thetaerr; + if (FLAG(obj2.prof_bar_lengthw)) + { +- ct = cos(obj2->prof_bar_theta*DEG); +- st = sin(obj2->prof_bar_theta*DEG); +- dx2 = obj2->prof_bar_length*obj2->prof_bar_length * (ct*ct +- + st*st * obj2->prof_bar_aspect*obj2->prof_bar_aspect); +- dy2 = obj2->prof_bar_length*obj2->prof_bar_length * (st*st +- + ct*ct * obj2->prof_bar_aspect*obj2->prof_bar_aspect); +- dxy = ct*st * obj2->prof_bar_length*obj2->prof_bar_length +- *(1.0 - obj2->prof_bar_aspect*obj2->prof_bar_aspect); ++ ct = cos(outobj2.prof_bar_theta*DEG); ++ st = sin(outobj2.prof_bar_theta*DEG); ++ dx2 = outobj2.prof_bar_length*outobj2.prof_bar_length * (ct*ct ++ + st*st * outobj2.prof_bar_aspect*outobj2.prof_bar_aspect); ++ dy2 = outobj2.prof_bar_length*outobj2.prof_bar_length * (st*st ++ + ct*ct * outobj2.prof_bar_aspect*outobj2.prof_bar_aspect); ++ dxy = ct*st * outobj2.prof_bar_length*outobj2.prof_bar_length ++ *(1.0 - outobj2.prof_bar_aspect*outobj2.prof_bar_aspect); + xm2 = lm0*lm0*dx2 + lm1*lm1*dy2 + lm0*lm1*dxy; + ym2 = lm2*lm2*dx2 + lm3*lm3*dy2 + lm2*lm3*dxy; + xym = lm0*lm2*dx2 + lm1*lm3*dy2 + (lm0*lm3+lm1*lm2)*dxy; + temp=xm2-ym2; + if (FLAG(obj2.prof_bar_thetaw)) + { +- obj2->prof_bar_thetaw = fmod_m90_p90((temp == 0.0)? ++ outobj2.prof_bar_thetaw = fmod_m90_p90((temp == 0.0)? + (45.0) : (0.5*atan2(2.0 * xym,temp)/DEG)); + + /*---- Compute position angles in J2000 or B1950 reference frame */ + if (wcs->lng != wcs->lat) + { + if (FLAG(obj2.prof_bar_thetas)) +- obj2->prof_bar_thetas = fmod_m90_p90(lngprof_bar_thetaw>0.0?90:-90.0) +- - obj2->prof_bar_thetaw) +- : obj2->prof_bar_thetaw); ++ outobj2.prof_bar_thetas = fmod_m90_p90(lng0.0?90:-90.0) ++ - outobj2.prof_bar_thetaw) ++ : outobj2.prof_bar_thetaw); + if (FLAG(obj2.prof_bar_theta2000)) +- obj2->prof_bar_theta2000 = fmod_m90_p90(obj2->prof_bar_thetas +- + obj2->dtheta2000); ++ outobj2.prof_bar_theta2000 = fmod_m90_p90(outobj2.prof_bar_thetas ++ + outobj2.dtheta2000); + if (FLAG(obj2.prof_bar_theta1950)) +- obj2->prof_bar_theta1950 = fmod_m90_p90(obj2->prof_bar_thetas +- + obj2->dtheta1950); ++ outobj2.prof_bar_theta1950 = fmod_m90_p90(outobj2.prof_bar_thetas ++ + outobj2.dtheta1950); + } + } + temp = sqrt(0.25*temp*temp+xym*xym); + pm2 = 0.5*(xm2+ym2); +- obj2->prof_bar_lengthw = sqrt(pm2+temp); +- obj2->prof_bar_lengtherrw = obj2->prof_bar_length > 0.0? +- obj2->prof_bar_lengtherr/obj2->prof_bar_length*obj2->prof_bar_lengthw ++ outobj2.prof_bar_lengthw = sqrt(pm2+temp); ++ outobj2.prof_bar_lengtherrw = outobj2.prof_bar_length > 0.0? ++ outobj2.prof_bar_lengtherr/outobj2.prof_bar_length*outobj2.prof_bar_lengthw + : 0.0; +- obj2->prof_bar_aspectw = obj2->prof_bar_lengthw>0.0? +- sqrt(pm2-temp) / obj2->prof_bar_lengthw +- : obj2->prof_bar_aspect; +- obj2->prof_bar_aspecterrw = obj2->prof_bar_aspect > 0.0? +- obj2->prof_bar_aspecterr/obj2->prof_bar_aspect*obj2->prof_bar_aspectw ++ outobj2.prof_bar_aspectw = outobj2.prof_bar_lengthw>0.0? ++ sqrt(pm2-temp) / outobj2.prof_bar_lengthw ++ : outobj2.prof_bar_aspect; ++ outobj2.prof_bar_aspecterrw = outobj2.prof_bar_aspect > 0.0? ++ outobj2.prof_bar_aspecterr/outobj2.prof_bar_aspect*outobj2.prof_bar_aspectw + : 0.0; + } + +Only in sextractor-2.8.6.new/src: astrom.o +diff -ur sextractor-2.8.6/src/growth.c sextractor-2.8.6.new/src/growth.c +--- sextractor-2.8.6/src/growth.c 2009-01-29 14:52:00.000000000 +0100 ++++ sextractor-2.8.6.new/src/growth.c 2009-05-24 00:07:56.000000000 +0200 +@@ -32,7 +32,7 @@ + + static double *growth; + static int ngrowth; +-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)); +Only in sextractor-2.8.6.new/src: growth.o +diff -ur sextractor-2.8.6/src/pc.c sextractor-2.8.6.new/src/pc.c +--- sextractor-2.8.6/src/pc.c 2009-01-29 14:52:00.000000000 +0100 ++++ sextractor-2.8.6.new/src/pc.c 2009-05-24 00:08:06.000000000 +0200 +@@ -32,7 +32,6 @@ + #include "wcs/poly.h" + #include "psf.h" + +-static obj2struct *obj2 = &outobj2; + + /****** pc_end *************************************************************** + PROTO void pc_end(pcstruct *pc) +@@ -361,22 +360,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 +396,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 +420,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 */ +Only in sextractor-2.8.6.new/src: pc.o +diff -ur sextractor-2.8.6/src/photom.c sextractor-2.8.6.new/src/photom.c +--- sextractor-2.8.6/src/photom.c 2009-01-29 14:51:59.000000000 +0100 ++++ sextractor-2.8.6.new/src/photom.c 2009-05-24 00:08:35.000000000 +0200 +@@ -27,7 +27,7 @@ + #include "photom.h" + #include "plist.h" + +-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,107 +835,107 @@ + { + 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. models */ + 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; + + if (FLAG(obj2.prof_spheroid_mag)) +- obj2->prof_spheroid_mag = obj2->prof_spheroid_flux>0.0? +- -2.5*log10(obj2->prof_spheroid_flux) ++ outobj2.prof_spheroid_mag = outobj2.prof_spheroid_flux>0.0? ++ -2.5*log10(outobj2.prof_spheroid_flux) + + prefs.mag_zeropoint + :99.0; + if (FLAG(obj2.prof_spheroid_magerr)) +- obj2->prof_spheroid_magerr = obj2->prof_spheroid_flux>0.0? +- 1.086*obj2->prof_spheroid_fluxerr +- / obj2->prof_spheroid_flux ++ outobj2.prof_spheroid_magerr = outobj2.prof_spheroid_flux>0.0? ++ 1.086*outobj2.prof_spheroid_fluxerr ++ / outobj2.prof_spheroid_flux + :99.0; + + if (FLAG(obj2.prof_disk_mag)) +- obj2->prof_disk_mag = obj2->prof_disk_flux>0.0? +- -2.5*log10(obj2->prof_disk_flux) ++ outobj2.prof_disk_mag = outobj2.prof_disk_flux>0.0? ++ -2.5*log10(outobj2.prof_disk_flux) + + prefs.mag_zeropoint + :99.0; + if (FLAG(obj2.prof_disk_magerr)) +- obj2->prof_disk_magerr = obj2->prof_disk_flux>0.0? +- 1.086*obj2->prof_disk_fluxerr +- / obj2->prof_disk_flux ++ outobj2.prof_disk_magerr = outobj2.prof_disk_flux>0.0? ++ 1.086*outobj2.prof_disk_fluxerr ++ / outobj2.prof_disk_flux + :99.0; + + if (FLAG(obj2.prof_bar_mag)) +- obj2->prof_bar_mag = obj2->prof_bar_flux>0.0? +- -2.5*log10(obj2->prof_bar_flux) ++ outobj2.prof_bar_mag = outobj2.prof_bar_flux>0.0? ++ -2.5*log10(outobj2.prof_bar_flux) + + prefs.mag_zeropoint + :99.0; + if (FLAG(obj2.prof_bar_magerr)) +- obj2->prof_bar_magerr = obj2->prof_bar_flux>0.0? +- 1.086*obj2->prof_bar_fluxerr +- /obj2->prof_bar_flux ++ outobj2.prof_bar_magerr = outobj2.prof_bar_flux>0.0? ++ 1.086*outobj2.prof_bar_fluxerr ++ /outobj2.prof_bar_flux + :99.0; + + if (FLAG(obj2.prof_arms_mag)) +- obj2->prof_arms_mag = obj2->prof_arms_flux>0.0? +- -2.5*log10(obj2->prof_arms_flux) ++ outobj2.prof_arms_mag = outobj2.prof_arms_flux>0.0? ++ -2.5*log10(outobj2.prof_arms_flux) + + prefs.mag_zeropoint + :99.0; + if (FLAG(obj2.prof_arms_magerr)) +- obj2->prof_arms_magerr = obj2->prof_arms_flux>0.0? +- 1.086*obj2->prof_arms_fluxerr +- /obj2->prof_arms_flux ++ outobj2.prof_arms_magerr = outobj2.prof_arms_flux>0.0? ++ 1.086*outobj2.prof_arms_fluxerr ++ /outobj2.prof_arms_flux + :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 */ +@@ -946,7 +946,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; +Only in sextractor-2.8.6.new/src: photom.o +diff -ur sextractor-2.8.6/src/psf.c sextractor-2.8.6.new/src/psf.c +--- sextractor-2.8.6/src/psf.c 2009-01-29 14:52:00.000000000 +0100 ++++ sextractor-2.8.6.new/src/psf.c 2009-05-24 00:10:31.000000000 +0200 +@@ -312,7 +312,7 @@ + objstruct *obj) + { + checkstruct *check; +- static obj2struct *obj2 = &outobj2; ++ + static double x2[PSF_NPSFMAX],y2[PSF_NPSFMAX],xy[PSF_NPSFMAX], + deltax[PSF_NPSFMAX], + deltay[PSF_NPSFMAX],flux[PSF_NPSFMAX], +@@ -352,8 +352,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; + } + +@@ -380,7 +380,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); +@@ -559,7 +559,7 @@ + deltaxb[j] = deltax[j]; + deltayb[j] = deltay[j]; + fluxb[j] = flux[j]; +- obj2->fluxerr_psf[j]=fluxerr; ++ outobj2.fluxerr_psf[j]=fluxerr; + } + } + } +@@ -582,7 +582,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; +@@ -607,7 +607,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; + + } +@@ -626,7 +626,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; + + } +@@ -758,7 +758,7 @@ + ival,npsfmax; + double *pvar; + +- static obj2struct *obj2 = &outobj2; ++ + checkdata = NULL; /* To avoid gcc -Wall warnings */ + pdx = pdy =dx = dy = 0.0; + ppixstep = 1.0/ppsf->pixstep; +@@ -776,13 +776,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; + + } +@@ -926,7 +926,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; + } + } +@@ -943,7 +943,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; + + } +@@ -963,7 +963,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; + + } +@@ -1195,11 +1195,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]); + +@@ -1208,19 +1208,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 */ +@@ -1228,12 +1228,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; + } +Only in sextractor-2.8.6.new/src: psf.o +diff -ur sextractor-2.8.6/src/winpos.c sextractor-2.8.6.new/src/winpos.c +--- sextractor-2.8.6/src/winpos.c 2009-01-29 14:52:00.000000000 +0100 ++++ sextractor-2.8.6.new/src/winpos.c 2009-05-24 00:10:49.000000000 +0200 +@@ -26,7 +26,7 @@ + #include "prefs.h" + #include "winpos.h" + +-static obj2struct *obj2 = &outobj2; ++ + + /****** compute_winpos ******************************************************** + PROTO void compute_winpos(picstruct *field, picstruct *wfield, +@@ -71,7 +71,7 @@ + momentflag = FLAG(obj2.win_mx2) | FLAG(obj2.winposerr_mx2); + var = backnoise2 = field->backsig*field->backsig; + gain = field->gain; +- sig = obj2->hl_radius*2.0/2.35; /* From half-FWHM to sigma */ ++ sig = outobj2.hl_radius*2.0/2.35; /* From half-FWHM to sigma */ + twosig2 = 2.0*sig*sig; + + /* Integration radius */ +@@ -99,8 +99,8 @@ + offsetx = 0.5*(scalex-1.0); + offsety = 0.5*(scaley-1.0); + /* Use isophotal centroid as a first guess */ +- mx = obj2->posx - 1.0; +- my = obj2->posy - 1.0; ++ mx = outobj2.posx - 1.0; ++ my = outobj2.posy - 1.0; + + for (i=0; iwinpos_x = mx + 1.0; /* The dreaded 1.0 FITS offset */ +- obj2->winpos_y = my + 1.0; /* The dreaded 1.0 FITS offset */ +- obj2->winpos_niter = i+1; ++ outobj2.winpos_x = mx + 1.0; /* The dreaded 1.0 FITS offset */ ++ outobj2.winpos_y = my + 1.0; /* The dreaded 1.0 FITS offset */ ++ outobj2.winpos_niter = i+1; + + /* WINdowed flux */ + if (FLAG(obj2.flux_win)) + { +- obj2->flux_win = tv; +- obj2->fluxerr_win = sqrt(esum); ++ outobj2.flux_win = tv; ++ outobj2.fluxerr_win = sqrt(esum); + } + temp2=mx2*my2-mxy*mxy; +- obj2->win_flag = (tv <= 0.0)*4 + (mx2 < 0.0 || my2 < 0.0)*2 ++ outobj2.win_flag = (tv <= 0.0)*4 + (mx2 < 0.0 || my2 < 0.0)*2 + + (temp2<0.0); +- if (obj2->win_flag) ++ if (outobj2.win_flag) + { + /*--- Negative values: revert to isophotal estimates */ + if (errflag) + { +- obj2->winposerr_mx2 = obj->poserr_mx2; +- obj2->winposerr_my2 = obj->poserr_my2; +- obj2->winposerr_mxy = obj->poserr_mxy; ++ outobj2.winposerr_mx2 = obj->poserr_mx2; ++ outobj2.winposerr_my2 = obj->poserr_my2; ++ outobj2.winposerr_mxy = obj->poserr_mxy; + if (FLAG(obj2.winposerr_a)) + { +- obj2->winposerr_a = obj2->poserr_a; +- obj2->winposerr_b = obj2->poserr_b; +- obj2->winposerr_theta = obj2->poserr_theta; ++ outobj2.winposerr_a = outobj2.poserr_a; ++ outobj2.winposerr_b = outobj2.poserr_b; ++ outobj2.winposerr_theta = outobj2.poserr_theta; + } + if (FLAG(obj2.winposerr_cxx)) + { +- obj2->winposerr_cxx = obj2->poserr_cxx; +- obj2->winposerr_cyy = obj2->poserr_cyy; +- obj2->winposerr_cxy = obj2->poserr_cxy; ++ outobj2.winposerr_cxx = outobj2.poserr_cxx; ++ outobj2.winposerr_cyy = outobj2.poserr_cyy; ++ outobj2.winposerr_cxy = outobj2.poserr_cxy; + } + } + if (momentflag) + { +- obj2->win_mx2 = obj->mx2; +- obj2->win_my2 = obj->my2; +- obj2->win_mxy = obj->mxy; ++ outobj2.win_mx2 = obj->mx2; ++ outobj2.win_my2 = obj->my2; ++ outobj2.win_mxy = obj->mxy; + if (FLAG(obj2.win_cxx)) + { +- obj2->win_cxx = obj->cxx; +- obj2->win_cyy = obj->cyy; +- obj2->win_cxy = obj->cxy; ++ outobj2.win_cxx = obj->cxx; ++ outobj2.win_cyy = obj->cyy; ++ outobj2.win_cxy = obj->cxy; + } + if (FLAG(obj2.win_a)) + { +- obj2->win_a = obj->a; +- obj2->win_b = obj->b; +- obj2->win_polar = obj2->polar; +- obj2->win_theta = obj->theta; ++ outobj2.win_a = obj->a; ++ outobj2.win_b = obj->b; ++ outobj2.win_polar = outobj2.polar; ++ outobj2.win_theta = obj->theta; + } + } + } +@@ -311,9 +311,9 @@ + emy2 += esum; + } + +- obj2->winposerr_mx2 = emx2; +- obj2->winposerr_my2 = emy2; +- obj2->winposerr_mxy = emxy; ++ outobj2.winposerr_mx2 = emx2; ++ outobj2.winposerr_my2 = emy2; ++ outobj2.winposerr_mxy = emxy; + /*---- Error ellipse parameters */ + if (FLAG(obj2.winposerr_a)) + { +@@ -329,18 +329,18 @@ + pmx2+=temp; + pmy2-=temp; + +- obj2->winposerr_a = (float)sqrt(pmx2); +- obj2->winposerr_b = (float)sqrt(pmy2); +- obj2->winposerr_theta = theta*180.0/PI; ++ outobj2.winposerr_a = (float)sqrt(pmx2); ++ outobj2.winposerr_b = (float)sqrt(pmy2); ++ outobj2.winposerr_theta = theta*180.0/PI; + } + + if (FLAG(obj2.winposerr_cxx)) + { + double temp; + +- obj2->winposerr_cxx = (float)(emy2/(temp=emx2*emy2-emxy*emxy)); +- obj2->winposerr_cyy = (float)(emx2/temp); +- obj2->winposerr_cxy = (float)(-2*emxy/temp); ++ outobj2.winposerr_cxx = (float)(emy2/(temp=emx2*emy2-emxy*emxy)); ++ outobj2.winposerr_cyy = (float)(emx2/temp); ++ outobj2.winposerr_cxy = (float)(-2*emxy/temp); + } + } + +@@ -353,15 +353,15 @@ + my2 += 0.0833333; + temp2 = mx2*my2-mxy*mxy; + } +- obj2->win_mx2 = mx2; +- obj2->win_my2 = my2; +- obj2->win_mxy = mxy; ++ outobj2.win_mx2 = mx2; ++ outobj2.win_my2 = my2; ++ outobj2.win_mxy = mxy; + + if (FLAG(obj2.win_cxx)) + { +- obj2->win_cxx = (float)(my2/temp2); +- obj2->win_cyy = (float)(mx2/temp2); +- obj2->win_cxy = (float)(-2*mxy/temp2); ++ outobj2.win_cxx = (float)(my2/temp2); ++ outobj2.win_cyy = (float)(mx2/temp2); ++ outobj2.win_cxy = (float)(-2*mxy/temp2); + } + + if (FLAG(obj2.win_a)) +@@ -373,11 +373,11 @@ + + temp = sqrt(0.25*temp*temp+mxy*mxy); + pmx2 = 0.5*(mx2+my2); +- obj2->win_a = (float)sqrt(pmx2 + temp); +- obj2->win_b = (float)sqrt(pmx2 - temp); ++ outobj2.win_a = (float)sqrt(pmx2 + temp); ++ outobj2.win_b = (float)sqrt(pmx2 - temp); + if (FLAG(obj2.win_polar)) +- obj2->win_polar = temp / pmx2; +- obj2->win_theta = theta*180.0/PI; ++ outobj2.win_polar = temp / pmx2; ++ outobj2.win_theta = theta*180.0/PI; + } + } + } +Only in sextractor-2.8.6.new/src: winpos.o diff --git a/sextractor.spec b/sextractor.spec index b7d327c..23127d6 100644 --- a/sextractor.spec +++ b/sextractor.spec @@ -1,20 +1,16 @@ Name: sextractor -Version: 2.28.2 -Release: %autorelease +Version: 2.19.5 +Release: 11%{?dist} Summary: Extract catalogs of sources from astronomical images -# Automatically converted from old format: GPLv3+ - review is highly recommended. -License: GPL-3.0-or-later +Group: Applications/Engineering +License: GPLv3+ URL: http://astromatic.iap.fr/software/%{name} -Source0: https://github.com/astromatic/%{name}/archive/%{version}.tar.gz#/%{name}-%{version}.tar.gz +Source0: http://www.astromatic.net/download/sextractor/%{name}-%{version}.tar.gz Patch0: sextractor-format-sec.patch - -BuildRequires: make -BuildRequires: gcc -BuildRequires: automake autoconf libtool +BuildRequires: gcc BuildRequires: fftw-devel >= 3.1 -BuildRequires: flexiblas-devel -BuildRequires: cfitsio-devel +BuildRequires: atlas-devel >= 3.6.0 %description SExtractor is a program that builds a catalogue of objects from an @@ -24,27 +20,124 @@ well on moderately crowded star fields. %prep %setup -q -%patch -P0 -p1 -sh ./autogen.sh -sed -i 's/openblas/flexiblas/g' configure +%patch0 -p1 +%if 0%{?fedora} >= 21 +# New atlas libs +sed -i -e '/LIBS*=.*atlas/s,=.*,="-L%{_libdir}/atlas -lsatlas",' configure +%endif %build -%configure --enable-flexiblas --with-flexiblas-incdir=%{_includedir}/flexiblas -%make_build +%configure +make %{?_smp_mflags} %install -%make_install +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} %files -%doc AUTHORS BUGS COPYRIGHT HISTORY README.md THANKS config/default.sex config/default.param config/README -%license LICENSE +%doc AUTHORS BUGS COPYRIGHT HISTORY README THANKS doc/README.DOC doc/sextractor.pdf config/default.sex config/default.param %{_bindir}/* %{_mandir}/man1/* %{_mandir}/manx/* %{_datadir}/%{name}/ %changelog -%autochangelog +* 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/sources b/sources index 32e1aac..c021c4f 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (sextractor-2.28.2.tar.gz) = f54b9e69944e582c68769c0d01534fc437f03fa5fc9dcb59bc680baed429983ebaa4c2422570b0f424b25c6c44cdf54a6587819ab2bc524aa33ed5c9f2595e62 +2115556b5d30571306608b7c023a318f sextractor-2.19.5.tar.gz