Commit ece261cd authored by Emmanuel Bertin's avatar Emmanuel Bertin
Browse files

merged with SExFIGI branch

parent 5ae55cd0
......@@ -9,7 +9,7 @@
*
* Contents: header (FITS format #1) and templates for catalog data.
*
* Last modify: 16/12/2002
* Last modify: 19/12/2007
*
*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
*/
......@@ -62,7 +62,7 @@ keystruct headkey1[] = {
{"SEXNNWF ", "CLASSIFICATION NNW FILENAME",
thecat.nnw_name, H_STRING, T_STRING, "%18s"},
{"SEXGAIN ", "GAIN (IN E- PER ADU)",
&prefs.gain, H_EXPO, T_DOUBLE, "%7.3F"},
&thefield2.gain, H_EXPO, T_DOUBLE, "%7.3F"},
{"SEXBKGND", "MEDIAN BACKGROUND (ADU)",
&thefield1.backmean, H_EXPO, T_FLOAT, "%12G"},
{"SEXBKDEV", "MEDIAN RMS (ADU)",
......@@ -104,7 +104,7 @@ keystruct headkey1[] = {
{"SEXAPEK3", "KRON MINIMUM RADIUS",
&prefs.autoparam[1], H_FLOAT, T_DOUBLE, "%4.1f"},
{"SEXSATLV", "SATURATION LEVEL (ADU)",
&prefs.satur_level, H_EXPO, T_DOUBLE, "%12G"},
&thefield2.satur_level, H_EXPO, T_DOUBLE, "%12G"},
{"SEXMGZPT", "MAGNITUDE ZERO-POINT",
&prefs.mag_zeropoint, H_FLOAT, T_DOUBLE, "%8.4f"},
{"SEXMGGAM", "MAGNITUDE GAMMA",
......
......@@ -9,7 +9,7 @@
*
* Contents: Implementation of Kohonen's Self Organizing Map (V3.0).
*
* Last modify: 28/11/2003
* Last modify: 19/12/2007
*
*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
*/
......@@ -128,7 +128,7 @@ int som_mkweight(somstruct *som, float back, float backnoise, float gain)
wt = som->inputw;
nima = som->ninput-som->nextrainput;
llim = -5.0*backnoise;
hlim = prefs.satur_level-back;
hlim = thefield2.satur_level-back;
backnoise *= backnoise;
ngood = 0;
for (i=nima; i--;)
......
/*
threads.h
*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
*
* Part of: A program that uses POSIX threads
*
* Author: E.BERTIN
*
* Contents: Definitions and shortcuts for POSIX threads.
*
* Last modify: 03/07/2002
*
*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
*/
#include <pthread.h>
#include <signal.h>
/*---- Set defines according to machine's specificities and customizing -----*/
/*--------------------------- Technical constants ---------------------------*/
/*---------------------------- Synchro messages -----------------------------*/
#define STATE_FREE 0
#define STATE_READY 1
#define STATE_BUSY 2
/*------------------------------- Other Macros ------------------------------*/
#define QPTHREAD_ATTR_INIT(pthread_attr) \
{if (pthread_attr_init(pthread_attr)) \
error(EXIT_FAILURE, \
"*Error*: pthread_attr_init() failed for ", #pthread_attr );;}
#define QPTHREAD_ATTR_SETDETACHSTATE(pthread_attr, attr) \
{if (pthread_attr_setdetachstate(pthread_attr, attr)) \
error(EXIT_FAILURE, \
"*Error*: pthread_attr_setdetachstate() failed for ", \
#pthread_attr );;}
#define QPTHREAD_ATTR_DESTROY(pthread_attr) \
{if (pthread_attr_destroy(pthread_attr)) \
error(EXIT_FAILURE, \
"*Error*: pthread_attr_destroy() failed for ",#pthread_attr);;}
#define QPTHREAD_CREATE(pthread, attr, func, arg) \
{if (pthread_create(pthread, attr, func, arg)) \
error(EXIT_FAILURE, \
"*Error*: pthread_create() failed for ", #pthread );;}
#define QPTHREAD_CANCEL(pthread) \
{if (pthread_cancel(pthread)) \
warning( \
"failed to cancel ", #pthread );;}
#define QPTHREAD_JOIN(pthread, ret) \
{if (pthread_join(pthread, ret)) \
error(EXIT_FAILURE, \
"*Error*: pthread_join() failed for ", #pthread );;}
#define QPTHREAD_MUTEX_INIT(mutex, attr) \
{if (pthread_mutex_init(mutex, attr)) \
error(EXIT_FAILURE, \
"*Error*: pthread_mutex_init() failed for ", #mutex );;}
#define QPTHREAD_MUTEX_LOCK(mutex) \
{if (pthread_mutex_lock(mutex)) \
error(EXIT_FAILURE, \
"*Error*: pthread_mutex_lock() failed for ", #mutex );;}
#define QPTHREAD_MUTEX_UNLOCK(mutex) \
{if (pthread_mutex_unlock(mutex)) \
error(EXIT_FAILURE, \
"*Error*: pthread_mutex_unlock() failed for ", #mutex );;}
#define QPTHREAD_MUTEX_DESTROY(mutex) \
{if (pthread_mutex_destroy(mutex)) \
error(EXIT_FAILURE, \
"*Error*: pthread_mutex_destroy() failed for ", #mutex );;}
#define QPTHREAD_COND_INIT(cond, attr) \
{if (pthread_cond_init(cond, attr)) \
error(EXIT_FAILURE, \
"*Error*: pthread_cond_init() failed for ", #cond );;}
#define QPTHREAD_COND_WAIT(cond, mutex) \
{if (pthread_cond_wait(cond, mutex)) \
error(EXIT_FAILURE, \
"*Error*: pthread_cond_wait() failed for ", #cond );;}
#define QPTHREAD_COND_BROADCAST(cond) \
{if (pthread_cond_broadcast(cond)) \
error(EXIT_FAILURE, \
"*Error*: pthread_cond_broadcast() failed for ", #cond );;}
#define QPTHREAD_COND_SIGNAL(cond) \
{if (pthread_cond_signal(cond)) \
error(EXIT_FAILURE, \
"*Error*: pthread_cond_signal() failed for ", #cond );;}
#define QPTHREAD_COND_DESTROY(cond) \
{if (pthread_cond_destroy(cond)) \
error(EXIT_FAILURE, \
"*Error*: pthread_cond_destroy() failed for ", #cond );;}
/*------------------------------- Structures --------------------------------*/
typedef struct _threads_gate_t
{
int ngate; /* Gate counter */
int nthreads; /* Number of threads to manage */
void (*func)(void); /* Function to execute at wakeup */
pthread_mutex_t mutex; /* Main MutEx */
pthread_mutex_t block; /* Safety Mutex (avoid "rebound") */
pthread_cond_t condvar; /* Main condition variable */
pthread_cond_t last; /* To wake the remaining thread up */
} threads_gate_t;
/*----------------------------- Global variables ----------------------------*/
int nproc; /* Number of child threads */
/*--------------------------------- Functions -------------------------------*/
threads_gate_t *threads_gate_init(int nthreads, void (*func)(void));
void threads_gate_end(threads_gate_t *gate),
threads_gate_sync(threads_gate_t *gate);
......@@ -9,7 +9,7 @@
*
* Contents: global type definitions.
*
* Last modify: 12/01/2006
* Last modify: 25/09/2008
*
*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
*/
......@@ -19,6 +19,9 @@
#ifndef _FITSCAT_H_
#include "fits/fitscat.h"
#endif
#ifndef _FITSWCS_H_
#include "fitswcs.h"
#endif
/*-------------------------------- flags ------------------------------------*/
......@@ -45,7 +48,6 @@
/*--------------------------------- typedefs --------------------------------*/
typedef unsigned char BYTE; /* a byte */
typedef unsigned short USHORT; /* 0 to 65535 integers */
typedef unsigned int FLAGTYPE; /* flag type */
typedef char pliststruct; /* Dummy type for plist */
typedef int LONG;
......@@ -60,7 +62,9 @@ typedef enum {CHECK_NONE, CHECK_IDENTICAL, CHECK_BACKGROUND,
CHECK_SEGMENTATION, CHECK_ASSOC, CHECK_SUBOBJECTS,
CHECK_SUBPSFPROTOS, CHECK_PSFPROTOS,
CHECK_SUBPCPROTOS, CHECK_PCPROTOS, CHECK_PCOPROTOS,
CHECK_MAPSOM} checkenum;
CHECK_MAPSOM, CHECK_SUBPROFILES, CHECK_PROFILES, CHECK_PATTERNS,
MAXCHECK}
checkenum;
/* CHECK_IMAGE type */
typedef enum {WEIGHT_NONE, WEIGHT_FROMBACK, WEIGHT_FROMRMSMAP,
......@@ -81,8 +85,6 @@ typedef struct
float dflux; /* integrated det. flux */
float flux; /* integrated mes. flux */
float fluxerr; /* integrated variance */
float flux_prof; /* PROFILE flux*/
float fluxerr_prof; /* PROFILE flux variance */
PIXTYPE fdpeak; /* peak intensity (ADU) */
PIXTYPE dpeak; /* peak intensity (ADU) */
PIXTYPE peak; /* peak intensity (ADU) */
......@@ -144,16 +146,13 @@ typedef struct
float *fluxerr_aper; /* APER flux error vector */
float *mag_aper; /* APER magnitude vector */
float *magerr_aper; /* APER mag error vector */
float flux_prof; /* PROFILE flux*/
float fluxerr_prof; /* PROFILE flux error */
float mag_prof; /* PROFILE magnitude */
float magerr_prof; /* PROFILE magnitude error */
float flux_win; /* WINdowed flux*/
float fluxerr_win; /* WINdowed flux error */
float mag_win; /* WINdowed magnitude */
float magerr_win; /* WINdowed magnitude error */
/* ---- astrometric data */
double posx,posy; /* "FITS" pos. in pixels */
double jacob[NAXIS*NAXIS]; /* Local deproject. Jacobian */
double mamaposx,mamaposy; /* "MAMA" pos. in pixels */
float sposx,sposy; /* single precision pos. */
float poserr_a, poserr_b,
......@@ -179,8 +178,10 @@ typedef struct
double peakalpha1950, peakdelta1950; /* B1950 for brightest pix */
double alpha2000, delta2000; /* J2000 alpha, delta */
float theta2000; /* J2000 position angle E/N */
double dtheta2000; /* North J2000 - native angle*/
double alpha1950, delta1950; /* B1950 alpha, delta */
float theta1950; /* B1950 position angle E/N */
double dtheta1950; /* North B1950 - native angle*/
float aw, bw; /* WORLD ellipse size */
float thetaw; /* WORLD position angle */
float cxxw,cyyw,cxyw; /* WORLD ellipse parameters */
......@@ -298,6 +299,132 @@ typedef struct
float fluxerr_galfit; /* RMS error on galfit flux */
float mag_galfit; /* Galaxy tot. mag from fit */
float magerr_galfit; /* RMS error on galfit mag */
/* ---- Profile-fitting */
float *prof_vector; /* Profile parameters */
float *prof_errvector; /* Profile parameter errors */
float prof_chi2; /* Reduced chi2 */
BYTE prof_flag; /* Model-fitting flags */
BYTE prof_flagw; /* Model-fitting WORLD flag */
short prof_niter; /* # of model-fitting iter. */
float flux_prof; /* Flux from model-fitting */
float fluxerr_prof; /* RMS error on model flux */
float mag_prof; /* Mag from model-fitting */
float magerr_prof; /* RMS mag from model-fitting */
float x_prof, y_prof; /* Coords from model-fitting*/
double xw_prof, yw_prof; /* WORLD coords */
double alphas_prof, deltas_prof; /* native alpha, delta */
double alpha2000_prof, delta2000_prof; /* J2000 alpha, delta */
double alpha1950_prof, delta1950_prof; /* B1950 alpha, delta */
double poserrmx2_prof, poserrmy2_prof,
poserrmxy_prof; /* Error ellips moments */
float poserra_prof, poserrb_prof,
poserrtheta_prof; /* Error ellips parameters */
float poserrcxx_prof, poserrcyy_prof,
poserrcxy_prof; /* pos. error ellipse */
double poserrmx2w_prof, poserrmy2w_prof,
poserrmxyw_prof; /* WORLD error moments */
float poserraw_prof, poserrbw_prof,
poserrthetaw_prof; /* WORLD error parameters */
float poserrthetas_prof; /* native error pos. angle */
float poserrtheta2000_prof; /* J2000 error pos. angle */
float poserrtheta1950_prof; /* B1950 error pos. angle */
float poserrcxxw_prof, poserrcyyw_prof,
poserrcxyw_prof; /* WORLD error ellipse */
double prof_mx2, prof_my2, prof_mxy; /* Profile model moments */
double prof_mx2w, prof_my2w, prof_mxyw;/* WORLD profile model moments*/
float prof_eps1, prof_eps2; /* Profile model ellip.vector */
float prof_e1, prof_e2; /* Profile model ellip.vector */
float prof_offset_flux; /* Background offset */
float prof_offset_fluxerr; /* RMS error */
float prof_spheroid_flux; /* Spheroid total flux */
float prof_spheroid_fluxerr; /* RMS error */
float prof_spheroid_mag; /* Spheroid "total" mag */
float prof_spheroid_magerr; /* RMS error */
float prof_spheroid_reff; /* Spheroid effective radius */
float prof_spheroid_refferr; /* RMS error */
float prof_spheroid_reffw; /* WORLD spheroid eff. radius */
float prof_spheroid_refferrw; /* RMS error */
float prof_spheroid_aspect; /* Spheroid aspect ratio */
float prof_spheroid_aspecterr; /* RMS error */
float prof_spheroid_aspectw; /* WORLD spheroid aspect ratio*/
float prof_spheroid_aspecterrw; /* RMS error */
float prof_spheroid_theta; /* Spheroid position angle */
float prof_spheroid_thetaerr; /* RMS error */
float prof_spheroid_thetaw; /* WORLD spheroid pos. angle */
float prof_spheroid_thetaerrw; /* RMS error */
float prof_spheroid_thetas; /* Sky spheroid pos. angle */
float prof_spheroid_theta2000; /* J2000 spheroid pos. angle */
float prof_spheroid_theta1950; /* B1950 spheroid pos. angle */
float prof_spheroid_sersicn; /* Spheroid Sersic index */
float prof_spheroid_sersicnerr; /* RMS error */
float prof_disk_flux; /* Disk total flux */
float prof_disk_fluxerr; /* RMS error */
float prof_disk_mag; /* Disk "total" mag */
float prof_disk_magerr; /* RMS error */
float prof_disk_scale; /* Disk scale length */
float prof_disk_scaleerr; /* RMS error */
float prof_disk_scalew; /* WORLD disk scale length */
float prof_disk_scaleerrw; /* RMS error */
float prof_disk_aspect; /* Disk aspect ratio */
float prof_disk_aspecterr; /* RMS error */
float prof_disk_aspectw; /* WORLD disk aspect ratio */
float prof_disk_aspecterrw; /* RMS error */
float prof_disk_inclination; /* Disk inclination */
float prof_disk_inclinationerr; /* RMS error */
float prof_disk_theta; /* Disk position angle */
float prof_disk_thetaerr; /* RMS error */
float prof_disk_thetaw; /* WORLD disk position angle */
float prof_disk_thetaerrw; /* RMS error */
float prof_disk_thetas; /* Sky disk position angle */
float prof_disk_theta2000; /* J2000 disk position angle */
float prof_disk_theta1950; /* B1950 disk position angle */
float *prof_disk_patternvector; /* Disk pattern coefficients */
float *prof_disk_patternmodvector; /* Disk pattern moduli */
float *prof_disk_patternargvector; /* Disk pattern arguments */
float prof_disk_patternspiral; /* Disk pattern spiral index */
float prof_bar_flux; /* Galactic bar total flux */
float prof_bar_fluxerr; /* RMS error */
float prof_bar_mag; /* Bar "total" magnitude */
float prof_bar_magerr; /* RMS error */
float prof_bar_length; /* Bar length */
float prof_bar_lengtherr; /* RMS error */
float prof_bar_lengthw; /* WORLD bar length */
float prof_bar_lengtherrw; /* RMS error */
float prof_bar_aspect; /* Bar aspect ratio */
float prof_bar_aspecterr; /* RMS error */
float prof_bar_aspectw; /* WORLD bar aspect ratio */
float prof_bar_aspecterrw; /* RMS error */
float prof_bar_posang; /* Bar true prosition angle */
float prof_bar_posangerr; /* RMS error */
float prof_bar_theta; /* Bar projected angle */
float prof_bar_thetaerr; /* RMS error */
float prof_bar_thetaw; /* WORLD bar projected angle */
float prof_bar_thetaerrw; /* RMS error */
float prof_bar_thetas; /* Sky bar projected angle */
float prof_bar_theta2000; /* J2000 bar projected angle */
float prof_bar_theta1950; /* B1950 bar projected angle */
float prof_arms_flux; /* Spiral arms total flux */
float prof_arms_fluxerr; /* RMS error */
float prof_arms_mag; /* Arms "total" magnitude */
float prof_arms_magerr; /* RMS error */
float prof_arms_scale; /* Arms scalelength */
float prof_arms_scaleerr; /* RMS error */
float prof_arms_scalew; /* WORLD arms scalelength */
float prof_arms_scaleerrw; /* RMS error */
float prof_arms_posang; /* Arms true position angle */
float prof_arms_posangerr; /* RMS error */
// float prof_arms_thetaw; /* WORLD arms position angle */
// float prof_arms_thetas; /* Sky arms position angle */
// float prof_arms_theta2000; /* J2000 arms position angle */
// float prof_arms_theta1950; /* B1950 arms position angle */
float prof_arms_pitch; /* Arms pitch angle */
float prof_arms_pitcherr; /* RMS error */
float prof_arms_start; /* Arms starting radius */
float prof_arms_starterr; /* RMS error */
float prof_arms_startw; /* WORLD arms starting radius */
float prof_arms_starterrw; /* RMS error */
float prof_arms_quadfrac; /* Arms quadrature fraction */
float prof_arms_quadfracerr; /* RMS error */
/* ---- MEF */
short ext_number; /* FITS extension number */
} obj2struct;
......@@ -321,9 +448,9 @@ typedef struct pic
char *rfilename; /* pointer to the reduced image name */
char ident[MAXCHAR]; /* field identifier (read from FITS)*/
char rident[MAXCHAR]; /* field identifier (relative) */
catstruct *cat; /* FITS structure */
tabstruct *tab; /* FITS extension structure */
FILE *file; /* pointer the image file structure */
char *fitshead; /* pointer to the FITS header */
int fitsheadsize; /* FITS header size */
/* ---- main image parameters */
int bitpix, bytepix; /* nb of bits and bytes per pixel */
int bitsgn; /* non-zero if signed integer data */
......@@ -345,17 +472,12 @@ typedef struct pic
int stripy; /* y position in buffer */
int stripylim; /* y limit in buffer */
int stripysclim; /* y scroll limit in buffer */
/* ---- image (de-)compression */
enum {ICOMPRESS_NONE, ICOMPRESS_BASEBYTE, ICOMPRESS_PREVPIX}
compress_type; /* image compression type */
char *compress_buf; /* de-compression buffer */
char *compress_bufptr; /* present pixel in buffer */
int compress_curval; /* current pixel or checksum value */
int compress_checkval; /* foreseen pixel or checksum value */
int compress_npix; /* remaining pixels in buffer */
/* ---- basic astrometric parameters */
double pixscale; /* pixel size in arcsec.pix-1 */
double epoch; /* epoch of coordinates */
/* ---- basic photometric parameters */
double gain; /* conversion factor in e-/ADU */
double satur_level; /* saturation level in ADUs */
/* ---- background parameters */
float *back; /* ptr to the background map in mem */
float *dback; /* ptr to the background deriv. map */
......@@ -374,7 +496,7 @@ typedef struct pic
PIXTYPE thresh; /* analysis threshold */
backenum back_type; /* Background type */
/* ---- astrometric parameters */
struct structastrom *astrom; /* astrometric data */
struct wcs *wcs; /* astrometric data */
struct structassoc *assoc; /* ptr to the assoc-list */
int flags; /* flags defining the field type */
/* ---- image interpolation */
......
# Makefile.in generated by automake 1.9.6 from Makefile.am.
# Makefile.in generated by automake 1.10.1 from Makefile.am.
# @configure_input@
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
# 2003, 2004, 2005 Free Software Foundation, Inc.
# 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
......@@ -14,15 +14,11 @@
@SET_MAKE@
srcdir = @srcdir@
top_srcdir = @top_srcdir@
VPATH = @srcdir@
pkgdatadir = $(datadir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
top_builddir = ../..
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
INSTALL = @INSTALL@
install_sh_DATA = $(install_sh) -c -m 644
install_sh_PROGRAM = $(install_sh) -c
install_sh_SCRIPT = $(install_sh) -c
......@@ -34,10 +30,15 @@ POST_INSTALL = :
NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
build_triplet = @build@
host_triplet = @host@
subdir = src/wcs
DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/acx_prog_cc_optim.m4 \
am__aclocal_m4_deps = $(top_srcdir)/acx_atlas.m4 \
$(top_srcdir)/acx_fftw.m4 $(top_srcdir)/acx_prog_cc_optim.m4 \
$(top_srcdir)/acx_pthread.m4 \
$(top_srcdir)/acx_urbi_resolve_dir.m4 \
$(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
......@@ -45,7 +46,6 @@ mkinstalldirs = $(SHELL) $(top_srcdir)/autoconf/mkinstalldirs
CONFIG_HEADER = $(top_builddir)/config.h
CONFIG_CLEAN_FILES =
LIBRARIES = $(noinst_LIBRARIES)
AR = ar
ARFLAGS = cru
libwcs_c_a_AR = $(AR) $(ARFLAGS)
libwcs_c_a_LIBADD =
......@@ -53,22 +53,30 @@ am_libwcs_c_a_OBJECTS = cel.$(OBJEXT) lin.$(OBJEXT) poly.$(OBJEXT) \
proj.$(OBJEXT) sph.$(OBJEXT) tnx.$(OBJEXT) wcs.$(OBJEXT) \
wcstrig.$(OBJEXT)
libwcs_c_a_OBJECTS = $(am_libwcs_c_a_OBJECTS)
DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)
DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)
depcomp = $(SHELL) $(top_srcdir)/autoconf/depcomp
am__depfiles_maybe = depfiles
COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
--mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
CCLD = $(CC)
LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
--mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \
$(LDFLAGS) -o $@
SOURCES = $(libwcs_c_a_SOURCES)
DIST_SOURCES = $(libwcs_c_a_SOURCES)
ETAGS = etags
CTAGS = ctags
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = @ACLOCAL@
AMDEP_FALSE = @AMDEP_FALSE@
AMDEP_TRUE = @AMDEP_TRUE@
AMTAR = @AMTAR@
AR = @AR@
ATLAS_CFLAGS = @ATLAS_CFLAGS@
ATLAS_ERROR = @ATLAS_ERROR@
ATLAS_LIB = @ATLAS_LIB@
ATLAS_LIBPATH = @ATLAS_LIBPATH@
AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
......@@ -78,16 +86,27 @@ CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
CXX = @CXX@
CXXCPP = @CXXCPP@
CXXDEPMODE = @CXXDEPMODE@
CXXFLAGS = @CXXFLAGS@
CYGPATH_W = @CYGPATH_W@
DATE2 = @DATE2@
DATE3 = @DATE3@
DEFS = @DEFS@
DEPDIR = @DEPDIR@
ECHO = @ECHO@
ECHO_C = @ECHO_C@
ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
EGREP = @EGREP@
EXEEXT = @EXEEXT@
F77 = @F77@
FFLAGS = @FFLAGS@
FFTW_ERROR = @FFTW_ERROR@
FFTW_LIBS = @FFTW_LIBS@
GREP = @GREP@
INSTALL = @INSTALL@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
......@@ -95,8 +114,11 @@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
LDFLAGS = @LDFLAGS@
LIBOBJS = @LIBOBJS@
LIBS = @LIBS@
LIBTOOL = @LIBTOOL@
LN_S = @LN_S@
LTLIBOBJS = @LTLIBOBJS@
MAKEINFO = @MAKEINFO@
MKDIR_P = @MKDIR_P@
OBJEXT = @OBJEXT@
PACKAGE = @PACKAGE@
PACKAGER = @PACKAGER@
......@@ -106,41 +128,66 @@ PACKAGE_STRING = @PACKAGE_STRING@
PACKAGE_TARNAME = @PACKAGE_TARNAME@
PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_SEPARATOR = @PATH_SEPARATOR@
PTHREAD_CC = @PTHREAD_CC@
PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
PTHREAD_LIBS = @PTHREAD_LIBS@
RANLIB = @RANLIB@
SED = @SED@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
STRIP = @STRIP@
VERSION = @VERSION@
abs_builddir = @abs_builddir@
abs_srcdir = @abs_srcdir@
abs_top_builddir = @abs_top_builddir@
abs_top_srcdir = @abs_top_srcdir@
ac_ct_CC = @ac_ct_CC@
ac_ct_RANLIB = @ac_ct_RANLIB@
ac_ct_STRIP = @ac_ct_STRIP@
am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
ac_ct_CXX = @ac_ct_CXX@
ac_ct_F77 = @ac_ct_F77@
am__include = @am__include@
am__leading_dot = @am__leading_dot@
am__quote = @am__quote@
am__tar = @am__tar@
am__untar = @am__untar@
bindir = @bindir@
build = @build@
build_alias = @build_alias@
build_cpu = @build_cpu@
build_os = @build_os@
build_vendor = @build_vendor@
builddir = @builddir@
datadir = @datadir@
datarootdir = @datarootdir@
docdir = @docdir@
dvidir = @dvidir@
exec_prefix = @exec_prefix@
host = @host@
host_alias = @host_alias@
host_cpu = @host_cpu@
host_os = @host_os@
host_vendor = @host_vendor@
htmldir = @htmldir@
includedir = @includedir@
infodir = @infodir@
install_sh = @install_sh@
libdir = @libdir@
libexecdir = @libexecdir@
localedir = @localedir@
localstatedir = @localstatedir@
mandir = @mandir@
mkdir_p = @mkdir_p@
oldincludedir = @oldincludedir@
pdfdir = @pdfdir@
prefix = @prefix@
program_transform_name = @program_transform_name@
psdir = @psdir@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
srcdir = @srcdir@
sysconfdir = @sysconfdir@
target_alias = @target_alias@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
# Program Makefile for the WCS library
# Copyright (C) 2002 Emmanuel Bertin.
......@@ -153,7 +200,7 @@ libwcs_c_a_SOURCES = cel.c lin.c poly.c proj.c sph.c tnx.c wcs.c \
all: all-am
.SUFFIXES:
.SUFFIXES: .c .o .obj
.SUFFIXES: .c .lo .o .obj
$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
@for dep in $?; do \
case '$(am__configure_deps)' in \
......@@ -163,9 +210,9 @@ $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
exit 1;; \
esac; \
done; \
echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/wcs/Makefile'; \
echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/wcs/Makefile'; \
cd $(top_srcdir) && \
$(AUTOMAKE) --gnu src/wcs/Makefile
$(AUTOMAKE) --foreign src/wcs/Makefile
.PRECIOUS: Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
@case '$?' in \
......@@ -207,27 +254,39 @@ distclean-compile:
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/wcstrig.Po@am__quote@
.c.o:
@am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(COMPILE) -c $<
.c.obj:
@am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \
@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'`
uninstall-info-am:
.c.lo:
@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $<
mostlyclean-libtool:
-rm -f *.lo
clean-libtool:
-rm -rf .libs _libs
ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
$(AWK) ' { files[$$0] = 1; } \
END { for (i in files) print i; }'`; \
$(AWK) '{ files[$$0] = 1; nonemtpy = 1; } \
END { if (nonempty) { for (i in files) print i; }; }'`; \
mkid -fID $$unique
tags: TAGS
......@@ -239,8 +298,8 @@ TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
$(AWK) ' { files[$$0] = 1; } \
END { for (i in files) print i; }'`; \
$(AWK) '{ files[$$0] = 1; nonempty = 1; } \
END { if (nonempty) { for (i in files) print i; }; }'`; \
if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
test -n "$$unique" || unique=$$empty_fix; \
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
......@@ -250,13 +309,12 @@ ctags: CTAGS
CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
$(TAGS_FILES) $(LISP)
tags=; \
here=`pwd`; \
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
$(AWK) ' { files[$$0] = 1; } \
END { for (i in files) print i; }'`; \
$(AWK) '{ files[$$0] = 1; nonempty = 1; } \
END { if (nonempty) { for (i in files) print i; }; }'`; \
test -z "$(CTAGS_ARGS)$$tags$$unique" \
|| $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
$$tags $$unique
......@@ -270,22 +328,21 @@ distclean-tags:
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
distdir: $(DISTFILES)
@srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
list='$(DISTFILES)'; for file in $$list; do \
case $$file in \
$(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
$(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
list='$(DISTFILES)'; \
dist_files=`for file in $$list; do echo $$file; done | \
sed -e "s|^$$srcdirstrip/||;t" \
-e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
case $$dist_files in \
*/*) $(MKDIR_P) `echo "$$dist_files" | \
sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
sort -u` ;; \
esac; \
for file in $$dist_files; do \
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
if test "$$dir" != "$$file" && test "$$dir" != "."; then \
dir="/$$dir"; \
$(mkdir_p) "$(distdir)$$dir"; \
else \
dir=''; \
fi; \
if test -d $$d/$$file; then \
dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
fi; \
......@@ -326,7 +383,8 @@ maintainer-clean-generic:
@echo "it deletes files that may require special tools to rebuild."
clean: clean-am
clean-am: clean-generic clean-noinstLIBRARIES mostlyclean-am
clean-am: clean-generic clean-libtool clean-noinstLIBRARIES \
mostlyclean-am
distclean: distclean-am
-rm -rf ./$(DEPDIR)
......@@ -346,12 +404,20 @@ info-am:
install-data-am:
install-dvi: install-dvi-am
install-exec-am:
install-html: install-html-am
install-info: install-info-am
install-man:
install-pdf: install-pdf-am
install-ps: install-ps-am
installcheck-am:
maintainer-clean: maintainer-clean-am
......@@ -361,7 +427,8 @@ maintainer-clean-am: distclean-am maintainer-clean-generic
mostlyclean: mostlyclean-am
mostlyclean-am: mostlyclean-compile mostlyclean-generic
mostlyclean-am: mostlyclean-compile mostlyclean-generic \
mostlyclean-libtool
pdf: pdf-am
......@@ -371,18 +438,22 @@ ps: ps-am
ps-am:
uninstall-am: uninstall-info-am
uninstall-am:
.MAKE: install-am install-strip
.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
clean-noinstLIBRARIES ctags distclean distclean-compile \
distclean-generic distclean-tags distdir dvi dvi-am html \
html-am info info-am install install-am install-data \
install-data-am install-exec install-exec-am install-info \
install-info-am install-man install-strip installcheck \
installcheck-am installdirs maintainer-clean \
maintainer-clean-generic mostlyclean mostlyclean-compile \
mostlyclean-generic pdf pdf-am ps ps-am tags uninstall \
uninstall-am uninstall-info-am
clean-libtool clean-noinstLIBRARIES ctags distclean \
distclean-compile distclean-generic distclean-libtool \
distclean-tags distdir dvi dvi-am html html-am info info-am \
install install-am install-data install-data-am install-dvi \
install-dvi-am install-exec install-exec-am install-html \
install-html-am install-info install-info-am install-man \
install-pdf install-pdf-am install-ps install-ps-am \
install-strip installcheck installcheck-am installdirs \
maintainer-clean maintainer-clean-generic mostlyclean \
mostlyclean-compile mostlyclean-generic mostlyclean-libtool \
pdf pdf-am ps ps-am tags uninstall uninstall-am
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
......
......@@ -191,7 +191,8 @@
*
* Author: Mark Calabretta, Australia Telescope National Facility
* IRAF's TNX added by E.Bertin 2000/08/23
* $Id: proj.c,v 1.1.1.1 2004/01/04 21:33:26 bertin Exp $
* Behaviour of Cartesian-like projections modified by E.Bertin 2005/08/29
* $Id: proj.c,v 1.1.1.1 2008/01/10 18:00:00 bertin Exp $
*===========================================================================*/
#ifdef HAVE_CONFIG_H
......@@ -1359,6 +1360,10 @@ double *phi, *theta;
}
*phi = x*prj->w[1];
if (*phi>180.0)
*phi -= 360.0;
else if (*phi<-180.0)
*phi += 360.0;
eta = y*prj->w[3];
*theta = wcs_atan2d(eta,1.0) + wcs_asind(eta*prj->p[1]/sqrt(eta*eta+1.0));
......@@ -1427,6 +1432,10 @@ double *phi, *theta;
}
*phi = prj->w[1]*x;
if (*phi>180.0)
*phi -= 360.0;
else if (*phi<-180.0)
*phi += 360.0;
*theta = prj->w[1]*y;
return 0;
......@@ -1497,6 +1506,10 @@ double *phi, *theta;
}
*phi = x*prj->w[1];
if (*phi>180.0)
*phi -= 360.0;
else if (*phi<-180.0)
*phi += 360.0;
*theta = 2.0*wcs_atand(exp(y/prj->r0)) - 90.0;
return 0;
......@@ -1590,6 +1603,10 @@ double *phi, *theta;
}
*phi = x*prj->w[1];
if (*phi>180.0)
*phi -= 360.0;
else if (*phi<-180.0)
*phi += 360.0;
*theta = wcs_asind(s);
return 0;
......@@ -3676,8 +3693,8 @@ int raw_to_pv(struct prjprm *prj, double x, double y, double *xo, double *yo)
}
k=prj->n;
a = prj->p; /* Longitude */
b = prj->p+100; /* Latitude */
a = prj->p+100; /* Latitude comes first for compatibility */
b = prj->p; /* Longitude */
xp = *(a++);
xp += *(a++)*x;
yp = *(b++);
......@@ -3763,7 +3780,7 @@ int raw_to_pv(struct prjprm *prj, double x, double y, double *xo, double *yo)
yp += *(b++)*y3*x3;
if (!--k) goto poly_end;
xp += *(a++)*x2*y4;
yp += *(b++)*y4*x2;
yp += *(b++)*y2*x4;
if (!--k) goto poly_end;
xp += *(a++)*x*y5;
yp += *(b++)*y*x5;
......
/*
wcscelsys.h
*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
*
* Part of: LDACTools+
*
* Author: E.BERTIN (IAP)
*
* Contents: Include file for fitswcs.c
*
* Last modify: 14/01/2001
*
*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
*/
/*-------------------------------- constants --------------------------------*/
/* equatorial coordinates of origin and pole and rotation sign of equatorial,*/
/* galactic, and ecliptic reference frames, from Allen Ast. Quant., 4th ed. */
char celsysname[][2][8] = { {"RA--", "DEC-"},
{"GLON", "GLAT"},
{"ELON", "ELAT"},
{""}};
double celsysorig[][2] = { {0.0, 0.0},
{266.40499625, -28.93617242},
{0.0, 0.0} },
celsyspole[][2] = { {0.0, 90.0},
{192.85948123, 27.12825120},
{273.85261111, 66.99111111}},
/* Note: the code to handle the rotation sign is not yet implemented!!! */
celsyssign[] = { 1.0,
1.0,
1.0};
......@@ -9,7 +9,7 @@
*
* Contents: Compute windowed barycenter
*
* Last modify: 22/09/2005
* Last modify: 19/12/2007
*
*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
*/
......@@ -38,7 +38,7 @@ INPUT Picture structure pointer,
OUTPUT -.
NOTES obj->posx and obj->posy are taken as initial centroid guesses.
AUTHOR E. Bertin (IAP)
VERSION 22/09/2005
VERSION 19/12/2007
***/
void compute_winpos(picstruct *field, picstruct *wfield, objstruct *obj)
......@@ -70,7 +70,7 @@ void compute_winpos(picstruct *field, picstruct *wfield, objstruct *obj)
errflag = FLAG(obj2.winposerr_mx2);
momentflag = FLAG(obj2.win_mx2) | FLAG(obj2.winposerr_mx2);
var = backnoise2 = field->backsig*field->backsig;
gain = prefs.gain;
gain = field->gain;
sig = obj2->hl_radius*2.0/2.35; /* From half-FWHM to sigma */
twosig2 = 2.0*sig*sig;
......
......@@ -9,7 +9,7 @@
*
* Contents: XML logging.
*
* Last modify: 14/07/2006
* Last modify: 19/12/2007
*
*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
*/
......@@ -82,7 +82,7 @@ INPUT -.
OUTPUT RETURN_OK if everything went fine, RETURN_ERROR otherwise.
NOTES -.
AUTHOR E. Bertin (IAP)
VERSION 11/07/2006
VERSION 19/12/2007
***/
int update_xml(sexcatstruct *sexcat, picstruct *dfield, picstruct *field,
picstruct *dwfield, picstruct *wfield)
......@@ -113,6 +113,10 @@ int update_xml(sexcatstruct *sexcat, picstruct *dfield, picstruct *field,
x->pixscale[1] = field->pixscale;
x->epoch[0] = dfield->epoch;
x->epoch[1] = field->epoch;
x->gain[0] = dfield->gain;
x->gain[1] = field->gain;
x->satur_level[0] = dfield->satur_level;
x->satur_level[1] = field->satur_level;
return EXIT_SUCCESS;
}
......@@ -213,7 +217,7 @@ INPUT Pointer to the output file (or stream),
OUTPUT RETURN_OK if everything went fine, RETURN_ERROR otherwise.
NOTES -.
AUTHOR E. Bertin (IAP)
VERSION 14/07/2006
VERSION 19/12/2007
***/
int write_xml_meta(FILE *file, char *error)
{
......@@ -352,15 +356,22 @@ int write_xml_meta(FILE *file, char *error)
fprintf(file, " <FIELD name=\"Epoch\" datatype=\"float\""
" arraysize=\"%d\" ucd=\"time.epoch;obs\" unit=\"yr\"/>\n",
prefs.nimage_name);
fprintf(file, " <FIELD name=\"Gain\" datatype=\"float\""
" arraysize=\"%d\" ucd=\"instr.param;obs.param\"/>\n",
prefs.nimage_name);
fprintf(file, " <FIELD name=\"Satur_Level\" datatype=\"float\""
" arraysize=\"%d\" ucd=\"instr.saturation;phot.count\" unit=\"ct\"/>\n",
prefs.nimage_name);
fprintf(file, " <DATA><TABLEDATA>\n");
for (n=0; n<nxml; n++)
if (prefs.nimage_name>1)
fprintf(file, " <TR>\n"
" <TD>%d</TD><TD>%s</TD><TD>%s</TD><TD>%.0f</TD>"
"<TD>%d</TD><TD>%d</TD>\n"
" <TD>%s,%s</TD>\n"
" <TD>%s,%s</TD><TD>%g %g</TD>\n"
" <TD>%g %g</TD><TD>%g %g</TD><TD>%g %g</TD>"
"<TD>%g %g</TD><TD>%g %g</TD>\n"
"<TD>%g %g</TD><TD>%f %f</TD>\n"
" <TD>%g %g</TD><TD>%g %g</TD>\n"
" </TR>\n",
xmlstack[n].currext,
xmlstack[n].ext_date,
......@@ -373,13 +384,17 @@ int write_xml_meta(FILE *file, char *error)
xmlstack[n].backsig[0], xmlstack[n].backsig[1],
xmlstack[n].sigfac[0], xmlstack[n].sigfac[1],
xmlstack[n].thresh[0], xmlstack[n].thresh[1],
xmlstack[n].pixscale[0], xmlstack[n].pixscale[1]);
xmlstack[n].pixscale[0], xmlstack[n].pixscale[1],
xmlstack[n].epoch[0], xmlstack[n].epoch[1],
xmlstack[n].gain[0], xmlstack[n].gain[1],
xmlstack[n].satur_level[0], xmlstack[n].satur_level[1]);
else
fprintf(file, " <TR>\n"
" <TD>%d</TD><TD>%s</TD><TD>%s</TD><TD>%.0f</TD>"
"<TD>%d</TD><TD>%d</TD>\n"
" <TD>%s</TD>\n"
" <TD>%g</TD><TD>%g</TD><TD>%g</TD><TD>%g</TD><TD>%g</TD>\n"
" <TD>%s</TD><TD>%g</TD>\n"
" <TD>%g</TD><TD>%g</TD><TD>%g</TD><TD>%g</TD><TD>%f</TD>\n"
" <TD>%g</TD><TD>%g</TD>\n"
" </TR>\n",
xmlstack[n].currext,
xmlstack[n].ext_date,
......@@ -392,7 +407,10 @@ int write_xml_meta(FILE *file, char *error)
xmlstack[n].backsig[0],
xmlstack[n].sigfac[0],
xmlstack[n].thresh[0],
xmlstack[n].pixscale[0]);
xmlstack[n].pixscale[0],
xmlstack[n].epoch[0],
xmlstack[n].gain[0],
xmlstack[n].satur_level[0]);
fprintf(file, " </TABLEDATA></DATA>\n");
fprintf(file, " </TABLE>\n");
......
......@@ -9,7 +9,7 @@
*
* Contents: XML logging.
*
* Last modify: 14/07/2005
* Last modify: 19/12/2007
*
*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
*/
......@@ -49,6 +49,8 @@ typedef struct
float thresh[2]; /* thresholds (ADU) */
double pixscale[2]; /* pixel scale (deg2) */
double epoch[2]; /* epoch of coords */
double gain[2]; /* gain (e-/ADU) */
double satur_level[2]; /* saturation level */
} xmlstruct;
/*------------------------------- functions ---------------------------------*/
......
# Test Makefile for SExtractor
# Copyright (C) 2007 Emmanuel Bertin.
TESTS = efigi1.test
EXTRA_DIST = galaxies.fits galaxies.weight.fits \
default.psf default.sex default.param \
default.conv efigi1.test
distclean-local:
-rm *.cat *.xml
# Makefile.in generated by automake 1.10.1 from Makefile.am.
# @configure_input@
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
# 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE.
@SET_MAKE@
VPATH = @srcdir@
pkgdatadir = $(datadir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
install_sh_DATA = $(install_sh) -c -m 644
install_sh_PROGRAM = $(install_sh) -c
install_sh_SCRIPT = $(install_sh) -c
INSTALL_HEADER = $(INSTALL_DATA)
transform = $(program_transform_name)
NORMAL_INSTALL = :
PRE_INSTALL = :
POST_INSTALL = :
NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
build_triplet = @build@
host_triplet = @host@
subdir = tests
DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/acx_atlas.m4 \
$(top_srcdir)/acx_fftw.m4 $(top_srcdir)/acx_prog_cc_optim.m4 \
$(top_srcdir)/acx_pthread.m4 \
$(top_srcdir)/acx_urbi_resolve_dir.m4 \
$(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
mkinstalldirs = $(SHELL) $(top_srcdir)/autoconf/mkinstalldirs
CONFIG_HEADER = $(top_builddir)/config.h
CONFIG_CLEAN_FILES =
SOURCES =
DIST_SOURCES =
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = @ACLOCAL@
AMTAR = @AMTAR@
AR = @AR@
ATLAS_CFLAGS = @ATLAS_CFLAGS@
ATLAS_ERROR = @ATLAS_ERROR@
ATLAS_LIB = @ATLAS_LIB@
ATLAS_LIBPATH = @ATLAS_LIBPATH@
AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
CXX = @CXX@
CXXCPP = @CXXCPP@
CXXDEPMODE = @CXXDEPMODE@
CXXFLAGS = @CXXFLAGS@
CYGPATH_W = @CYGPATH_W@
DATE2 = @DATE2@
DATE3 = @DATE3@
DEFS = @DEFS@
DEPDIR = @DEPDIR@
ECHO = @ECHO@
ECHO_C = @ECHO_C@
ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
EGREP = @EGREP@
EXEEXT = @EXEEXT@
F77 = @F77@
FFLAGS = @FFLAGS@
FFTW_ERROR = @FFTW_ERROR@
FFTW_LIBS = @FFTW_LIBS@
GREP = @GREP@
INSTALL = @INSTALL@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
LDFLAGS = @LDFLAGS@
LIBOBJS = @LIBOBJS@
LIBS = @LIBS@
LIBTOOL = @LIBTOOL@
LN_S = @LN_S@
LTLIBOBJS = @LTLIBOBJS@
MAKEINFO = @MAKEINFO@
MKDIR_P = @MKDIR_P@
OBJEXT = @OBJEXT@
PACKAGE = @PACKAGE@
PACKAGER = @PACKAGER@
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
PACKAGE_NAME = @PACKAGE_NAME@
PACKAGE_STRING = @PACKAGE_STRING@
PACKAGE_TARNAME = @PACKAGE_TARNAME@
PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_SEPARATOR = @PATH_SEPARATOR@
PTHREAD_CC = @PTHREAD_CC@
PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
PTHREAD_LIBS = @PTHREAD_LIBS@
RANLIB = @RANLIB@
SED = @SED@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
STRIP = @STRIP@
VERSION = @VERSION@
abs_builddir = @abs_builddir@
abs_srcdir = @abs_srcdir@
abs_top_builddir = @abs_top_builddir@
abs_top_srcdir = @abs_top_srcdir@
ac_ct_CC = @ac_ct_CC@
ac_ct_CXX = @ac_ct_CXX@
ac_ct_F77 = @ac_ct_F77@
am__include = @am__include@
am__leading_dot = @am__leading_dot@
am__quote = @am__quote@
am__tar = @am__tar@
am__untar = @am__untar@
bindir = @bindir@
build = @build@
build_alias = @build_alias@
build_cpu = @build_cpu@
build_os = @build_os@
build_vendor = @build_vendor@
builddir = @builddir@
datadir = @datadir@
datarootdir = @datarootdir@
docdir = @docdir@
dvidir = @dvidir@
exec_prefix = @exec_prefix@
host = @host@
host_alias = @host_alias@
host_cpu = @host_cpu@
host_os = @host_os@
host_vendor = @host_vendor@
htmldir = @htmldir@
includedir = @includedir@
infodir = @infodir@
install_sh = @install_sh@
libdir = @libdir@
libexecdir = @libexecdir@
localedir = @localedir@
localstatedir = @localstatedir@
mandir = @mandir@
mkdir_p = @mkdir_p@
oldincludedir = @oldincludedir@
pdfdir = @pdfdir@
prefix = @prefix@
program_transform_name = @program_transform_name@
psdir = @psdir@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
srcdir = @srcdir@
sysconfdir = @sysconfdir@
target_alias = @target_alias@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
# Test Makefile for SExtractor
# Copyright (C) 2007 Emmanuel Bertin.
TESTS = efigi1.test
EXTRA_DIST = galaxies.fits galaxies.weight.fits \
default.psf default.sex default.param \
default.conv efigi1.test
all: all-am
.SUFFIXES:
$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
@for dep in $?; do \
case '$(am__configure_deps)' in \
*$$dep*) \
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
&& exit 0; \
exit 1;; \
esac; \
done; \
echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign tests/Makefile'; \
cd $(top_srcdir) && \
$(AUTOMAKE) --foreign tests/Makefile
.PRECIOUS: Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
@case '$?' in \
*config.status*) \
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
*) \
echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
esac;
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(top_srcdir)/configure: $(am__configure_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(ACLOCAL_M4): $(am__aclocal_m4_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
mostlyclean-libtool:
-rm -f *.lo
clean-libtool:
-rm -rf .libs _libs
tags: TAGS
TAGS:
ctags: CTAGS
CTAGS:
check-TESTS: $(TESTS)
@failed=0; all=0; xfail=0; xpass=0; skip=0; ws='[ ]'; \
srcdir=$(srcdir); export srcdir; \
list=' $(TESTS) '; \
if test -n "$$list"; then \
for tst in $$list; do \
if test -f ./$$tst; then dir=./; \
elif test -f $$tst; then dir=; \
else dir="$(srcdir)/"; fi; \
if $(TESTS_ENVIRONMENT) $${dir}$$tst; then \
all=`expr $$all + 1`; \
case " $(XFAIL_TESTS) " in \
*$$ws$$tst$$ws*) \
xpass=`expr $$xpass + 1`; \
failed=`expr $$failed + 1`; \
echo "XPASS: $$tst"; \
;; \
*) \
echo "PASS: $$tst"; \
;; \
esac; \
elif test $$? -ne 77; then \
all=`expr $$all + 1`; \
case " $(XFAIL_TESTS) " in \
*$$ws$$tst$$ws*) \
xfail=`expr $$xfail + 1`; \
echo "XFAIL: $$tst"; \
;; \
*) \
failed=`expr $$failed + 1`; \
echo "FAIL: $$tst"; \
;; \
esac; \
else \
skip=`expr $$skip + 1`; \
echo "SKIP: $$tst"; \
fi; \
done; \
if test "$$failed" -eq 0; then \
if test "$$xfail" -eq 0; then \
banner="All $$all tests passed"; \
else \
banner="All $$all tests behaved as expected ($$xfail expected failures)"; \
fi; \
else \
if test "$$xpass" -eq 0; then \
banner="$$failed of $$all tests failed"; \
else \
banner="$$failed of $$all tests did not behave as expected ($$xpass unexpected passes)"; \
fi; \
fi; \
dashes="$$banner"; \
skipped=""; \
if test "$$skip" -ne 0; then \
skipped="($$skip tests were not run)"; \
test `echo "$$skipped" | wc -c` -le `echo "$$banner" | wc -c` || \
dashes="$$skipped"; \
fi; \
report=""; \
if test "$$failed" -ne 0 && test -n "$(PACKAGE_BUGREPORT)"; then \
report="Please report to $(PACKAGE_BUGREPORT)"; \
test `echo "$$report" | wc -c` -le `echo "$$banner" | wc -c` || \
dashes="$$report"; \
fi; \
dashes=`echo "$$dashes" | sed s/./=/g`; \
echo "$$dashes"; \
echo "$$banner"; \
test -z "$$skipped" || echo "$$skipped"; \
test -z "$$report" || echo "$$report"; \
echo "$$dashes"; \
test "$$failed" -eq 0; \
else :; fi
distdir: $(DISTFILES)
@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
list='$(DISTFILES)'; \
dist_files=`for file in $$list; do echo $$file; done | \
sed -e "s|^$$srcdirstrip/||;t" \
-e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
case $$dist_files in \
*/*) $(MKDIR_P) `echo "$$dist_files" | \
sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
sort -u` ;; \
esac; \
for file in $$dist_files; do \
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
if test -d $$d/$$file; then \
dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
fi; \
cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
else \
test -f $(distdir)/$$file \
|| cp -p $$d/$$file $(distdir)/$$file \
|| exit 1; \
fi; \
done
check-am: all-am
$(MAKE) $(AM_MAKEFLAGS) check-TESTS
check: check-am
all-am: Makefile
installdirs:
install: install-am
install-exec: install-exec-am
install-data: install-data-am
uninstall: uninstall-am
install-am: all-am
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
installcheck: installcheck-am
install-strip:
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
`test -z '$(STRIP)' || \
echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
mostlyclean-generic:
clean-generic:
distclean-generic:
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
maintainer-clean-generic:
@echo "This command is intended for maintainers to use"
@echo "it deletes files that may require special tools to rebuild."
clean: clean-am
clean-am: clean-generic clean-libtool mostlyclean-am
distclean: distclean-am
-rm -f Makefile
distclean-am: clean-am distclean-generic distclean-local
dvi: dvi-am
dvi-am:
html: html-am
info: info-am
info-am:
install-data-am:
install-dvi: install-dvi-am
install-exec-am:
install-html: install-html-am
install-info: install-info-am
install-man:
install-pdf: install-pdf-am
install-ps: install-ps-am
installcheck-am:
maintainer-clean: maintainer-clean-am
-rm -f Makefile
maintainer-clean-am: distclean-am maintainer-clean-generic
mostlyclean: mostlyclean-am
mostlyclean-am: mostlyclean-generic mostlyclean-libtool
pdf: pdf-am
pdf-am:
ps: ps-am
ps-am:
uninstall-am:
.MAKE: install-am install-strip
.PHONY: all all-am check check-TESTS check-am clean clean-generic \
clean-libtool distclean distclean-generic distclean-libtool \
distclean-local distdir dvi dvi-am html html-am info info-am \
install install-am install-data install-data-am install-dvi \
install-dvi-am install-exec install-exec-am install-html \
install-html-am install-info install-info-am install-man \
install-pdf install-pdf-am install-ps install-ps-am \
install-strip installcheck installcheck-am installdirs \
maintainer-clean maintainer-clean-generic mostlyclean \
mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
uninstall uninstall-am
distclean-local:
-rm *.cat *.xml
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:
CONV NORM
# 3x3 ``all-ground'' convolution mask with FWHM = 2 pixels.
1 2 1
2 4 2
1 2 1
NUMBER
X_IMAGE
Y_IMAGE
XWIN_IMAGE
YWIN_IMAGE
XPROF_IMAGE
YPROF_IMAGE
FLUX_AUTO
FLUX_PROF
MAG_AUTO
MAG_PROF
FLUX_RADIUS
FLAGS
NITER_PROF
VECTOR_PROF(12)
# Default configuration file for SExtractor 2.5.0
# EB 2006-07-14
#
#-------------------------------- Catalog ------------------------------------
CATALOG_NAME test.cat # name of the output catalog
CATALOG_TYPE ASCII_HEAD # NONE,ASCII,ASCII_HEAD, ASCII_SKYCAT,
# ASCII_VOTABLE, FITS_1.0 or FITS_LDAC
PARAMETERS_NAME default.param # name of the file containing catalog contents
#------------------------------- Extraction ----------------------------------
DETECT_TYPE CCD # CCD (linear) or PHOTO (with gamma correction)
DETECT_MINAREA 2 # minimum number of pixels above threshold
DETECT_THRESH 1.5 # <sigmas> or <threshold>,<ZP> in mag.arcsec-2
ANALYSIS_THRESH 2 # <sigmas> or <threshold>,<ZP> in mag.arcsec-2
FILTER Y # apply filter for detection (Y or N)?
FILTER_NAME default.conv # name of the file containing the filter
DEBLEND_NTHRESH 32 # Number of deblending sub-thresholds
DEBLEND_MINCONT 0.005 # Minimum contrast parameter for deblending
CLEAN Y # Clean spurious detections? (Y or N)?
CLEAN_PARAM 1.0 # Cleaning efficiency
MASK_TYPE CORRECT # type of detection MASKing: can be one of
# NONE, BLANK or CORRECT
WEIGHT_TYPE NONE
#------------------------------ Photometry -----------------------------------
PHOT_APERTURES 5 # MAG_APER aperture diameter(s) in pixels
PHOT_AUTOPARAMS 2.5, 3.5 # MAG_AUTO parameters: <Kron_fact>,<min_radius>
PHOT_PETROPARAMS 2.0, 3.5 # MAG_PETRO parameters: <Petrosian_fact>,
# <min_radius>
SATUR_LEVEL 50000.0 # level (in ADUs) at which arises saturation
MAG_ZEROPOINT 0.0 # magnitude zero-point
MAG_GAMMA 4.0 # gamma of emulsion (for photographic scans)
GAIN 0.0 # detector gain in e-/ADU
PIXEL_SCALE 1.0 # size of pixel in arcsec (0=use FITS WCS info)
#------------------------- Star/Galaxy Separation ----------------------------
SEEING_FWHM 1.2 # stellar FWHM in arcsec
STARNNW_NAME default.nnw # Neural-Network_Weight table filename
#------------------------------ Background -----------------------------------
BACK_SIZE 64 # Background mesh: <size> or <width>,<height>
BACK_FILTERSIZE 3 # Background filter: <size> or <width>,<height>
BACKPHOTO_TYPE GLOBAL # can be GLOBAL or LOCAL
#------------------------------ Check Image ----------------------------------
CHECKIMAGE_TYPE MODELS, -MODELS, -BACKGROUND # can be NONE, BACKGROUND, BACKGROUND_RMS,
# MINIBACKGROUND, MINIBACK_RMS, -BACKGROUND,
# FILTERED, OBJECTS, -OBJECTS, SEGMENTATION,
# or APERTURES
CHECKIMAGE_NAME prof.fits,subprof.fits,orig.fits # Filename for the check-image
#--------------------- Memory (change with caution!) -------------------------
MEMORY_OBJSTACK 3000 # number of objects in stack
MEMORY_PIXSTACK 300000 # number of pixels in stack
MEMORY_BUFSIZE 1024 # number of lines in buffer
#----------------------------- Miscellaneous ---------------------------------
VERBOSE_TYPE NORMAL # can be QUIET, NORMAL or FULL
WRITE_XML Y # Write XML file (Y/N)?
XML_NAME sex.xml # Filename for XML output
#! /bin/sh
# Copyright (C) 2007 Emmanuel Bertin.
#
../src/sex galaxies.fits -WEIGHT_IMAGE galaxies.weight.fits -CATALOG_NAME galaxies.cat
This source diff could not be displayed because it is too large. You can view the blob instead.
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE xsl:stylesheet [
<!ENTITY nbsp "&#160;">
<!ENTITY deg "&#176;">
<!ENTITY amin "&#180;">
<!ENTITY asec "&#168;">
]>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<!-- *********************** Global XSL template ************************** -->
<xsl:template match="/">
<xsl:variable name="date" select="/VOTABLE/RESOURCE/RESOURCE[@name='MetaData']/PARAM[@name='Date']/@value"/>
<xsl:variable name="time" select="/VOTABLE/RESOURCE/RESOURCE[@name='MetaData']/PARAM[@name='Time']/@value"/>
<html>
<!-- HTML head -->
<head>
<!-- javascript -->
<!-- <script type="text/javascript" language="javascript"> -->
<script src="http://terapix.iap.fr/cplt/xsl/sorttable.js"/>
<style type="text/css">
p.sansserif {font-family: sans-serif}
body {background-color: white}
mono {font-family: monospace}
elen {font-family: monospace; font-size: 100%; font-weight: bold; color: green }
elep {font-family: monospace; font-size: 100%; font-weight: bold; color: red }
el {font-family: monospace; font-size: 100%; color: black}
a {text-decoration: none}
table.sortable a.sortheader
{
background-color:#FFEECC;
color: black;
font-weight: bold;
font-size: 80%;
text-decoration: none;
display: button;
}
table.sortable span.sortarrow
{
color: black;
font-weight: bold;
text-decoration: none;
}
table.sortable a.sortheader.sub
{
vertical-align: sub;
}
</style>
<title>
Processing summary on <xsl:value-of select="$date"/> at <xsl:value-of select="$time"/>
</title>
</head>
<!-- HTML body -->
<BODY>
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="0" WIDTH="100%">
<TR>
<TD ALIGN="LEFT">
<TABLE BORDER="0">
<TR>
<TD ALIGN="CENTER">
<IMG SRC="http://terapix.iap.fr/cplt/xsl/terapixLogo.png" ALT="Terapix"/>
</TD>
<TD ALIGN="CENTER">
<IMG SRC="http://terapix.iap.fr/cplt/xsl/terapixTitle.png" ALT="Logo"/>
</TD>
<TD ALIGN="CENTER">
<FONT color="#669933">
<B> Processing summary</B>
</FONT>
</TD>
<TD ALIGN="CENTER">
<IMG SRC="http://terapix.iap.fr/cplt/xsl/terapixPicture.gif" ALT="Terapix banner"/>
</TD>
</TR>
</TABLE>
</TD>
</TR>
<TR>
<TD>
<TABLE BORDER="0" WIDTH="100%" BGCOLOR="#000000">
<TR>
<TH BGCOLOR="#000000" ALIGN="LEFT"><FONT SIZE="-1" COLOR="#FFFFFF"> Home > Tools > Data reduction</FONT></TH>
</TR>
</TABLE>
</TD>
</TR>
</TABLE>
<xsl:call-template name="VOTable"/>
</BODY>
</html>
</xsl:template>
<!-- **************** Generic XSL template for VOTables ****************** -->
<xsl:template name="VOTable">
<xsl:for-each select="/VOTABLE">
<xsl:call-template name="Resource"/>
</xsl:for-each>
</xsl:template>
<!-- *************** Generic XSL template for Resources ****************** -->
<xsl:template name="Resource">
<xsl:for-each select="RESOURCE">
<xsl:choose>
<xsl:when test="@ID='SExtractor'">
<xsl:call-template name="sextractor"/>
</xsl:when>
</xsl:choose>
</xsl:for-each>
</xsl:template>
<!-- ******************* XSL template for SExtractor ********************* -->
<xsl:template name="sextractor">
<xsl:for-each select="RESOURCE[@ID='MetaData']">
<xsl:call-template name="RunInfo"/>
<xsl:for-each select="/VOTABLE/RESOURCE[@ID='SExtractor']/TABLE[@ID='Source_List']">
<xsl:call-template name="sources"/>
</xsl:for-each>
<xsl:for-each select="TABLE[@ID='Extension_Data']">
<xsl:call-template name="extdata"/>
</xsl:for-each>
<xsl:for-each select="RESOURCE[@ID='Config']">
<xsl:call-template name="Config"/>
</xsl:for-each>
<xsl:for-each select="TABLE[@ID='Warnings']">
<xsl:call-template name="Warnings"/>
</xsl:for-each>
</xsl:for-each>
</xsl:template>
<!-- ************* Generic XSL RunInfo template for MetaData ************* -->
<xsl:template name="RunInfo">
<p>
<!-- Software name, version, date, time and number of threads -->
<a>
<xsl:attribute name="href">
<xsl:value-of select="PARAM[@name='Soft_URL']/@value"/>
</xsl:attribute>
<b>
<xsl:value-of select="PARAM[@name='Software']/@value"/>&nbsp;<xsl:value-of select="PARAM[@name='Version']/@value"/>
</b>
</a>
started on
<b><xsl:value-of select="PARAM[@name='Date']/@value"/></b>
at
<b><xsl:value-of select="PARAM[@name='Time']/@value"/></b>
with
<b><xsl:value-of select="PARAM[@name='NThreads']/@value"/></b>
thread<xsl:if test="PARAM[@name='NThreads']/@value &gt; 1">s</xsl:if>
<!-- Run time -->
<xsl:variable name="duration" select="PARAM[@name='Duration']/@value"/>
(run time:
<b>
<xsl:choose>
<xsl:when test="$duration &gt; 3600.0">
<xsl:value-of
select='concat(string(floor($duration div 3600)),
" h ", format-number(floor(($duration div 60) mod 60.0), "00"),
" min")'/>
</xsl:when>
<xsl:otherwise>
<xsl:choose>
<xsl:when test="$duration &gt; 60.0">
<xsl:value-of
select='concat(format-number(floor($duration div 60),"##"),
" min ", format-number(floor($duration mod 60.0), "00")," s")'/>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select='concat(string($duration), " s")'/>
</xsl:otherwise>
</xsl:choose>
</xsl:otherwise>
</xsl:choose>
</b>)
<br />
by user <b><xsl:value-of select="PARAM[@name='User']/@value"/></b>
from <b><xsl:value-of select="PARAM[@name='Host']/@value"/></b>
in <b><mono><xsl:value-of select="PARAM[@name='Path']/@value"/></mono></b>
</p>
<p>
<b style="color: red"><xsl:if test="PARAM[@name='Error_Msg']/@value &gt; 0">
An Error occured!!! </xsl:if>
<xsl:value-of select="PARAM[@name='Error_Msg']/@value"/></b>
</p>
<p>
<sans-serif><i>click to expand or hide tables</i></sans-serif>
</p>
</xsl:template>
<!-- ******************** XSL template for Source List ******************** -->
<xsl:template name="sources">
<xsl:choose>
<xsl:when test="DATA/TABLEDATA">
<p>
<BUTTON type="button" style="background:#CCEECC; font-family: sans-serif; font-weight: bold;" onclick="showhideTable('sources')">
Source List
</BUTTON>
<TABLE id="sources" class="sortable" style="display: none">
<TR>
<xsl:for-each select="FIELD">
<TH BGCOLOR="#FFEECC" align="center"><xsl:attribute name="title"><xsl:value-of select="DESCRIPTION"/></xsl:attribute>
<xsl:value-of select="@name"/>
<xsl:text disable-output-escaping="yes">&#13;&#10;
</xsl:text>
<xsl:value-of select="@unit"/>
</TH>
</xsl:for-each>
</TR>
<xsl:for-each select="DATA/TABLEDATA">
<xsl:for-each select="TR">
<tr>
<xsl:for-each select="TD">
<td align="right" BGCOLOR="#EEEEEE">
<el><xsl:value-of select="self::TD"/></el>
</td>
</xsl:for-each>
</tr>
</xsl:for-each>
</xsl:for-each>
</TABLE>
</p>
</xsl:when>
<xsl:otherwise>
<p>
<BUTTON type="button" style="background:#CCEECC; font-family: sans-serif; font-weight: bold;" onclick="showhideTable('catparam')">
Parameter List
</BUTTON>
<TABLE id="catparam" class="sortable" style="display: none">
<TR>
<TH BGCOLOR="#FFEECC" align="center">Parameter Name</TH>
<TH BGCOLOR="#FFEECC" align="center">Description</TH>
</TR>
<xsl:for-each select="FIELD">
<tr>
<td align="left" BGCOLOR="#EEEEEE">
<el><xsl:value-of select="@name"/></el>
</td>
<td align="left" BGCOLOR="#EEEEEE">
<el><xsl:value-of select="DESCRIPTION"/></el>
</td>
</tr>
</xsl:for-each>
</TABLE>
</p>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
<!-- ******************* XSL template for Extension Data ****************** -->
<xsl:template name="extdata">
<xsl:variable name="extension" select="count(FIELD[@name='Extension']/preceding-sibling::FIELD)+1"/>
<xsl:variable name="date" select="count(FIELD[@name='Date']/preceding-sibling::FIELD)+1"/>
<xsl:variable name="time" select="count(FIELD[@name='Time']/preceding-sibling::FIELD)+1"/>
<xsl:variable name="duration" select="count(FIELD[@name='Duration']/preceding-sibling::FIELD)+1"/>
<xsl:variable name="ndet" select="count(FIELD[@name='NDetect']/preceding-sibling::FIELD)+1"/>
<xsl:variable name="nsex" select="count(FIELD[@name='NSextracted']/preceding-sibling::FIELD)+1"/>
<xsl:variable name="imid" select="count(FIELD[@name='Image_Ident']/preceding-sibling::FIELD)+1"/>
<xsl:variable name="backmean" select="count(FIELD[@name='Background_Mean']/preceding-sibling::FIELD)+1"/>
<xsl:variable name="backsig" select="count(FIELD[@name='Background_StDev']/preceding-sibling::FIELD)+1"/>
<xsl:variable name="thresh" select="count(FIELD[@name='Threshold']/preceding-sibling::FIELD)+1"/>
<xsl:variable name="wscale" select="count(FIELD[@name='Weight_Scaling']/preceding-sibling::FIELD)+1"/>
<xsl:variable name="pixscale" select="count(FIELD[@name='Pixel_Scale']/preceding-sibling::FIELD)+1"/>
<xsl:variable name="epoch" select="count(FIELD[@name='Epoch']/preceding-sibling::FIELD)+1"/>
<p>
<BUTTON type="button" style="background:#CCEECC; font-family: sans-serif; font-weight: bold;" onclick="showhideTable('extdata')">
Summary Table on Output Catalog
</BUTTON>
<TABLE class="sortable" id="extdata" BORDER="2" style="display: none">
<TR>
<TH BGCOLOR="#FFEECC">Extension</TH>
<TH BGCOLOR="#FFEECC">Date</TH>
<TH BGCOLOR="#FFEECC">Time</TH>
<TH BGCOLOR="#FFEECC">Duration</TH>
<TH BGCOLOR="#FFEECC">Detected Source Number</TH>
<TH BGCOLOR="#FFEECC">Sextracted Source Number</TH>
<TH BGCOLOR="#FFEECC">Image ID</TH>
<TH BGCOLOR="#FFEECC">Mean Background</TH>
<TH BGCOLOR="#FFEECC">Sigma Background</TH>
<TH BGCOLOR="#FFEECC">Detection Threshold</TH>
<TH BGCOLOR="#FFEECC">Weight Scaling</TH>
<TH BGCOLOR="#FFEECC">Pixel Scale</TH>
<TH BGCOLOR="#FFEECC">Epoch</TH>
</TR>
<xsl:for-each select="DATA/TABLEDATA">
<xsl:for-each select="TR">
<tr>
<td align="center" BGCOLOR="#EEEEEE">
<el><xsl:value-of select="TD[$extension]"/></el>
</td>
<td align="center" BGCOLOR="#EEEEEE">
<el><xsl:value-of select="TD[$date]"/></el>
</td>
<td align="center" BGCOLOR="#EEEEEE">
<el><xsl:value-of select="TD[$time]"/></el>
</td>
<td align="center" BGCOLOR="#EEEEEE">
<el><xsl:value-of select="TD[$duration]"/></el>
</td>
<td align="center" BGCOLOR="#EEEEEE">
<el><xsl:value-of select="TD[$ndet]"/></el>
</td>
<td align="center" BGCOLOR="#EEEEEE">
<el><xsl:value-of select="TD[$nsex]"/></el>
</td>
<td align="center" BGCOLOR="#EEEEEE">
<el><xsl:value-of select="TD[$imid]"/></el>
</td>
<td align="right" BGCOLOR="#EEEEEE">
<el><xsl:value-of select="format-number(TD[$backmean],'#####0.00')"/></el>
</td>
<td align="right" BGCOLOR="#EEEEEE">
<el><xsl:value-of select="format-number(TD[$backsig],'###0.000')"/></el>
</td>
<td align="right" BGCOLOR="#EEEEEE">
<el><xsl:value-of select="format-number(TD[$thresh],'#####0.00')"/></el>
</td>
<td align="right" BGCOLOR="#EEEEEE">
<el><xsl:value-of select="format-number(TD[$wscale],'#####0.00')"/></el>
</td>
<td align="right" BGCOLOR="#EEEEEE">
<el><xsl:value-of select="format-number(TD[$pixscale],'#0.000')"/></el>
</td>
<td align="center" BGCOLOR="#EEEEEE">
<el><xsl:value-of select="TD[$epoch]"/></el>
</td>
</tr>
</xsl:for-each>
</xsl:for-each>
</TABLE>
</p>
</xsl:template>
<!-- ******************** XSL template for Config File ******************** -->
<xsl:template name="Config">
<p>
<BUTTON type="button" style="background:#CCEECC; font-family: sans-serif; font-weight: bold;" onclick="showhideTable('config')">
Configuration File: <xsl:value-of select="PARAM[@name='Prefs_Name']/@value"/>
</BUTTON>
<TABLE id="config" class="sortable" style="display: none">
<TR>
<TH BGCOLOR="#FFEECC">Config Parameter</TH>
<TH BGCOLOR="#FFEECC">Value</TH>
</TR>
<xsl:for-each select="PARAM[position()>2]">
<tr BGCOLOR="#EEEEEE">
<td><el><xsl:value-of select="@name"/></el></td>
<td><el><xsl:value-of select="@value"/></el></td>
</tr>
</xsl:for-each>
</TABLE>
</p>
<p>
<BUTTON type="button" style="background:#CCEECC; font-family: monospace; font-weight: bold: font-size: 80%;" onclick="showhideTable('commandline')">
Command Line
</BUTTON>
<TABLE id="commandline" style="display: none">
<TR>
<TD BGCOLOR="#FFEECC" style="font-size: 80%;"><el>Command Line: <xsl:value-of select="PARAM[@name='Command_Line']/@value"/></el></TD>
</TR>
</TABLE>
</p>
</xsl:template>
<!-- ********************** XSL template for Warnings ********************** -->
<xsl:template name="Warnings">
<xsl:variable name="date" select="count(FIELD[@name='Date']/preceding-sibling::FIELD)+1"/>
<xsl:variable name="time" select="count(FIELD[@name='Time']/preceding-sibling::FIELD)+1"/>
<xsl:variable name="msg" select="count(FIELD[@name='Msg']/preceding-sibling::FIELD)+1"/>
<p>
<BUTTON type="button" style="background:#CCEECC; font-family: monospace; font-weight: bold: font-size: 80%;" onclick="showhideTable('warnings')">
Warnings (limited to the last 100)
</BUTTON>
<TABLE id="warnings" style="display: none">
<TR style="font-size: 80%;">
<TH BGCOLOR="#FFEECC">Date</TH>
<TH BGCOLOR="#FFEECC">Time</TH>
<TH BGCOLOR="#FFEECC">Message</TH>
</TR>
<xsl:for-each select="DATA/TABLEDATA">
<xsl:for-each select="TR">
<tr>
<td BGCOLOR="#EEEEEE">
<el><xsl:value-of select="TD[$date]"/></el>
</td>
<td BGCOLOR="#EEEEEE">
<el><xsl:value-of select="TD[$time]"/></el>
</td>
<td align="center" BGCOLOR="#EEEEEE">
<el><xsl:value-of select="TD[$msg]"/></el>
</td>
</tr>
</xsl:for-each>
</xsl:for-each>
</TABLE>
</p>
</xsl:template>
<xsl:template name="Rest">
</xsl:template>
</xsl:stylesheet>
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment