IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changes between Initial Version and Version 1 of IPPstripe82


Ignore:
Timestamp:
Feb 24, 2009, 4:23:56 PM (17 years ago)
Author:
trac
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • IPPstripe82

    v1 v1  
     1[http://chifire.strefa.pl/news-962.html movie rad] [http://huruple.qsh.eu/20090105-shockwave-video.htm shockwave video games] [http://hencnac4t.is-the-boss.com/news-inspirational-2008-12-27.html inspirational peoms] [http://naceceli.qsh.eu/page671.html roxana diaz y jorge reyes video] [http://faquafav.is-the-boss.com/text-535.htm microsoft proofing tools torrent]
     2[http://tacataca.strefa.pl/comment-1729.htm pocket video] [http://ettaelt.strefa.pl/news-1118.html nba 2k6 video] [http://baslozaro.is-the-boss.com/article756.html inspirational quote sister] [http://mahohmie.qsh.eu/resource368.htm anal full length video] [http://indronrol.is-the-boss.com/sitemap.html sitemap]
     3drontar
     4Notes on running IPP on SDSS stripe 82 multi-epoch data
     5
     6Sebastian Jester jester at mpia.de
     7
     8Use these as a guide for running IPP for the first time on data from a new camera.
     9
     10= Questions =
     11
     12# At what stage is the fake object insertion/dection run?
     13# Is warptool, stacktool, difftool operation going to be automated?
     14
     15= To-dos =
     16
     17# Look up the distortion correction for SDSS images and whether its WCS is good enough or not (ask Hubert Lampeitl?)
     18
     19= Useful for everything =
     20
     21To get more error messages to a command-line invocation of an IPP executable, add
     22
     23  -trace err 10
     24
     25= Step 0: Get a working installation of IPP =
     26
     27Gene set me up at IPP; there's a working version on panapple at MPIA, and I'm working on getting one set up on aida77-80.
     28
     29See [wiki:ParallelIPPvers installing and using multiple IPP versions in parallel]
     30
     31= Step 1: set up config files =
     32
     33See [wiki:Configfiles Configfiles].
     34
     35= Step 2: Run psphot on single SDSS image =
     36
     37First I create a file firstimg.lis which has the name of the input file. Then I run psphot thus:
     38
     39 psphot -list firstimg.lis firsttry
     40
     41I could also have given it the input image on the command line with
     42
     43 psphot -file input.fits firsttry
     44
     45firsttry is the rootname for the output. Here's what happens when I run psphot on [http://www.mpia.de/homes/jester/fpC-001056-i1-0192.fit.gz fpC-001056-i1-0192.fit]
     46
     47    Camera SDSS, format SDSS matches header.
     48    Chip 0: 1 1
     49    Cell 0: 1 1
     50    Cell 0: 1 1
     51    PHOTCODE is SDSS.i.21
     52    System random seed value used  seed = 4479799321607236930 hex
     53    image sky : mean 1308.983600 stdev 10.202114
     54    background sky : min 890.523438 mean 1308.983154 max 1349.394043 stdev 32.456470
     55    subtracted background model: 0.283947 sec
     56    built smoothed signficance image: 0.824891 sec
     57    104 peaks: 0.104587 sec
     58    100 sources, 100 moments, 4 failed: 0.116634 sec
     59    found 0 satstar blend peaks, leaving 100 sources: 0.000100 sec
     60    identified 11 blended objects: 0.000904 sec
     61    psf clump  X,  Y: 1.646315, 1.765633
     62    psf clump DX, DY: 0.056862, 0.044356
     63    SN range (moments): 26.758667 - 1668.058228
     64    SN range (peaks)  : 26.420599 - 1264.513428
     65    rough classification: 0.000428 sec
     66    selected candidate 64 PSF objects
     67    fit ext:   1.151582 sec for 63 of 64 sources
     68    fit psf:   0.476687 sec for 45 of 64 sources
     69    chisq vs flux fit: 0.006806 +/- 0.227294
     70    chisq vs flux fit term 0: 0.035698 +/- 0.200890
     71    chisq vs flux fit term 1: 2.193609 +/- 0.292923
     72    apresid: -0.018228 +/- 0.021941; keeping 29 of 64 psf stars
     73    try model PS_MODEL_QGAUSS, ap-fit: -0.018228 +/- 0.021941 : sky bias: 0.000000
     74    dSxo: mean: 0.003162, median: 0.001405, stdev: 0.013455, npts: 29
     75    dSyo: mean: 0.000718, median: 0.002953, stdev: 0.012298, npts: 29
     76    ndSx: mean: 0.045632, median: -0.045638, stdev: 1.276208, npts: 29
     77    ndSy: mean: -0.089024, median: 0.223447, stdev: 1.087374, npts: 29
     78    generate residuals for 29 objects: 0.270703 sec
     79    select psf model: 1.917943 sec
     80    psf model PS_MODEL_QGAUSS, ApResid: -0.018228 +/- 0.021941
     81    no external sources supplied
     82    built models for 100 objects: 0.232271 sec
     83    measure ensemble of PSFs: 0.396416 sec
     84    GrowthCurve : apLoss : 0.012242
     85    measure aperture residuals for 64 objects (2 skipped, 0 failed, 34 invalid)
     86    measure full-frame aperture residuals for 27 of 64 objects: 0.879843 sec
     87    aperture residual: -0.012413 +/- 0.019795 : 0.000000 bias, 0.000000 skysat
     88    measure magnitudes : 0.558418 sec for 100 objects (86 with apertures)
     89    replace background flux : 0.056657 sec
     90    creating moments plot
     91    saving plot to firsttry.mnt.png
     92    creating psf model plot
     93    saving plot to firsttry.psf.png
     94    creating ap mag - psf mag plot
     95    saving plot to firsttry.dap.png
     96    complete psphot run: 8.708983 sec
     97 found 0 leaks at psphot
     98
     99'''I also tried this on the Mac in Heidelberg and get different results...:'''
     100
     101    Camera SDSS, format SDSS matches header.
     102    Chip 0: 1 1
     103    Cell 0: 1 1
     104    Cell 0: 1 1
     105    PHOTCODE is SDSS.i.21
     106    System random seed value used  seed = 2726282019464764904 hex
     107    image sky : mean 1311.806081 stdev 8.951074
     108    background sky : min 1305.236572 mean 1311.805908 max 1372.219238 stdev 8.360644
     109    subtracted background model: 0.268568 sec
     110    built smoothed signficance image: 0.662050 sec
     111    99 peaks: 0.081675 sec
     112    96 sources, 96 moments, 3 failed: 0.094184 sec
     113    found 0 satstar blend peaks, leaving 96 sources: 0.000078 sec
     114    identified 8 blended objects: 0.007648 sec
     115    psf clump  X,  Y: 1.645948, 1.765079
     116    psf clump DX, DY: 0.056189, 0.045065
     117    SN range (moments): 26.627832 - 1668.060669
     118    SN range (peaks)  : 26.431179 - 1264.521973
     119    rough classification: 0.012332 sec
     120    selected candidate 64 PSF objects
     121    fit ext:   0.840499 sec for 63 of 64 sources
     122    fit psf:   0.416352 sec for 42 of 64 sources
     123    chisq vs flux fit: 0.005232 +/- 0.371809
     124    chisq vs flux fit term 0: -0.088947 +/- 0.187928
     125    chisq vs flux fit term 1: 2.666661 +/- 0.175476
     126    apresid: -0.037835 +/- 0.032469; keeping 26 of 64 psf stars
     127    try model PS_MODEL_QGAUSS, ap-fit: -0.037835 +/- 0.032469 : sky bias: 0.000000
     128    dSxo: mean: 0.001541, median: -0.001044, stdev: 0.014191, npts: 26
     129    dSyo: mean: 0.001470, median: 0.001485, stdev: 0.011560, npts: 26
     130    ndSx: mean: 0.125409, median: -0.191685, stdev: 1.329126, npts: 26
     131    ndSy: mean: -0.105611, median: 0.018051, stdev: 1.013325, npts: 26
     132    generate residuals for 26 objects: 0.283203 sec
     133    select psf model: 1.554244 sec
     134    psf model PS_MODEL_QGAUSS, ApResid: -0.037835 +/- 0.032469
     135    no external sources supplied
     136    built models for 96 objects: 0.170146 sec
     137    measure ensemble of PSFs: 0.447365 sec
     138    GrowthCurve : apLoss : 0.008937
     139    measure aperture residuals for 64 objects (3 skipped, 0 failed, 29 invalid)
     140    measure full-frame aperture residuals for 28 of 64 objects: 0.845621 sec
     141    aperture residual: -0.012332 +/- 0.020148 : 0.000000 bias, 0.000000 skysat
     142    measure magnitudes : 0.417724 sec for 96 objects (85 with apertures)
     143    replace background flux : 0.027076 sec
     144    skipping moments plot
     145    skipping psf model plot
     146    skipping ap-mag resid plot
     147    complete psphot run: 5.548932 sec
     148
     149I thought I was using exactly the same settings (copied all the config files 1:1 from IfA to MPIA), but maybe not? E.g. why is it skipping the moments plot in HD, but not in HI? According to Gene, the different numbers are explicable by different random numbers (i.e. seeds). The plots missing would only make sense if kapa wasn't compiled properly, but we think it was.
     150
     151= Step 3: inserting results into dvo and inspecting them =
     152
     153psphot produces its output catalog in firsttry.cmf which we load into dvo:
     154
     155 addstar -D CAMERA sdss -accept-astrom firsttry.cmf
     156
     157-accept-astrom says that dvo should trust the WCS and ignore the fact that there are 0 astrometric stars reported in the header. Ohana commands like addstar require the -D CAMERA flag on the command line.
     158
     159Then start dvo by typing 'dvo' and plot things:
     160
     161 # Make a plot window
     162 region 0 0 90 ait
     163 cgrid
     164 current style -x 2 -c black -pt 2 -lt 0 -lw 0.500000 -sz 1.000000
     165 # The above line is the output from csgrid.  It's not something to type in.
     166 # (May need to repeat both commands after adjusting size of kapa plot window)
     167 
     168 # tell it where the catalogs are
     169 catdir /data/ipp001.0/jester/stripe82/coadd/catdir
     170 
     171 # make a new display for displaying images
     172 images -n 1
     173 
     174 # read a fits image into a buffer buf0
     175 rd buf0 /data/ipp001.0/jester/stripe82/coadd/input/fpC-001056-i1-0192.fit
     176 
     177 # display it with cuts given
     178 tv buf0 1300 3000
     179 # in the TV window, click left to pan, middle to zoom out, right to zoom in
     180 
     181 # Tell IPP which region of the sky I'm interested in
     182 skyregion 350 355 -2 0
     183 # Extract individual measurements that exist in catdir for that region
     184 mextract ra,dec,mag
     185 # Show how many entries each vector has
     186 vectors
     187    N       name      size
     188    0         ra        100
     189    1        dec        100
     190    2        mag        100
     191 # convert ra,dec positions into display's x,y positions '''in place'''
     192 coords buf0 -c ra dec
     193 # and overlay the object positions on the display window
     194 vload red ra dec
     195 # To just plot the ra,dec on a coordinate grid (i.e., not an image), say
     196 cplot ra dec
     197
     198= Step 4: warping and stacking =
     199
     200== Set up a grid of skycells to which the output will be warped ==
     201
     202DVO has Gene's tesselation of the sky built in. To create a table with the skycells of this tesselation, there's the skycells executable:
     203
     204 skycells 8 -scale .3 -D CATDIR /data/ipp001.0/jester/stripe82/coadd/skycells/
     205
     206The '8' tells it the tiling level, where 1 is coarse and 10 is fine. -scale gives the arcseconds per pixel. The skycells table is put into the directory specified by CATDIR.
     207
     208To look at the resulting tesselation, bring up dvo:
     209
     210 # Set catdir to the directory where the skycells live
     211 catdir /data/ipp001.0/jester/stripe82/coadd/skycells/
     212 # Plot them up, first set up the grid (args are ra dec radius projection)
     213 region 352 -1 2 ait
     214 images
     215 # Overplot the outline of a fits image
     216 imbox -c red /data/ipp001.0/jester/stripe82/coadd/input/fpC-001056-i1-0193.fit
     217 # Same for a list of images - first read list into a list variable
     218 list myImlist -x "ls /data/ipp001.0/jester/stripe82/coadd/input/fpC*.fit"
     219 # Plot them up in a for loop
     220 for i 0 $myImlist:n
     221 >> imbox -c red $myImlist:$i
     222 >> end
     223 
     224 # The preceding was for individual fits files; if dvo already knows about images (via addstar), it works like this:
     225 # set catdir to place where images are
     226 catdir /data/ipp001.0/jester/stripe82/coadd/catdir/
     227 # plot them up
     228 images -c red
     229 
     230 # To set up the next step, we need to know the id of the skycell. This can be done semi-interactively:
     231 cursor
     232 # then move the cursor into the skycell whose number you want to know and press any letter key,
     233 # e.g. d, to store the ra,dec of the point where you press the key (q to quit, also stores things in q).
     234 # $Rq and $Dq then store the ra,dec of that point, and you can use them in 'gimages' to get the skycell id:
     235 gimages $Rq $Dq -region
     236 
     237 output-> reading images (mode DVO_MODE_MEF)
     238 output->  0 skycell.0484667 353.0672  -1.1307  1970/01/01,00:00:00     0  0 0.00  0.000 0.000 0.000    1
     239
     240skycell.0484667 is the ID we need.
     241
     242== Warp images to the skycell grid ==
     243
     244=== Setup: create a pixelless fits image containg the WCS of the skycell ===
     245
     246This uses a shell command:
     247
     248 dvoImageExtract skycell.0484667 -D CATDIR /data/ipp001.0/jester/stripe82/coadd/skycells/ -o /data/ipp001.0/jester/stripe82/coadd/run_ipp/skycell_0484667_warptemplate.fits
     249
     250to create the "warp template" fits file. It's a fits image with NAXIS=0, i.e., no pixels - just the header.
     251
     252=== Run psWarp ===
     253
     254You need to have the config files for the "simple" camera to run psWarp as follows:
     255
     256 pswarp -file ../input/fpC-001056-i1-0192.fit psWarp-001056-i1-0192 skycell_0484667_warptemplate.fits
     257 pswarp -file ../input/fpC-001755-i1-0330.fit psWarp-001755-i1-0330 skycell_0484667_warptemplate.fits
     258
     259The 'output' parameter gives a rootname, so no .fits needed - it gets added automatically. The skycell needs to be specified with its full pathname.
     260
     261== Stack the images with ppStack ==
     262
     263To run ppStack, you need an input file that specifies input images, weights, masks, seeing; here's an [[Image(htdocs:/images/PpStack.mdc.txt)]] (the .txt is just there because the wiki judges files by its name and doesn't know .mdc files). You then simply say:
     264
     265 ppStack ppStack.mdc ppStack-run1
     266
     267where ppStack-run1 is the output rootname.
     268
     269= Step 5: run psphot on the stacked image =
     270
     271Initially, this barfed with some config file issue, but Paul fixed it. Now it runs with [[Image(htdocs:/images/Photstack-run1.out.txt)]]
     272
     273 psphot -file ppStack-run1.fits photstack-run1
     274
     275= Step 6: inject stacked psphot results into dvo =
     276
     277= Step 7 (really chapter 2): run everything in automated fashion in pantasks =
     278
     279== Preliminaries: set up a database in ippMon ==
     280
     281The db administrator uses ippMonitor/dbadmin to create a new "project" in the mySQL database (this isolates different reduction runs from each other; I get the impression that it's useful to really have one project per run, as the easiest [and perhaps only?] way to start over with something is to delete all the tables in the project and start from scratch).
     282
     283=== Administrator things ===
     284
     285If the database is being set up for the very first time at all for IPP use, the admin need sto say (e.g.)
     286
     287 dbadmin init (dbserver) (dbname) (dbpassword)
     288 dbadmin init aida77 ipp ********
     289
     290This creates an administrative database ippadmin which keeps track of everything else and is just required once per IPP installation.
     291
     292To set up a new project database, then say
     293
     294 dbadmin project (dbserver) (dbuser) (dbname)
     295 dbadmin project aida77 ipp jester_s82
     296
     297confirming with the password set above. This creates a project database jester_s82 that keeps track of all files in that project.
     298
     299There's also something about creating a www user:
     300
     301 dbadmin user (dbserver) (dbuser) (username) (password)
     302
     303but I'm still fighting with the web server. NB: in our case, the php script install location is
     304
     305 /srv/www/htdocs/ippMonitor
     306
     307=== User things ===
     308
     309The server, ipp-dbname, password and project are specified in ~/.ipprc and/or site.config. I have in site.config:
     310
     311 ### Database configuration
     312 DBSERVER       STR     aida77                  # Database host name (for psDBInit)
     313 DBUSER         STR     ipp                     # Database user name (for psDBInit)
     314 DBPASSWORD     STR     *******                 # Database password (for psDBInit)
     315
     316and in ~/.ipprc:
     317
     318 DBNAME         STR     jester_s82              # Database name (for psDBInit)
     319
     320I as user then use pxadmin to create a new database, or delete or recreate it (make sure that DBNAME is pointing to the database you actually want to work on!)
     321
     322 pxadmin -create
     323
     324'''There should proabably be something like an "IPP administrator's guide" (or maybe there is already one) that spells out how mySQL should be set up, what the best way is to make sure that different users don't interfere with each other's tables and projects (e.g. by having multiple mySQL users, if possible), etc.'''
     325
     326To start a whole reduction afresh, at the moment the fastest/only way is
     327
     328 pxadmin -recreate
     329
     330This will delete EVERYTHING in your database DBNAME...
     331
     332== Injecting and registering frames in ippMon ==
     333
     334Now we need to tell ippMon about our images. This has been covered in [[Image(htdocs:/images/IPP-1-1 tutorial.pdf)]]] and also in [http://kiawe.ifa.hawaii.edu/eugene/software/ipp-workshop.pdf Gene and Paul et al's giant 2-day presentation on IPP from the Baltimore workshop] (slide 228).
     335
     336Injection means telling IPP about the files
     337
     338=== Adding a static bad pixel mask to the db ===
     339
     340I've written a [[Image(htdocs:/images/RegisterBPmasks.txt)]]  path://S82/sdssBPmask/registerBPmasks.pl that runs the injection of the bad-pixel masks, first defining a ''detrend run'' for each filter, then injecting all the [[Image(htdocs:/images/Sdss_staticbadpixmasks.txt)]] I created from the [[Image(htdocs:/images/OpBC-51392.txt)]]. The bad pixel masks only work with the mosaiced camera below - in fact, they were the motivation for introducing the mosaiced SDSS camera.
     341
     342'''After pxadmin recreate, the bad-pixel masks need to be injected ''before'' the image files, so they are there and can be used!'''
     343
     344=== Injection with the "single chip = FPA" config ===
     345
     346This is in
     347
     348 ~jester/IPP/ippconfig/sdss/camera.config
     349
     350The injection is simple here:
     351 ipp_serial_inject.pl --telescope sdss --camera sdss \
     352 --workdir path://S82/run_ipp --dbname jester \
     353 --reduction PROCESSED /data/ipp001.0/jester/stripe82/coadd/input/fpC*.fits
     354
     355The "reduction class" PROCESSED selects a given set of reduction steps that is defined in the ppImage.config file. In the sdssmosaic/ppImage.config, I renamed this class into SDSSphotonly, which runs psphot but not psastro, to distinguish it from SDSSphotast, which runs both.
     356
     357=== Injection with the "six chips = mosaiced FPA" config ===
     358
     359This is in
     360
     361 ~jester/IPP/ippconfig/sdssmosaic/
     362
     363and the camera name is SDSSmosaic. Whether an SDSS image is recognized as SDSSmosaic or the single-chip SDSS format depends on which of the lines in my ~/.ipprc is commented out - the format.config for both files look identical, since the files ''are'' identical.
     364
     365The injection is more involved, since the injection needs to know about the grouping. There are two possibilities: ipp_serial_inject_mosaic.pl and ipp_serial_inject_split.pl
     366
     367The former needs to be modified to know about the structure of SDSS. It then needs to be called once per group of 6 files that are part of the same "exposure".
     368
     369The latter needs to have the input files put into subdirectories, with one dir per "exposure". You call it with a glob for all the directories [I think].
     370
     371Since I need to write a script either way, either to copy to directories or to call with a suitable glob per exposure, I'll take the latter route so we don't need to change ipp_serial_inject_mosaic.pl.
     372
     373To inject all the files in a given directory $D/stripe82/coadd/input/i/1056-0192/, use this command:
     374
     375 ipp_serial_inject_split.pl --telescope SDSS --camera SDSSmosaic --reduction SDSSphotast \
     376 --workdir path://S82/run_ipp --dbname jester_s82 --tess_id S82CELLS --dvodb S82CATDIR \
     377 $D/data/SDSS/stripe82/coadd/input/i/1056-0192/
     378
     379tess_id and dvodb are new in 2.5. The tesselation_name and dvodb_name can be explicit paths to catdirs above, but also abstract names defined in site.config
     380
     381SDSSphotonly corresponds to the PROCESSED reduction class (now PPIMAGE_OP_SOFT) defined in sdss[mosaic]/camara.config using the recipes in sdss[mosaic]/ppImage.config. The other new reduction class is SDSSphotast, which includes astrometry.
     382
     383For the initial testing, I want to isolate any possible astrometry problems from photometry problems, so I'll continue to work with SDSSphotonly. However, I wanted to make sure that phot & ast both run through, so that I can rectify any mechanical problems while still at the IfA, and then worry only about functional problems later.
     384
     385=== Registering ===
     386
     387"Registering" means getting them ingested into ippMon:
     388
     389 # Start pantasks
     390 pantasks
     391 # Inside pantasks, load predefined procuedures
     392 module pantasks.pro
     393 module.tasks
     394 # Add host names for parallel processing
     395 controller host add ipp000
     396 # etc. for more hosts.
     397 # Now by default, all analysis steps are on by default, but we want
     398 # to go through them step by step to make sure everything's working.
     399 # Hence we turn 'all' off, and then turn things on selectively.
     400 # Also, at this stage, IPP doesn't know by itself that fpC*.fits images
     401 # from SDSS don't need detrending, so we need to tell IPP by hand after the
     402 # register step.
     403 all.off
     404 register.on
     405 run
     406
     407You can also save these steps in a macro, by puttin the commands in a file, wrapping them in "macro myMacro" and "end", and then reading the file in pantasks with the "input" command. In pantasks, one can then call the macro by just typing myMacro. On the IfA cluster, my macro that does these things is called thus:
     408
     409 input /home/panstarrs/jester/IPP/macros/inject.pro
     410 injectmine
     411
     412Note that it is possible to 'controller add' the same host multiple times, and it will get multiple shares of the load.
     413
     414== Processing things with the pipeline ==
     415
     416All the reduction steps are just switches in the pantasks.pro module; they can be run simply by turning them on, e.g.
     417
     418 chip.on
     419 camera.on
     420
     421runs psphot.
     422
     423The next step is warping, which requires some extra command-line work (but maybe there's a way to have IPP do this, too? There has to be one, eventually...)
     424
     425== Warping ==
     426
     427=== Defining warp runs ===
     428
     429In IPP 2.5, there's a new feature where you specify the skycell tessellation id already in the [wiki:#Injection_with_the_.22six_chips_.3D_mosaiced_FPA.22_config injection step (see above)]. You then just need to turn on the warping step, and it figures out what to warp where by itself, and does it.
     430
     431=== Run them ===
     432
     433Then
     434
     435 warp.on
     436 run
     437
     438will run the actual warping. To see what's going on, say
     439
     440 status
     441
     442for a general job count, and
     443
     444 status -taskstats
     445
     446to see statistics on execution times.
     447
     448== Stacking ==
     449
     450Now that everything is warped, we could stack it. For this, we need to define a 'stack run' with stacktool.
     451
     452 stacktool -definerun -workdir path://S82/run_ipp -skycell_id skycell.0472823 -warp_id 1 -warp_id 2 -warp_id 5 -tess_id Skycells
     453
     454This tells IPP to stack things in the skycell given and include the pictures from the warp runs listed. The tess_id is defined in the TESSELLATIONS METADATA in camera.config, and points to the same path that I used to set up the tessellation [wiki:#Set_up_a_grid_of_skycells_to_which_the_output_will_be_warped above]
     455
     456At the moment, you need to figure out yourself which skycells and warp_ids to use. I do this:
     457
     458 # First, connect to the database
     459 mysql -h alala -u ipp -p jester
     460 [enter password]
     461 # then run the following query
     462
     463 select distinct skycell_id, warp_id from warpSkyCellMap
     464 where skycell_id in (select skycell_id from warpSkyCellMap
     465    group by skycell_id having count(distinct warp_id) > 1)
     466 order by skycell_id, warp_id;
     467
     468The inner query shows you how many warp runs overlap a given skycell:
     469
     470 select skycell_id, count(distinct warp_id) as N_warp, count(*) as N_img
     471 from warpSkyCellMap
     472 group by skycell_id having N_img  > 1
     473 order by skycell_id ;
     474
     475Conversely, you can find out how many skycells each of your images was split into:
     476
     477 select cam_id, class_id, warp_id,  count(distinct skycell_id)
     478 from warpSkyCellMap
     479 group by class_id, warp_id, cam_id
     480 order by cam_id, class_id, warp_id;
     481
     482If something fails, the way to get IPP to stop trying is
     483
     484 stacktool -updaterun -stack_id 2 -state stop
     485
     486== Diffing ==
     487
     488In principle, we could also define a diff run with difftool, but since I'm not interested in image subtraction myself, at least not initially (sorting out brown dwarfs via proper motion may change this in the future), I am skipping this step.
     489
     490However, the SDSS supernova survey has been preparing high-quality subtractions for this same data set, so it would be a very good comparison set, too. Gajus Miknaitis at Fermilab knows about the SDSS set, and I'm happy to help establishing contacts if necessary.
     491
     492== Running pshot on the stack ==
     493
     494Don't know how that works in the pipeline yet.
     495
     496== Loading stacked psphot outputs into dvo ==
     497
     498Should work as above, in principle.
     499
     500= Log 2008-05-28 =
     501
     502I don't know where I'm at on aida77 so I'm starting afresh.
     503
     504== Creating a database ==
     505
     506Start with fresh jester_s82 reduction database:
     507 pxadmin -recreate -dbname jester_s82
     508
     509or create a new one for a new run:
     510 ippadmin project aida77 ipp jester_s82_20080912
     511 pxadmin -create -dbname jester_s82_20080912
     512
     513== Injecting ==
     514
     515Normally I'd want to inject the bad pixel masks as described above, but I'm skipping that for now. Instead, go straight to injection, for now just with all the fields from 2 runs to see that it works:
     516
     517 ipp_serial_inject_split.pl --telescope SDSS --camera SDSSmosaic --reduction SDSSphotast \
     518 --workdir path://S82TEST/run_ipp --dbname jester_s82_20080912 --tess_id S82CELLS --dvodb S82TESTCATDIR  \
     519 /IPP/data/SDSS/stripe82/coadd/input/i/{1056,1755}-*/
     520
     521or for everything:
     522
     523 ipp_serial_inject_split.pl --telescope SDSS --camera SDSSmosaic --reduction SDSSphotast \
     524 --workdir path://S82PROD/run_ipp --dbname jester_s82 --tess_id S82CELLS --dvodb S82PRODCATDIR  \
     525 /IPP/data/SDSS/stripe82/coadd/input/?/*/
     526
     527The symbolic names like S82TEST are defined in <code>~/.ipprc</code> or <code>/IPP/site.config</code> (or another site config file pointed to by your <code>~/.ipprc</code>).
     528
     529=== With different recipes ===
     530
     531At some point, IPP allowed using recipes also for psphot, which are in sdssmosaic/psphot.config and sdssmosaic/reductionClasses.mdc For these, use things like
     532
     533 pxadmin -recreate -dbname jester_s82_20081217_ap3
     534
     535 ipp_serial_inject_split.pl --telescope SDSS --camera SDSSmosaic \
     536 --reduction SDSSphotast_ap \
     537 --workdir path://S82AP3_20081217 \
     538 --dbname jester_s82_20081217_ap3 \
     539 --tess_id S82CELLS \
     540 --dvodb S82AP3CAT_20081217  \
     541 /IPP/data/SDSS/stripe82/coadd/input/i/{1056,1755}-*/
     542
     543This recipe turns on both aperture corrections and spatially variable PSF fits.
     544
     545== Pantasksing ==
     546
     547Then start jobs in pantasks:
     548
     549 pantasks
     550 # If it's not in your ~/.pantasksrc
     551 module pantasks.pro
     552 module.tasks
     553
     554 # There's also a file with the sort of commands that I'm describing here
     555 # in /home/jester/s82.pro which you can load with
     556 input /home/jester/s82.pro
     557 
     558 # Set database if different from DBNAME in ~/.ipprc
     559 add.database jester_s82_20080912
     560 
     561 # Turn all reduction steps off, except for register, chip and camera:
     562 all.off
     563 register.on
     564 chip.on
     565 camera.on
     566 
     567 # Add some CPUs for the task scheduler to use
     568 # - need to be able to ssh without passwords to the host given
     569 # (see /IPP/README)
     570 controller host add aida77 -threads 2
     571 
     572 # This command can be issued multiple times for adding more
     573 # CPUs on the same machine, or more machines.
     574 # The -threads 2 is optional and allows multi-threading,
     575 # which should be the fastest option.
     576 # aida77 (and aida78 etc.) have 2 dual-core CPUs. Hence:
     577 # Without the -threads, use at most 3 copies of aida77
     578 # (fewer if more than one person are running pantasks!)
     579 # With the threads, use at most 2 copies of aida77.
     580 
     581 # Now start the processing
     582 run
     583 
     584 # say 'stop' to stop launching new jobs, or 'halt' to
     585 # stop processing altogether (and being flooded by error messages)
     586 
     587 # To see what's going on:
     588 controller status
     589 # lists active and pending jobs and the status of the hosts
     590 
     591 status
     592 # lists pending jobs and statistics of success/failures
     593 
     594 status -taskstats
     595 # includes information on how long each job ran
     596
     597NB: with
     598
     599 $VERBOSE = 2
     600
     601in pantasks, you see the commands as they're issued, which is useful for diagnosing problems. You can also simply re-run the command that's announced as failing, or look at the log file indicated. Normally, to re-run without generating further error messages, you need to remove the <code>--log path://datata</code> argument to see the output (which otherwise goes into a log file), and add <code>--no-update</code> so that the database isn't affected by the manual repeat.
     602
     603Once the camera-stage processing is finished, there's a dvo catalog with the outputs in S82PRODCATDIR. This needs to be sorted:
     604 cd `ipp_datapath.pl path://S82PRODCATDIR`
     605 addstar -D CATDIR . -resort
     606 relphot -D CATDIR . -averages
     607
     608The resorted version is available for download at [http://www.mpia.de/homes/jester/IPPstripe82_catdir_20080815.tgz http://www.mpia.de/homes/jester/IPPstripe82_catdir_20080815.tgz] - a tarfile of about 250 MB that expands into a directory of about 500 MB. I have asked our computer people also to make available all the IPP outputs directly; however, those are 250 GB (no compression) so they need to figure out a way to host those. The input fpC*.fits images from SDSS are another ~50 GB. Here is the [[Image(htdocs:/images/README_IPPstripe82_20080815.txt)]].tgz