Commit 62858c2c authored by Ole Streicher's avatar Ole Streicher

Merge branch 'upstream' into debian

parents ebc076ec cd74f762
2.7.0 24/10/2015 Updated reflex wkf top level picture id, included Valentin's comments in tutorial, fixed some valgring error on unit tests
2.6.9 02/10/2015 Addressed PIPE-6121 (due to wavcal failure due to wrong addition of FITS keywords)
07/10/2015 Addressed PIPE-6223 (due to wavecal & jitter failures related to addition of wcs)
2.6.8 14/09/2015 Addressed DFS-11239 2.6.8 14/09/2015 Addressed DFS-11239
2.6.7 10/09/2015 2.6.7 10/09/2015
"changed status of parameter SetProductExplorerMode to Triggered" sinfo.xml.in "changed status of parameter SetProductExplorerMode to Triggered" sinfo.xml.in
......
...@@ -41,7 +41,7 @@ PRINTER_NAME=lp ...@@ -41,7 +41,7 @@ PRINTER_NAME=lp
PRINT_FONT=Monospaced:16 PRINT_FONT=Monospaced:16
PRINT_ORIENTATION=P PRINT_ORIENTATION=P
RADEC_CONVERSION=true RADEC_CONVERSION=true
RECIPE_SET=sinfo_rec_detlin=/home/quality/pipelines/sinfo/lib/esopipes-plugins/sinfo-2.6.8/sinfo_rec_detlin.so;sinfo_rec_distortion=/home/quality/pipelines/sinfo/lib/esopipes-plugins/sinfo-2.6.8/sinfo_rec_distortion.so;sinfo_rec_jitter=/home/quality/pipelines/sinfo/lib/esopipes-plugins/sinfo-2.6.8/sinfo_rec_jitter.so;sinfo_rec_mdark=/home/quality/pipelines/sinfo/lib/esopipes-plugins/sinfo-2.6.8/sinfo_rec_mdark.so;sinfo_rec_mflat=/home/quality/pipelines/sinfo/lib/esopipes-plugins/sinfo-2.6.8/sinfo_rec_mflat.so;sinfo_rec_pupil=/home/quality/pipelines/sinfo/lib/esopipes-plugins/sinfo-2.6.8/sinfo_rec_pupil.so;sinfo_rec_wavecal=/home/quality/pipelines/sinfo/lib/esopipes-plugins/sinfo-2.6.8/sinfo_rec_wavecal.so;sinfo_utl_bp_mask_add=/home/quality/pipelines/sinfo/lib/esopipes-plugins/sinfo-2.6.8/sinfo_utl_bp_mask_add.so;sinfo_utl_cube2ima=/home/quality/pipelines/sinfo/lib/esopipes-plugins/sinfo-2.6.8/sinfo_utl_cube2ima.so;sinfo_utl_cube_combine=/home/quality/pipelines/sinfo/lib/esopipes-plugins/sinfo-2.6.8/sinfo_utl_cube_combine.so;sinfo_utl_cube2spectrum=/home/quality/pipelines/sinfo/lib/esopipes-plugins/sinfo-2.6.8/sinfo_utl_cube2spectrum.so;sinfo_utl_cube_arith=/home/quality/pipelines/sinfo/lib/esopipes-plugins/sinfo-2.6.8/sinfo_utl_cube_arith.so;sinfo_utl_ima_arith=/home/quality/pipelines/sinfo/lib/esopipes-plugins/sinfo-2.6.8/sinfo_utl_ima_arith.so;sinfo_utl_skycor=/home/quality/pipelines/sinfo/lib/esopipes-plugins/sinfo-2.6.8/sinfo_utl_skycor.so;sinfo_utl_skymap=/home/quality/pipelines/sinfo/lib/esopipes-plugins/sinfo-2.6.8/sinfo_utl_skymap.so;sinfo_utl_spectrum_divide_by_blackbody=/home/quality/pipelines/sinfo/lib/esopipes-plugins/sinfo-2.6.8/sinfo_utl_spectrum_divide_by_blackbody.so;sinfo_utl_spectrum_wavelength_shift=/home/quality/pipelines/sinfo/lib/esopipes-plugins/sinfo-2.6.8/sinfo_utl_spectrum_wavelength_shift.so RECIPE_SET=sinfo_rec_detlin=/home/quality/pipelines/sinfo/lib/esopipes-plugins/sinfo-2.7.0/sinfo_rec_detlin.so;sinfo_rec_distortion=/home/quality/pipelines/sinfo/lib/esopipes-plugins/sinfo-2.7.0/sinfo_rec_distortion.so;sinfo_rec_jitter=/home/quality/pipelines/sinfo/lib/esopipes-plugins/sinfo-2.7.0/sinfo_rec_jitter.so;sinfo_rec_mdark=/home/quality/pipelines/sinfo/lib/esopipes-plugins/sinfo-2.7.0/sinfo_rec_mdark.so;sinfo_rec_mflat=/home/quality/pipelines/sinfo/lib/esopipes-plugins/sinfo-2.7.0/sinfo_rec_mflat.so;sinfo_rec_pupil=/home/quality/pipelines/sinfo/lib/esopipes-plugins/sinfo-2.7.0/sinfo_rec_pupil.so;sinfo_rec_wavecal=/home/quality/pipelines/sinfo/lib/esopipes-plugins/sinfo-2.7.0/sinfo_rec_wavecal.so;sinfo_utl_bp_mask_add=/home/quality/pipelines/sinfo/lib/esopipes-plugins/sinfo-2.7.0/sinfo_utl_bp_mask_add.so;sinfo_utl_cube2ima=/home/quality/pipelines/sinfo/lib/esopipes-plugins/sinfo-2.7.0/sinfo_utl_cube2ima.so;sinfo_utl_cube_combine=/home/quality/pipelines/sinfo/lib/esopipes-plugins/sinfo-2.7.0/sinfo_utl_cube_combine.so;sinfo_utl_cube2spectrum=/home/quality/pipelines/sinfo/lib/esopipes-plugins/sinfo-2.7.0/sinfo_utl_cube2spectrum.so;sinfo_utl_cube_arith=/home/quality/pipelines/sinfo/lib/esopipes-plugins/sinfo-2.7.0/sinfo_utl_cube_arith.so;sinfo_utl_ima_arith=/home/quality/pipelines/sinfo/lib/esopipes-plugins/sinfo-2.7.0/sinfo_utl_ima_arith.so;sinfo_utl_skycor=/home/quality/pipelines/sinfo/lib/esopipes-plugins/sinfo-2.7.0/sinfo_utl_skycor.so;sinfo_utl_skymap=/home/quality/pipelines/sinfo/lib/esopipes-plugins/sinfo-2.7.0/sinfo_utl_skymap.so;sinfo_utl_spectrum_divide_by_blackbody=/home/quality/pipelines/sinfo/lib/esopipes-plugins/sinfo-2.7.0/sinfo_utl_spectrum_divide_by_blackbody.so;sinfo_utl_spectrum_wavelength_shift=/home/quality/pipelines/sinfo/lib/esopipes-plugins/sinfo-2.7.0/sinfo_utl_spectrum_wavelength_shift.so
SCRIPTS_DIR=/home/astro4/gasgano/scripts/gas-scripts SCRIPTS_DIR=/home/astro4/gasgano/scripts/gas-scripts
SHORTEN_FILES_PATH=false SHORTEN_FILES_PATH=false
SHORT_FILENAME=true SHORT_FILENAME=true
......
#! /bin/sh #! /bin/sh
# Guess values for system-dependent variables and create Makefiles. # Guess values for system-dependent variables and create Makefiles.
# Generated by GNU Autoconf 2.69 for SINFONI Instrument Pipeline 2.6.8. # Generated by GNU Autoconf 2.69 for SINFONI Instrument Pipeline 2.7.0.
# #
# Report bugs to <usd-help@eso.org>. # Report bugs to <usd-help@eso.org>.
# #
...@@ -590,8 +590,8 @@ MAKEFLAGS= ...@@ -590,8 +590,8 @@ MAKEFLAGS=
# Identity of this package. # Identity of this package.
PACKAGE_NAME='SINFONI Instrument Pipeline' PACKAGE_NAME='SINFONI Instrument Pipeline'
PACKAGE_TARNAME='sinfo' PACKAGE_TARNAME='sinfo'
PACKAGE_VERSION='2.6.8' PACKAGE_VERSION='2.7.0'
PACKAGE_STRING='SINFONI Instrument Pipeline 2.6.8' PACKAGE_STRING='SINFONI Instrument Pipeline 2.7.0'
PACKAGE_BUGREPORT='usd-help@eso.org' PACKAGE_BUGREPORT='usd-help@eso.org'
PACKAGE_URL='' PACKAGE_URL=''
...@@ -1376,7 +1376,7 @@ if test "$ac_init_help" = "long"; then ...@@ -1376,7 +1376,7 @@ if test "$ac_init_help" = "long"; then
# Omit some internal or obsolete options to make the list less imposing. # 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. # This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF cat <<_ACEOF
\`configure' configures SINFONI Instrument Pipeline 2.6.8 to adapt to many kinds of systems. \`configure' configures SINFONI Instrument Pipeline 2.7.0 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]... Usage: $0 [OPTION]... [VAR=VALUE]...
...@@ -1447,7 +1447,7 @@ fi ...@@ -1447,7 +1447,7 @@ fi
if test -n "$ac_init_help"; then if test -n "$ac_init_help"; then
case $ac_init_help in case $ac_init_help in
short | recursive ) echo "Configuration of SINFONI Instrument Pipeline 2.6.8:";; short | recursive ) echo "Configuration of SINFONI Instrument Pipeline 2.7.0:";;
esac esac
cat <<\_ACEOF cat <<\_ACEOF
...@@ -1575,7 +1575,7 @@ fi ...@@ -1575,7 +1575,7 @@ fi
test -n "$ac_init_help" && exit $ac_status test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then if $ac_init_version; then
cat <<\_ACEOF cat <<\_ACEOF
SINFONI Instrument Pipeline configure 2.6.8 SINFONI Instrument Pipeline configure 2.7.0
generated by GNU Autoconf 2.69 generated by GNU Autoconf 2.69
Copyright (C) 2012 Free Software Foundation, Inc. Copyright (C) 2012 Free Software Foundation, Inc.
...@@ -1990,7 +1990,7 @@ cat >config.log <<_ACEOF ...@@ -1990,7 +1990,7 @@ cat >config.log <<_ACEOF
This file contains any messages produced by compilers while This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake. running configure, to aid debugging if configure makes a mistake.
It was created by SINFONI Instrument Pipeline $as_me 2.6.8, which was It was created by SINFONI Instrument Pipeline $as_me 2.7.0, which was
generated by GNU Autoconf 2.69. Invocation command line was generated by GNU Autoconf 2.69. Invocation command line was
$ $0 $@ $ $0 $@
...@@ -2969,7 +2969,7 @@ fi ...@@ -2969,7 +2969,7 @@ fi
# Define the identity of the package. # Define the identity of the package.
PACKAGE='sinfo' PACKAGE='sinfo'
VERSION='2.6.8' VERSION='2.7.0'
cat >>confdefs.h <<_ACEOF cat >>confdefs.h <<_ACEOF
...@@ -14932,7 +14932,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 ...@@ -14932,7 +14932,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
# report actual input values of CONFIG_FILES etc. instead of their # report actual input values of CONFIG_FILES etc. instead of their
# values after options handling. # values after options handling.
ac_log=" ac_log="
This file was extended by SINFONI Instrument Pipeline $as_me 2.6.8, which was This file was extended by SINFONI Instrument Pipeline $as_me 2.7.0, which was
generated by GNU Autoconf 2.69. Invocation command line was generated by GNU Autoconf 2.69. Invocation command line was
CONFIG_FILES = $CONFIG_FILES CONFIG_FILES = $CONFIG_FILES
...@@ -14998,7 +14998,7 @@ _ACEOF ...@@ -14998,7 +14998,7 @@ _ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
ac_cs_version="\\ ac_cs_version="\\
SINFONI Instrument Pipeline config.status 2.6.8 SINFONI Instrument Pipeline config.status 2.7.0
configured by $0, generated by GNU Autoconf 2.69, configured by $0, generated by GNU Autoconf 2.69,
with options \\"\$ac_cs_config\\" with options \\"\$ac_cs_config\\"
......
# Process this file with autoconf to produce a configure script. # Process this file with autoconf to produce a configure script.
AC_INIT([SINFONI Instrument Pipeline], [2.6.8], [usd-help@eso.org], [sinfo]) AC_INIT([SINFONI Instrument Pipeline], [2.7.0], [usd-help@eso.org], [sinfo])
AC_PREREQ([2.59]) AC_PREREQ([2.59])
......
...@@ -384,9 +384,9 @@ sinfo_cube_create(cpl_parameterlist * parameters, cpl_frameset * frames) ...@@ -384,9 +384,9 @@ sinfo_cube_create(cpl_parameterlist * parameters, cpl_frameset * frames)
float* distances=NULL; float* distances=NULL;
float* correct_dist=NULL; float* correct_dist=NULL;
char kernel[80]; char kernel[80];
char poly_file[80]; char poly_file[256];
char pos_list[80]; char pos_list[256];
char dist_list[80]; char dist_list[256];
int ns_index=0; int ns_index=0;
...@@ -410,6 +410,7 @@ sinfo_cube_create(cpl_parameterlist * parameters, cpl_frameset * frames) ...@@ -410,6 +410,7 @@ sinfo_cube_create(cpl_parameterlist * parameters, cpl_frameset * frames)
check_nomsg(p=cpl_parameterlist_find(parameters, check_nomsg(p=cpl_parameterlist_find(parameters,
"sinfoni.objnod.kernel_type")); "sinfoni.objnod.kernel_type"));
check_nomsg(strcpy(kernel,cpl_parameter_get_string(p))); check_nomsg(strcpy(kernel,cpl_parameter_get_string(p)));
check_nomsg(p=cpl_parameterlist_find(parameters,"sinfoni.objnod.n_coeffs")); check_nomsg(p=cpl_parameterlist_find(parameters,"sinfoni.objnod.n_coeffs"));
...@@ -473,7 +474,6 @@ sinfo_cube_create(cpl_parameterlist * parameters, cpl_frameset * frames) ...@@ -473,7 +474,6 @@ sinfo_cube_create(cpl_parameterlist * parameters, cpl_frameset * frames)
cpl_image_save(ima_obj_mflat,"ima_obj_mflat.fits", CPL_BPP_IEEE_FLOAT, cpl_image_save(ima_obj_mflat,"ima_obj_mflat.fits", CPL_BPP_IEEE_FLOAT,
NULL,CPL_IO_DEFAULT); NULL,CPL_IO_DEFAULT);
//The following is not needed //The following is not needed
cknull_nomsg(ima_mflat_dist=sinfo_new_image_warp_fits(ima_mflat,kernel, cknull_nomsg(ima_mflat_dist=sinfo_new_image_warp_fits(ima_mflat,kernel,
poly_file)); poly_file));
......
...@@ -38,6 +38,7 @@ noinst_HEADERS = \ ...@@ -38,6 +38,7 @@ noinst_HEADERS = \
sinfo_dump.h \ sinfo_dump.h \
sinfo_fit.h \ sinfo_fit.h \
sinfo_utils_wrappers.h \ sinfo_utils_wrappers.h \
sinfo_boltzmann.h \
sinfo_hidden.h \ sinfo_hidden.h \
sinfo_stacked_hidden_config.h \ sinfo_stacked_hidden_config.h \
sinfo_skycor_config.h \ sinfo_skycor_config.h \
......
...@@ -472,6 +472,7 @@ noinst_HEADERS = \ ...@@ -472,6 +472,7 @@ noinst_HEADERS = \
sinfo_dump.h \ sinfo_dump.h \
sinfo_fit.h \ sinfo_fit.h \
sinfo_utils_wrappers.h \ sinfo_utils_wrappers.h \
sinfo_boltzmann.h \
sinfo_hidden.h \ sinfo_hidden.h \
sinfo_stacked_hidden_config.h \ sinfo_stacked_hidden_config.h \
sinfo_skycor_config.h \ sinfo_skycor_config.h \
......
This diff is collapsed.
...@@ -56,28 +56,11 @@ ...@@ -56,28 +56,11 @@
float float
sinfo_new_edge(float * xdat, float * parlist/*, int * npar, int * ndat */) ; sinfo_new_edge(float * xdat, float * parlist/*, int * npar, int * ndat */) ;
float
sinfo_new_boltz ( float * xdat, float * parlist ) ;
cpl_error_code cpl_error_code
sinfo_new_edge_deriv(float * xdat, sinfo_new_edge_deriv(float * xdat,
float * parlist, float * dervs/*, int * npar */) ; float * parlist, float * dervs/*, int * npar */) ;
cpl_error_code
sinfo_new_boltz_deriv( float * xdat, float * parlist, float * dervs ) ;
int sinfo_new_lsqfit ( float * xdat,
int * xdim,
float * ydat,
float * wdat,
int * ndat,
float * fpar,
float * epar,
int * mpar,
int * npar,
float * tol ,
int * its ,
float * lab ) ;
int int
sinfo_new_lsqfit_edge ( float * xdat, sinfo_new_lsqfit_edge ( float * xdat,
...@@ -101,32 +84,7 @@ sinfo_new_fit_slits_edge( cpl_image * lineImage, ...@@ -101,32 +84,7 @@ sinfo_new_fit_slits_edge( cpl_image * lineImage,
float y_box, float y_box,
float diff_tol ) ; float diff_tol ) ;
int int
sinfo_new_fit_slits_boltz( cpl_image * lineImage,
FitParams ** par,
float ** sinfo_slit_pos,
int box_length,
float y_box,
float diff_tol ) ;
int
sinfo_new_fit_slits_boltz_single_line ( cpl_image * lineImage,
float ** sinfo_slit_pos,
int box_length,
float y_box,
int low_pos,
int high_pos ) ;
int
sinfo_new_fit_slits_boltz_with_estimate ( cpl_image * lineImage,
float ** sinfo_slit_pos,
int box_length,
float y_box,
float diff_tol,
int low_pos,
int high_pos ) ;
int
sinfo_new_fit_slits_edge_with_estimate ( cpl_image * lineImage, sinfo_new_fit_slits_edge_with_estimate ( cpl_image * lineImage,
float ** sinfo_slit_pos, float ** sinfo_slit_pos,
int box_length, int box_length,
...@@ -135,5 +93,6 @@ sinfo_new_fit_slits_edge_with_estimate ( cpl_image * lineImage, ...@@ -135,5 +93,6 @@ sinfo_new_fit_slits_edge_with_estimate ( cpl_image * lineImage,
int low_pos, int low_pos,
int high_pos ) ; int high_pos ) ;
#endif /*!SINFO_ABSOLUTE_H*/ #endif /*!SINFO_ABSOLUTE_H*/
/**@}*/ /**@}*/
This diff is collapsed.
/*
* This file is part of the ESO SINFONI Pipeline
* Copyright (C) 2004,2005 European Southern Observatory
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, 51 Franklin St, Fifth Floor, Boston, MA 02111-1307 USA
*/
/*****************************************************************************
* E.S.O. - VLT project
*
* "@(#) $Id: sinfo_absolute.h,v 1.3 2007-08-20 10:01:05 amodigli Exp $"
*
* who when what
* -------- -------- ----------------------------------------------
* schreib 14/11/00 created
*/
#ifndef SINFO_BOLTZMANN_H
#define SINFO_BOLTZMANN_H
/**
* @addtogroup sinfo_boltzmann
*
*/
/*----------------------------------------------------------------------------*/
/************************************************************************
* boltzmann.h
* routines to determine the absolute positions of the slitlets out of
* an emission line frame
*----------------------------------------------------------------------
*/
/*
* header files
*/
#include <cpl.h>
#include "sinfo_spectrum_ops.h"
#include "sinfo_msg.h"
#include "sinfo_recipes.h"
/*----------------------------------------------------------------------------
* Function ANSI C prototypes
*--------------------------------------------------------------------------*/
float
sinfo_new_boltz ( float * xdat, float * parlist ) ;
cpl_error_code
sinfo_new_boltz_deriv( float * xdat, float * parlist, float * dervs ) ;
int sinfo_new_lsqfit ( float * xdat,
int * xdim,
float * ydat,
float * wdat,
int * ndat,
float * fpar,
float * epar,
int * mpar,
int * npar,
float * tol ,
int * its ,
float * lab );
int
sinfo_new_fit_slits_boltz( cpl_image * lineImage,
FitParams ** par,
float ** sinfo_slit_pos,
int box_length,
float y_box,
float diff_tol ) ;
int
sinfo_new_fit_slits_boltz_with_estimate ( cpl_image * lineImage,
float ** sinfo_slit_pos,
int box_length,
float y_box,
float diff_tol,
int low_pos,
int high_pos ) ;
#endif /*!SINFO_BOLTZMANN_H*/
/**@}*/
This diff is collapsed.
...@@ -45,105 +45,6 @@ ...@@ -45,105 +45,6 @@
/*---------------------------------------------------------------------------- /*----------------------------------------------------------------------------
* Function ANSI C prototypes * Function ANSI C prototypes
*--------------------------------------------------------------------------*/ *--------------------------------------------------------------------------*/
/*----------------------------------------------------------------------------
@name sinfo_new_slope_of_spectrum()
@param ns_image image with at least one continuum spectrum of a pinhole
@param box_length width of the box in which the lines are fit by a Gaussian
@param fwhm first guess of the full width at half maximum
@param min_amplitude_factor factor peak/background below given threshold
the fit is not carried through
@return slope of a straight line fitted to the spectrum. -FLT_MAX if
something went wrong.
@doc determines the sub-pixel shifts of each row by using an image with
at least one continuum spectrum of a pinhole this is done by
searching the spectrum within the image then fitting the spectrum
along the rows within a given box by a Gaussian, so that the exact
position is determined for each row. Afterwards, a straight line is
fitted through the fitted positions. The slope of this linear fit
is returned.
*/
float
sinfo_new_slope_of_spectrum(cpl_image * ns_image,
int box_length,
float fwhm,
float min_amplitude_factor ) ;
/**
@name sinfo_new_shift_rows()
@param image raw image in which the rows should be shifted
@param slope slope of a fitted straight line along a spectrum
output of sinfo_slopeOfSpectrum
@param n_order order of the interpolation polynom
@return resulting image with shifted rows
@doc shifts the rows of a raw image by using the output of
sinfo_slopeOfSpectrum and applying polynomial interpolation
*/
cpl_image *
sinfo_new_shift_rows(cpl_image * image,
float slope,
int n_order ) ;
/**
@name sinfo_new_parameter_to_ascii()
@memo stores parameters in an ASCII file
@param parameter float parameter array to be stored in an ASCII file
@param number number of parameters
@param filename filename of ASCII file
@return void
*/
void
sinfo_new_parameter_to_ascii ( float * parameter,
int n,
char * filename ) ;
/**
@name sinfo_new_ascii_to_parameter()
@param filename filename of ASCII file
@param n number of parameters in the parameter array array of parameters
@doc writes parameters stored in an ASCII file in an float array
*/
float *
sinfo_new_ascii_to_parameter ( char * filename,
int * n ) ;
/**
@name sinfo_new_curvature_of_spectrum()
@param ns_image image with at least one continuum spectrum of a pinhole
@param order order of the fit polynomial
@param box_length width of the box in which the lines are fit by a Gaussian
@param left_pos
@param right_pos left and right positions between which the spectrum should
be located
@param fwhm first guess of the full width at half maximum
@param min_amplitude_factor factor peak/background below given
threshold the fit is not carried through
@return resulting polynomial coefficients.
@doc this routine determines the curvature of a spectrum by fitting
a polynomial to a continuum spectrum. This is done by using
an image with at least one continuum spectrum of a pinhole.
this is done by searching the spectrum within the image
then fitting the spectrum along the rows within a given box
by a sinfo_gaussian, so that the exact position is determined for
each row. Afterwards, a polynomial is fitted through the
found positions. The polynomial coefficients are returned.
*/
double *
sinfo_new_curvature_of_spectrum(cpl_image * ns_image,
int order,
int box_length,
int left_pos,
int right_pos,
float fwhm,
float min_amplitude_factor ) ;
/** /**
@name sinfo_new_image_warp_fits @name sinfo_new_image_warp_fits
...@@ -155,8 +56,8 @@ sinfo_new_curvature_of_spectrum(cpl_image * ns_image, ...@@ -155,8 +56,8 @@ sinfo_new_curvature_of_spectrum(cpl_image * ns_image,
*/ */
cpl_image * cpl_image *
sinfo_new_image_warp_fits(cpl_image * image, sinfo_new_image_warp_fits(cpl_image * image,
char * kernel_type, const char * kernel_type,
char * poly_table ); const char * poly_table );
#endif /*!SINFO_COLTILT_H*/ #endif /*!SINFO_COLTILT_H*/
This diff is collapsed.
...@@ -85,34 +85,6 @@ sinfo_north_south_test( cpl_image * ns_image, ...@@ -85,34 +85,6 @@ sinfo_north_south_test( cpl_image * ns_image,
int bottom ) ; int bottom ) ;
/**
@name sinfo_new_make_cube()
@memo makes a data cube out of a resampled source image
@param calibImage: resampled source image
@param distances: distances of the slitlets from each other
output of function ns_test
@param correct_diff_dist: dummy array with 32 elements
@return resulting source data cube
@note correct_diff_dist: differences of the slitlets from
distance 32 given in the correct
Spiffi sequence. The first slitlet
is the reference, therefore element
23 is set 0.
@doc makes a data cube out of a resampled source image
this SPIFFI specific routine takes into account the
Spiffi slitlet order on the detector.
Also shifts the resulting image rows by one pixel if
necessary according to the distances array gained from
the north-south test routine.
Can do the same with the bad pixel map image to generate a
bad pixel mask cube.
*/
cpl_imagelist *
sinfo_new_make_cube ( cpl_image * calibImage,
float * distances,
float * correct_diff_dist ) ;
/** /**
@name sinfo_new_make_cube_spi() @name sinfo_new_make_cube_spi()
@param calibImage resampled source image @param calibImage resampled source image
...@@ -168,121 +140,6 @@ sinfo_new_make_cube_dist ( cpl_image * calibImage, ...@@ -168,121 +140,6 @@ sinfo_new_make_cube_dist ( cpl_image * calibImage,
float * shift ) ; float * shift ) ;
/**
@name sinfo_new_make_3D_cube_dist()
@param calibImage resampled source image
@param firstCol floating point value of the first column of
the first slitlet in the resampled image,
determined "by hand"
@param distances distances of the slitlets from each other
output of function ns_test
@param shift dummy array with 32 elements
@return resulting source data cube
@note shift differences of the slitlets from
distance 32 given in the correct
Spiffi row sequence. The first slitlet
is the reference, therefore element
23 is set 0.
@doc makes a data cube out of a resampled source image
this 3D specific routine takes into account the
3D slitlet order on the detector.
Also shifts the resulting image rows by one pixel if
necessary according to the distances array gained from
the north-south test routine.
Can do the same with the bad pixel map image to generate a
bad pixel mask cube.
*/
cpl_imagelist *
sinfo_new_make_3D_cube_dist ( cpl_image * calibImage,
float firstCol,
float * distances,
float * shift ) ;
/**
@name sinfo_new_make_3D_cube()
@param calibImage resampled source image
@param kpixshift integer pixel shifts of the resulting image
plane rows.
@param kpixfirst first valid pixel
@result resulting source data cube
@doc makes a data cube out of a resampled source image
this MPE 3D specific routine takes into account the
3D slitlet order on the detector.
Also shifts the resulting image row by an integer pixel shift if
necessary according to the input kpixshift array
Can do the same with the bad pixel map image to generate a
bad pixel mask cube.
*/
cpl_imagelist *
sinfo_new_make_3D_cube ( cpl_image * calibImage,
int * kpixshift,
int kpixfirst ) ;
/**
@name sinfo_new_determine_mask_cube()
@memo converts resampled bad pixels to real bad pixels in data cubes.
@param sourceMaskCube bad pixel mask cube generated by using
the bad pixel mask frame (0: bad, 1: good)
and going through the same reduction steps
as with the observation frame.
@param lowLimit low limit of pixel value (about -0.7)
@param highLimit high limit of bad pixel value (about 0.7)
@result resulting bad pixel data cube (bad pixels: 0, good pixels: 1).
*/
cpl_imagelist *
sinfo_new_determine_mask_cube ( cpl_imagelist * sourceMaskCube,
float lowLimit,
float highLimit ) ;
/**
@name sinfo_new_interpol_cube()
@param sourceCube reconstructed source cube from sinfo_makeCube
without fine tuning of rows
@param maskCube bad pixel mask cube, bad pixel are marked
with 0., good and interpolated pixels with 1.
this maskCube is changed within the routine
if a bad pixel was interpolated.
@param n_neighbors number of neighbors in one spectral direction
with which the bad pixel will be interpolated (7)
@param max_radius maximal pixel radius within an image plane
inside which valid pixels are searched to
be used for interpolation. If there aren't
found 9 good neighboring pixels within this
radius the loop is left. (5)
@result resulting interpolated data cube.
changed maskCube at the positions of the interpolated pixels
@doc Bad pixel interpolation 3D like (saturated pixels exist):
interpolates the bad pixels of the source cube by
using the nearest neighbors.
first it is checked if the bad pixel is interpolatable:
it is only interpolatable if the number of good pixels
in its spectrum of length 2*n_neighbors+1 exceeds 3 and
if there is at least one good pixel on either side of the
central pixel.
Afterwards good neighboring pixels are searched within the
image plane of the bad pixel by using an increasing pixel radius.
Good pixels mean, the corresponding spectral pixels of the
bad pixel and its spatial neighboring pixel must have
at least 2 valid pixel pairs to be able to be used for
the interpolation. The search is stopped if 9 valid neighboring
pixels are found.
Now normalize the found spectral values, collect the valid pixels
(there must be at least 18) and take the sinfo_median of the valid
pixels with which the bad pixel is replaced.
*/
cpl_imagelist *
sinfo_new_interpol_cube ( cpl_imagelist * sourceCube,
cpl_imagelist * maskCube,
int n_neighbors, /* 7 */
int max_radius ) ; /* 5 */
/** /**
@name sinfo_new_fine_tune_cube() @name sinfo_new_fine_tune_cube()
...@@ -368,39 +225,4 @@ cpl_imagelist * ...@@ -368,39 +225,4 @@ cpl_imagelist *
sinfo_new_fine_tune_cube_by_spline ( cpl_imagelist * cube, sinfo_new_fine_tune_cube_by_spline ( cpl_imagelist * cube,
float * correct_diff_dist ) ; float * correct_diff_dist ) ;
/**
@name sinfo_new_calibrate_ns_test()
@param ns_image: north-south image
@param n_slitlets: number of slitlets
@param halfWidth: half width of the box in which the lines
are fit by a sinfo_gaussian
@param fwhm: first guess of the full width at half maximum
@param minDiff: minimum amplitude below which the fit
will not be carried through
@param estimated_dist: estimated average distance of spectra
@param devtol: maximal pixel deviation of the distances from
slitlet center
@return array of the distances of the slitlets from each other
@doc determines the distances of the spectra from the center
of the slitlets to be able to find the correct angle of
the north-south entrance slit.
*/
float *
sinfo_new_calibrate_ns_test( cpl_image * ns_image,