#ifndef PP_IMAGE_OPTIONS_H
#define PP_IMAGE_OPTIONS_H

// Options for ppImage processing
typedef struct {
    bool doMask;                        // Mask bad pixels
    psMaskType maskValue;               // apply this bit-mask to choose masked bits

    bool doBias;                        // Bias subtraction
    bool doDark;                        // Dark subtraction
    bool doShutter;                     // Shutter correction
    bool doFlat;                        // Flat-field normalisation
    bool doFringe;                      // Fringe subtraction
    bool doPhotom;                      // Source identification and photometry
    bool doAstromChip;                  // per-chip Astrometry
    bool doAstromMosaic;                // full-mosaic Astrometry
    bool doAddstar;                     // add results to object database?

    bool doOverscan;                    // Overscan subtraction
    pmOverscanOptions *overscan;        // Overscan options

    bool doNonLin;                      // Non-linearity correction
    psDataType nonLinearType;
    psMetadataItem *nonLinearData;
    void *nonLinearSource;

    bool BaseFITS;
    bool ChipFITS;
    bool FPA1FITS;
    bool FPA2FITS;

    bool Bin1FITS;
    bool Bin1JPEG;
    int xBin1, yBin1;

    bool Bin2FITS;
    bool Bin2JPEG;
    int xBin2, yBin2;

    float fringeRej;                    // Fringe rejection limit
    int fringeIter;                     // Fringe iterations
    float fringeKeep;                   // Fringe keep fraction

} ppImageOptions;

ppImageOptions *ppImageOptionsAlloc(void);

// Determine the processing options
ppImageOptions *ppImageOptionsParse(pmConfig *config);

#endif
