| | 1 | Here are the instructions for Bill/Gene/anyone else to build the dvo, fix ipptopsp and run ipptopsps: There are far more instructions on [wiki:ippToPsps], these are just the quick version with specifics for SA10: |
| | 2 | |
| | 3 | == IPPTOPSPS INSTRUCTIONS == |
| | 4 | |
| | 5 | There are a number of columns to be fixed, which I haven't had a chance to get to yet (and likely won't). Here is a table of remaining changes |
| | 6 | |
| | 7 | to be checked/verified for ipptopsps. These live here: |
| | 8 | {{{ |
| | 9 | ~ipp/src/ippTopsps/jython/ |
| | 10 | stackbatch.py |
| | 11 | objectbatch.py |
| | 12 | detectionbatch.py |
| | 13 | }}} |
| | 14 | |
| | 15 | * these need to be checked in stack: |
| | 16 | * !StackDetection |
| | 17 | * psfFlux/psfFluxErr (formerly instFlux/instFluxErr) - was unclear if this was just a name change or do we grab something else instead? |
| | 18 | * peakFlux -> covert to adu/s |
| | 19 | * sky/skyErr -> convert to adu/s/pixel |
| | 20 | * sgSep -> needs a formula |
| | 21 | * psfLikelihood -> fhe formula was modded, (see wiki) |
| | 22 | * apFlux/apFluxErr -> these were once mags, need to be converted to flux, also needs exptime correction |
| | 23 | * !StackApFlx |
| | 24 | * isophotMag/Err -> were mags, need to be converted to flux |
| | 25 | * pefFlux/Err -> were mags, need to be converted to flux |
| | 26 | * !StackModelFit |
| | 27 | * devFlux/Err -> were mags, need to be converted to flux |
| | 28 | * expFlux/Err -> were mags, need to be converted to flux |
| | 29 | * serFlux/Err -> were mags, need to be converted to flux |
| | 30 | * !stackDetectionCalib |
| | 31 | * need ra/dec/raErr/decErr to be populated |
| | 32 | * need zp/zpErr to be populated |
| | 33 | * need expTime to be populated |
| | 34 | * need airMass to be populated |
| | 35 | * these need to be checked in detection: |
| | 36 | * Detection |
| | 37 | * psfFlux/psfFluxErr (formerly instFlux/instFluxErr) - was unclear if this was just a name change or do we grab something else instead? |
| | 38 | * peakFlux -> covert to adu/s |
| | 39 | * sky/skyErr -> convert to adu/s/pixel |
| | 40 | * sgSep -> needs a formula |
| | 41 | * psfLikelihood -> fhe formula was modded, (see wiki) |
| | 42 | * apFlux/apFluxErr -> these were once mags, need to be converted to flux |
| | 43 | * !DetectionCalib |
| | 44 | * need ra/dec/raErr/decErr to be populated |
| | 45 | * need zp/zpErr to be populated |
| | 46 | * need expTime to be populated |
| | 47 | * need airMass to be populated |
| | 48 | * Object: |
| | 49 | * [filter]stackDetectID needs to be populated - I think the only other change was a flux to a mag and I did that already |
| | 50 | |
| | 51 | |
| | 52 | |
| | 53 | I advise to make some tests of these to make sure that the batches contain what you want and such. There is already a config for this, SAS.2120905.sa10.test1 (yes, typo in the date). The config is located in the ipptopsps database, (ippdb01, same user/pass as gpc1), and you can see it here: |
| | 54 | |
| | 55 | {{{ |
| | 56 | mysql> select * from config where name = 'SAS.2120905.sa10.test1'; |
| | 57 | +---------------------+------------------------+-------------------+----------------+-------------------+-------------- |
| | 58 | +------------------------------------------+--------+--------+---------+---------+----------+--------------------------- |
| | 59 | +--------------+--------------+------------------+----------------+---------------------+--------+-------------+---------- |
| | 60 | +----------+----------+--------+ |
| | 61 | | timestamp | name | datastore_product | datastore_type | datastore_publish | dvo_label |
| | 62 | | dvo_location | min_ra | max_ra | min_dec | max_dec | box_size | base_path |
| | 63 | | data_release | delete_local | delete_datastore | delete_dxlayer | epoch | survey | psps_survey | queue_P2 |
| | 64 | | queue_ST | queue_OB | active | |
| | 65 | +---------------------+------------------------+-------------------+----------------+-------------------+-------------- |
| | 66 | +------------------------------------------+--------+--------+---------+---------+----------+--------------------------- |
| | 67 | +--------------+--------------+------------------+----------------+---------------------+--------+-------------+---------- |
| | 68 | +----------+----------+--------+ |
| | 69 | | 2012-10-26 11:51:12 | SAS.2120905.sa10.test1 | PSPS_test | IPP_PSPS | 1 | SAS.20120905 |
| | 70 | | /data/ipp005.0/gpc1/catdirs/SAS/20120901 | 327 | 341 | -7 | 7 | 2 | /data/ipp005.0/ipptopsps/ |
| | 71 | | 10 | 1 | 1 | 1 | 2012-10-26 11:53:00 | 3PI | SA10 | 0 |
| | 72 | | 0 | 1 | 1 | |
| | 73 | +---------------------+------------------------+-------------------+----------------+-------------------+-------------- |
| | 74 | +------------------------------------------+--------+--------+---------+---------+----------+--------------------------- |
| | 75 | +--------------+--------------+------------------+----------------+---------------------+--------+-------------+---------- |
| | 76 | +----------+----------+--------+ |
| | 77 | 1 row in set (0.00 sec) |
| | 78 | }}} |
| | 79 | |
| | 80 | == testing ipptopsps changes == |
| | 81 | |
| | 82 | you can turn off/on queue_P2/queue_ST/queue_OB as needed, and to test do the following as ipp in ~/src/ippToPsps/jython on ipp005 or ipp006 |
| | 83 | |
| | 84 | {{{ |
| | 85 | psconfig ipptrunk-20120913 |
| | 86 | ./run.sh queue.py SAS.2120905.SA10.test1 |
| | 87 | ./run.sh loader.py SAS.2120905.SA10.test1 |
| | 88 | }}} |
| | 89 | |
| | 90 | The first command changes the psconfig to grab the proper libraries for dvograbber |
| | 91 | |
| | 92 | The second command makes a list of what needs to be made into batches (so if you turn off/on ST/P2/OB it will only pick up the ones that are on) |
| | 93 | |
| | 94 | The third command starts loading |
| | 95 | |
| | 96 | The batches get placed on http://datastore.ipp.ifa.hawaii.edu/PSPS_test/, you can pick them up from there and play with them. |
| | 97 | |
| | 98 | |
| | 99 | === do psconfig ipptrunk-20120913 prior to any of the ./run.py commands - this picks up the correct libraries for dvo. === |
| | 100 | |
| | 101 | == recompiling for the new SAS == |
| | 102 | there will be a dvo schema change - there are 2 ways to work with this: |
| | 103 | * Step 1: |
| | 104 | * update the tag and recompile the tag |
| | 105 | * check out a copy of the truck and access it by something like ipptrunk-2012date |
| | 106 | * Step 2: once you are linked to the proper dvo library, recompile dvograbber (in ~/src/ippTopsps/src) I honestly don't remember how I did this, wheter from ~src/ippToPsps or from the directory that contains dvograbber, and what if any things I did to make sure the make files picked up the correct libraries. I did stuff multiple times... as ipp on ipp005 you can test it like this: ../src/dvograbber ../config/settings.xml ipptopsps_scratch3 /data/ipp005.0/gpc1/catdirs/SAS/20120901 to see if it works (change to new SAS directory) |
| | 107 | * Step 3: once you verify dvograbber works it should be ok... I hope... |
| | 108 | |
| | 109 | == queueing the new SAS == |
| | 110 | |
| | 111 | === MAKE sure you have used the proper psconfig for this otherwise it will not work (dvograbber will fail!!) === |
| | 112 | * do psconfig ipptrunk-20120913 for testing |
| | 113 | * do psconfig ipptrunk-(whatever) for the actual loading for PSPS (see above section) |
| | 114 | |
| | 115 | |
| | 116 | === Step 1: make new config === |
| | 117 | |
| | 118 | {{{ |
| | 119 | ./run.sh queue.py edit |
| | 120 | }}} |
| | 121 | answer questions, basically give it the same answers as for SAS.2120905.sa10.test1 with a different name/ dvo_label / dvo_location, and put it on datastore_product = PSPS_JHU, and tell it to queue everything (P2/ST/OB). for epoch give it whatever the current time is - I don't understand why but that's the rules from Roy. |
| | 122 | |
| | 123 | if you make errors correct it by going into mysql and editing that entry in config table |
| | 124 | |
| | 125 | === Step 2: make an init batch (only do this once) === |
| | 126 | {{{ |
| | 127 | ./run.sh loader.py (configname) init |
| | 128 | }}} |
| | 129 | this should just work - i've not had problems in the past. |
| | 130 | |
| | 131 | === Step 3: start loading. === |
| | 132 | you can do this step multiple times to load on multiple machines. There are certain machines that can do loading, but I recommend doing it on ipp005 and ipp006 (up to 3 on ipp005, and I think 2-3 times on ipp006) |
| | 133 | {{{ |
| | 134 | ./run.sh loader.py (configname) |
| | 135 | }}} |
| | 136 | |
| | 137 | == trouble shooting == |
| | 138 | |
| | 139 | === reverting errors === |
| | 140 | |
| | 141 | First is how do you tell? There is funny logic here. Preferably you will know how many OB/ST/P2 batches there are. Do queries in addRun to find out how many cam/stacks there are (cam should be 620, stacks are a little variable due to those few that don't staticsky) objects = number of cpt files in SAS dvodb. Do a query in the ipptopsps database to get counts of stuff (example from SAS.v9): |
| | 142 | {{{ |
| | 143 | mysql> select batch_type, count(*) from batch where processed = 1 and loaded_to_datastore =1 and dvo_db = 'SAS.20120905' and datastore_product = 'PSPS_JHU' group by batch_type; |
| | 144 | +------------+----------+ |
| | 145 | | batch_type | count(*) | |
| | 146 | +------------+----------+ |
| | 147 | | IN | 1 | |
| | 148 | | OB | 368 | |
| | 149 | | P2 | 620 | |
| | 150 | | ST | 2967 | |
| | 151 | +------------+----------+ |
| | 152 | 4 rows in set (0.12 sec) |
| | 153 | }}} |
| | 154 | those counts should add up to what you expect (it does for sas_v9). Note that you can't just count up the ones that have not processed, because once a batch fails it is forgotten about (we don't recycle batch numbers, we just make a new batch with the same contents): |
| | 155 | |
| | 156 | {{{ |
| | 157 | mysql> select batch_type, count(*) from batch where dvo_db = 'SAS.20120905' and datastore_product = 'PSPS_JHU' group by batch_type, processed;+------------+----------+ |
| | 158 | | batch_type | count(*) | |
| | 159 | +------------+----------+ |
| | 160 | | IN | 1 | |
| | 161 | | OB | 123 | |
| | 162 | | OB | 368 | |
| | 163 | | P2 | 620 | |
| | 164 | | ST | 2967 | |
| | 165 | +------------+----------+ |
| | 166 | 5 rows in set (0.13 sec) |
| | 167 | }}} |
| | 168 | Those 123 OBs failed during some craziness the last time (always due to nfs/system/neb/mysql hiccups) and were requeued... Always only trust the final count of what's been processed and loaded_to_datastore... |
| | 169 | |
| | 170 | To try again, requeue and reload: |
| | 171 | |
| | 172 | {{{ |
| | 173 | ./run.sh queue.py SAS.(name) |
| | 174 | ./run.sh loader.py SAS.(name) |
| | 175 | }}} |
| | 176 | |
| | 177 | it might take a couple of iterations, depending on the nature of the error. check database to verify it has all. |
| | 178 | |
| | 179 | === logs === |
| | 180 | These live in /data/ipp005.0/ipptopsps/logs |
| | 181 | |
| | 182 | === databases === |
| | 183 | * the main ipptopsps database has information about the config and the batches. |
| | 184 | * each loader has a database as well on teh machines they are running on: |
| | 185 | mysql -h localhost -u ipp ipptopsps_scratch (or ipptopsps_scratch2 or ipptopsps_scratch3) |
| | 186 | useful to diagnose stuff when working on ipptopsps |
| | 187 | |
| | 188 | |
| | 189 | == IPPDVO recompile of ipp trunk instructions == |
| | 190 | |
| | 191 | ippdvo runs off of the trunk. To differentiate I call them by the date that I cecked out the trunk... So once the changes are in and it is ready to do, make adirectory called src/ipptrunk-201210day check out and compile the trunk, and edit .tcshrc to use that psconfig instead. I keep the old ones around just in case... |
| | 192 | |
| | 193 | |
| | 194 | == ADDSTAR INSTRUCTIONS == |
| | 195 | |
| | 196 | This is to be run on addstarlap (ipp005) since that is where the other SASs live |
| | 197 | |
| | 198 | I was pondering about just reusing the old cam stage from previously, but I don't necessarily trust that since I think Gene changed some stuff in the dvo, also, it's substantially easier to explain without queueing older minidvodbs, and also, building 620 cam stages isn't going to take too long. |
| | 199 | |
| | 200 | I generally build the cam stage first and then the staticsky stage. For simplicity you can do both simultaneously (I don't think it matters): |
| | 201 | |
| | 202 | to queue the minidvodb stuff: |
| | 203 | {{{ |
| | 204 | survey.add.addstar SAS.cam SAS_v10 SAS.20121027 SAS.20121027 cam |
| | 205 | survey.add.addstar SAS.staticsky SAS_v10 SAS.20121027 SAS.20121027 staticsky |
| | 206 | add.minidvodb SAS.20121027 SAS.20121027.MINI SAS.20121027 1 GPC1 |
| | 207 | add.label SAS.20121027 |
| | 208 | }}} |
| | 209 | once you are satisfied that staticsky is working properly and doing the right stuff, you can turn on creation/merge of the merge dvodb: |
| | 210 | {{{ |
| | 211 | add.mergedvodb SAS.20121027 |
| | 212 | survey.add.mergedvodb SAS.20121027 SAS.20121027 SAS.20121027 |
| | 213 | }}} |
| | 214 | Note that once the staticskys have completed, there will still be that last minidvodb that is in 'active', since it kicks to be merged after a day. If all the staticskys have been addstarred, you can set the state (with mysql) of the current active minidvodb for this to the state 'to_be_merged' which will cause it to go get merged (wait for it...) |
| | 215 | |
| | 216 | Once the merge dvodb is built, it needs to be 'spiffed': |
| | 217 | |
| | 218 | These are what I used last time (change SAS as needed) |
| | 219 | {{{ |
| | 220 | relphot -averages -reset -update -boundary-tree ~ipp/RINGS.V3.tree.fits -D CAMERA gpc1 -D CATDIR /data/ipp005.0/gpc1/catdirs/SAS/20120901 |
| | 221 | relastro -update-objects -reset -update -D CAMERA gpc1 -D CATDIR /data/ipp005.0/gpc1/catdirs/SAS/20120901 |
| | 222 | }}} |
| | 223 | |
| | 224 | Please verify with Gene that these are the commands. |
| | 225 | |
| | 226 | |