/** @file ippToPsps.c
 *
 *  @brief
 *
 *  @ingroup ippToPsps
 *
 *  @author IfA
 *  Copyright 2009 Institute for Astronomy, University of Hawaii
 */

#include "ippToPsps.h"

// Main 
int main(int argc, char **argv) {

    psTimerStart("ippToPsps");

    ippToPsps_VersionPrint();

    int exitCode;

    // create ippToPsps
    IppToPsps *ippToPsps = ippToPsps_Constructor(&argc, argv);
    ippToPsps->run(ippToPsps);
    exitCode = ippToPsps->exitCode;
    psFree(ippToPsps);

    double secs = psTimerMark("ippToPsps");

    psLogMsg("ippToPsps", 3, "ippToPsps completed %ssuccessfully, with exit code %d, in %.1f %s\n", 
            (exitCode == PS_EXIT_SUCCESS) ? "" : "un",
            exitCode,
            (secs<60.0) ? secs : (secs/60.0),
            (secs<60.0) ? "sec(s)" : "min(s)");

    // tidy up
    psTimerStop();
    psLibFinalize();

    return exitCode;
}
