Commit 523e3274 authored by Emmanuel Bertin's avatar Emmanuel Bertin
Browse files

Added reading of .head ASCII headers (suggestion from M.Monnerville and P.Hudelot).

Improved real-time display.
Fixed various issues with XSLT in double image mode.
Pushed version number to 2.11.0.
parent 0ca2f8a5
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
# Generated by GNU Autoconf 2.63 for sextractor 2.10.0.
# Generated by GNU Autoconf 2.63 for sextractor 2.11.0.
#
# Report bugs to <bertin@iap.fr>.
#
......@@ -750,8 +750,8 @@ SHELL=${CONFIG_SHELL-/bin/sh}
# Identity of this package.
PACKAGE_NAME='sextractor'
PACKAGE_TARNAME='sextractor'
PACKAGE_VERSION='2.10.0'
PACKAGE_STRING='sextractor 2.10.0'
PACKAGE_VERSION='2.11.0'
PACKAGE_STRING='sextractor 2.11.0'
PACKAGE_BUGREPORT='bertin@iap.fr'
 
ac_unique_file="src/makeit.c"
......@@ -1505,7 +1505,7 @@ if test "$ac_init_help" = "long"; then
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
\`configure' configures sextractor 2.10.0 to adapt to many kinds of systems.
\`configure' configures sextractor 2.11.0 to adapt to many kinds of systems.
 
Usage: $0 [OPTION]... [VAR=VALUE]...
 
......@@ -1575,7 +1575,7 @@ fi
 
if test -n "$ac_init_help"; then
case $ac_init_help in
short | recursive ) echo "Configuration of sextractor 2.10.0:";;
short | recursive ) echo "Configuration of sextractor 2.11.0:";;
esac
cat <<\_ACEOF
 
......@@ -1706,7 +1706,7 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
sextractor configure 2.10.0
sextractor configure 2.11.0
generated by GNU Autoconf 2.63
 
Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
......@@ -1720,7 +1720,7 @@ cat >config.log <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
 
It was created by sextractor $as_me 2.10.0, which was
It was created by sextractor $as_me 2.11.0, which was
generated by GNU Autoconf 2.63. Invocation command line was
 
$ $0 $@
......@@ -2423,7 +2423,7 @@ fi
 
# Define the identity of the package.
PACKAGE='sextractor'
VERSION='2.10.0'
VERSION='2.11.0'
 
 
cat >>confdefs.h <<_ACEOF
......@@ -28535,7 +28535,7 @@ exec 6>&1
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
This file was extended by sextractor $as_me 2.10.0, which was
This file was extended by sextractor $as_me 2.11.0, which was
generated by GNU Autoconf 2.63. Invocation command line was
 
CONFIG_FILES = $CONFIG_FILES
......@@ -28598,7 +28598,7 @@ Report bugs to <bug-autoconf@gnu.org>."
_ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_version="\\
sextractor config.status 2.10.0
sextractor config.status 2.11.0
configured by $0, generated by GNU Autoconf 2.63,
with options \\"`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
 
