IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changes between Version 165 and Version 166 of ippToPsps


Ignore:
Timestamp:
Oct 5, 2011, 1:59:37 PM (15 years ago)
Author:
rhenders
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • ippToPsps

    v165 v166  
    8585= Using the software =
    8686
     87{{{ippToPsps}}} contains numerous separate programs that work together to process and load IPP data (in the form of batches) to the datastore, monitor the progress of those batches and then perform the necessary cleanup of the various temporary files once those batches are safely merged into the PSPS database.
     88
    8789== Setting up a loading machine ==
    8890
     
    113115}}}
    114116
    115 == Running {{{ippToPsps}}} ==
    116 
    117 {{{ippToPsps}}} is configured for use entirely by a config file (see above). So, running the software is simply a case of editing a config and passing it as an argument to the program, like this:
     117== Loading ==
     118
     119Loading data means running the {{{load.py}}} program while passing it the relevant configuration file (see above). So, running the software is simply a case of editing a config and passing it as an argument to the program, like this:
    118120
    119121{{{
    120122cd trunk/ippToPsps/jython
    121 ./run.sh ipptopsps.py someConfig.xml
     123./run.sh load.py someConfig.xml
    122124}}}
    123125
    124126The {{{./run.sh}}} prefix above is necessary to invoke the correct Java virtual machine, while including the relevant jar files in the CLASSPATH (all included in the {{{trunk/ippToPsps/Jars}}} subdir)
    125127
    126 == Creating and publishing an 'IN' batch ==
     128=== Creating and publishing an 'IN' batch ===
    127129
    128130The same program is used to create IN batches, but requires one extra argument, like this:
    129131
    130132{{{
    131 ./run.sh ipptopsps.py someConfig.xml init
     133./run.sh load.py someConfig.xml init
    132134}}}
    133135
    134136This will produce an IN batch, publish it, then stop (the IN-batch MySQL tables will also be updateded in the local scratch database).
    135137
    136 == Queuing ==
    137 
    138 When run, {{{ippToPsps}}} first queues up all the exposures or stacks that it needs to process, then works through them sequentially, doing detections first then stacks. The master list comes from the gpc1 {{{addRun}}} table, which lists all items currently merged into the DVO database we are using. From this list, {{{ippToPsps}}} subtracts items that have already been successfully loaded to the datastore already, and queues up the remainder.
     138=== Queuing ===
     139
     140When run, {{{load.py}}} first queues up all the exposures or stacks that it needs to process, then works through them sequentially, doing detections first then stacks. The master list comes from the gpc1 {{{addRun}}} table, which lists all items currently merged into the DVO database we are using. From this list, {{{ippToPsps}}} subtracts items that have already been successfully loaded to the datastore already, and queues up the remainder.
     141
     142Because it is possible, and usual, to run multiple versions of {{{load.py}}} in order to speed up loading time, the methods to queue and begin processing a new batch form a critical section. This simply means that the 'batch' table in the {{{ippToPsps}}} database is locked by a client looking for a new item to process, then released afterwards.
    139143
    140144An important factor in the queuing of items is the current ''epoch'', which is set in the config file.
    141145
    142 == Epochs ==
    143 
    144 Each config file requires an entry in the {{{options/epoch}}} field.  An ''epoch'' in the context of {{{ippToPsps}}} is the date that we count as ''the beginning''. If we loaded IPP data to PSPS once and only once, this would not be necessary: we would queue up all available exposures and stacks and simply load them. However, the early stages of the project have required multiple re-loads of data while the IPP perfects the science, necessitating that the same exposures and stacks are loaded more than once. Because {{{ippToPsps}}} queues available items by taking into account those that have already been published to PSPS, we have to give it an epoch date from which to accurately determine those exposure that have been loaded or not. Generally speaking, the epoch is reset every time we delete the main PSPS database.
    145 
    146 == Test mode ==
     146=== Epochs ===
     147
     148Each config file requires an entry in the {{{options/epoch}}} field.  An ''epoch'' in the context of {{{ippToPsps}}} is the date that we count as ''the beginning''. If we loaded IPP data to PSPS once and only once, this would not be necessary: we would queue up all available exposures and stacks and simply load them. However, the early stages of the project have required multiple re-loads of data while the IPP perfects the science, necessitating that the same exposures and stacks are loaded more than once. Because {{{load.py}}} queues available items by taking into account those that have already been published to PSPS, we have to give it an epoch date from which to accurately determine those exposure that have been loaded or not. Generally speaking, the epoch is reset every time we delete the main PSPS database.
     149
     150=== Test mode ===
    147151
    148152One field in the config, under the ''options'' section, is ''testMode''. This is a boolean, i.e. can be either 1 or 0. When switched on, each batch type will be run in it's own test mode. For detections, this means: