IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Mar 18, 2007, 12:28:16 PM (19 years ago)
Author:
eugene
Message:

a variety of fixes to get psastro working in chip and mosaic mode

  • various memory leaks
  • when loading mosaic data, the modification of the WCS for the common focal-plane scale was getting the offset wrong (fixed in psModules)
  • added some debugging dump; more plots still needed
  • error handling in psastroMosaicAstrom
  • loading chip and fpa dimensions from concepts
  • now reading chip concepts when reading objects (in psModules)
  • now supplying region and subdivisions for gradient measurements
  • grid search is now optional

-

File:
1 edited

Legend:

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

    r11467 r12492  
    11# include "psastro.h"
     2
     3// this function is used for test purposes (-trace psastro.dump.psastroAstromGuess 1)
     4bool psastroDumpStars (psArray *stars, char *filename) {
     5
     6    FILE *f = fopen (filename, "w");
     7
     8    for (int i = 0; i < stars->n; i++) {
     9        pmAstromObj *obj = stars->data[i];
     10
     11        // write out the upward projections
     12        fprintf (f, "%d  %f %f  %f  %f %f  %f %f  %f %f\n", i,
     13                 obj->sky->r, obj->sky->d, obj->Mag,
     14                 obj->TP->x, obj->TP->y,
     15                 obj->FP->x, obj->FP->y,
     16                 obj->chip->x, obj->chip->y);
     17    }
     18    fclose (f);
     19    return true;
     20}
    221
    322// this function is used for test purposes (-trace psastro.dump.psastroAstromGuess 1)
    423bool psastroDumpRawstars (psArray *rawstars, pmFPA *fpa, pmChip *chip) {
    524
    6     FILE *f1 = fopen ("rawstars.dat", "w");
    7     FILE *f2 = fopen ("rawstars.down.dat", "w");
     25    char *filename = NULL;
     26    char *chipname = psMetadataLookupStr (NULL, chip->concepts, "CHIP.NAME");
     27
     28    psStringAppend (&filename, "rawstars.up.%s.dat", chipname);
     29    FILE *f1 = fopen (filename, "w");
     30    psFree (filename);
     31    filename = NULL;
     32
     33    psStringAppend (&filename, "rawstars.dn.%s.dat", chipname);
     34    FILE *f2 = fopen (filename, "w");
     35    psFree (filename);
     36    filename = NULL;
    837
    938    for (int i = 0; i < rawstars->n; i++) {
Note: See TracChangeset for help on using the changeset viewer.