| | 1 | Here are the issues/fixes I ran into while running IPP 2.1 on 2.2m-UH Tek data using a Linux machine. By Julia Fang |
| | 2 | |
| | 3 | == Configuration == |
| | 4 | |
| | 5 | * Modifications to ~/.ipprc |
| | 6 | I added two more data directories: |
| | 7 | |
| | 8 | TEKDATA STR /home/group12/jfang/TEKDATA/ |
| | 9 | TEKWORK STR /home/group12/jfang/TEKWORK/ |
| | 10 | |
| | 11 | I also changed my database information: |
| | 12 | DBNAME STR tek |
| | 13 | |
| | 14 | I added camera information for TEK under "Setups for each camera system" and "camera names as expected by DVO". I also made sure that the TEK camera was located above the simple camera. |
| | 15 | CAMERAS METADATA |
| | 16 | TEK STR tek/camera.config |
| | 17 | |
| | 18 | DVO.CAMERAS METADATA |
| | 19 | TEK STR tek |
| | 20 | |
| | 21 | * Initiating new database |
| | 22 | I created a new database called tek and granted permissions to the other computers in my cluster to access this database. |
| | 23 | |
| | 24 | * Fits Headers of Input Images |
| | 25 | I used IRAF and the command "imhead file.fits lo+" to edit the headers of my fits files. The telescope, instrument, and detector names were changed. I had to add dashes to the telescope and detector names because IPP wouldn't allow spaces. The instrument name was changed to "TEK". Other additions to the fits headers: |
| | 26 | |
| | 27 | OBSTYPE = 'object ' |
| | 28 | FILTER = 'R ' |
| | 29 | UTC-OBS = '2007-06-13' |
| | 30 | |
| | 31 | I added the OBSTYPE, FILTER, and UTC-OBS. |
| | 32 | |
| | 33 | * Tek's configuration files |
| | 34 | I added a tek config folder under /jfang/psconfig/default.linrh/share/ippconfig/ and named it "tek". In this folder, I copied over isp camera's configuration files from /jfang/psconfig/default.linrh/share/ippconfig/isp/ and edited them: |
| | 35 | |
| | 36 | In format.config, cmf.config, cmp.config: |
| | 37 | Edited the TELESCOP, INSTRUME, and DETECTOR fields. |
| | 38 | I modified these fields: |
| | 39 | FPA.NAME STR NAXIS |
| | 40 | CELL.TRIMSEC.SOURCE STR VALUE |
| | 41 | CELL.BIASSEC.SOURCE STR HEADER |
| | 42 | CELL.TRIMSEC STR [21:2068,1:2048] |
| | 43 | CELL.BIASSEC STR BIASSEC |
| | 44 | FPA.FILTER STR FILTER |
| | 45 | CELL.XBIN STR CCDBIN1 |
| | 46 | CELL.YBIN STR CCDBIN2 |
| | 47 | |
| | 48 | In dvo.config: |
| | 49 | CATDIR /media/usbdisk/scr1/catdir.synth.grizy/ |
| | 50 | DATE-KEYWORD DATE-OBS |
| | 51 | DATE-MODE YYYY-MM-DD |
| | 52 | UT-KEYWORD UT |
| | 53 | JD-KEYWORD JD |
| | 54 | |
| | 55 | In ppImage.config: |
| | 56 | I turned off all dark and shutter fields to FALSE. |
| | 57 | |
| | 58 | In psastro.config, I changed the catalog path: |
| | 59 | DVO.CATDIR STR /media/usbdisk/scr1/catdir.synth.grizy/ |
| | 60 | |
| | 61 | In camera.config, I modified file formats and filter: |
| | 62 | FORMATS METADATA |
| | 63 | TEK STR tek/format.config |
| | 64 | CMP STR tek/cmp.config |
| | 65 | CMF STR tek/cmf.config |
| | 66 | END |
| | 67 | |
| | 68 | FILTER.ID METADATA |
| | 69 | R STR R |
| | 70 | END |
| | 71 | |
| | 72 | DVO.CAMERADIR STR tek |
| | 73 | |
| | 74 | == Data Injection == |
| | 75 | |
| | 76 | * How to inject data |
| | 77 | I used the ipp_serial_inject.pl command. Looked at the notes for Essence Test to figure it out. |
| | 78 | |
| | 79 | > ipp_serial_inject.pl --workdir path://TEKWORK/ --dbname tek /home/group12/jfang/TEKDATA/*.fits |
| | 80 | |
| | 81 | == Detrend Construction == |
| | 82 | |
| | 83 | * Errors in trying to get any master image |
| | 84 | I went to Tek's camera.config and modified these lines to fix the problem: |
| | 85 | |
| | 86 | PPIMAGE.CHIP OUTPUT {OUTPUT}.chip.fits IMAGE FPA TRUE NONE |
| | 87 | PPIMAGE.CHIP.MASK OUTPUT {OUTPUT}.chip.mk.fits MASK FPA TRUE NONE |
| | 88 | PPIMAGE.CHIP.WEIGHT OUTPUT {OUTPUT}.chip.wt.fits WEIGHT FPA TRUE NONE |
| | 89 | |
| | 90 | I also had to check Tek's rejections.config and changed IMFILE.STDEV and EXP.STDEV to a higher number like 10 so that it won't be so easily rejected. |
| | 91 | |
| | 92 | * Problem where dark subtraction didn't seem to be properly turned off |
| | 93 | Turns out Tek's ppImage recipe didn't contain the recipe used for flat-fielding. I went to the simple camera and copied over the long list of detrend steps (at the end of the file) and turned on/off the appropriate steps. |
| | 94 | |
| | 95 | * Error while trying to get master flat: "unmatched statement (null)" |
| | 96 | This was fixed by going to Tek's format.config. Under DEFAULTS, set CELL.BAD to 0 and CELL.READNOISE to 10. |
| | 97 | |
| | 98 | * Still could not get a master flat |
| | 99 | In the end, turns out there was a bug in ppMerge, the code wasn't checking for NAN in the image, and when it generated one, it wasn't being masked for the statistics. So I got the new, fixed files from Paul Price and recompiled psModules, ppMerge, and ppStats. This solved the problem. |
| | 100 | |
| | 101 | == Chip and Camera == |
| | 102 | |
| | 103 | * Can't find expected output file: path://TEKDATA/nt2154.chp6.chip.mk.fits |
| | 104 | Actually the real error here was in Tek's format.config file. CELL.TRIMSEC and CELL.BIASSEC were actually on the same line although they did not appear to be. So I added a line return between them. |
| | 105 | |
| | 106 | * No WCS metadata in header |
| | 107 | I needed WCS data in my Tek headers, specifically a CD matrix and CRVAL1 and CRVAL2. I added this information to my fits headers (as well as other optional WCS information): |
| | 108 | |
| | 109 | CTYPE1 = 'RA---TAN' |
| | 110 | CTYPE2 = 'DEC--TAN' |
| | 111 | CRPIX1 = 1024 |
| | 112 | CRPIX2 = 1024 |
| | 113 | CRVAL1 = 358.37 |
| | 114 | CRVAL2 = 54.9575 |
| | 115 | CDELT1 = 0.22 |
| | 116 | CDELT2 = 0.22 |
| | 117 | CD1_1 = -6.100000E-5 |
| | 118 | CD1_2 = 0 |
| | 119 | CD2_1 = 0 |
| | 120 | CD2_2 = 6.100000E-5 |
| | 121 | |
| | 122 | The CD matrix determined rotation. I figured this out by going to ds9 and scaling my image to a DSS image of the same sky. |
| | 123 | |
| | 124 | * Problem with camera processing |
| | 125 | I added the following lines to PPIMAGE_J1 and to PPIMAGE_J2 in /recipes/ppImage.config to fix this: |
| | 126 | PHOTOM BOOL FALSE |
| | 127 | ASTROM.CHIP BOOL FALSE |
| | 128 | ASTROM.MOSAIC BOOL FALSE |
| | 129 | |
| | 130 | * How do rerun chip/camera step |
| | 131 | Queue it up again: |
| | 132 | > chiptool -queue -exp_type OBJECT |
| | 133 | Or you can replace exp_type with whatever field you would like to use in your queue, like a specific image you want to queue up. |
| | 134 | |
| | 135 | == Warping == |
| | 136 | |
| | 137 | * No valid photcode is supplied |
| | 138 | To fix this, I went to /ippconfig/dvo.photcodes and put in the appropriate photcode entry for Tek: |
| | 139 | 4405 Tektronix-2048^2-CCD.R dep 25.00 0.00 - - - - - 1 |
| | 140 | |
| | 141 | * Bad astrometric solution in header (for 2 out of 7 images) |
| | 142 | Fixed by modifying the psastro.config in /tek and /recipes. I changed the ranges and offset to larger values for pmAstromGridMatch and pmAstromGridAngle. I also went to check those two images with the DSS image again and looked for 1) correct RA and DEC as well as 2) correct rotation. Then I reran the chip and camera step. |
| | 143 | |
| | 144 | == Difference == |
| | 145 | |
| | 146 | * What to do |
| | 147 | I went to /jfang/TEKWORK/tess_Skycells/ to look for all the skycells with at least two warps in them (so that way something can be differenced). A - B (template). |
| | 148 | |
| | 149 | For each of those skyfiles, use a series of 4 difftool commands like the following examples: |
| | 150 | > difftool -definerun -workdir path://TEKWORK/ -skycell_id skycell.0372023 -tess_id skycells |
| | 151 | > difftool -addinputskyfile -diff_id 1 -warp_id 1 -skycell_id skycell.0372023 -tess_id skycells |
| | 152 | > difftool -addinputskyfile -diff_id 1 -warp_id 2 -skycell_id skycell.0372023 -tess_id skycells -template |
| | 153 | > difftool -updaterun -diff_id 1 -state run |
| | 154 | |
| | 155 | * Unable to find PPSUB.OUTPUT within metadata |
| | 156 | I went to simtest/camera.config to copy over the all the fields for PPSUB and PPSTACK (do a search through the file for them) to Tek's camera.config. For some reason those were missing. |
| | 157 | |
| | 158 | * Error performing subtraction. pmSubtractionSolveEquation: parameter out-of-range. |
| | 159 | This error is given when the two images are blanks. Overlaps aren't calculated exactly, so sometimes we get skycells that don't have a real overlap when we come to do the warp. They are just created as completely blank fields. So I went to ds9 to find those that were blanks and just ignored them. |
| | 160 | |
| | 161 | == Stacking == |
| | 162 | |
| | 163 | * Skycell identifiers don't match |
| | 164 | This came up because there was a bug in IPP 2.1 (but fixed in the current version), so I just copied over some stack config files from Paul Price and rebuilt ippTools. |
| | 165 | |
| | 166 | Everything finished...but the stacked images look only partial. Paul reassured me that this is normal because if my image only happens to overlap a particular skycell a little bit, then I will only get little bits of the image and the rest will be blank. |