#ifndef TA_COSMIC_H
#define TA_COSMIC_H

#ifdef __cplusplus
extern "C" {
#endif

/* HARDWIRED: we'll hardwire values to use for the cosmic color and scatter
 * both for objects and sky.  These values are used both when applying
 * photometric and astrometric calibrations.  The sky values should rarely
 * be used, since all sky measurements should be pretty good.
 */

/* Cosmic colors and scatter for objects (order u-g, g-r, r-i, i-z).
 * The cosmic color is the median color for objects in the magnitude range
 * 19 < r' < 20 for run 752, column 3, rerun 1, fields 11-100 (4428 objects,
 * galactic latitude ~ 42 deg).  The cosmic scatter is the sigma for the color
 * distribution for the same set of stars.
 * NOTE: the code that sets the cosmic mags in calls to atCosmicMagScatterSet()
 * works only if the scatter decreases along the cosmicScatter array
 * (that is, cosmicScatter[i] > cosmicScatter[i+1]).
 */
static const double cosmicColor[4] = {1.42, 1.11, 0.48, 0.35};
static const double cosmicScatter[4] = {0.82, 0.46, 0.34, 0.22};

/* Cosmic colors and scatter for the sky (order u-g, g-r, r-i, i-z) */
static const double cosmicSkyColor[4] = {0.4, 1.0, 0.8, 1.5};
static const double cosmicSkyScatter[4] = {0.2, 0.2, 0.2, 0.5};

/* Cosmic color to use for each filter (order u, g, r, i, z) */
static const int cosmicIdx[5] = {0, 1, 2, 3, 3}; 

/* prototypes */
void taTransCosmicSet(const double cosmicColor[4],
		      const double cosmicScatter[4]);

#ifdef __cplusplus
}
#endif

#endif
