/*
 * dettool.h
 *
 * Copyright (C) 2006  Joshua Hoblitt
 *
 * This program is free software; you can redistribute it and/or modify it
 * under the terms of the GNU General Public License as published by the Free
 * Software Foundation; version 2 of the License.
 *
 * This program is distributed in the hope that it will be useful, but WITHOUT
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
 * more details.
 *
 * You should have received a copy of the GNU General Public License along with
 * program; see the file COPYING. If not, write to the Free Software
 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
 */

#ifdef HAVE_CONFIG_H
#include <config.h>
#endif

#ifndef DETTOOL_H
#define DETTOOL_H 1

#include "pxtools.h"

typedef enum {
    DETTOOL_MODE_NONE           = PXTOOL_MODE_NONE,
    DETTOOL_MODE_PENDING,
    DETTOOL_MODE_DEFINEBYTAG,
    DETTOOL_MODE_DEFINEBYQUERY,
    DETTOOL_MODE_DEFINEBYDETRUN,
    DETTOOL_MODE_MAKECORRECTION,
    DETTOOL_MODE_TOCORRECTEXP,
    DETTOOL_MODE_TOCORRECTIMFILE,
    DETTOOL_MODE_ADDCORRECTIMFILE,
    DETTOOL_MODE_RUNS,
    DETTOOL_MODE_CHILDLESSRUN,
    DETTOOL_MODE_INPUT,
    DETTOOL_MODE_RAW,
    DETTOOL_MODE_TOPROCESSEDIMFILE,
    DETTOOL_MODE_ADDPROCESSEDIMFILE,
    DETTOOL_MODE_PROCESSEDIMFILE,
    DETTOOL_MODE_REVERTPROCESSEDIMFILE,
    DETTOOL_MODE_TOPROCESSEDEXP,
    DETTOOL_MODE_ADDPROCESSEDEXP,
    DETTOOL_MODE_PROCESSEDEXP,
    DETTOOL_MODE_REVERTPROCESSEDEXP,
    DETTOOL_MODE_TOSTACKED,
    DETTOOL_MODE_ADDSTACKED,
    DETTOOL_MODE_STACKED,
    DETTOOL_MODE_REVERTSTACKED,
    DETTOOL_MODE_TONORMALIZEDSTAT,
    DETTOOL_MODE_ADDNORMALIZEDSTAT,
    DETTOOL_MODE_NORMALIZEDSTAT,
    DETTOOL_MODE_REVERTNORMALIZEDSTAT,
    DETTOOL_MODE_TONORMALIZE,
    DETTOOL_MODE_ADDNORMALIZEDIMFILE,
    DETTOOL_MODE_NORMALIZEDIMFILE,
    DETTOOL_MODE_REVERTNORMALIZEDIMFILE,
    DETTOOL_MODE_TONORMALIZEDEXP,
    DETTOOL_MODE_ADDNORMALIZEDEXP,
    DETTOOL_MODE_NORMALIZEDEXP,
    DETTOOL_MODE_REVERTNORMALIZEDEXP,
    DETTOOL_MODE_TORESIDIMFILE,
    DETTOOL_MODE_ADDRESIDIMFILE,
    DETTOOL_MODE_RESIDIMFILE,
    DETTOOL_MODE_REVERTRESIDIMFILE,
    DETTOOL_MODE_TORESIDEXP,
    DETTOOL_MODE_ADDRESIDEXP,
    DETTOOL_MODE_RESIDEXP,
    DETTOOL_MODE_REVERTRESIDEXP,
    DETTOOL_MODE_TODETRUNSUMMARY,
    DETTOOL_MODE_ADDDETRUNSUMMARY,
    DETTOOL_MODE_DETRUNSUMMARY,
    DETTOOL_MODE_REVERTDETRUNSUMMARY,
    DETTOOL_MODE_UPDATERESIDEXP,
    DETTOOL_MODE_UPDATEDETRUNSUMMARY,
    DETTOOL_MODE_UPDATEDETRUN,
    DETTOOL_MODE_RERUN,
    DETTOOL_MODE_REGISTER_DETREND,
    DETTOOL_MODE_REGISTER_DETREND_IMFILE
} dettoolMode;

pxConfig *dettoolConfig(pxConfig *config, int argc, char **argv);

// correct
bool makecorrectionMode(pxConfig *config);
bool tocorrectexpMode(pxConfig *config);
bool tocorrectimfileMode(pxConfig *config);
bool addcorrectimfileMode(pxConfig *config);
// register
bool register_detrend_imfileMode(pxConfig *config);

#endif // DETTOOL_H
