# include "psastroInternal.h"

bool psastroDefineFiles (pmConfig *config, pmFPAfile *input) {

    // these calls bind the I/O handle to the specified fpa
    pmFPAfile *output = NULL;

    output = pmFPAfileDefineOutput (config, input->fpa, "PSASTRO.OUTPUT");
    if (!output) {
	psError(PSASTRO_ERR_CONFIG, false, "Failed to build FPA from PSASTRO.INPUT");
	return false;
    }
    output->save = true;

# if (0)
    // optionally save output plots
    if (!pmFPAfileDefineOutput (config, input->fpa, "SOURCE.PLOT.MOMENTS")) {
	psTrace ("psphot", 3, "Cannot find a rule for SOURCE.PLOT.MOMENTS");
    }
    if (!pmFPAfileDefineOutput (config, input->fpa, "SOURCE.PLOT.PSFMODEL")) {
	psTrace ("psphot", 3, "Cannot find a rule for SOURCE.PLOT.PSFMODEL");
    }
# endif

    return true;
}
