IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 16071


Ignore:
Timestamp:
Jan 14, 2008, 4:52:43 PM (18 years ago)
Author:
eugene
Message:

split psastroOneChip into OneChipFit and OneChipGrid, adding psastroFixChips call

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/psastro/src/psastroChipAstrom.c

    r15196 r16071  
    4949                    readout->data_exists = false;
    5050                    psLogMsg ("psastro", 3, "insufficient rawstars (%ld) or refstars (%ld)",
    51                             rawstars->n, refstars->n);
     51                              rawstars->n, refstars->n);
    5252                    continue;
    5353                }
    54 
    55                 char *filename = NULL;
    56                 char *chipname = psMetadataLookupStr (NULL, chip->concepts, "CHIP.NAME");
    5754
    5855                // save WCS and analysis metadata in update header
     
    6057
    6158                // XXX update the header with info to reflect the failure
    62                 if (!psastroOneChip (fpa, chip, refstars, rawstars, recipe, updates)) {
     59                if (!psastroOneChipGrid (fpa, chip, refstars, rawstars, recipe, updates)) {
    6360                    readout->data_exists = false;
    6461                    psLogMsg ("psastro", 3, "failed to find a solution\n");
     
    6663                    continue;
    6764                }
     65                // XXX update the header with info to reflect the failure
     66                if (!psastroOneChipFit (fpa, chip, refstars, rawstars, recipe, updates)) {
     67                    readout->data_exists = false;
     68                    psLogMsg ("psastro", 3, "failed to find a solution\n");
     69                    psFree (updates);
     70                    continue;
     71                }
     72
    6873                pmAstromWriteWCS (updates, fpa, chip, NONLIN_TOL);
    6974                psMetadataAdd (readout->analysis, PS_LIST_TAIL, "PSASTRO.HEADER",  PS_DATA_METADATA, "psastro header stats", updates);
     
    7176
    7277                if (psTraceGetLevel("psastro.dump") > 0) {
     78
     79                    char *filename = NULL;
     80                    char *chipname = psMetadataLookupStr (NULL, chip->concepts, "CHIP.NAME");
     81
    7382                    psStringAppend (&filename, "rawstars.ch.%s.dat", chipname);
    7483                    psastroDumpStars (rawstars, filename);
     
    8594    }
    8695
     96    // psastroDumpCorners ("corners.chipAstrom.dat", input->fpa);
     97
     98# if (0)
     99    if (!psastroFixChipsTest (config, recipe)) {
     100        psError(PSASTRO_ERR_UNKNOWN, false, "failed to align problematic chips");
     101        return false;
     102    }
     103# endif
     104
     105    if (!psastroFixChips (config, recipe)) {
     106        psError(PSASTRO_ERR_UNKNOWN, false, "failed to align problematic chips");
     107        return false;
     108    }
     109
     110    // psastroDumpCorners ("corners.fixChips.dat", input->fpa);
     111
    87112    psFree (view);
    88113    return true;
Note: See TracChangeset for help on using the changeset viewer.