IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Oct 9, 2008, 2:39:01 PM (18 years ago)
Author:
beaumont
Message:

merged mainline into branch. resolved conflicts. added plots.

Location:
branches/cnb_branch_20080830/psastro/src
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/cnb_branch_20080830/psastro/src

    • Property svn:ignore
      •  

        old new  
        1515psastroModel
        1616gpcModel
         17psastroModelFit
  • branches/cnb_branch_20080830/psastro/src/psastroModelFitBoresite.c

    r15891 r20033  
    22
    33// we now have a set of observed L,M values.  fit these to the boresite model
    4 psVector *psastroModelFitBoresite (psVector *Xo, psVector *Yo, psVector *Po) {
     4psVector *psastroModelFitBoresite (psVector *Xo, psVector *Yo, psVector *Po, char *outroot) {
    55
    66    assert (Xo->n > 2);
     
    6060    params->data.F32[PAR_T0] = 0.0;
    6161
    62     psMinimization *myMin = psMinimizationAlloc (15, 0.001);
     62    psMinimization *myMin = psMinimizationAlloc (25, 0.001);
    6363    psImage *covar = psImageAlloc (params->n, params->n, PS_TYPE_F32);
    6464   
     
    7474    psMinimizeLMChi2(myMin, covar, params, constraint, x, y, NULL, psastroModelBoresite);
    7575
    76     fprintf (stderr, "fitted values:\n");
    77     fprintf (stderr, "Xo:  %f\n", params->data.F32[PAR_X0]);
    78     fprintf (stderr, "Yo:  %f\n", params->data.F32[PAR_Y0]);
    79     fprintf (stderr, "RX:  %f\n", params->data.F32[PAR_RX]);
    80     fprintf (stderr, "RY:  %f\n", params->data.F32[PAR_RY]);
    81     fprintf (stderr, "P0:  %f\n", params->data.F32[PAR_P0]);
    82     fprintf (stderr, "T0:  %f\n", params->data.F32[PAR_T0]);
     76    char filename[256];
     77    snprintf (filename, 256, "%s.pars", outroot);
     78    FILE *outfile = fopen (filename, "w");
     79    if (!outfile) {
     80        psAbort("cannot open %s for output", filename);
     81    }
     82
     83    fprintf (outfile, "# fitted values:\n");
     84    fprintf (outfile, "Xo:  %f\n", params->data.F32[PAR_X0]);
     85    fprintf (outfile, "Yo:  %f\n", params->data.F32[PAR_Y0]);
     86    fprintf (outfile, "RX:  %f\n", params->data.F32[PAR_RX]);
     87    fprintf (outfile, "RY:  %f\n", params->data.F32[PAR_RY]);
     88    fprintf (outfile, "P0:  %f\n", params->data.F32[PAR_P0]);
     89    fprintf (outfile, "T0:  %f\n", params->data.F32[PAR_T0]);
     90    fclose (outfile);
    8391
    8492    return params;
Note: See TracChangeset for help on using the changeset viewer.