#ifndef PM_FPA_CONSTRUCT_H
#define PM_FPA_CONSTRUCT_H

#include "pslib.h"
#include "pmFPA.h"
#include "pmFPAview.h"

// Construct an FPA instance on the basis of a camera configuration
pmFPA *pmFPAConstruct(const psMetadata *camera // The camera configuration
                     );

bool pmFPAAddSourceFromView(pmFPA *fpa,   // The FPA
                            const pmFPAview *phuView, // The view, corresponding to the PHU
                            const psMetadata *format // Format of file
                           );

pmFPAview *pmFPAAddSourceFromHeader(pmFPA *fpa, // The FPA
                                    psMetadata *phu, // Primary header of file
                                    const psMetadata *format // Format of file
                                   );

// Print out the FPA
void pmFPAPrint(FILE *fd,               // File descriptor to which to print
                pmFPA *fpa,             // FPA to print
                bool header,            // Print headers?
                bool concepts           // Print concepts?
               );

#endif
