IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 42297


Ignore:
Timestamp:
Oct 24, 2022, 12:27:04 PM (4 years ago)
Author:
cclin33
Message:

update changes from ipp-ops-20220705

Location:
tags/ipp-ops-20220906
Files:
1 added
10 edited

Legend:

Unmodified
Added
Removed
  • tags/ipp-ops-20220906/ippconfig/gpc1/Makefile.am

    r41750 r42297  
    1616        format_20100228.config \
    1717        format_20100723.config \
     18        format_20220827.config \
    1819        format_mef.config \
    1920        format_relphot.config \
  • tags/ipp-ops-20220906/ippconfig/gpc1/camera.config

    r41750 r42297  
    55        MEF             STR     gpc1/format_mef.config
    66        RELPHOT         STR     gpc1/format_relphot.config
     7        RAW_20220827    STR     gpc1/format_20220827.config
    78        RAW_20100723    STR     gpc1/format_20100723.config
    89        RAW_20100228    STR     gpc1/format_20100228.config
  • tags/ipp-ops-20220906/ippconfig/gpc1/psastro.config

    r42282 r42297  
    407407#   PSASTRO.CATDIR               STR     PS1.REF.20140605
    408408#  PSASTRO.CATDIR                STR     PS1.REF.20140713
    409    PSASTRO.CATDIR                STR     PS1.REF.20170919
     409#   PSASTRO.CATDIR               STR     PS1.REF.20170919
     410   PSASTRO.CATDIR               STR     PS1.REF.20220324
     411   DVO.GETSTAR.PM.APPLY         BOOL    TRUE
    410412   ZERO.POINT.USE.MEAN          BOOL    TRUE 
    411413END
     
    428430   PSASTRO.MAX.ALLOWED.FWHM    F32   24
    429431#   PSASTRO.CATDIR              STR   PS1.REF.20140713
    430    PSASTRO.CATDIR               STR     PS1.REF.20170919
     432#   PSASTRO.CATDIR               STR     PS1.REF.20170919
     433   PSASTRO.CATDIR               STR     PS1.REF.20220324
     434   DVO.GETSTAR.PM.APPLY         BOOL    TRUE
    431435END
    432436
     
    435439   PSASTRO.MAX.ALLOWED.FWHM    F32   24
    436440#   PSASTRO.CATDIR              STR   PS1.REF.20140713
    437    PSASTRO.CATDIR               STR     PS1.REF.20170919
     441#   PSASTRO.CATDIR               STR     PS1.REF.20170919
     442   PSASTRO.CATDIR               STR     PS1.REF.20220324
     443   DVO.GETSTAR.PM.APPLY         BOOL    TRUE
    438444END
    439445
     
    441447   ZERO.POINT.USE.MEAN         BOOL  TRUE
    442448   PSASTRO.MAX.ALLOWED.FWHM    F32   24
    443    PSASTRO.CATDIR               STR     PS1.REF.20170919
     449#   PSASTRO.CATDIR               STR     PS1.REF.20170919
     450   PSASTRO.CATDIR               STR     PS1.REF.20220324
     451   DVO.GETSTAR.PM.APPLY         BOOL    TRUE
    444452END
    445453
     
    448456   ZERO.POINT.USE.MEAN         BOOL  TRUE
    449457   PSASTRO.MAX.ALLOWED.FWHM    F32   30
    450    PSASTRO.CATDIR               STR     PS1.REF.20170919
     458#   PSASTRO.CATDIR               STR     PS1.REF.20170919
     459   PSASTRO.CATDIR               STR     PS1.REF.20220324
     460   DVO.GETSTAR.PM.APPLY         BOOL    TRUE
    451461END
    452462
     
    460470   DVO.GETSTAR.MIN.MAG.INST    F32   -25.0
    461471#   PSASTRO.CATDIR              STR   PS1.REF.20140713
    462    PSASTRO.CATDIR               STR     PS1.REF.20170919
     472#   PSASTRO.CATDIR               STR     PS1.REF.20170919
     473   PSASTRO.CATDIR               STR     PS1.REF.20220324
     474   DVO.GETSTAR.PM.APPLY         BOOL    TRUE
    463475   ## refcat may be okay astrom but not faint phot -- so need to be able to further limit by ZP
    464476   ## -- concern w/ new refcat >20 extra sources w/ larger merr over-dominating scatter in ZP
     
    690702#   PSASTRO.CATDIR                  STR   PS1.REF.20140605 (BAD catalog)
    691703#   PSASTRO.CATDIR                  STR   PS1.REF.20140713
    692    PSASTRO.CATDIR               STR     PS1.REF.20170919
     704#   PSASTRO.CATDIR               STR     PS1.REF.20170919
     705   PSASTRO.CATDIR               STR     PS1.REF.20220324
     706   DVO.GETSTAR.PM.APPLY         BOOL    TRUE
    693707   REFSTAR_MASK                    BOOL  FALSE
    694708   PSASTRO.SAVE.REFMATCH           BOOL  FALSE
     
    729743   #PSASTRO.CATDIR                  STR   PS1.REF.20140605  # ensure same catalog is used when reprocessing MD set uniformly (BAD catalog)
    730744#   PSASTRO.CATDIR                  STR   PS1.REF.20140713
    731    PSASTRO.CATDIR               STR     PS1.REF.20170919
     745#   PSASTRO.CATDIR               STR     PS1.REF.20170919
     746   PSASTRO.CATDIR               STR     PS1.REF.20220324
     747   DVO.GETSTAR.PM.APPLY         BOOL    TRUE
    732748   REFSTAR_MASK                    BOOL  FALSE
    733749   PSASTRO.SAVE.REFMATCH           BOOL  FALSE
     
    879895
    880896SWEETSPOT_TEST METADATA
    881    PSASTRO.CATDIR               STR     PS1.REF.20170919
     897#   PSASTRO.CATDIR               STR     PS1.REF.20170919
     898   PSASTRO.CATDIR               STR     PS1.REF.20220324
     899   DVO.GETSTAR.PM.APPLY         BOOL    TRUE
    882900   ZERO.POINT.USE.MEAN          BOOL    TRUE
    883901END
  • tags/ipp-ops-20220906/ippconfig/gpc2/psastro.config

    r42282 r42297  
    402402   ZERO.POINT.USE.MEAN         BOOL  TRUE
    403403   PSASTRO.MAX.ALLOWED.FWHM    F32   24
    404    PSASTRO.CATDIR               STR     PS1.REF.20170919
     404#   PSASTRO.CATDIR               STR     PS1.REF.20170919
     405   PSASTRO.CATDIR               STR     PS1.REF.20220324
     406   DVO.GETSTAR.PM.APPLY         BOOL    TRUE
    405407END
    406408
     
    408410   ZERO.POINT.USE.MEAN         BOOL  TRUE
    409411   PSASTRO.MAX.ALLOWED.FWHM    F32   24
    410    PSASTRO.CATDIR               STR     PS1.REF.20170919
     412#   PSASTRO.CATDIR               STR     PS1.REF.20170919
     413   PSASTRO.CATDIR               STR     PS1.REF.20220324
     414   DVO.GETSTAR.PM.APPLY         BOOL    TRUE
    411415END
    412416
     
    415419   ZERO.POINT.USE.MEAN         BOOL  TRUE
    416420   PSASTRO.MAX.ALLOWED.FWHM    F32   30
    417    PSASTRO.CATDIR               STR     PS1.REF.20170919
     421#   PSASTRO.CATDIR               STR     PS1.REF.20170919
     422   PSASTRO.CATDIR               STR     PS1.REF.20220324
     423   DVO.GETSTAR.PM.APPLY         BOOL    TRUE
    418424END
    419425
     
    551557
    552558SWEETSPOT_TEST METADATA
    553    PSASTRO.CATDIR               STR     PS1.REF.20170919
     559#   PSASTRO.CATDIR               STR     PS1.REF.20170919
     560   PSASTRO.CATDIR               STR     PS1.REF.20220324
     561   DVO.GETSTAR.PM.APPLY         BOOL    TRUE
    554562   ZERO.POINT.USE.MEAN          BOOL    TRUE
    555563   PSASTRO.GRID.MIN.ANGLE F32 -6.0
  • tags/ipp-ops-20220906/psLib/src/astro/psCoord.c

    r41896 r42297  
    242242    const psPlane* coords)
    243243{
    244   if (!transform) {
    245     fprintf (stderr, "problem\n");
    246   }
    247244    PS_ASSERT_PTR_NON_NULL(transform, NULL);
    248245    PS_ASSERT_PTR_NON_NULL(transform->x, NULL);
  • tags/ipp-ops-20220906/psastro/src/psastroAstromGuess.c

    r41895 r42297  
    320320        if (!chip->process || !chip->file_exists || !chip->data_exists) { continue; }
    321321
    322         if (!chip->toFPA || !chip->fromFPA) {
     322        // if a chip fails during the calibration, the associated readout->data_exists
     323        // gets set to false.  This may be the wrong solution, but it does not break this
     324        // analysis here.  Note this is not the chip->data_exists field tested above.
     325        // chip->data_exists is only false if the chip data is missing.
     326
     327        // chip->fromFPA can be NULL if the inversion fails, but I'm not sure
     328        // chip->toFPA can be NULL unless it was not in the original model
     329        if (!chip->toFPA) {
    323330          char *name = psMetadataLookupStr (NULL, chip->concepts, "CHIP.NAME");
    324331          fprintf (stderr, "no astrom model for %s, skipping\n", name);
    325332          continue;
    326333        }
    327 
    328         // XXX we are currently inconsistent with marking the good vs the bad data
    329         // psastroChipAstrom sets data_exists to false if the fit is bad.  this is
    330         // probably wrong since it implies there is no data!
     334        if (!chip->fromFPA) {
     335          char *name = psMetadataLookupStr (NULL, chip->concepts, "CHIP.NAME");
     336          fprintf (stderr, "inversion faiulre for %s (%d), will be skipped\n", name, view->chip);
     337        }
    331338
    332339        // skip chips for which the astrometry failed (NASTRO == 0)
     
    350357        float astError = psMetadataLookupF32 (&status, updates, "CERROR");
    351358        if (fabs(astError) < 1e-6) goto skip_chip;
     359
     360        // XXX EAM 2022.09.22 : a more robust analysis would put the corner points
     361        // on the chip metadata so we can be certain the old and new corner values
     362        // are correctly matched.
    352363
    353364        psPlane ptCH, ptFP, ptTP;
  • tags/ipp-ops-20220906/psastro/src/psastroMosaicOneChip.c

    r41895 r42297  
    148148    if (order == 1) { minNstar = PS_MAX ( 8, minNstar); }
    149149
     150    // determine fromFPA transformation and apply new transformation to raw & ref stars
     151    psastroUpdateChipToFPA (fpa, chip);
     152
    150153    bool validSolution = true;
    151154
     
    162165    if (astNstar < minNstar) {
    163166        psLogMsg("psastro", PS_LOG_INFO, "solution uses too few stars: %d < %d", astNstar, minNstar);
     167        validSolution = false;
     168    }
     169    if (!chip->fromFPA) {
     170        psLogMsg("psastro", PS_LOG_INFO, "toFPA/fromFPA inversion failure");
    164171        validSolution = false;
    165172    }
     
    189196    psMetadataAddF32 (updates, PS_LIST_TAIL, "AST_MRY",   PS_META_REPLACE, "mosaic astrometry Y 10-90 percentile (arcsec)", results->dYrange * plateScale);
    190197
    191     // determine fromFPA transformation and apply new transformation to raw & ref stars
    192     psastroUpdateChipToFPA (fpa, chip);
    193 
    194     //plot results
     198    // plot results
    195199    pmAstromVisualPlotMosaicOneChip(rawstars, refstars, match, recipe);
    196200
  • tags/ipp-ops-20220906/psastro/src/psastroOneChipFit.c

    r41895 r42297  
    217217        validSolution = false;
    218218    }
     219    if (!chip->fromFPA) {
     220        psLogMsg("psastro", PS_LOG_INFO, "toFPA/fromFPA inversion failure");
     221        validSolution = false;
     222    }
    219223
    220224    // DVO expects NASTRO = 0 if we fail to find a solution
  • tags/ipp-ops-20220906/psastro/src/psastroOneChipGrid.c

    r40084 r42297  
    2222    bool status;
    2323    pmAstromStats *stats = NULL;
     24    char *chipname = psMetadataLookupStr (NULL, chip->concepts, "CHIP.NAME");
     25
    2426
    2527    // do we need to get a rough initial match?
     
    4951    }
    5052
    51     psLogMsg ("psastro", 3, "grid search using %ld raw vs %ld ref stars\n", rawGridStars->n, refGridStars->n);
     53    psLogMsg ("psastro", 3, "grid search for chip %s using %ld raw vs %ld ref stars\n",chipname,rawGridStars->n, refGridStars->n);
    5254
    5355    // find initial offset / rotation / scale
    5456    pmAstromStats *gridStats = pmAstromGridMatch (rawGridStars, refGridStars, recipe);
    5557    if (gridStats == NULL) {
    56         psLogMsg ("psastro", 3, "failed to find a grid match solution\n");
     58        psLogMsg ("psastro", 3, "failed to find a grid match solution for chip %s\n",chipname);
    5759        psFree (rawGridStars);
    5860        psFree (refGridStars);
     
    6062        return false;
    6163    }
    62     psLogMsg ("psastro", 3, "basic grid search result - offset: %f,%f pixels, rotation: %f deg\n", gridStats->offset.x, gridStats->offset.y, DEG_RAD*gridStats->angle);
     64    psLogMsg ("psastro", 3, "basic grid search result for chip %s - offset: %f,%f pixels, rotation: %f deg\n",chipname, gridStats->offset.x, gridStats->offset.y, DEG_RAD*gridStats->angle);
    6365
    6466# if (1)
     
    7375        return false;
    7476    }
    75     psLogMsg ("psastro", 3, "tweak grid search result - offset: %f,%f pixels, rotation: %f deg\n", stats->offset.x, stats->offset.y, DEG_RAD*stats->angle);
     77    psLogMsg ("psastro", 3, "tweak grid search result for chip %s - offset: %f,%f pixels, rotation: %f deg\n",chipname, stats->offset.x, stats->offset.y, DEG_RAD*stats->angle);
    7678# else
    7779    // EAM TEST: skip tweak
     
    8284    // adjust the chip.toFPA terms only
    8385    pmAstromGridApply (chip->toFPA, stats);
    84     psastroUpdateChipToFPA (fpa, chip); // updates PSASTRO.RAWSTARS and PSASTRO.REFSTARS
     86    psastroUpdateChipToFPA (fpa, chip); // updates PSASTRO.RAWSTARS and PSASTRO.REFSTARS (see note below)
    8587    psFree (gridStats);
    8688    psFree (rawGridStars);
     
    9092    return true;
    9193}
     94
     95/* if psastroUpdateChiptoFPA fails to invert the toFPA transformation,
     96   the ref->chip coordinates will not be set.  This is not a problem
     97   at this stage since they are not used in the calculation.  Later
     98   passes can still yield a valid solution.
     99*/
  • tags/ipp-ops-20220906/psastro/src/psastroUtils.c

    r41895 r42297  
    109109
    110110    psRegion *region = pmChipPixels (chip);
    111 
    112111    psFree (chip->fromFPA);
    113112    chip->fromFPA = psPlaneTransformInvert (NULL, chip->toFPA, *region, 50, 4);
    114113    psFree (region);
     114
     115    // XXX EAM 2022.09.22 : for a specific case, psPlaneTransformInvert fails.
     116    // This probably means the solution was poor in any case. 
     117    // Some options:
     118    // 1) skip the chip in psastroAstromGuessCheck (supply bad corners)
     119    // 2) mark this chip as bad (return an error here and trap in psastroMosaicOneChip)
     120    // 3) warn of the failure:
     121    if (!chip->fromFPA) {
     122        char *name = psMetadataLookupStr (NULL, chip->concepts, "CHIP.NAME");
     123        psLogMsg ("psastro", PS_LOG_INFO, "WARNING: failure to invert toFPA for %s", name);
     124    }
    115125
    116126    // loop over cells in this chip
     
    150160                    pmAstromObj *ref = refstars->data[i];
    151161                    psPlaneTransformApply (ref->chip, chip->fromFPA, ref->FP);
     162                    // if chip->fromFPA is NULL (non-invertable), the action is skipped
    152163                }
    153164            }
Note: See TracChangeset for help on using the changeset viewer.