......
......@@ -6,7 +6,7 @@ define([AC_CACHE_LOAD],)
define([AC_CACHE_SAVE],)
# This is your standard Bertin source code...
AC_INIT(sextractor, 2.10.0, [bertin@iap.fr])
AC_INIT(sextractor, 2.11.0, [bertin@iap.fr])
AC_CONFIG_SRCDIR(src/makeit.c)
AC_CONFIG_AUX_DIR(autoconf)
AM_CONFIG_HEADER(config.h)
......
.TH SEXTRACTOR "1" "December 2009" "SWarp 2.10.0" "User Commands"
.TH SEXTRACTOR "1" "February 2010" "SWarp 2.11.0" "User Commands"
.SH NAME
sex \- extract a source catalog from an astronomical FITS image
.SH SYNOPSIS
......
# Program Makefile for SEx
# Copyright (C) 2004-2008 Emmanuel Bertin.
# Copyright (C) 2004-2010 Emmanuel Bertin.
SUBDIRS = fits levmar wcs
bin_PROGRAMS = sex ldactoasc
check_PROGRAMS = sex
sex_SOURCES = analyse.c assoc.c astrom.c back.c bpro.c catout.c \
check.c clean.c extract.c fft.c field.c filter.c \
fitswcs.c flag.c graph.c growth.c image.c \
fitswcs.c flag.c graph.c growth.c header.c image.c \
interpolate.c main.c makeit.c manobjlist.c misc.c \
neurro.c pattern.c pc.c photom.c plist.c prefs.c \
profit.c psf.c readimage.c refine.c retina.c scan.c \
som.c weight.c winpos.c xml.c \
assoc.h astrom.h back.h bpro.h check.h clean.h \
define.h extract.h fft.h field.h filter.h fitswcs.h \
flag.h globals.h growth.h image.h interpolate.h \
key.h neurro.h param.h paramprofit.h pattern.h \
photom.h plist.h prefs.h preflist.h profit.h psf.h \
retina.h sexhead1.h sexhead.h sexheadsc.h som.h \
threads.h types.h wcscelsys.h weight.h winpos.h xml.h
flag.h globals.h growth.h header.h image.h \
interpolate.h key.h neurro.h param.h paramprofit.h \
pattern.h photom.h plist.h prefs.h preflist.h \
profit.h psf.h retina.h sexhead1.h sexhead.h \
sexheadsc.h som.h threads.h types.h wcscelsys.h \
weight.h winpos.h xml.h
ldactoasc_SOURCES = ldactoasc.c ldactoasc.h
sex_LDADD = $(top_builddir)/src/fits/libfits.a \
$(top_builddir)/src/wcs/libwcs_c.a \
......
......@@ -58,9 +58,9 @@ am_sex_OBJECTS = analyse.$(OBJEXT) assoc.$(OBJEXT) astrom.$(OBJEXT) \
clean.$(OBJEXT) extract.$(OBJEXT) fft.$(OBJEXT) \
field.$(OBJEXT) filter.$(OBJEXT) fitswcs.$(OBJEXT) \
flag.$(OBJEXT) graph.$(OBJEXT) growth.$(OBJEXT) \
image.$(OBJEXT) interpolate.$(OBJEXT) main.$(OBJEXT) \
makeit.$(OBJEXT) manobjlist.$(OBJEXT) misc.$(OBJEXT) \
neurro.$(OBJEXT) pattern.$(OBJEXT) pc.$(OBJEXT) \
header.$(OBJEXT) image.$(OBJEXT) interpolate.$(OBJEXT) \
main.$(OBJEXT) makeit.$(OBJEXT) manobjlist.$(OBJEXT) \
misc.$(OBJEXT) neurro.$(OBJEXT) pattern.$(OBJEXT) pc.$(OBJEXT) \
photom.$(OBJEXT) plist.$(OBJEXT) prefs.$(OBJEXT) \
profit.$(OBJEXT) psf.$(OBJEXT) readimage.$(OBJEXT) \
refine.$(OBJEXT) retina.$(OBJEXT) scan.$(OBJEXT) som.$(OBJEXT) \
......@@ -222,22 +222,23 @@ top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
# Program Makefile for SEx
# Copyright (C) 2004-2008 Emmanuel Bertin.
# Copyright (C) 2004-2010 Emmanuel Bertin.
SUBDIRS = fits levmar wcs
sex_SOURCES = analyse.c assoc.c astrom.c back.c bpro.c catout.c \
check.c clean.c extract.c fft.c field.c filter.c \
fitswcs.c flag.c graph.c growth.c image.c \
fitswcs.c flag.c graph.c growth.c header.c image.c \
interpolate.c main.c makeit.c manobjlist.c misc.c \
neurro.c pattern.c pc.c photom.c plist.c prefs.c \
profit.c psf.c readimage.c refine.c retina.c scan.c \
som.c weight.c winpos.c xml.c \
assoc.h astrom.h back.h bpro.h check.h clean.h \
define.h extract.h fft.h field.h filter.h fitswcs.h \
flag.h globals.h growth.h image.h interpolate.h \
key.h neurro.h param.h paramprofit.h pattern.h \
photom.h plist.h prefs.h preflist.h profit.h psf.h \
retina.h sexhead1.h sexhead.h sexheadsc.h som.h \
threads.h types.h wcscelsys.h weight.h winpos.h xml.h
flag.h globals.h growth.h header.h image.h \
interpolate.h key.h neurro.h param.h paramprofit.h \
pattern.h photom.h plist.h prefs.h preflist.h \
profit.h psf.h retina.h sexhead1.h sexhead.h \
sexheadsc.h som.h threads.h types.h wcscelsys.h \
weight.h winpos.h xml.h
ldactoasc_SOURCES = ldactoasc.c ldactoasc.h
sex_LDADD = $(top_builddir)/src/fits/libfits.a \
......@@ -343,6 +344,7 @@ distclean-compile:
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/flag.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/graph.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/growth.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/header.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/image.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/interpolate.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ldactoasc.Po@am__quote@
......
......@@ -9,7 +9,7 @@
*
* Contents: Handling of field structures.
*
* Last modify: 01/10/2009
* Last modify: 05/02/2010
*
*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
*/
......@@ -33,6 +33,7 @@
#include "field.h"
#include "filter.h"
#include "fitswcs.h"
#include "header.h"
#include "interpolate.h"
/********************************* newfield **********************************/
......@@ -45,6 +46,7 @@ picstruct *newfield(char *filename, int flags, int nok)
picstruct *field;
catstruct *cat;
tabstruct *tab;
char *pstr;
int nok2, ntab, margin;
/* Move to nok'th valid FITS image extension */
......@@ -77,27 +79,37 @@ picstruct *newfield(char *filename, int flags, int nok)
else
field->rfilename++;
/* Create a file name with a "header" extension */
strcpy(field->hfilename, filename);
if (!(pstr = strrchr(field->hfilename, '.')))
pstr = field->hfilename+strlen(field->hfilename);
sprintf(pstr, "%s", prefs.head_suffix);
sprintf(gstr, "Looking for %s", field->rfilename);
NFPRINTF(OUTPUT, gstr);
/* Check the image exists and read important info (image size, etc...) */
field->file = cat->file;
field->headflag = !read_aschead(field->hfilename, nok2 - 1, field->tab);
readimagehead(field);
if (cat->ntab>1)
sprintf(gstr, "[%d/%d]", nok2, cat->tab->naxis<2? cat->ntab-1 : cat->ntab);
QPRINTF(OUTPUT, "%s \"%.20s\" %s / %d x %d / %d bits %s data\n",
sprintf(gstr, " [%d/%d]", nok2, cat->tab->naxis<2? cat->ntab-1 : cat->ntab);
QPRINTF(OUTPUT, "----- %s %s%s\n",
flags&FLAG_FIELD? "Flagging from:" :
(flags&(RMS_FIELD|VAR_FIELD|WEIGHT_FIELD)?
"Weighting from:" :
(flags&MEASURE_FIELD? "Measuring from:" :
"Detecting from:")),
field->rfilename,
cat->ntab>1? gstr : "");
QPRINTF(OUTPUT, " \"%.20s\" / %s / %dx%d / %d bits %s\n",
field->ident,
cat->ntab>1? gstr : "",
field->headflag? "EXT. HEADER" : "no ext. header",
field->width, field->height, field->bytepix*8,
field->bitpix>0?
(field->tab->compress_type!=COMPRESS_NONE?"COMPRESSED":"INTEGER")
:"FLOATING POINT");
(field->tab->compress_type!=COMPRESS_NONE?"(compressed)":"(integers)")
:"(floats)");
/* Check the astrometric system and do the setup of the astrometric stuff */
if (prefs.world_flag && (flags & (MEASURE_FIELD|DETECT_FIELD)))
......
/*
header.c
*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
*
* Part of: SExtractor
*
* Author: E.BERTIN (IAP)
*
* Contents: Read extern ASCII headers.
*
* Last modify: 05/02/2010
*
*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
*/
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "define.h"
#include "globals.h"
#include "fits/fitscat.h"
#include "header.h"
#include "prefs.h"
/****** read_aschead ********************************************************
PROTO int read_aschead(char *filename, int frameno, tabstruct *tab)
PURPOSE Read a ASCII header file and update the current field's tab
INPUT Name of the ASCII file,
Frame number (if extensions),
Tab structure.
OUTPUT RETURN_OK if the file was found, RETURN_ERROR otherwise.
NOTES -.
AUTHOR E. Bertin (IAP)
VERSION 05/02/2010
***/
int read_aschead(char *filename, int frameno, tabstruct *tab)
{
char keyword[88],data[88],comment[88], str[88];
FILE *file;
h_type htype;
t_type ttype;
int i, flag;
if ((file=fopen(filename, "r")))
{
/*- Skip previous ENDs in multi-FITS extension headers */
for (i=frameno; i--;)
while (fgets(str, MAXCHAR, file)
&& strncmp(str,"END ",4)
&& strncmp(str,"END\n",4));
memset(str, ' ', 80);
flag = RETURN_ERROR;
while (fgets(str, 81, file) && strncmp(str,"END ",4)
&& strncmp(str,"END\n",4))
{
if (fitspick(str, keyword, data, &htype, &ttype, comment) != RETURN_OK)
{
memset(str, ' ', 80);
continue;
}
/*---- Block critical keywords */
if (!wstrncmp(keyword, "SIMPLE ", 8)
||!wstrncmp(keyword, "BITPIX ", 8)
||!wstrncmp(keyword, "NAXIS ", 8)
||!wstrncmp(keyword, "BSCALE ", 8)
||!wstrncmp(keyword, "BZERO ", 8))
continue;
addkeywordto_head(tab, keyword, comment);
fitswrite(tab->headbuf, keyword, data, htype, ttype);
memset(str, ' ', 80);
flag = RETURN_OK;
}
fclose(file);
/*-- Update the tab data */
readbasic_head(tab);
return flag;
}
else
return RETURN_ERROR;
}
/*
header.h
*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
*
* Part of: SWarp
*
* Author: E.BERTIN (IAP)
*
* Contents: Include file for header.c.
*
* Last modify: 05/02/2010
*
*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
*/
#ifndef _FITSCAT_H_
#include "fits/fitscat.h"
#endif
/*------------------------------- functions ---------------------------------*/
extern int read_aschead(char *filename, int frameno,
tabstruct *tab);
......@@ -483,7 +483,7 @@ void makeit()
if (dwfield)
endfield(dwfield);
QPRINTF(OUTPUT, "Objects: detected %-8d / sextracted %-8d \n",
QPRINTF(OUTPUT, " Objects: detected %-8d / sextracted %-8d \n\n",
thecat.ndetect, thecat.ntotal);
}
......
......@@ -9,7 +9,7 @@
*
* Contents: Keywords for the configuration file.
*
* Last modify: 21/01/2010
* Last modify: 05/02/2010
*
*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
*/
......@@ -94,6 +94,7 @@
{"OR","AND","MIN", "MAX", "MOST",""}, 0, MAXFLAG, &idummy},
{"GAIN", P_FLOAT, &prefs.gain, 0,0, 0.0, 1e+30},
{"GAIN_KEY", P_STRING, prefs.gain_key},
{"HEADER_SUFFIX", P_STRING, prefs.head_suffix},
{"INTERP_MAXXLAG", P_INTLIST, prefs.interp_xtimeout, 1,1000000, 0.0,0.0,
{""}, 1, 2, &prefs.ninterp_xtimeout},
{"INTERP_MAXYLAG", P_INTLIST, prefs.interp_ytimeout, 1,1000000, 0.0,0.0,
......@@ -267,6 +268,7 @@ char *default_prefs[] =
"#----------------------------- Miscellaneous ---------------------------------",
" ",
"VERBOSE_TYPE NORMAL # can be QUIET, NORMAL or FULL",
"HEADER_SUFFIX .head # Filename extension for additional headers",
"WRITE_XML N # Write XML file (Y/N)?",
"XML_NAME sex.xml # Filename for XML output",
"*XSL_URL " XSL_URL,
......
......@@ -9,7 +9,7 @@
*
* Contents: Keywords for the configuration file.
*
* Last modify: 21/01/2010
* Last modify: 05/02/2010
*
*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
*/
......@@ -42,6 +42,7 @@ typedef struct
char *(image_name[2]); /* image filenames */
int nimage_name; /* nb of params */
char cat_name[MAXCHAR]; /* catalog filename*/
char head_suffix[MAXCHAR]; /* ext. header suffix */
/*----- thresholding */
double dthresh[2]; /* detect. threshold */
int ndthresh; /* (1 or 2 entries) */
......
......@@ -9,7 +9,7 @@
*
* Contents: global type definitions.
*
* Last modify: 01/12/2009
* Last modify: 05/02/2010
*
*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
*/
......@@ -494,6 +494,8 @@ typedef struct pic
{
char filename[MAXCHAR]; /* pointer to the image filename */
char *rfilename; /* pointer to the reduced image name */
char hfilename[MAXCHAR]; /* external header filename */
int headflag; /* external header found? */
char ident[MAXCHAR]; /* field identifier (read from FITS)*/
char rident[MAXCHAR]; /* field identifier (relative) */
catstruct *cat; /* FITS structure */
......
......@@ -9,7 +9,7 @@
*
* Contents: XML logging.
*
* Last modify: 21/01/2010
* Last modify: 05/02/2010
*
*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
*/
......@@ -82,7 +82,7 @@ INPUT -.
OUTPUT RETURN_OK if everything went fine, RETURN_ERROR otherwise.
NOTES -.
AUTHOR E. Bertin (IAP)
VERSION 19/12/2007
VERSION 05/02/2010
***/
int update_xml(sexcatstruct *sexcat, picstruct *dfield, picstruct *field,
picstruct *dwfield, picstruct *wfield)
......@@ -94,6 +94,8 @@ int update_xml(sexcatstruct *sexcat, picstruct *dfield, picstruct *field,
"");
x = &xmlstack[nxml++];
x->currext = sexcat->currext;
x->headflag[0] = dfield->headflag;
x->headflag[1] = field->headflag;
x->ndetect = sexcat->ndetect;
x->ntotal = sexcat->ntotal;
strcpy(x->ext_date, sexcat->ext_date);
......@@ -217,7 +219,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 21/01/2010
VERSION 05/02/2010
***/
int write_xml_meta(FILE *file, char *error)
{
......@@ -319,13 +321,16 @@ int write_xml_meta(FILE *file, char *error)
fprintf(file, " <PARAM name=\"NExtensions\" datatype=\"int\""
" ucd=\"meta.number;meta.dataset\" value=\"%d\"/>\n",
nxmlmax);
fprintf(file, " <!-- CurrExtension may differ fromq n_extensions"
fprintf(file, " <!-- CurrExtension may differ from Nextensions"
" if an error occurred -->\n");
fprintf(file, " <PARAM name=\"CurrExtension\" datatype=\"int\""
" ucd=\"meta.number;meta.dataset\" value=\"%d\"/>\n",
nxml);
fprintf(file, " <FIELD name=\"Extension\" datatype=\"int\""
" ucd=\"meta.record\"/>\n");
fprintf(file, " <FIELD name=\"External_Header\" datatype=\"boolean\""
" arraysize=\"%d\" ucd=\"meta.code\"/>\n",
prefs.nimage_name);
fprintf(file, " <FIELD name=\"Date\" datatype=\"char\" arraysize=\"*\""
" ucd=\"meta.record;time.event.end\"/>\n");
fprintf(file, " <FIELD name=\"Time\" datatype=\"char\" arraysize=\"*\""
......@@ -366,7 +371,7 @@ int write_xml_meta(FILE *file, char *error)
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>%c %c</TD><TD>%s</TD><TD>%s</TD><TD>%.0f</TD>"
"<TD>%d</TD><TD>%d</TD>\n"
" <TD>%s,%s</TD><TD>%g %g</TD>\n"
" <TD>%g %g</TD><TD>%g %g</TD><TD>%g %g</TD>"
......@@ -374,6 +379,7 @@ int write_xml_meta(FILE *file, char *error)
" <TD>%g %g</TD><TD>%g %g</TD>\n"
" </TR>\n",
xmlstack[n].currext,
xmlstack[n].headflag[0]?'T':'F',xmlstack[n].headflag[1]?'T':'F',
xmlstack[n].ext_date,
xmlstack[n].ext_time,
xmlstack[n].ext_elapsed,
......@@ -390,13 +396,14 @@ int write_xml_meta(FILE *file, char *error)
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>%c</TD><TD>%s</TD><TD>%s</TD><TD>%.0f</TD>"
"<TD>%d</TD><TD>%d</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].headflag[0]?'T':'F',
xmlstack[n].ext_date,
xmlstack[n].ext_time,
xmlstack[n].ext_elapsed,
......@@ -755,6 +762,10 @@ int write_xml_meta(FILE *file, char *error)
key[findkeys("VERBOSE_TYPE", keylist,
FIND_STRICT)].keylist[prefs.verbose_type]);
fprintf(file,
" <PARAM name=\"Header_Suffix\" datatype=\"char\" arraysize=\"*\""
" ucd=\"meta.dataset;meta.file\" value=\"%s\"/>\n",
prefs.head_suffix);
fprintf(file,
" <PARAM name=\"FITS_Unsigned\" datatype=\"boolean\""
" ucd=\"meta.code;obs.param\" value=\"%c\"/>\n",
......
......@@ -9,7 +9,7 @@
*
* Contents: XML logging.
*
* Last modify: 01/04/2009
* Last modify: 05/02/2010
*
*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
*/
......@@ -31,6 +31,7 @@
typedef struct
{
int currext;
int headflag[2]; /* external headers? */
int ndetect;
int ntotal;
char ext_date[16],ext_time[16]; /* date and time */
......
......@@ -8,7 +8,7 @@
]>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<!-- ****************** Global XSL template for SExtractor ****************
(C) E.Bertin and C.Marmo IAP/CNRS/UPMC 2005-2009
(C) E.Bertin and C.Marmo IAP/CNRS/UPMC 2005-2010
********************************************************************** -->
<xsl:template match="/">
......@@ -35,6 +35,11 @@
mono {font-family: monospace}
elmin {color: green }
elmax {color: red }
elen {
font-family: monospace;
font-weight: bold;
color: green
}
el {
font-family: monospace;
font-size: 100%;
......@@ -69,6 +74,14 @@
color:#d3e7f0;
font-weight: bold;
}
hr {
background-color:#9ABBCA;
border-bottom:1px solid #FFFFFF;
border-left:1px solid #9ABBCA;
border-right:0 none;
border-top:0 none;
height:2px;
}
th {
background-color:#d3e7f0;
border-top: 1px solid white;
......@@ -284,12 +297,14 @@
<!-- ******************* 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="headflag" select="count(FIELD[@name='External_Header']/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="nimage" select="FIELD[@name='Background_Mean']/@arraysize"/>
<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"/>
......@@ -302,7 +317,8 @@
</BUTTON>
<TABLE class="sortable" id="extdata" style="display: none">
<TR>
<TH >Extension</TH>
<TH>Extension</TH>
<TH>Ext.Header</TH>
<TH >Date</TH>
<TH >Time</TH>
<TH >Duration</TH>
......@@ -322,6 +338,39 @@
<td align="center" >
<el><xsl:value-of select="TD[$extension]"/></el>
</td>
<td align="center">
<xsl:choose>
<xsl:when test="$nimage = 2">
<xsl:choose>
<xsl:when test="substring(TD[$headflag],1,1) = 'T'">
<elen>H</elen>
</xsl:when>
<xsl:otherwise>
<el>-</el>
</xsl:otherwise>
</xsl:choose>
<HR/>
<xsl:choose>
<xsl:when test="substring(TD[$headflag],3,1) = 'T'">
<elen>H</elen>
</xsl:when>
<xsl:otherwise>
<el>-</el>
</xsl:otherwise>
</xsl:choose>
</xsl:when>
<xsl:otherwise>
<xsl:choose>
<xsl:when test="TD[$headflag] = 'T'">
<elen>H</elen>
</xsl:when>
<xsl:otherwise>
<el>-</el>
</xsl:otherwise>
</xsl:choose>
</xsl:otherwise>
</xsl:choose>
</td>
<td align="center" >
<el><xsl:value-of select="TD[$date]"/></el>
</td>
......@@ -338,25 +387,88 @@
<el><xsl:value-of select="TD[$nsex]"/></el>
</td>
<td align="center" >
<el><xsl:value-of select="TD[$imid]"/></el>
<xsl:choose>
<xsl:when test="$nimage = 2">
<el><xsl:value-of select="substring-before(TD[$imid], ',')"/></el>
<HR/>
<el><xsl:value-of select="substring-after(TD[$imid], ',')"/></el>
</xsl:when>
<xsl:otherwise>
<el><xsl:value-of select="TD[$imid]"/></el>
</xsl:otherwise>
</xsl:choose>
</td>
<td align="right" >
<el><xsl:value-of select="format-number(TD[$backmean],'#####0.00')"/></el>
<xsl:choose>
<xsl:when test="$nimage = 2">
<el><xsl:value-of select="format-number(substring-before(TD[$backmean], ' '),'#####0.00')"/></el>
<HR/>
<el><xsl:value-of select="format-number(substring-after(TD[$backmean], ' '),'#####0.00')"/></el>
</xsl:when>
<xsl:otherwise>
<el><xsl:value-of select="format-number(TD[$backmean],'#####0.00')"/></el>
</xsl:otherwise>
</xsl:choose>
</td>
<td align="right" >
<el><xsl:value-of select="format-number(TD[$backsig],'###0.000')"/></el>
<xsl:choose>
<xsl:when test="$nimage = 2">
<el><xsl:value-of select="format-number(substring-before(TD[$backsig], ' '),'###0.000')"/></el>
<HR/>
<el><xsl:value-of select="format-number(substring-after(TD[$backsig], ' '),'###0.000')"/></el>
</xsl:when>
<xsl:otherwise>
<el><xsl:value-of select="format-number(TD[$backsig],'###0.000')"/></el>
</xsl:otherwise>
</xsl:choose>
</td>
<td align="right" >
<el><xsl:value-of select="format-number(TD[$thresh],'#####0.00')"/></el>
<xsl:choose>
<xsl:when test="$nimage = 2">
<el><xsl:value-of select="format-number(substring-before(TD[$thresh], ' '),'#####0.00')"/></el>
<HR/>
<el><xsl:value-of select="format-number(substring-after(TD[$thresh], ' '),'#####0.00')"/></el>
</xsl:when>
<xsl:otherwise>
<el><xsl:value-of select="format-number(TD[$thresh],'#####0.00')"/></el>
</xsl:otherwise>
</xsl:choose>
</td>
<td align="right" >
<el><xsl:value-of select="format-number(TD[$wscale],'#####0.00')"/></el>
<xsl:choose>
<xsl:when test="$nimage = 2">
<el><xsl:value-of select="format-number(substring-before(TD[$wscale], ' '),'#####0.00')"/></el>
<HR/>
<el><xsl:value-of select="format-number(substring-after(TD[$wscale], ' '),'#####0.00')"/></el>
</xsl:when>
<xsl:otherwise>
<el><xsl:value-of select="format-number(TD[$wscale],'#####0.00')"/></el>
</xsl:otherwise>
</xsl:choose>
</td>
<td align="right" >
<el><xsl:value-of select="format-number(TD[$pixscale],'#0.000')"/></el>
<xsl:choose>
<xsl:when test="$nimage = 2">
<el><xsl:value-of select="format-number(substring-before(TD[$pixscale], ' '),'#0.000')"/></el>
<HR/>
<el><xsl:value-of select="format-number(substring-after(TD[$pixscale], ' '),'#0.000')"/></el>
</xsl:when>
<xsl:otherwise>
<el><xsl:value-of select="format-number(TD[$pixscale],'#0.000')"/></el>
</xsl:otherwise>
</xsl:choose>
</td>
<td align="center" >
<el><xsl:value-of select="TD[$epoch]"/></el>
<xsl:choose>
<xsl:when test="$nimage = 2">
<el><xsl:value-of select="substring-before(TD[$epoch], ' ')"/></el>
<HR/>
<el><xsl:value-of select="substring-after(TD[$epoch], ' ')"/></el>
</xsl:when>
<xsl:otherwise>
<el><xsl:value-of select="TD[$epoch]"/></el>
</xsl:otherwise>
</xsl:choose>
</td>
</tr>
</xsl:for-each>
......
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