IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 36192


Ignore:
Timestamp:
Oct 9, 2013, 4:06:09 PM (13 years ago)
Author:
eugene
Message:

merge from trunk

Location:
branches/eam_branches/ipp-20130904
Files:
36 edited
4 copied

Legend:

Unmodified
Added
Removed
  • branches/eam_branches/ipp-20130904/Nebulous-Server

    • Property svn:mergeinfo changed (with no actual effect on merging)
  • branches/eam_branches/ipp-20130904/PS-IPP-PStamp/lib/PS/IPP/PStamp/Job.pm

    r36057 r36192  
    693693                $out->{data_state} = $out->{state} = $out->{stack_state};
    694694            } else {
    695                 # XXX: Consider looking up skycal results even if we are
     695                $out->{data_state} = $out->{state};
     696
     697                # XXX: Consider looking up skycal and staticsky results even if we are
    696698                # not using releasetool
    697                 $out->{data_state} = $out->{state};
    698699            }
    699700        }
     
    731732            $out->{mask}   = $ipprc->filename($mask_name,   $mask_base, $class_id) if $mask_name;
    732733            $out->{weight} = $ipprc->filename($weight_name, $base, $class_id) if $weight_name;
    733             $out->{cmf}    = $ipprc->filename($cmf_name,    $base, $class_id) if $cmf_name;
    734             $out->{psf}    = $ipprc->filename($psf_name,    $base, $class_id) if $psf_name;
    735734            $out->{backmdl}= $ipprc->filename($backmdl_name,$base, $class_id) if $backmdl_name;
     735            if ($image->{staticsky_path_base}) {
     736                $out->{psf}    = $ipprc->filename("PSPHOT.STACK.PSF.SAVE", $image->{staticsky_path_base}, $image->{stack_id});
     737                # if astrom was not set above to the skycal cmf get the sources file from staticsky
     738                $out->{cmf}    = $ipprc->filename("PSPHOT.STACK.OUTPUT",   $image->{staticsky_path_base}, $image->{stack_id}) if !$out->{astrom};
     739            } else {
     740                $out->{psf}    = $ipprc->filename($psf_name,    $base, $class_id) if $psf_name;
     741                $out->{cmf}    = $ipprc->filename($cmf_name,    $base, $class_id) if $cmf_name;
     742            }
    736743        }
    737744
     
    808815                        $command .= " -priority_order";
    809816                    }
    810                     $command .= " -surveyName $survey";
     817                    $command .= " -surveyName $survey" if $survey;
    811818                } else {
    812819                    $command = "$stacktool -dbname $imagedb";
     
    20512058    # see if we need to start the scs (skycell server)
    20522059
     2060    my $very_verbose = 0;
     2061
    20532062    if (!$scs_tess_id or ($scs_tess_id ne $tess_id)) {
    20542063        if ($scs_tess_id) {
     
    20762085
    20772086        # start an scs
     2087        print "Starting skycell server for $tess_dir_resolved.\n";
    20782088
    20792089        # create pipes for communicating with the server
     
    21112121            my $command = "$dvoImagesAtCoords -D CATDIR $tess_dir_resolved -coords -";
    21122122
    2113             print STDERR "SCS: execing $command\n";
     2123            print STDERR "SCS: execing $command\n" if $very_verbose;
    21142124
    21152125            unless(exec $command) {
     
    21462156    }
    21472157
    2148     my $very_verbose = 0;
    21492158    print STDERR "  sent coordinates to skycell server\n" if $very_verbose;
    21502159
  • branches/eam_branches/ipp-20130904/PS-IPP-PStamp/lib/PS/IPP/PStamp/RequestFile.pm

    r36058 r36192  
    3737                    $PSTAMP_USE_IMFILE_ID
    3838                    $PSTAMP_NO_WAIT_FOR_UPDATE
    39                     $PSTAMP_REQUEST_UNCENSORED
    40                     $PSTAMP_REQUIRE_UNCENSORED
     39                    $PSTAMP_SELECT_EXPJPEG
     40                    $PSTAMP_SELECT_NUMJPEG
    4141                    $PSTAMP_SUCCESS
    4242                    $PSTAMP_FIRST_ERROR_CODE
     
    5555                    $PSTAMP_NO_OVERLAP
    5656                    $PSTAMP_NOT_AUTHORIZED
     57                    $PSTAMP_NO_VALID_PIXELS
    5758                    );
    5859our %EXPORT_TAGS = (standard => [@EXPORT_OK]);
     
    8485our $PSTAMP_NO_WAIT_FOR_UPDATE = 32768;
    8586
    86 # these bits will be repurposed
    87 our $PSTAMP_REQUEST_UNCENSORED = 0x10000;
    88 our $PSTAMP_REQUIRE_UNCENSORED = 0x20000;
     87our $PSTAMP_SELECT_EXPJPEG     = 0x10000;
     88our $PSTAMP_SELECT_NUMJPEG     = 0x20000;
     89
     90# these bits have been repurposed. They were only exposed to MOPS and IFA and they have adapted.
     91#our $PSTAMP_REQUEST_UNCENSORED = 0x10000;
     92#our $PSTAMP_REQUIRE_UNCENSORED = 0x20000;
    8993
    9094# job and result codes
  • branches/eam_branches/ipp-20130904/dbconfig/cam.md

    • Property svn:mergeinfo changed (with no actual effect on merging)
  • branches/eam_branches/ipp-20130904/dbconfig/changes.txt

    • Property svn:mergeinfo changed (with no actual effect on merging)
  • branches/eam_branches/ipp-20130904/dvodist/Makefile.in

    r36076 r36192  
    6363$(TGT-IPPDATA)/photladder.20130107.subset/ubercal-fits/index.php \
    6464$(TGT-IPPDATA)/photladder.20130107.subset/ubercal-csv/index.php \
     65$(TGT-IPPDATA)/ps1.filters/index.php \
    6566$(TGT-IPPDATA)/catdir.syn.test/index.php \
    6667$(TGT-IPPDATA)/catdir.syn.test/n3000/index.php \
     
    7374$(TGT-IPPDATA)/ipp.css \
    7475$(TGT-IPPDATA)/PScolorlogo2.jpg \
     76$(TGT-IPPDATA)/ps1.filters/apj425122t3_mrt.txt \
    7577$(TGT-IPPDATA)/docs/photladder-1206.20130301.pdf \
    7678$(TGT-IPPDATA)/docs/2mass.compare/dH.allsky.20120528.v3.png \
  • branches/eam_branches/ipp-20130904/dvodist/ippdata/index.mkd

    r36076 r36192  
    4545@ PS1 Photladder, 12.01       : photladder.20130107.subset : dir   : dir1  : Photometric Reference Ladder, Release 12.01
    4646@ Synthetic Photometry DVO    : catdir.syn.test            : dir   : dir2  : Demonstration DVO Database
     47@ PS1 Filter Bandpasses       : ps1.filters                : dir   : dir1  : PS1 Filter Bandpass Tables
  • branches/eam_branches/ipp-20130904/ippMonitor

    • Property svn:mergeinfo changed (with no actual effect on merging)
  • branches/eam_branches/ipp-20130904/ippScripts/scripts/chip_imfile.pl

    • Property svn:mergeinfo changed (with no actual effect on merging)
  • branches/eam_branches/ipp-20130904/ippScripts/scripts/destreak_restore_camera.pl

    • Property svn:mergeinfo changed (with no actual effect on merging)
  • branches/eam_branches/ipp-20130904/ippScripts/scripts/ipp_apply_burntool_single.pl

    • Property svn:mergeinfo changed (with no actual effect on merging)
  • branches/eam_branches/ipp-20130904/ippScripts/scripts/lap_science.pl

    • Property svn:mergeinfo changed (with no actual effect on merging)
  • branches/eam_branches/ipp-20130904/ippScripts/scripts/magic_destreak.pl

    • Property svn:mergeinfo changed (with no actual effect on merging)
  • branches/eam_branches/ipp-20130904/ippScripts/scripts/publish_file.pl

    • Property svn:mergeinfo changed (with no actual effect on merging)
  • branches/eam_branches/ipp-20130904/ippScripts/scripts/receive_file.pl

    r35976 r36192  
    239239    }
    240240
    241     if ($stage eq 'sky' or $stage = 'skycal') {
     241    if ($stage eq 'sky' or $stage eq 'skycal') {
    242242        # the dbinfo file for staticskyRun and skycalRun only have one component and they don't contain
    243243        # skycell_id which is the way components are listed in the dirinfo file.
    244244        my @ids = keys %$components;
    245         &my_die( "unexpected number of components scalar @ids found in staticsky dirinfo file\n", $file_id, $PS_EXIT_UNKNOWN_ERROR) if scalar @ids != 1;
     245        my $nComponents = scalar @ids;
     246        &my_die( "unexpected number of components $nComponents found in $stage dirinfo file\n", $file_id, $PS_EXIT_UNKNOWN_ERROR) if $nComponents  != 1;
    246247        $current_component = $ids[0];
    247248    }
  • branches/eam_branches/ipp-20130904/ippScripts/scripts/warp_skycell.pl

    r36078 r36192  
    388388            $quality = 8006; # bad data.
    389389        }
    390 #         if (!$quality) {
    391 #             check_output($outputImage, 0);
    392 #             check_output($outputMask, 0);
    393 #             check_output($outputWeight, 0);
    394 #             check_output($outputSources, 1);
    395 #             check_output($outputPSF, 1) if metadataLookupBool($recipe, 'PSF')  ;
    396 #         }
    397390        print "Quality: $quality\n";
     391        if (!$quality) {
     392            check_output($outputImage, 0);
     393            check_output($outputMask, 0);
     394            check_output($outputWeight, 0);
     395            check_output($outputSources, 0);
     396            check_output($outputPSF, 0) if metadataLookupBool($recipe, 'PSF')  ;
     397        }
    398398
    399399        # $run_state eq 'update'
  • branches/eam_branches/ipp-20130904/ippTasks

    • Property svn:mergeinfo changed (with no actual effect on merging)
  • branches/eam_branches/ipp-20130904/ippToPsps

  • branches/eam_branches/ipp-20130904/ippToPsps/jython/dxlayer.py

    r35217 r36192  
    2525    '''
    2626    def deleteBatch(self, batchID):
     27        #HAF This is really lazy to do this way, but for the time, will check both dx layers and try the first, if no go try the second.
    2728
    2829        batch = Batch.getNameFromID(batchID)
     
    4647        p.stdout.close()
    4748
    48         if ret: self.logger.infoPair("Deleted batch from DXLayer", batch)
    49         else: self.logger.errorPair("Unable to delete batch from DXLayer", batch)
     49        if ret: self.logger.infoPair("Deleted batch from DXLayer 1", batch)
     50        else: self.logger.errorPair("Unable to delete batch from DXLayer 1" , batch)
     51
     52
     53       
     54
     55        tempFile = tempfile.NamedTemporaryFile(mode='w+b')
     56
     57        p = Popen("deleteFromDXLayer2.pl -b " + batch + " -f " + tempFile.name,
     58                shell=True,
     59                stdout=PIPE)
     60        p.wait()
     61       
     62        if p.returncode != 0:
     63           self.logger.debugPair("DXLayer webservice", "failed")
     64           return 0
     65        else:
     66           self.logger.debugPair("DXLayer webservice", "successful")
     67
     68        ret = self.decodeDXLayerResponse(tempFile.name)
     69
     70        tempFile.close()
     71        p.stdout.close()
     72
     73        if ret: self.logger.infoPair("Deleted batch from DXLayer 2", batch)
     74        else: self.logger.errorPair("Unable to delete batch from DXLayer 2" , batch)
     75
     76
     77
    5078
    5179        return ret
     80
    5281
    5382    '''
  • branches/eam_branches/ipp-20130904/ippToPsps/jython/ipptopspsdb.py

    r35994 r36192  
    3939               AND batch_type = '" + batchType + "' \
    4040               AND dvo_db = '" + self.skychunk.dvoLabel + "' \
     41               AND comment = '" + self.skychunk.name + "' \
     42               AND datastore_product = '" + self.skychunk.datastoreProduct + "' \
    4143               AND merged = 1 \
    4244               AND deleted_local = 0 \
     
    6567               AND batch_type = '" + batchType + "' \
    6668               AND dvo_db = '" + self.skychunk.dvoLabel + "' \
     69               AND comment = '" + self.skychunk.name + "' \
     70               AND datastore_product = '" + self.skychunk.datastoreProduct + "' \
    6771               AND purged = 1 \
    6872               AND deleted_local = 0 \
     
    9296               AND batch_type = '" + batchType + "' \
    9397               AND dvo_db = '" + self.skychunk.dvoLabel + "' \
     98               AND comment = '" + self.skychunk.name + "' \
     99               AND datastore_product = '" + self.skychunk.datastoreProduct + "' \
    94100               AND purged = 1 \
    95101               AND deleted_datastore = 0 \
     
    119125               AND batch_type = '" + batchType + "' \
    120126               AND dvo_db = '" + self.skychunk.dvoLabel + "' \
    121                AND (loaded_to_ODM = -1 OR merge_worthy = 1) \
     127               AND comment = '" + self.skychunk.name + "' \
     128               AND datastore_product = '" + self.skychunk.datastoreProduct + "' \
     129               AND (merge_worthy = 1) \
    122130               AND deleted_datastore = 0 AND block_delete_datastore = 0"
    123131
     
    144152               AND batch_type = '" + batchType + "' \
    145153               AND dvo_db = '" + self.skychunk.dvoLabel + "' \
    146                AND (loaded_to_ODM = -1 OR merge_worthy = 1) \
     154               AND (merge_worthy = 1) \
    147155               AND deleted_dxlayer = 0 and block_delete_dxlayer = 0"
    148156
  • branches/eam_branches/ipp-20130904/ippToPsps/jython/stackbatch.py

    r35780 r36192  
    645645        ,petRadiusErr=b.PETRO_RADIUS_ERR \
    646646        ,petFlux=POW(10.0, -0.4 * b.PETRO_MAG) /" + str(self.expTime) + " \
    647         ,petFluxErr=ABS(b.PETRO_MAG_ERR) * POW(10.0, (-0.4*b.PETRO_MAG)) / " + str(self.expTime) + " / 1.085736  \
     647        ,petFluxErr=-999  \
    648648        ,petR50=b.PETRO_RADIUS_50 \
    649649        ,petR50Err=b.PETRO_RADIUS_50_ERR \
     
    653653        WHERE a.ippDetectID=b.IPP_IDET"
    654654        self.scratchDb.execute(sql)
     655
     656        self.logger.infoPair("Adding", "petFluxErr for non nulls")
     657        sql = "UPDATE StackApFlx as a, SkyChip_xsrc AS b SET \
     658        petFluxErr=ABS(b.PETRO_MAG_ERR) * POW(10.0, (-0.4*b.PETRO_MAG)) / " + str(self.expTime) + " / 1.085736  \
     659        WHERE a.ippDetectID=b.IPP_IDET \
     660        AND (b.PETRO_MAG_ERR is not NULL AND b.PETRO_MAG is not NULL AND PETRO_MAG_ERR < 1000.0)"
     661        # added this because when the petromagerr is crazy large (10^29 it out of ranges the flux err calc)
     662        self.logger.infoPair("sql", sql)
     663        self.scratchDb.execute(sql)
     664
     665
    655666
    656667        self.logger.infoPair("adding"," PrimaryF to stackApFlx")
  • branches/eam_branches/ipp-20130904/ippconfig

  • branches/eam_branches/ipp-20130904/ippconfig/gpc1

  • branches/eam_branches/ipp-20130904/ippconfig/gpc1/ppImage.config

    r35846 r36192  
    3434# aditional auxiliary mask applied to corners of all chips in video cells.
    3535# Is only applied if MASK.AUXMASK and USE.VIDEO.MASK are both true
    36 AUX.VIDEO.MASK  STR     neb://any/gpc1/auxmask/mpg.20130506/mask_video_cell_corners.fits
     36AUX.VIDEO.MASK  STR     neb://any/gpc1/auxmask/mpg.20130930/mask_video_cell_corners.fits
    3737
    3838
     
    189189END
    190190
     191CHIP_NOCOMPRESS METADATA
     192  BASE.FITS          BOOL    FALSE           # Save base detrended image?
     193  BASE.MASK.FITS     BOOL    FALSE           # Save base detrended image?
     194  BASE.VARIANCE.FITS BOOL    FALSE           # Save base detrended image?
     195  CHIP.FITS          BOOL    TRUE            # Save chip-mosaic-ed image?
     196  CHIP.MASK.FITS     BOOL    TRUE            # Save chip-mosaic-ed image?
     197  CHIP.VARIANCE.FITS BOOL    TRUE            # Save chip-mosaic-ed image?
     198  OVERSCAN           BOOL    TRUE            # Overscan subtraction
     199  NONLIN             BOOL    TRUE            # apply non-linearity correction
     200  BIAS               BOOL    FALSE           # Bias subtraction
     201  DARK               BOOL    TRUE            # Dark subtraction
     202  NOISEMAP           BOOL    TRUE           
     203  REMNANCE           BOOL    FALSE           # Remnance masking
     204  SHUTTER            BOOL    FALSE           # Shutter correction
     205  FLAT               BOOL    TRUE            # Flat-field normalisation
     206  MASK               BOOL    TRUE            # Mask bad pixels
     207  MASK.BUILD         BOOL    TRUE            # Build internal mask?
     208  MASK.BURNTOOL      BOOL    TRUE            # Mask potential burntool trails
     209  MASK.AUXMASK       BOOL    FALSE           # augment mask with more restrictive auxiliary mask
     210  PATTERN.ROW        BOOL    TRUE            # Row pattern correction
     211  PATTERN.CELL       BOOL    FALSE           # Cell pattern correction
     212  PATTERN.CONTINUITY BOOL    TRUE            # Cell pattern correction using edge continuity
     213  FRINGE             BOOL    TRUE            # Fringe subtraction
     214  BIN1.FITS          BOOL    TRUE            # Save 1st binned chip image?
     215  BIN2.FITS          BOOL    TRUE            # Save 2nd binned chip image?
     216  PHOTOM             BOOL    TRUE            # Source identification and photometry
     217  ASTROM.CHIP        BOOL    FALSE           # Astrometry per chip?
     218  ASTROM.MOSAIC      BOOL    FALSE           # Astrometry for mosaic?
     219  BACKGROUND         BOOL    TRUE            # Subtract background?
     220  CROSSTALK.MEASURE  BOOL    FALSE           # Subtract model background?
     221  NO.COMPRESS        BOOL    TRUE            # do not compress images
     222END
     223
    191224# Chip processing for testing pattern correction
    192225CHIP_PATTERNTEST METADATA
     
    12591292  CROSSTALK.MEASURE  BOOL    FALSE           # Subtract model background?
    12601293  NO.COMPRESS        BOOL    TRUE            # turn off image compression
     1294    DETREND.CONSTRAINTS  METADATA
     1295      BIAS METADATA
     1296      END
     1297      DARK METADATA
     1298        EXPTIME STR FPA.EXPOSURE
     1299      END
     1300      FLAT METADATA
     1301        FILTER  STR FPA.FILTERID
     1302      END
     1303      FLATCORR METADATA
     1304        FILTER   STR FPA.FILTERID
     1305      END
     1306      FRINGE METADATA
     1307        FILTER   STR FPA.FILTERID
     1308      END
     1309      SHUTTER METADATA
     1310      END
     1311      MASK METADATA
     1312      END       
     1313      AUXMASK METADATA
     1314        DETTYPE STR AUXMASK_STS
     1315      END
     1316      ASTROM METADATA
     1317      END       
     1318      NOISEMAP METADATA
     1319      END       
     1320      LINEARITY METADATA
     1321      END
     1322    END
     1323END
     1324
     1325# Standard chip processing + auxiliary mask with heavy masking
     1326CHIP_AUXMASK_HEAVY METADATA
     1327  BASE.FITS          BOOL    FALSE           # Save base detrended image?
     1328  BASE.MASK.FITS     BOOL    FALSE           # Save base detrended image?
     1329  BASE.VARIANCE.FITS BOOL    FALSE           # Save base detrended image?
     1330  CHIP.FITS          BOOL    TRUE            # Save chip-mosaic-ed image?
     1331  CHIP.MASK.FITS     BOOL    TRUE            # Save chip-mosaic-ed image?
     1332  CHIP.VARIANCE.FITS BOOL    TRUE            # Save chip-mosaic-ed image?
     1333  OVERSCAN           BOOL    TRUE            # Overscan subtraction
     1334  NONLIN             BOOL    TRUE            # apply non-linearity correction
     1335  BIAS               BOOL    FALSE           # Bias subtraction
     1336  DARK               BOOL    TRUE            # Dark subtraction
     1337  NOISEMAP           BOOL    TRUE           
     1338  REMNANCE           BOOL    FALSE           # Remnance masking
     1339  SHUTTER            BOOL    FALSE           # Shutter correction
     1340  FLAT               BOOL    TRUE            # Flat-field normalisation
     1341  MASK               BOOL    TRUE            # Mask bad pixels
     1342  MASK.BUILD         BOOL    TRUE            # Build internal mask?
     1343  MASK.BURNTOOL      BOOL    TRUE            # Mask potential burntool trails
     1344  MASK.AUXMASK       BOOL    TRUE            # augment mask with more restrictive auxiliary mask
     1345  PATTERN.ROW        BOOL    TRUE            # Row pattern correction
     1346  PATTERN.CELL       BOOL    FALSE           # Cell pattern correction
     1347  PATTERN.CONTINUITY BOOL    TRUE            # Cell pattern correction using edge continuity
     1348  FRINGE             BOOL    TRUE            # Fringe subtraction
     1349  BIN1.FITS          BOOL    TRUE            # Save 1st binned chip image?
     1350  BIN2.FITS          BOOL    TRUE            # Save 2nd binned chip image?
     1351  PHOTOM             BOOL    TRUE            # Source identification and photometry
     1352  ASTROM.CHIP        BOOL    FALSE           # Astrometry per chip?
     1353  ASTROM.MOSAIC      BOOL    FALSE           # Astrometry for mosaic?
     1354  BACKGROUND         BOOL    TRUE            # Subtract background?
     1355  CROSSTALK.MEASURE  BOOL    FALSE           # Subtract model background?
     1356  NO.COMPRESS        BOOL    TRUE            # turn off image compression
     1357    DETREND.CONSTRAINTS  METADATA
     1358      BIAS METADATA
     1359      END
     1360      DARK METADATA
     1361        EXPTIME STR FPA.EXPOSURE
     1362      END
     1363      FLAT METADATA
     1364        FILTER  STR FPA.FILTERID
     1365      END
     1366      FLATCORR METADATA
     1367        FILTER   STR FPA.FILTERID
     1368      END
     1369      FRINGE METADATA
     1370        FILTER   STR FPA.FILTERID
     1371      END
     1372      SHUTTER METADATA
     1373      END
     1374      MASK METADATA
     1375      END       
     1376      AUXMASK METADATA
     1377        DETTYPE STR AUXMASK_HEAVY
     1378      END
     1379      ASTROM METADATA
     1380      END       
     1381      NOISEMAP METADATA
     1382      END       
     1383      LINEARITY METADATA
     1384      END
     1385    END
    12611386END
    12621387
     
    13591484  CROSSTALK.MEASURE  BOOL    FALSE           # Subtract model background?
    13601485  NO.COMPRESS        BOOL    TRUE            # turn off image compression
     1486    DETREND.CONSTRAINTS  METADATA
     1487      BIAS METADATA
     1488      END
     1489      DARK METADATA
     1490        EXPTIME STR FPA.EXPOSURE
     1491      END
     1492      FLAT METADATA
     1493        FILTER  STR FPA.FILTERID
     1494      END
     1495      FLATCORR METADATA
     1496        FILTER   STR FPA.FILTERID
     1497      END
     1498      FRINGE METADATA
     1499        FILTER   STR FPA.FILTERID
     1500      END
     1501      SHUTTER METADATA
     1502      END
     1503      MASK METADATA
     1504      END       
     1505      AUXMASK METADATA
     1506        DETTYPE STR AUXMASK_HEAVY
     1507      END
     1508      ASTROM METADATA
     1509      END       
     1510      NOISEMAP METADATA
     1511      END       
     1512      LINEARITY METADATA
     1513      END
     1514    END
    13611515END
    13621516
  • branches/eam_branches/ipp-20130904/ippconfig/gpc1/ppStack.config

    r35964 r36192  
    125125END
    126126
    127 STACK_NIGHTLY_1DG  METADATA                 # Typically MD 8 input nightly stacks and using 1DG convolution
    128     OUTPUT.NOCOMP      BOOL  FALSE
    129     OUTPUT.LOGFLUX     BOOL  FALSE
    130     PSF.TARGET.AS.MAX  BOOL  TRUE
    131     PSF.TARGET.AS.MAX.EPSILON F32 0.1
     127STACK_NIGHTLY_1DG  METADATA                 # Revised MD 8 input nightly stacks and using 1DG convolution
     128    OUTPUT.NOCOMP             BOOL  FALSE
     129    OUTPUT.LOGFLUX            BOOL  FALSE
     130    PSF.INPUT.CLIP.SIMPLE     BOOL  True
     131    PSF.INPUT.MAX             F32   12.0    # what FWHM does diffim become mostly useless, if any?
     132    PSF.INPUT.CLIP.NSIGMA     F32   1000.0  # want to use up to MAX, but sig could possibly be small?
     133    MATCH.REJ                 F32   4.0     # need to tune?
     134    SAFE                      BOOL  FALSE
     135    PSF.TARGET.AS.MAX         BOOL  TRUE
     136    PSF.TARGET.AS.MAX.EPSILON F32   0.1
    132137END
    133138
     
    138143    STACK.TYPE              STR   DEEP_STACK  ## needed?
    139144    PSF.INPUT.CLIP.SIMPLE   BOOL  True
    140     PSF.INPUT.MAX           F32   6.0   # never really want >6 pixels in refstack
     145    PSF.INPUT.MAX           F32   6.0   # never really want >6 pixels in refstack, even on edges
    141146    PSF.INPUT.CLIP.NSIGMA   F32   1.0   # sample typically on rising side of distribution (set even smaller?)
    142147    PSF.INPUT.THRESH        F32   NAN
    143148    PSF.INPUT.ASYMMETRY     F32   NAN
    144     MATCH.REJ               F32   4.0 # need ot tune?
     149    MATCH.REJ               F32   4.0   # need ot tune?
    145150    SAFE                    BOOL  FALSE
    146151    PSF.TARGET.AS.MAX       BOOL  TRUE      # Set the target PSF FWHM as the maximum of accepted input FWHM values.
     
    154159    STACK.TYPE              STR   DEEP_STACK
    155160    PSF.INPUT.CLIP.SIMPLE   BOOL  True
    156     PSF.INPUT.MAX           F32   10.0
     161    PSF.INPUT.MAX           F32   10.0    # 
    157162    PSF.INPUT.CLIP.NSIGMA   F32   100.0
    158163    PSF.INPUT.THRESH        F32   NAN
    159164    PSF.INPUT.ASYMMETRY     F32   NAN
    160     MATCH.REJ               F32   4.0 # need ot tune?
     165    MATCH.REJ               F32   4.0     # need ot tune?
    161166    SAFE                    BOOL  FALSE
    162167    PSF.TARGET.AS.MAX  BOOL  TRUE
     
    164169END
    165170
    166 STACK_ALLDEEP_1DG      METADATA     # no cuts, everything in changes after ppStack mods 5/03/13
     171STACK_ALLDEEP_1DG      METADATA     # no real cuts, for changes after ppStack mods 5/03/13
    167172    OUTPUT.NOCOMP           BOOL  TRUE
    168173    OUTPUT.LOGFLUX          BOOL  FALSE
     
    170175    STACK.TYPE              STR   DEEP_STACK
    171176    PSF.INPUT.CLIP.SIMPLE   BOOL  True
    172     PSF.INPUT.MAX           F32   100.0
     177    PSF.INPUT.MAX           F32   14.0    # greater than 14 is more often junk
    173178    PSF.INPUT.CLIP.NSIGMA   F32   100.0
    174179    PSF.INPUT.THRESH        F32   NAN
    175180    PSF.INPUT.ASYMMETRY     F32   NAN
    176     MATCH.REJ               F32   4.0 # need ot tune?
     181    MATCH.REJ               F32   4.0     # need ot tune?
    177182    SAFE                    BOOL  FALSE
    178183    PSF.TARGET.AS.MAX  BOOL  TRUE
  • branches/eam_branches/ipp-20130904/ippconfig/recipes/filerules-split.mdc

    r36163 r36192  
    3838PPIMAGE.INPUT.MASK        INPUT    @FILES        CHIP       MASK
    3939PPIMAGE.VIDEOMASK         INPUT    @DETDB        CHIP       MASK
     40PPIMAGE.AUXMASK           INPUT    @DETDB        CHIP       MASK
    4041PPIMAGE.INPUT.VARIANCE    INPUT    @FILES        CHIP       VARIANCE
    4142PPIMAGE.INPUT.PSF         INPUT    @FILES        CHIP       PSF
  • branches/eam_branches/ipp-20130904/ippconfig/recipes/ppImage.config

    r35688 r36192  
    194194  MASK.STATS         BOOL    TRUE            # Calculate Mask statistics.
    195195END
    196 
    197196# Standard chip processing
     197CHIP_NOCOMPRESS METADATA
     198  BASE.FITS          BOOL    FALSE           # Save base detrended image?
     199  BASE.MASK.FITS     BOOL    FALSE           # Save base detrended image?
     200  BASE.VARIANCE.FITS BOOL    FALSE           # Save base detrended image?
     201  CHIP.FITS          BOOL    TRUE            # Save chip-mosaic-ed image?
     202  CHIP.MASK.FITS     BOOL    TRUE            # Save chip-mosaic-ed image?
     203  CHIP.VARIANCE.FITS BOOL    TRUE            # Save chip-mosaic-ed image?
     204  OVERSCAN           BOOL    TRUE            # Overscan subtraction
     205  NONLIN             BOOL    FALSE           # Non-linearity correction; not implemented
     206  BIAS               BOOL    TRUE            # Bias subtraction
     207  DARK               BOOL    TRUE            # Dark subtraction
     208  SHUTTER            BOOL    FALSE           # Shutter correction
     209  FLAT               BOOL    TRUE            # Flat-field normalisation
     210  MASK               BOOL    TRUE            # Mask bad pixels
     211  FRINGE             BOOL    TRUE            # Fringe subtraction
     212  BIN1.FITS          BOOL    TRUE            # Save 1st binned chip image?
     213  BIN2.FITS          BOOL    TRUE            # Save 2nd binned chip image?
     214  PHOTOM             BOOL    TRUE            # Source identification and photometry
     215  ASTROM.CHIP        BOOL    FALSE           # Astrometry per chip?
     216  ASTROM.MOSAIC      BOOL    FALSE           # Astrometry for mosaic?
     217  BACKGROUND         BOOL    TRUE            # Subtract background?
     218  MASK.STATS         BOOL    TRUE            # Calculate Mask statistics.
     219  NO.COMPRESS        BOOL    TRUE
     220END
     221
     222# Standard chip processing with auxillary masking
    198223CHIP_AUXMASK    METADATA
     224  BASE.FITS          BOOL    FALSE           # Save base detrended image?
     225  BASE.MASK.FITS     BOOL    FALSE           # Save base detrended image?
     226  BASE.VARIANCE.FITS BOOL    FALSE           # Save base detrended image?
     227  CHIP.FITS          BOOL    TRUE            # Save chip-mosaic-ed image?
     228  CHIP.MASK.FITS     BOOL    TRUE            # Save chip-mosaic-ed image?
     229  CHIP.VARIANCE.FITS BOOL    TRUE            # Save chip-mosaic-ed image?
     230  OVERSCAN           BOOL    TRUE            # Overscan subtraction
     231  NONLIN             BOOL    FALSE           # Non-linearity correction; not implemented
     232  BIAS               BOOL    TRUE            # Bias subtraction
     233  DARK               BOOL    TRUE            # Dark subtraction
     234  SHUTTER            BOOL    FALSE           # Shutter correction
     235  FLAT               BOOL    TRUE            # Flat-field normalisation
     236  MASK               BOOL    TRUE            # Mask bad pixels
     237  FRINGE             BOOL    TRUE            # Fringe subtraction
     238  BIN1.FITS          BOOL    TRUE            # Save 1st binned chip image?
     239  BIN2.FITS          BOOL    TRUE            # Save 2nd binned chip image?
     240  PHOTOM             BOOL    TRUE            # Source identification and photometry
     241  ASTROM.CHIP        BOOL    FALSE           # Astrometry per chip?
     242  ASTROM.MOSAIC      BOOL    FALSE           # Astrometry for mosaic?
     243  BACKGROUND         BOOL    TRUE            # Subtract background?
     244  MASK.STATS         BOOL    TRUE            # Calculate Mask statistics.
     245END
     246
     247# Standard chip processing with heavy auxillary masking (same as CHIP_AUXMASK here, but different in gpc1)
     248CHIP_AUXMASK_HEAVY      METADATA
    199249  BASE.FITS          BOOL    FALSE           # Save base detrended image?
    200250  BASE.MASK.FITS     BOOL    FALSE           # Save base detrended image?
  • branches/eam_branches/ipp-20130904/ippconfig/recipes/ppSub.config

    • Property svn:mergeinfo changed (with no actual effect on merging)
  • branches/eam_branches/ipp-20130904/ippconfig/recipes/reductionClasses.mdc

    r36094 r36192  
    11291129   CHIP_PSPHOT STR CHIP
    11301130   WARP_PSWARP STR WARP
     1131   STACK_PPSTACK STR STACK
     1132   STACK_PPSUB STR STACK
     1133   STACK_PSPHOT STR STACK
     1134   DIFF_PPSUB  STR DIFF
     1135   DIFF_PSPHOT STR DIFF
     1136   JPEG_BIN1   STR PPIMAGE_J1
     1137   JPEG_BIN2   STR PPIMAGE_J2
     1138   FAKEPHOT    STR FAKEPHOT
     1139   ADDSTAR     STR ADDSTAR
     1140   PSASTRO     STR STS_DATASET
     1141   STACKPHOT   STR STACKPHOT
     1142END
     1143
     1144STS_DATASET_NOCOMPRESS METADATA
     1145   CHIP_PPIMAGE STR CHIP_NOCOMPRESS
     1146   CHIP_PSPHOT STR CHIP
     1147   WARP_PSWARP STR WARP_NOCOMPRESS
    11311148   STACK_PPSTACK   STR STACK
    11321149   STACK_PPSUB STR STACK
  • branches/eam_branches/ipp-20130904/pstamp/scripts

  • branches/eam_branches/ipp-20130904/pstamp/scripts/psmkreq

    r35438 r36192  
    177177$id = 0 if !$id;
    178178
    179 unless ($stage eq 'raw' or $stage eq 'chip' or $stage eq 'warp' or $stage eq 'diff' or $stage eq 'stack') {
     179unless ($stage eq 'raw' or $stage eq 'chip' or $stage eq 'warp' or $stage eq 'diff' or $stage eq 'stack'
     180    or $stage eq 'stack_summary') {
    180181    die "$stage is not a valid value for stage\n";
    181182}
     
    208209        $option_mask |= $PSTAMP_SELECT_PSF      if $psf;
    209210        $option_mask |= $PSTAMP_SELECT_BACKMDL  if $backmdl;
     211        $option_mask |= $PSTAMP_SELECT_UNCOMPRESSED   if $uncompressed;
    210212        $option_mask |= $PSTAMP_SELECT_UNCONV   if $unconvolved;
    211213        $option_mask |= $PSTAMP_USE_IMFILE_ID   if $use_imfile_id;
  • branches/eam_branches/ipp-20130904/pstamp/scripts/pstamp_checkdependent.pl

    r35937 r36192  
    304304            }
    305305            $queued_update = 1;
     306        } elsif ($chip->{state} eq 'cleaned' and $chip->{data_state} eq 'update') {
     307            # we've had a number of runs in this limbo state
     308
     309            my $command = "$chiptool -updaterun -set_state update -chip_id $chip_id";
     310            $command .= " -set_label $rlabel" if $rlabel;
     311
     312            if (!$no_update) {
     313                my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =
     314                            run(command => $command, verbose => $verbose);
     315                unless ($success) {
     316                    my_die("failed to change ${stage}Run $stage_id $component from goto_cleaned to update", $PS_EXIT_UNKNOWN_ERROR);
     317                }
     318            } else {
     319                print "skipping $command\n";
     320            }
     321            $queued_update = 1;
    306322        } elsif ($chip->{fault}) {
    307323            $fault_count++;
     
    460476            print "skipping $command\n";
    461477        }
     478    } elsif ($chips_ready and $skycell->{data_state} eq 'update' and $skycell->{state} ne 'update') {
     479        my $command = "$warptool -updaterun -warp_id $warp_id -set_state update";
     480        $command .= " -set_label $rlabel" if $rlabel;
     481
     482        if (!$no_update) {
     483            my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =
     484                        run(command => $command, verbose => $verbose);
     485            unless ($success) {
     486                my_die("failed to change state of ${stage}Run $stage_id to update", $PS_EXIT_UNKNOWN_ERROR);
     487            }
     488        } else {
     489            print "skipping $command\n";
     490        }
     491
    462492    } elsif (scalar @chipsToUpdate > 0) {
    463493        my $fault = check_states_chip($chip_id, \@chipsToUpdate, $rlabel, $need_magic);
  • branches/eam_branches/ipp-20130904/pstamp/scripts/pstamp_job_run.pl

    r36059 r36192  
    236236                           $PSTAMP_SELECT_JPEG     => 'jpg',
    237237                           $PSTAMP_SELECT_EXP      => 'exp.fits',
    238                            $PSTAMP_SELECT_NUM      => 'num.fits');
     238                           $PSTAMP_SELECT_NUM      => 'num.fits',
     239                           $PSTAMP_SELECT_EXPJPEG  => 'exp.jpg',
     240                           $PSTAMP_SELECT_NUMJPEG  => 'num.jpg');
    239241
    240242        my $output_mask = $options & ($PSTAMP_SELECT_IMAGE | $PSTAMP_SELECT_MASK | $PSTAMP_SELECT_VARIANCE
    241             | $PSTAMP_SELECT_JPEG | $PSTAMP_SELECT_SOURCES | $PSTAMP_SELECT_EXP | $PSTAMP_SELECT_NUM);
     243            | $PSTAMP_SELECT_JPEG | $PSTAMP_SELECT_SOURCES
     244            | $PSTAMP_SELECT_EXP | $PSTAMP_SELECT_NUM
     245            | $PSTAMP_SELECT_EXPJPEG | $PSTAMP_SELECT_NUMJPEG);
     246
    242247
    243248        foreach my $key (keys (%extensions)) {
     
    261266        close $F;
    262267        $jobStatus = $PS_EXIT_SUCCESS;
    263     } elsif ($exitStatus == $PSTAMP_NO_OVERLAP) {
    264         $jobStatus = $PSTAMP_NO_OVERLAP;
     268    } elsif ($exitStatus == $PSTAMP_NO_OVERLAP || $exitStatus == $PSTAMP_NO_VALID_PIXELS) {
     269        $jobStatus = $exitStatus;
    265270    } else {
    266271        my_die( "ppstamp failed with error code: $exitStatus", $job_id, $exitStatus);
     
    382387        my $backmdl_file = $params->{backmdl} if ($options & $PSTAMP_SELECT_BACKMDL);
    383388        my $pattern_file = $params->{pattern} if ($options & $PSTAMP_SELECT_BACKMDL);
     389        my $filter = $params->{filter};
     390        $filter = ' ' if !$filter;
     391        $filter = substr $filter, 0, 1;
    384392        my $cmf_file;
    385393#        if ($stage ne 'chip') {
     
    394402            if (!$therest or !$rownum or !$jobnum);
    395403
    396         my $prefix = "${rownum}_${jobnum}_";
     404        # XXX: Here we are assuming the form of the output file names
     405        # if we change this in pstampparse we'll need to remember ....
     406        # (the last time I forgot)
     407        my $prefix = "${rownum}_${jobnum}_${filter}_";
    397408
    398409        if ($cmf_file) {
     
    573584    $params->{exp}    = $path_base . ".exp.b1.fits";
    574585    $params->{num}    = $path_base . ".num.b1.fits";
     586    $params->{expjpeg} = $path_base . ".exp.0.b1.jpeg";
     587    $params->{numjpeg} = $path_base . ".num.0.b1.jpeg";
    575588}
    576589
     
    632645        if (!myCopy("$outputBase.num.fits", $params->{num}, 'num', 0)) {
    633646            $options &= ~$PSTAMP_SELECT_NUM;
     647        }
     648    }
     649    if ($options & $PSTAMP_SELECT_EXPJPEG) {
     650        if (!myCopy("$outputBase.exp.jpg", $params->{expjpeg}, 'exp', 0)) {
     651            $options &= ~$PSTAMP_SELECT_EXPJPEG;
     652        }
     653    }
     654    if ($options & $PSTAMP_SELECT_NUMJPEG) {
     655        if (!myCopy("$outputBase.num.jpg", $params->{numjpeg}, 'num', 0)) {
     656            $options &= ~$PSTAMP_SELECT_NUMJPEG;
    634657        }
    635658    }
  • branches/eam_branches/ipp-20130904/pstamp/scripts/pstampparse.pl

    r36061 r36192  
    3131my $no_update;
    3232my $dest_requires_magic;
     33my $dump_params = 0;
    3334
    3435# set this to true to disable update processing
     
    4849    'save-temps'=>  \$save_temps,
    4950    'no-update' =>  \$no_update,
     51    'dump-params' => \$dump_params,
    5052);
    5153
     
    238240
    239241
     242# if label is for one of the high priority channels, watch for big requests
     243my $watch_for_big_requests = (!($label =~ /BIG/) and ($label =~ /PSI/ or $label =~ /WEB/));
     244
     245my $big_limit = 100;    # XXX: this should be in a configuration file somewhere not hard coded
     246
     247if ($watch_for_big_requests and $nRows > $big_limit) {
     248    $label = change_to_lower_priority_label($label);
     249    $watch_for_big_requests = 0;
     250}
    240251
    241252my $num_jobs = 0;
    242 my $imageList;
    243 my $stage;
    244 my $big_limit = 100;    # XXX: this should be in a configuration file some where
     253
    245254foreach my $row (@$rows) {
    246 
    247 
    248     if (!($label =~ /BIG/) and ($label =~ /PSI/ or $label =~ /WEB/) and ($nRows > $big_limit or $num_jobs > $big_limit)
    249         and $req_id and !$no_update) {
    250 
    251         # This is a "big" request and it came from one of the "high priority" channels
    252         # and doesn't have a specific label assigned.
    253         # Change the label to a value that its jobs run with lower priority.
    254 
    255         my $old_label = $label;
    256         $label = ($label =~ /WEB/) ? 'WEB.BIG' : 'PSI.BIG';
    257         print "\nChanging label for big $old_label request to $label\n";
    258 
    259         my $command = "$pstamptool -updatereq -req_id $req_id  -set_label $label";
    260         my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =
    261             run(command => $command, verbose => $verbose);
    262         unless ($success) {
    263             my_die("$command failed", $PS_EXIT_UNKNOWN_ERROR);
    264         }
    265     }
    266255
    267256    # validate the paramaters
     
    276265
    277266    $num_jobs += processRow($action, $row);
     267
     268    # see whether number of jobs limit for high priority request was exceeded
     269    if ($watch_for_big_requests and $num_jobs > $big_limit) {
     270        $label = change_to_lower_priority_label($label);
     271        $watch_for_big_requests = 0;
     272    }
    278273}
    279274
     
    286281
    287282exit 0;
     283
     284# end of main function
     285
     286sub change_to_lower_priority_label {
     287    my $label = shift;
     288    my $old_label = $label;
     289    $label = ($label =~ /WEB/) ? 'WEB.BIG' : 'PSI.BIG';
     290    print "\nChanging label for big $old_label request to $label\n";
     291
     292    my $command = "$pstamptool -updatereq -req_id $req_id  -set_label $label";
     293    my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =
     294        run(command => $command, verbose => $verbose);
     295    unless ($success) {
     296        my_die("$command failed", $PS_EXIT_UNKNOWN_ERROR);
     297    }
     298    return $label;
     299}
    288300
    289301sub checkRow {
     
    494506    print "\nCalling locate_images_for_row for row: $rownum\n";
    495507
    496     $imageList = locate_images_for_row($ipprc, $image_db, $camera, $row, $verbose);
     508    my $imageList = locate_images_for_row($ipprc, $image_db, $camera, $row, $verbose);
    497509
    498510    my $dtime_locate = gettimeofday() - $start_locate;
     
    586598    # information required is contained there
    587599
    588     $imageList = locate_images($ipprc, $image_db, $rowList, $req_type, $stage, $id, $tess_id, $component,
     600    my $imageList = locate_images($ipprc, $image_db, $rowList, $req_type, $stage, $id, $tess_id, $component,
    589601                $option_mask, $need_magic, $mjd_min, $mjd_max, $filter, $data_group, $verbose);
    590602
     
    777789            print "$image->{image}\n";
    778790            ++$firstRow->{job_num};
     791            if ($dump_params) {
     792                my $rownum = $firstRow->{ROWNUM};
     793                my $jobnum = $firstRow->{job_num};
     794                my $filter = substr $image->{filter}, 0, 1;
     795                my $output_base = "${rownum}_${jobnum}_${filter}";
     796                write_params($output_base, $image);
     797            }
    779798        }
    780799    } elsif ($job_type eq "get_image") {
  • branches/eam_branches/ipp-20130904/pstamp/test/gpc1/stacksummary.bycoord.txt

    r36043 r36192  
    44CHANGEME 2 PROCESS null
    55#  ROWNUM CENTER_X CENTER_Y WIDTH HEIGHT COORD_MASK JOB_TYPE OPTION_MASK PROJECT SURVEY_NAME IPP_RELEASE REQ_TYPE IMG_TYPE ID TESS_ID COMPONENT DATA_GROUP REQFILT MJD_MIN MJD_MAX RUN_TYPE FWHM_MIN FWHM_MAX | COMMENT
    6 1     359.767   -30.2009     100    100   2      stamp      455         gpc1      3PI         null     bycoord   stack_summary  null RINGS.V3 null   LAP.ThreePI.20130717%      r        0      0        null      0        0    |
     61     359.767   -30.2009     100    100   2  stamp      196673        gpc1      3PI         null     bycoord   stack_summary  null RINGS.V3 null   LAP.ThreePI.20130717%      r        0      0        null      0        0    |
  • branches/eam_branches/ipp-20130904/psvideophot

    • Property svn:mergeinfo changed (with no actual effect on merging)
Note: See TracChangeset for help on using the changeset viewer.