IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 36914


Ignore:
Timestamp:
Jun 19, 2014, 3:22:46 PM (12 years ago)
Author:
bills
Message:

have psastro output a mask for each chip ASTROM_CHIPS. It has
the value 1 << chip_num if sucessfull otherwise zero
ppStatsFromMetadata ors them all together and then
add to camProcessedExp.
If all 60 gpc1 chips get an astronomical fit the value is 1152921504606846975

Location:
trunk
Files:
11 edited

Legend:

Unmodified
Added
Removed
  • trunk/dbconfig/cam.md

    r36529 r36914  
    119119    quality        S16      0
    120120    background_model  S16   0
     121    astrom_chips   S64      0
    121122END
    122123
  • trunk/dbconfig/changes.txt

    r36529 r36914  
    25212521UPDATE dbversion set schema_version = '1.1.79', updated= CURRENT_TIMESTAMP();
    25222522
    2523 
     2523ALTER TABLE camProcessedExp ADD COLUMN astrom_chips BIGINT;
     2524UPDATE dbversion set schema_version = '1.1.79', updated= CURRENT_TIMESTAMP();
     2525
     2526
  • trunk/ippTools/share/camtool_find_processedexp.sql

    r33000 r36914  
    11SELECT
    22    camProcessedExp.*,
     3    HEX(IFNULL(camProcessedExp.astrom_chips, 0)) AS good_astrom_chips,
    34    camRun.workdir,
    45    camRun.label,
  • trunk/ippTools/share/pxadmin_create_tables.sql

    r36529 r36914  
    523523    quality SMALLINT NOT NULL DEFAULT 0,
    524524    background_model SMALLINT,
     525    astrom_chips BIGINT,
    525526    PRIMARY KEY(cam_id),
    526527    KEY(fault),
  • trunk/ippTools/src/camtool.c

    r36529 r36914  
    501501    PXOPT_LOOKUP_S16(quality, config->args, "-quality", false, false);
    502502    PXOPT_LOOKUP_S16(background_model, config->args, "-background_model", false, false);
     503    PXOPT_LOOKUP_S64(astrom_chips, config->args, "-astrom_chips", false, false);
     504
    503505   
    504506    PXOPT_LOOKUP_STR(ver_pslib, config->args, "-ver_pslib", false, false);
     
    692694        deteff_uq,
    693695        quality,
    694         background_model
     696        background_model,
     697        astrom_chips
    695698        );
    696699
  • trunk/ippTools/src/camtoolConfig.c

    r36529 r36914  
    205205    psMetadataAddF32(addprocessedexpArgs, PS_LIST_TAIL, "-deteff_inst_uq", 0, "define deteff_uq", NAN);
    206206    psMetadataAddS16(addprocessedexpArgs, PS_LIST_TAIL, "-background_model", 0, "set background_model value", 0);
     207    psMetadataAddS64(addprocessedexpArgs, PS_LIST_TAIL, "-astrom_chips", 0, "chips with successful astrom", -1);
    207208
    208209    // -processedexp
  • trunk/ippconfig/recipes/ppStats.config

    r35195 r36914  
    116116  HEADER        STR     DT_ASTR  # elapsed time in astrometry processing
    117117  HEADER        STR     NASTRO
     118  HEADER        STR     ASTROM_CHIPS
    118119
    119120  HEADER        STR     ZPT_OBS
  • trunk/ippconfig/recipes/ppStatsFromMetadata.config

    r35269 r36914  
    274274  ENTRY  VAL  DT_ASTR             F32  SUM              -dtime_astrom     
    275275  ENTRY  VAL  NASTRO              S32  SUM              -n_astrom         
     276  ENTRY  VAL  ASTROM_CHIPS        U64  BITWISEOR        -astrom_chips
    276277
    277278  ENTRY  VAL  ZPT_OBS             F32  SAMPLE_MEAN      -zpt_obs
  • trunk/ppStats/src/ppStatsFromMetadataStats.c

    r23989 r36914  
    11# include "ppStatsInternal.h"
     2
     3static void computeBitwiseOr(ppStatsEntry *entry);
    24
    35// calculate the stats for the non-constant entries (already calculated)
     
    1113        // XXX skip or warn on missing stats?
    1214        if (!entry->vector) continue;
     15
     16        if (!strcasecmp (entry->statistic, "bitwiseor")) {
     17            computeBitwiseOr(entry);
     18            continue;
     19        }
    1320
    1421        psStatsOptions option;
     
    6875    return true;
    6976}
     77
     78static void computeBitwiseOr(ppStatsEntry *entry)
     79{
     80    psU64 result = 0;
     81    psVector *vector = entry->vector;
     82    for (int j = 0; j < vector->n; j++) {
     83        // XXX: should we handle other types
     84        if (entry->type == PS_DATA_U64) {
     85            result |= vector->data.U64[j];
     86        } else if (entry->type == PS_DATA_U32) {
     87            result |= vector->data.U32[j];
     88        } else {
     89            return;
     90        }
     91    }
     92
     93    if (entry->type == PS_DATA_U64) {
     94        entry->value = psMetadataItemAllocU64(entry->keyword, entry->statistic, result);
     95    } else {
     96        entry->value = psMetadataItemAllocU32(entry->keyword, entry->statistic, result);
     97    }
     98
     99    return;
     100}
     101
  • trunk/psastro/src/psastroChipAstrom.c

    r35419 r36914  
    143143                numGoodRO++;
    144144
     145                psU64 astrom_chip_val = 1;
     146                astrom_chip_val <<= view->chip;
     147                psMetadataAddU64 (updates, PS_LIST_TAIL, "ASTROM_CHIPS", PS_META_REPLACE,
     148                    "chips that passed astrometry", astrom_chip_val);
     149
    145150                // write the elapsed time here; this will be updated in psastroMosaicAstrometry, if called
    146151                psMetadataAddF32 (updates, PS_LIST_TAIL, "DT_ASTR", PS_META_REPLACE, "elapsed psastro time", psTimerMark ("psastroAnalysis"));
  • trunk/psastro/src/psastroOneChipFit.c

    r36837 r36914  
    228228    psMetadataAddF32 (updates, PS_LIST_TAIL, "CPRECISE", PS_META_REPLACE, "astrometry precision (arcsec)", 0.0);
    229229    psMetadataAddS32 (updates, PS_LIST_TAIL, "NASTRO",   PS_META_REPLACE, "number of astrometry stars", 0);
     230    psMetadataAddU64 (updates, PS_LIST_TAIL, "ASTROM_CHIPS", PS_META_REPLACE, "chips that passed astrometry", 0);
    230231    return true;
    231232}
Note: See TracChangeset for help on using the changeset viewer.