#ifndef PP_IMAGE_DETREND_FRINGE_H
#define PP_IMAGE_DETREND_FRINGE_H

#include <pslib.h>
#include <psmodules.h>
#include "ppImageOptions.h"

// Measure fringes
bool ppImageDetrendFringeMeasure(pmReadout *readout, // Readout to measure
                                 pmCell *fringe, // Fringe cell (each readout is a different component)
                                 const ppImageOptions *options // Options
    );

// Solve the fringe system
bool ppImageDetrendFringeSolve(pmChip *scienceChip, // Chip with science
                               const pmChip *refChip, // Chip with reference fringes
                               const ppImageOptions *options // Options
    );

// Generate fringe frame
bool ppImageDetrendFringeGenerate(pmCell *science, // Science cell
                                  pmCell *fringes // Fringe cell, one readout per fringe component
    );


#endif
