/* -*- Mode: C; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* vim:set sw=2 sts=2 et cin: */
/* 
 * This file is part of the MUSE Instrument Pipeline
 * Copyright (C) 2005-2014 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, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
 */

/* This file was automatically generated */

#ifndef MUSE_CREATE_SKY_Z_H
#define MUSE_CREATE_SKY_Z_H

/*----------------------------------------------------------------------------*
 *                              Includes                                      *
 *----------------------------------------------------------------------------*/
#include <muse.h>
#include <muse_instrument.h>

/*----------------------------------------------------------------------------*
 *                          Special variable types                            *
 *----------------------------------------------------------------------------*/

/** @addtogroup recipe_muse_create_sky */
/**@{*/

/*----------------------------------------------------------------------------*/
/**
  @brief   Structure to hold the parameters of the muse_create_sky recipe.

  This structure contains the parameters for the recipe that may be set on the
  command line, in the configuration, or through the environment.
 */
/*----------------------------------------------------------------------------*/
typedef struct muse_create_sky_params_s {
  /** @brief   Fraction of the image to be considered as sky. If an input sky mask is provided, the fraction is applied to the regions within the mask. If the whole sky mask should be used, set this parameter to 1. */
  double fraction;

  /** @brief   Spectral sampling of the sky spectrum [Angstrom]. */
  double sampling;

  /** @brief   Spectral sampling of the continuum spectrum [Angstrom]. */
  double csampling;

  /** @brief   Type of cosmic ray cleaning to use. "Cube" is the standard CR cleaning which works on a datacube, "spectrum" uses sigma clipping on the spectrum. */
  int cr;
  /** @brief   Type of cosmic ray cleaning to use. "Cube" is the standard CR cleaning which works on a datacube, "spectrum" uses sigma clipping on the spectrum. (as string) */
  const char *cr_s;

  /** @brief   Cut off the data below this wavelength after loading the pixel table(s). */
  double lambdamin;

  /** @brief   Cut off the data above this wavelength after loading the pixel table(s). */
  double lambdamax;

  /** @brief   Reference wavelength used for correction of differential atmospheric refraction. The R-band (peak wavelength ~7000 Angstrom) that is usually used for guiding, is close to the central wavelength of MUSE, so a value of 7000.0 Angstrom should be used if nothing else is known. A value less than zero switches DAR correction off. */
  double lambdaref;

  char __dummy__; /* quieten compiler warning about possibly empty struct */
} muse_create_sky_params_t;

#define MUSE_CREATE_SKY_PARAM_CR_NONE 1
#define MUSE_CREATE_SKY_PARAM_CR_CUBE 2
#define MUSE_CREATE_SKY_PARAM_CR_SPECTRUM 3
#define MUSE_CREATE_SKY_PARAM_CR_INVALID_VALUE -1

/**@}*/

/*----------------------------------------------------------------------------*
 *                           Function prototypes                              *
 *----------------------------------------------------------------------------*/
int muse_create_sky_compute(muse_processing *, muse_create_sky_params_t *);

#endif /* MUSE_CREATE_SKY_Z_H */
