IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 23666


Ignore:
Timestamp:
Apr 1, 2009, 4:47:30 PM (17 years ago)
Author:
eugene
Message:

add INST_MAG to output header, fix ghost count

File:
1 edited

Legend:

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

    r23592 r23666  
    7676
    7777    int nExt = 0;
     78    int nExtGhost = 0;
    7879
    7980    // open the output file handle: we are just saving a series of extensions to this file
     
    157158                    psMetadataAddF32 (header, PS_LIST_TAIL, "FPA_Y",   0, "focal-plane coordinate", ref->FP->y);
    158159                    psMetadataAddF32 (header, PS_LIST_TAIL, "MAG",     0, "magnitude",              ref->Mag);
     160                    psMetadataAddF32 (header, PS_LIST_TAIL, "INST_MAG",0, "instrumental magnitude", ref->Mag - MagOffset);
    159161
    160162                    snprintf (extname, 80, "extname.%05d", nExt);
     
    175177
    176178                    pmReadout *inReadout = pmFPAviewThisReadout (view, input->fpa);
    177                     psImage *subraster = psastroExtractStar (inReadout->image, ghost->chip->x, ghost->chip->y, 200.0, 200.0);
     179                    psImage *subraster = psastroExtractStar (inReadout->image, ghost->chip->x, ghost->chip->y, 400.0, 400.0);
    178180                    if (!subraster) continue;
    179181                   
     
    187189                    psMetadataAddF32 (header, PS_LIST_TAIL, "FPA_Y0",  0, "star focal-plane coordinate", ghost->TP->y); // note : over-loaded value
    188190                    psMetadataAddF32 (header, PS_LIST_TAIL, "MAG",     0, "magnitude",              ghost->Mag);
    189 
    190                     snprintf (extname, 80, "extname.%05d", nExt);
    191                     psFitsWriteImage (outStars, header, subraster, 0, extname);
    192                     nExt ++;
     191                    psMetadataAddF32 (header, PS_LIST_TAIL, "INST_MAG",0, "instrumental magnitude", ghost->Mag - MagOffset);
     192
     193                    snprintf (extname, 80, "extname.%05d", nExtGhost);
     194                    psFitsWriteImage (outGhosts, header, subraster, 0, extname);
     195                    nExtGhost ++;
    193196                   
    194197                    psFree (header);
     
    204207
    205208    psFitsClose (outStars);
     209    psFitsClose (outGhosts);
    206210    psFree (view);
    207211    return true;
Note: See TracChangeset for help on using the changeset viewer.