IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Mar 8, 2006, 5:14:23 PM (20 years ago)
Author:
magnier
Message:

major rework of objects code

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/rel10_ifa/psModules/src/objects/pmSourceIO_SX.c

    r6545 r6556  
    1 # include "pmSource.h"
     1/** @file  pmSourceIO.c
     2 *
     3 *  @author EAM, IfA
     4 *
     5 *  @version $Revision: 1.1.2.2 $ $Name: not supported by cvs2svn $
     6 *  @date $Date: 2006-03-09 03:14:23 $
     7 *
     8 *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
     9 *
     10 */
     11
     12#include <stdio.h>
     13#include <math.h>
     14#include <string.h>
     15#include "pslib.h"
     16#include "psLine.h"
     17#include "psEllipse.h"
     18#include "pmHDU.h"
     19#include "pmFPA.h"
     20#include "pmPeaks.h"
     21#include "pmMoments.h"
     22#include "pmGrowthCurve.h"
     23#include "pmModel.h"
     24#include "pmPSF.h"
     25#include "pmSource.h"
     26#include "pmModelGroup.h"
     27#include "pmSourceIO.h"
    228
    329// elixir-mode / sextractor-style output list with fixed line width
     
    632
    733    psF32 *PAR, *dPAR;
    8     float dmag;
     34    EllipseShape shape;
     35    EllipseAxes axes;
    936
    1037    psLine *line = psLineAlloc (110);  // 110 is sextractor line length
     
    1946    for (int i = 0; i < sources->n; i++) {
    2047        pmSource *source = (pmSource *) sources->data[i];
    21         pmModel *model = pmModelSelect (source);
     48        pmModel *model = pmSourceSelectModel (source);
    2249        if (model == NULL)
    2350            continue;
     
    2855        // pmSourceSextractType (source, &type, &flags);
    2956
    30         dmag = dPAR[1] / PAR[1];
     57        shape.sx  = PAR[4];
     58        shape.sy  = PAR[5];
     59        shape.sxy = PAR[6];
     60        axes = EllipseShapeToAxes (shape);
    3161
    3262        psLineInit (line);
    33         psLineAdd (line, "%5.2f", 0.0); // should be type
     63        psLineAdd (line, "%5.2f",  0.0); // should be type
    3464        psLineAdd (line, "%11.3f", PAR[2]);
    3565        psLineAdd (line, "%11.3f", PAR[3]);
    36         psLineAdd (line, "%9.4f", source->fitMag);
    37         psLineAdd (line, "%9.4f", dmag);
     66        psLineAdd (line, "%9.4f",  source->psfMag);
     67        psLineAdd (line, "%9.4f",  source->errMag);
    3868        psLineAdd (line, "%13.4f", PAR[0]);
    39         psLineAdd (line, "%9.2f", 0.0); // should be FWHMx
    40         psLineAdd (line, "%9.2f", 0.0); // should be FWHMy
    41         psLineAdd (line, "%6.1f", 0.0); // should be Theta
    42         psLineAdd (line, "%9.4f", 99.999); // should be MAG_ISO
    43         psLineAdd (line, "%9.4f", source->apMag);
    44         psLineAdd (line, "%4d\n", 0); // should be flags
     69        psLineAdd (line, "%9.2f",  axes.major);
     70        psLineAdd (line, "%9.2f",  axes.minor);
     71        psLineAdd (line, "%6.1f",  axes.theta);
     72        psLineAdd (line, "%9.4f",  source->extMag);
     73        psLineAdd (line, "%9.4f",  source->apMag);
     74        psLineAdd (line, "%4d\n",  0); // should be flags
    4575        fwrite (line->line, 1, line->Nline, f);
    4676    }
Note: See TracChangeset for help on using the changeset viewer.