/** @file ippToPsps.h
 *
 *  @brief ippToPsps
 *
 *  @ingroup ippToPsps
 *
 *  @author IfA
 *  Copyright 2009 Institute for Astronomy, University of Hawaii
 */

#ifndef IPPTOPSPS_H
#define IPPTOPSPS_H

#include <psmodules.h>
#include <dvo_util.h>
#include "ippToPspsConfig.h"

#define MAXDETECT 30000 //TODO limit ok?

// ippToPsps struct
typedef struct {

    uint32_t expId;            // the exposure ID to be used
    uint8_t product;           // IPP data product
    psString fitsInPath;       // path to FITS input
    psString resultsPath;      // path to results file
    FILE* resultsFile;         // file for results  
    uint16_t numOfInputFiles;  // number of input files
    char** inputFiles;         // array of input file names
    psString fitsOutPath;      // path to FITS output
    fitsfile *fitsOut;         // output FITS file
    psString configsDir;       // path to IPP/PSPS mapping file
    pmConfig* pmconfig;        // pmConfig
    dvoConfig* dvoConfig;      // dvo database
    IppToPspsConfig* config;   // config structure
    int exitCode;              // ps exit code

    int (*run)();

} IppToPsps;

IppToPsps *ippToPsps_Constructor(int *argc, char **argv);
void ippToPsps_VersionPrint(void);

# endif // IPPTOPSPS_H 
