#ifndef PM_FPA_WRITE_H
#define PM_FPA_WRITE_H

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

bool pmReadoutWriteNext(pmReadout *readout, // Readout to write
                        psFits *fits,   // FITS file to which to write
                        int z           // Image plane to write
                       );

bool pmCellWrite(pmCell *cell,          // Cell to write
                 psFits *fits,          // FITS file to which to write
                 psDB *db,              // Database handle for "concepts" update
                 bool pixels            // Write the pixels, or only the PHU header?
                );
bool pmChipWrite(pmChip *chip,          // Chip to write
                 psFits *fits,          // FITS file to which to write
                 psDB *db,              // Database handle for "concepts" update
                 bool pixels,           // Write the pixels, or only the PHU header?
                 bool recurse           // Recurse to lower levels?
                );
bool pmFPAWrite(pmFPA *fpa,             // FPA to write
                psFits *fits,           // FITS file to which to write
                psDB *db,               // Database handle for "concepts" update
                bool pixels,            // Write the pixels, or only the PHU header?
                bool recurse            // Recurse to lower levels?
               );

#endif
