IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 7636


Ignore:
Timestamp:
Jun 22, 2006, 10:15:15 AM (20 years ago)
Author:
eugene
Message:

adding psastroConvertFPA,psastroConvertReadout

Location:
trunk/psastro/src
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/psastro/src/psastro.h

    r7332 r7636  
    1919bool              psastroDataSave (pmConfig *config);
    2020
    21 bool              psastroConvert (pmReadout *readout, psMetadata *recipe);
     21bool              psastroConvertFPA (pmFPA *fpa, psMetadata *recipe);
     22bool              psastroConvertReadout (pmReadout *readout, psMetadata *recipe);
    2223psArray          *pmSourceToAstromObj (psArray *sources);
    2324bool              psastroAstromGuess (pmConfig *config);
  • trunk/psastro/src/psastroConvert.c

    r7332 r7636  
    22// XXX leak free 2006.04.27
    33
     4bool psastroConvertFPA (pmFPA *fpa, psMetadata *recipe) {
     5
     6    pmChip *chip;
     7    pmCell *cell;
     8    pmReadout *readout;
     9    pmFPAview *view = pmFPAviewAlloc (0);
     10 
     11    while ((chip = pmFPAviewNextChip (view, fpa, 1)) != NULL) {
     12        psTrace (__func__, 4, "Chip %d: %x %x\n", view->chip, chip->file_exists, chip->process);
     13        if (!chip->process || !chip->file_exists) { continue; }
     14
     15        while ((cell = pmFPAviewNextCell (view, fpa, 1)) != NULL) {
     16            psTrace (__func__, 4, "Cell %d: %x %x\n", view->cell, cell->file_exists, cell->process);
     17            if (!cell->process || !cell->file_exists) { continue; }
     18
     19            // process each of the readouts
     20            while ((readout = pmFPAviewNextReadout (view, fpa, 1)) != NULL) {
     21                if (! readout->data_exists) { continue; }
     22
     23                psastroConvertReadout (readout, recipe);
     24            }
     25        }
     26    }
     27    psFree (view);
     28    return true;
     29}
     30
    431// XXX pass/apply the WCS information?
    5 bool psastroConvert (pmReadout *readout, psMetadata *recipe) {
     32bool psastroConvertReadout (pmReadout *readout, psMetadata *recipe) {
    633
    734    psArray *sources = psMetadataLookupPtr (NULL, readout->analysis, "PSPHOT.SOURCES");
  • trunk/psastro/src/psastroDataLoad.c

    r7583 r7636  
    5151                if (! readout->data_exists) { continue; }
    5252
    53                 psastroConvert (readout, recipe);
     53                psastroConvertReadout (readout, recipe);
    5454
    5555                pmFPAfileIOChecks (config, view, PM_FPA_AFTER);
Note: See TracChangeset for help on using the changeset viewer.