IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 36622


Ignore:
Timestamp:
Mar 31, 2014, 11:50:56 AM (12 years ago)
Author:
eugene
Message:

merge changes from trunk

Location:
branches/eam_branches/ipp-20140226
Files:
21 edited
11 copied

Legend:

Unmodified
Added
Removed
  • branches/eam_branches/ipp-20140226

  • branches/eam_branches/ipp-20140226/Ohana/src/libohana/src

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

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

    • Property svn:mergeinfo changed (with no actual effect on merging)
  • branches/eam_branches/ipp-20140226/ippToPsps/jython/cleanup.py

    r35311 r36622  
    8787        self.logger.infoPair("To delete from DXLayer", "%d" % len(deleteFromDxLayerIDs))
    8888        self.logger.infoPair("To delete from local disk", "%d" % len(deleteFromLocalIDs))
    89    
     89    #    self.logger.infoPair("Did I get here", "yes?")
    9090        # delete stuff from local disk
    9191        if self.skychunk.deleteLocal:
     
    110110   
    111111            self.reportResults("datastore", deleteFromDatastoreIDs, count)
    112         
     112       # self.logger.infoPair("here","here")
    113113        # remove stuff from DXLayer
    114114        if self.skychunk.deleteDxLayer:
     115#            self.logger.infoPair ("skip remove from dxlayer", "HAF")
    115116            count = 0
    116117            for id in deleteFromDxLayerIDs:
    117        
     118                self.logger.infoPair("delete from dxlayer", id);
    118119                if self.dxlayer.deleteBatch(id):
     120                    self.logger.infoPair("delete dxlayer",id);
    119121                    self.ippToPspsDb.updateDeletedDxlayer(id, 1)
    120122                    count = count + 1
  • branches/eam_branches/ipp-20140226/ippToPsps/jython/dxlayer.py

    r36098 r36622  
    3737       
    3838        if p.returncode != 0:
    39            self.logger.debugPair("DXLayer webservice", "failed")
     39           self.logger.infoPair("DXLayer webservice", "failed")
    4040           return 0
    4141        else:
    42            self.logger.debugPair("DXLayer webservice", "successful")
     42           self.logger.infoPair("DXLayer webservice", "successful")
    4343
    4444        ret = self.decodeDXLayerResponse(tempFile.name)
     
    4848
    4949        if ret: self.logger.infoPair("Deleted batch from DXLayer 1", batch)
    50         else: self.logger.errorPair("Unable to delete batch from DXLayer 1" , batch)
     50        else: self.logger.infoPair("Unable to delete batch from DXLayer 1" , batch)
    5151
    5252
     
    6161       
    6262        if p.returncode != 0:
    63            self.logger.debugPair("DXLayer webservice", "failed")
     63           self.logger.infoPair("DXLayer webservice", "failed")
    6464           return 0
    6565        else:
     
    7272
    7373        if ret: self.logger.infoPair("Deleted batch from DXLayer 2", batch)
    74         else: self.logger.errorPair("Unable to delete batch from DXLayer 2" , batch)
     74        else: self.logger.infoPair("Unable to delete batch from DXLayer 2" , batch)
    7575
    7676
  • branches/eam_branches/ipp-20140226/ippToPsps/jython/odm.py

    r35217 r36622  
    7878                DETAILS = doc.find("{%s}OdmBatchState/{%s}Details" % (NAMESPACE, NAMESPACE)).text
    7979                results['DETAILS'] = DETAILS
    80             elif re.search("processing", STATE): 
     80            elif re.search("processing", STATE):
    8181                loadedToODM = 1
    8282            if re.search("MergeWorthy", MESSAGE):
     
    8787                mergeWorthy = 1
    8888                merged = 1
     89#            if re.search("released", STATE):
     90#                loadedToODM = 1
     91#                mergeWorthy = 1
     92#                merged = 1
     93#            if re.search("released", MESSAGE):
     94#                loadedToODM = 1
     95#                mergeWorthy = 1
     96#                merged = 1
    8997        except:
    9098            pass
  • branches/eam_branches/ipp-20140226/ippToPsps/perl/deleteFromDXLayer.pl

    r36190 r36622  
    1818        );
    1919
    20 my $dxWebServiceUrl = "http://lsb01.psps.ifa.hawaii.edu/cgi-bin/dxlayer/dxwebservice.cgi";
     20#my $dxWebServiceUrl = "http://lsb01.psps.ifa.hawaii.edu/cgi-bin/dxlayer/dxwebservice.cgi";
     21
     22#my $dxWebServiceUrl = "http://web02.psps.ifa.hawaii.edu/lsb01/cgi-bin/dxwebservice.cgi";
     23my $dxWebServiceUrl = "http://web02.psps.ifa.hawaii.edu/lsb01/cgi-bin/dxlayer/dxwebservice.cgi";
     24
     25
    2126#my $dxWebServiceUrl2 = "http://lsb02.psps.ifa.hawaii.edu/cgi-bin/dxlayer/dxwebservice.cgi";
    2227
  • branches/eam_branches/ipp-20140226/ippToPsps/perl/deleteFromDXLayer2.pl

    r36191 r36622  
    1818        );
    1919
    20 my $dxWebServiceUrl = "http://lsb02.psps.ifa.hawaii.edu/cgi-bin/dxlayer/dxwebservice.cgi";
     20#my $dxWebServiceUrl = "http://lsb02.psps.ifa.hawaii.edu/cgi-bin/dxlayer/dxwebservice.cgi";
     21
     22#my $dxWebServiceUrl = "http://web02.psps.ifa.hawaii.edu/lsb02/cgi-bin/dxwebservice.cgi";
     23my $dxWebServiceUrl = "http://web02.psps.ifa.hawaii.edu/lsb02/cgi-bin/dxlayer/dxwebservice.cgi";
    2124#my $dxWebServiceUrl2 = "http://lsb02.psps.ifa.hawaii.edu/cgi-bin/dxlayer/dxwebservice.cgi";
    2225
  • branches/eam_branches/ipp-20140226/ippTools/src/difftool.c

    r36019 r36622  
    13491349    if (!mdok) {
    13501350        psError(PXTOOLS_ERR_PROG, false, "exp_id not found");
     1351        if (!psDBRollback(config->dbh)) {
     1352          psError(PS_ERR_UNKNOWN, false, "database error");
     1353        }
     1354        return false;
     1355    }
     1356    psString warpDataGroup = psMetadataLookupStr(&mdok, row, "warpDataGroup");
     1357    if (!mdok) {
     1358        psError(PXTOOLS_ERR_PROG, false, "warpDataGroup not found");
    13511359        if (!psDBRollback(config->dbh)) {
    13521360          psError(PS_ERR_UNKNOWN, false, "database error");
     
    13911399                                        workdir,
    13921400                                        label,
    1393                                         data_group ? data_group : label,
     1401                                        data_group ? data_group : warpDataGroup,
    13941402                                        dist_group,
    13951403                                        reduction,
  • branches/eam_branches/ipp-20140226/ippconfig/recipes/filerules-split.mdc

    r36441 r36622  
    303303SKYCELL.TEMPLATE             OUTPUT {OUTPUT}.skycell                  SKYCELL         NONE       FPA        TRUE      NONE
    304304                                                                                                             
    305 PPSUB.OUTPUT                 OUTPUT {OUTPUT}.fits                     IMAGE           COMP_SUB   FPA        TRUE      NONE
     305PPSUB.OUTPUT                 OUTPUT {OUTPUT}.fits                     IMAGE           NONE       FPA        TRUE      NONE
    306306PPSUB.OUTPUT.MASK            OUTPUT {OUTPUT}.mask.fits                MASK            COMP_MASK  FPA        TRUE      NONE
    307307PPSUB.OUTPUT.VARIANCE        OUTPUT {OUTPUT}.wt.fits                  VARIANCE        COMP_WT    FPA        TRUE      NONE
     
    311311PPSUB.OUTPUT.JPEG2           OUTPUT {OUTPUT}.b2.jpg                   JPEG            NONE       FPA        TRUE      NONE
    312312PPSUB.OUTPUT.RESID.JPEG      OUTPUT {OUTPUT}.res.jpg                  JPEG            NONE       FPA        TRUE      NONE
    313 PPSUB.INVERSE                OUTPUT {OUTPUT}.inv.fits                 IMAGE           COMP_SUB   FPA        TRUE      NONE
     313PPSUB.INVERSE                OUTPUT {OUTPUT}.inv.fits                 IMAGE           NONE       FPA        TRUE      NONE
    314314PPSUB.INVERSE.MASK           OUTPUT {OUTPUT}.inv.mask.fits            MASK            COMP_MASK  FPA        TRUE      NONE
    315315PPSUB.INVERSE.VARIANCE       OUTPUT {OUTPUT}.inv.wt.fits              VARIANCE        COMP_WT    FPA        TRUE      NONE
  • branches/eam_branches/ipp-20140226/ippconfig/recipes/ppSub.config

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

    • Property svn:mergeinfo changed (with no actual effect on merging)
  • branches/eam_branches/ipp-20140226/ppBackground/src/Makefile.am

    r28281 r36622  
    1 bin_PROGRAMS = ppBackground
     1bin_PROGRAMS = ppBackground ppBackgroundStack
    22
    33if HAVE_SVNVERSION
     
    2828ppBackground_LDFLAGS  = $(PSLIB_LIBS)   $(PSMODULE_LIBS)   $(PPSTATS_LIBS)   $(PSPHOT_LIBS)   $(PPBACKGROUND_LIBS)
    2929
     30ppBackgroundStack_CPPFLAGS = $(ppBackground_CPPFLAGS)
     31ppBackgroundStack_LDFLAGS = $(ppBackground_LDFLAGS)
     32
    3033ppBackground_SOURCES =          \
    3134        ppBackground.c          \
     
    3841        ppBackgroundErrorCodes.c        \
    3942        ppBackgroundExit.c
     43
     44ppBackgroundStack_SOURCES = \
     45        ppBackgroundStack.c \
     46        ppBackgroundStackArguments.c \
     47        ppBackgroundStackCamera.c \
     48        ppBackgroundStackData.c \
     49        ppBackgroundStackLoop.c \
     50        ppBackgroundStackMath.c \
     51        ppBackgroundVersion.c \
     52        ppBackgroundErrorCodes.c \
     53        ppBackgroundExit.c
     54
    4055
    4156noinst_HEADERS = \
  • branches/eam_branches/ipp-20140226/ppBackground/src/ppBackground.c

    r28280 r36622  
    1818    ppBackgroundErrorRegister();
    1919
     20    printf("Initializing data\n");
    2021    ppBackgroundData *data = ppBackgroundDataInit(&argc, argv);
    2122    if (!data) {
    2223        goto DIE;
    2324    }
    24 
     25    printf("Reading Arguments\n");
    2526    if (!ppBackgroundArguments(data, argc, argv)) {
    2627        goto DIE;
    2728    }
    28 
     29    printf("Setting up Camera\n");
    2930    if (!ppBackgroundCamera(data)) {
    3031        goto DIE;
    3132    }
    3233
     34    printf("Looping over data!\n");
    3335    if (!ppBackgroundLoop(data)) {
    3436        goto DIE;
  • branches/eam_branches/ipp-20140226/ppStack/src/ppStackReadout.c

    r34800 r36622  
    184184    psFree(stack);
    185185
     186    psLogMsg("ppStack", PS_LOG_INFO, "initial stack image sectionNum %d", sectionNum);
     187
    186188    sectionNum++;
    187189
     
    293295    psFree(stack);
    294296
     297    psLogMsg("ppStack", PS_LOG_INFO, "final stack image sectionNum %d", sectionNum);
     298
    295299    sectionNum++;
    296300
  • branches/eam_branches/ipp-20140226/ppSub/src/ppSubMatchPSFs.c

    r36441 r36622  
    156156    psLogMsg("ppSub", PS_LOG_INFO, "Input FWHM: %f\nReference FWHM: %f\n", inFWHM, refFWHM);
    157157    if (!isfinite(inFWHM) || !isfinite(refFWHM)) {
     158#ifdef SET_QUALITY_INSTEAD_OF_ERROR
    158159        psErrorStackPrint(stderr, "Cannot determine FHWM for images, giving up.");
    159160        int error = psErrorCodeLast(); // Error code
    160161        ppSubDataQuality(data, error, PPSUB_FILES_ALL);
    161162        return true;
     163#else
     164        psError(PPSUB_ERR_DATA, false, "Cannot determine FHWM for images, giving up.");
     165        return false;
     166#endif
    162167    }
    163168
  • branches/eam_branches/ipp-20140226/psphot/src

    • Property svn:mergeinfo changed (with no actual effect on merging)
  • branches/eam_branches/ipp-20140226/psphot/src/psphotStackImageLoop.c

    • Property svn:mergeinfo changed (with no actual effect on merging)
  • branches/eam_branches/ipp-20140226/pstamp/scripts/pstamp_insert_request.pl

    r35487 r36622  
    4545my $pstamptool = can_run('pstamptool')  or (warn "Can't find pstamptool"  and $missing_tools = 1);
    4646my $fields = can_run('fields')  or (warn "Can't find fields"  and $missing_tools = 1);
     47my $fhead = can_run('fhead')  or (warn "Can't find fhead"  and $missing_tools = 1);
    4748
    4849if ($missing_tools) {
     
    5657    # Note that if it's a pstamp request then REQ_NAME should be defined.
    5758    # if it's a detectability query it will not have a REQ_NAME but will have a QUERY_ID
    58     my $command = "echo $tmp_req_file | $fields -x 0 EXTNAME EXTVER REQ_NAME QUERY_ID";
     59    # my $command = "echo $tmp_req_file | $fields -x 0 EXTNAME EXTVER REQ_NAME QUERY_ID";
     60    my $command = "$fhead -x 0 $tmp_req_file";
    5961    my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =
    6062        run(command => $command, verbose => $verbose);
    61 if (0) {
    62     # stoopid fields doesn't set exit status to zero when it works
    6363    unless ($success) {
    6464        print STDERR @$stderr_buf;
    6565        exit $error_code >> 8;
    6666    }
    67 }
    6867    my $output = join "", @$stdout_buf;
    69     (undef, $extname, $extver, $req_name) = split " ", $output;
     68
     69
     70    my $makehash = 0;
     71    my %hash;
     72    foreach my $line (split "\n", $output) {
     73        chomp $line;
     74        # split lines inte left and right using equals sign. left is the keyword
     75        my ($key, $right) = split "=", $line;
     76            # skip if there was no '='
     77        next if !$right;
     78
     79        $key =~ s/ //g;
     80
     81        # separate value from comment
     82        my ($value, $comment) = split "/", $right;
     83        # remove ' and space characters from key and value
     84        $value =~ s/'//g;
     85        $value =~ s/ //g;
     86
     87        #    print "$key $value\n";
     88
     89        # extract the values that we are looking for
     90        $extname  = $value if ($key eq "EXTNAME");
     91        $extver   = $value if ($key eq "EXTVER");
     92        $req_name = $value if ($key eq "REQ_NAME");
     93        $req_name = $value if ($key eq "QUERY_ID");
     94
     95        # optionally build hash. Duplicate keys get the last value seen
     96        if ($makehash) {
     97            $hash{$key} = $value;
     98        }
     99    }
     100
     101    # (undef, $extname, $extver, $req_name) = split " ", $output;
     102
    70103    if (!$extname or ! (($extname eq "PS1_PS_REQUEST") or ($extname eq "MOPS_DETECTABILITY_QUERY"))) {
    71104        print STDERR "invalid request file\n";
     105        print "invalid request file\n";
    72106        exit $PS_EXIT_DATA_ERROR;
    73107    }
     108
    74109    if (!defined $req_name) {
    75110        print STDERR "invalid request file no REQ_NAME or QUERY_ID\n";
     111        print "invalid request file no REQ_NAME or QUERY_ID\n";
     112        exit $PS_EXIT_DATA_ERROR;
     113    }
     114    if (!defined $extver) {
     115        print STDERR "invalid request file no EXTVER found\n";
     116        print "invalid request file no EXTVER found\n";
    76117        exit $PS_EXIT_DATA_ERROR;
    77118    }
     
    119160
    120161exit 0;
     162
    121163# Ask the database for the next web request number
    122164sub get_webreq_num
  • branches/eam_branches/ipp-20140226/pstamp/scripts/pstampparse.pl

    r36165 r36622  
    243243my $watch_for_big_requests = (!($label =~ /BIG/) and ($label =~ /PSI/ or $label =~ /WEB/));
    244244
    245 my $big_limit = 100;    # XXX: this should be in a configuration file somewhere not hard coded
     245# XXX: these should be in a configuration file somewhere not hard coded
     246my $big_limit = 100;
     247my $job_big_limit = 400;
    246248
    247249if ($watch_for_big_requests and $nRows > $big_limit) {
     
    267269
    268270    # see whether number of jobs limit for high priority request was exceeded
    269     if ($watch_for_big_requests and $num_jobs > $big_limit) {
     271    if ($watch_for_big_requests and $num_jobs > $job_big_limit) {
    270272        $label = change_to_lower_priority_label($label);
    271273        $watch_for_big_requests = 0;
     
    311313    my $rownum   = $row->{ROWNUM};
    312314    if (!validID($rownum)) {
     315        $rownum = 'NULL' if !defined $rownum;
    313316        print STDERR "$rownum is not a valid ROWNUM\n";
    314317        insertFakeJobForRow($row, 1, $PSTAMP_INVALID_REQUEST);
     
    316319    }
    317320    my $job_type = $row->{JOB_TYPE};
    318     if (($job_type ne "stamp") and ($job_type ne "get_image")) {
     321    if (!defined $job_type || (($job_type ne "stamp") and ($job_type ne "get_image"))) {
     322        $job_type = 'NULL' if !defined $job_type;
    319323        print STDERR "$job_type is not a valid JOB_TYPE\n";
    320324        insertFakeJobForRow($row, 1, $PSTAMP_INVALID_REQUEST);
     
    325329    if (($req_type ne "byid") and ($req_type ne "bycoord") and ($req_type ne "byexp") and
    326330        ($req_type ne "byskycell") and ($req_type ne "bydiff")) {
     331        $req_type = 'NULL' if !defined $req_type;
    327332        print STDERR "$req_type is not a valid REQ_TYPE\n";
    328333        insertFakeJobForRow($row, 1, $PSTAMP_INVALID_REQUEST);
Note: See TracChangeset for help on using the changeset viewer.