Changeset 35554
- Timestamp:
- May 9, 2013, 11:35:03 AM (13 years ago)
- Location:
- branches/eam_branches/ipp-20130419
- Files:
-
- 19 edited
-
. (modified) (1 prop)
-
DataStore/lib/DataStore/Utils.pm (modified) (1 diff)
-
Nebulous-Server (modified) (1 prop)
-
doc/stamps/stampsICD.tex (modified) (15 diffs)
-
ippToPsps (modified) (1 prop)
-
ippToPsps/config/ippToPspsDbSchema.sql (modified) (3 diffs)
-
ippToPsps/config/settings.xml (modified) (2 diffs)
-
ippToPsps/doc/notes.txt (modified) (1 diff)
-
ippToPsps/jython/batch.py (modified) (1 diff)
-
ippToPsps/jython/detectionbatch.py (modified) (4 diffs)
-
ippToPsps/jython/objectbatch.py (modified) (2 diffs)
-
ippToPsps/jython/stackbatch.py (modified) (7 diffs)
-
ippToPsps/test/fulltest.sh (modified) (3 diffs)
-
ippToPsps/test/mkgpc1data.dvo (modified) (1 diff)
-
psconfig (modified) (1 prop)
-
psphot (modified) (1 prop)
-
psphot/src (modified) (1 prop)
-
psphot/src/psphotStackImageLoop.c (modified) (1 prop)
-
psvideophot (modified) (1 prop)
Legend:
- Unmodified
- Added
- Removed
-
branches/eam_branches/ipp-20130419
-
branches/eam_branches/ipp-20130419/DataStore/lib/DataStore/Utils.pm
r35411 r35554 44 44 %KNOWN_FILE_TYPES = map { $_ => 1 } qw( chip psrequest psresults pstamp chipproc warp stack diff ipp-mops table text xml tgz fits IPP-MOPS IPP-PSPS ipp-psps notset ); 45 45 %KNOWN_FILESET_TYPES = map { $_ => 1 } qw( OBJECT BIAS DARK SKYFLAT DOMEFLAT OOF SHACKHARTMANN PSREQUEST PSRESULTS IPP-MOPS XRAY FOCUS MOPS_DETECTABILITY_QUERY MOPS_DETECTABILITY_RESPONSE MOPS_TRANSIENT_DETECTIONS LED notset IPP_PSPS IPP-DIST table); 46 %KNOWN_PRODUCT_TYPES = map { $_ => 1 } qw( image dump psrequest psresults table ipp-dist ipp-misc dqresults );46 %KNOWN_PRODUCT_TYPES = map { $_ => 1 } qw( image dump psrequest psresults table ipp-dist ipp-misc dqresults IPP-MOPS IPP-PSPS PSRESULTS); 47 47 48 48 =pod -
branches/eam_branches/ipp-20130419/Nebulous-Server
- Property svn:mergeinfo changed (with no actual effect on merging)
-
branches/eam_branches/ipp-20130419/doc/stamps/stampsICD.tex
r33884 r35554 9 9 \project{Pan-STARRS IPP} 10 10 \organization{Institute for Astronomy} 11 \version{ 1.0}11 \version{2.0} 12 12 \docnumber{PSDC-940-011-00} 13 13 … … 48 48 one or more FITS binary tables called \emph{request tables}. 49 49 Each row in a request table contains a postage stamp request specification. 50 Each request specification causes zero or more postage stamp jobs to be processed.50 Each request specification causes zero or more postage stamp jobs to be created. 51 51 Images are added to the output file set for each successful job. 52 52 53 53 The request specification give the parameters that the PSS uses to determine the images of interest 54 54 and the Region of Interest. 55 56 Note: The value "null" for strings or 0 for numbers may be used to disable the application of 57 certain parameters. 55 58 56 59 \subsection{Request Table Contents} … … 69 72 \hline 70 73 \code{EXTNAME} & string & \code{PS1_PS_REQUEST} \\ 71 \code{EXTVER} & string & 1\\74 \code{EXTVER} & string & 2 \\ 72 75 \code{REQ_NAME} & string & unique name of the request (see text) \\ 76 \code{ACTION} & string & PROCESS \\ 77 \code{EMAIL} & string & Email address of submitting user\\ 73 78 \hline 74 79 \end{tabular} … … 81 86 This value is used for the name of the request's output file set. 82 87 83 The postage stamp server supports three types of "postage stamp" job specified by the value 88 89 The postage stamp server supports two types of "postage stamp" job specified by the value 84 90 the column \code{JOB_TYPE}. If the value is \emph{stamp} postage stamp images will be extracted 85 91 from the images of interest. If the value of \code{JOB_TYPE} is \emph{get\_image} 86 the data from the selected images' "runs" with (satellite streaks removed) are bundled87 in andplaced on the output file set.92 the data from the selected images' "runs" are bundled in the format used by the IPP distribution system 93 and are placed on the output file set. 88 94 89 95 \begin{table}[h] … … 97 103 \code{ROWNUM} & U32 & & must be unique in file\\ 98 104 \code{PROJECT} & string & gpc1 & \\ 105 \code{SURVEY_NAME} & string & PS1 survey names & see table 3 \\ 106 \code{IPP_RELEASE} & string & IPP release name & e.g. 3PI.PV1, 3PI.nightly \\ 99 107 \code{JOB_TYPE} & string & stamp or get\_image & \\ 100 108 \\ … … 117 125 \code{MJD_MIN} & F64 & Modified Julian Day & \\ 118 126 \code{MJD_MAX} & F64 & & \\ 119 \\ 120 \code{COMMENT} & string & copied to the results flie & \\ 127 \code{RUN_TYPE} & string & stack or diff type & deep, reference, nightly, warp-stack, etc.\\ 128 \code{FWHM_MIN} & F64 & minimum measured seeing (pixels) & \\ 129 \code{FWHM_MAX} & F64 & maximum measured seeing (pixels) & \\ 130 \\ 131 \code{COMMENT} & string & copied to the results file & \\ 121 132 \hline 122 133 \end{tabular} … … 159 170 \end{itemize} 160 171 161 Note that at this time theREQ\_TYPE byexp is not implemented for IMG\_TYPE stack.172 Note that REQ\_TYPE byexp is not implemented for IMG\_TYPE stack. 162 173 163 174 COMPONENT must also be supplied for request specifications where all of the following are true … … 173 184 \end{itemize} 174 185 175 The special value 'all' may be used to select all component images but this is not recommended. 186 The special value "all" may be used to select all component components (chips or skycells) of a run. 187 176 188 177 189 \subsubsection{Image Selection Cuts}\label{ImageCuts} 178 190 179 A request specification may refer to many images. The scope of the search can be 180 limited to certain dates with the parameters MJD\_MIN and MJD\_MAX. The specified range is inclusive. 181 Note: these cuts have no effect for stack stage requests. 191 A request specification may refer to many images. The scope of the search can be reduced by providing 192 the selection parameters. 193 194 SURVEY\_NAME (new in version 2) restricts the queries to images for a given PS1 survey. Valid values are 195 shown in the table below. The value "null" may also be used. 196 197 \begin{table}[h] 198 \begin{center} 199 \caption{PS1 SURVEYNAME Values}\label{surveys} 200 \begin{tabular}{ll} 201 \hline 202 \hline 203 {\bf SURVEY\_NAME} & {\bf Description } \\ 204 \hline 205 3PI & PS1 3PI Survey \\ 206 MD01 & PS1 MD01 XMM-LSS-DXS 022224-043000 \\ 207 MD02 & PS1 MD02 CDFS/GOODS/GEMS 033224-274800 \\ 208 MD03 & PS1 MD03 IFA/Lynx 084300+444000 \\ 209 MD04 & PS1 MD04 COSMOS 100000+021200 \\ 210 MD05 & PS1 MD05 Lockman-DXS 110000+570000 \\ 211 MD06 & PS1 MD06 NGC 4258 121857+471814 \\ 212 MD07 & PS1 MD07 VISTA-Video1 140000+050000 \\ 213 MD08 & PS1 MD08 EliasN1-DXS 160000+570000 \\ 214 MD09 & PS1 MD09 Vimos4-DXS-SSA 220000+003000 \\ 215 MD10 & PS1 MD10 Deep2 233000+000000 \\ 216 M31 & PS1 M31 Andromeda 004242+411600 \\ 217 STS1 & PS1 STS1 Outskirts of Bulge 195048+170339 \\ 218 STS2 & PS1 STS2 Hyades 004000+150000 \\ 219 STS3 & PS1 STS3 Praesepe 083000+200000 \\ 220 SSS & PS1 Solar System Survey \\ 221 \hline 222 \end{tabular} 223 \end{center} 224 \end{table} 225 226 IPP\_RELEASE (new in version 2) restricts the search for data from a particular "release" of IPP data. 227 If "null" the system choses data from the highest priority release ("best") of the given exposure or skycell. 182 228 183 229 DATA\_GROUP restricts the search to runs with the given value. Note that the SQL database lookups 184 are done with a "LIKE" comparison so SQL wild cards may be used. 230 are done with a "LIKE" comparison so SQL wild cards may be used. With Version 2 of this specification 231 use of DATA\_GROUP is deprecated. It is ignored if a non null value for SURVEY\_NAME or IPP\_RELEASE is 232 supplied. 233 234 Searches may be limited to certain dates with the parameters MJD\_MIN and MJD\_MAX. The specified range is inclusive. 235 Note: For stack stage requests, these cuts will have no effect on queries for deep or reference stacks. 185 236 186 237 The REQFILT parameter may be used to restrict the search for images taken with a given filter. 187 If the filter is a single character (g, r, i, z, y) the server appends a '\%' character to the 188 sql query. 238 If the filter is a single character (g, r, i, z, y, w) the server appends a '\%' character to the 239 sql query. If "null" data from all filters is queried. 240 241 The optional parameter RUN\_TYPE is used for specify the type of stack or difference images to consider as 242 images of interest. 243 244 For difference images valid values are warp\_warp warp\_stack and stack\_stack. 245 246 For stacks valid values are "deep", "reference", "nightly", and "notnightly". For stacks, this selector 247 is only applied if SURVEY\_NAME or IPP\_RELEASE is supplied. 248 189 249 190 250 … … 230 290 When pixel coordinates are used the coordinate system is that of the image. (For chip level images, before 231 291 the stamps are created the cells are mosaicked into a single image.) 292 293 Note: If the width and height are both equal to zero, the entire input image is included in the stamp. Otherwise 294 values less than or equal to zero will generate an error. 232 295 233 296 \subsection{Request Options} … … 252 315 PSTAMP\_SELECT\_INVERSE & 1024 & make stamps from inverse difference images (applies only for diff) \\ 253 316 PSTAMP\_SELECT\_UNCONV & 2048 & make stamps from unconvolved stack images (applies only for stack) \\ 254 PSTAMP\_RESTORE\_BACKGROUND & 4096 & (TODO)restore background correction to chip stage images before making stamp \\317 PSTAMP\_RESTORE\_BACKGROUND & 4096 & restore background correction to chip stage images before making stamp \\ 255 318 PSTAMP\_USE\_IMFILE\_ID & 16384 & for byid requests select images using image id instead of stage id \\ 256 319 PSTAMP\_NO\_WAIT\_FOR\_UPDATE & 32768 & if images are not available because they have been cleaned don't wait \\ … … 299 362 the pixels for requested images, if possible. This is referred to as the update process. 300 363 If the user does not wish to wait for the updates to complete he should include 301 \code{PSTAMP_NO_WAIT_FOR_UPDATE} in the \code{OPTION_MASK}. 364 \code{PSTAMP_NO_WAIT_FOR_UPDATE} in the \code{OPTION_MASK}. In this case the row will receive the error 365 code PSTAMP\_NOT\_AVAIALABLE. 302 366 303 367 … … 353 417 \code{EXPTIME} & F64 & exposure time of parent image \\ 354 418 \code{FPA_ID} & string & orginal FPA\_ID used at injection \\ 355 \\ 356 \code{PROJECT} & string & Values from initial request specification\\ 419 \hline 420 & Values from corresponding row in the request file\\ 421 \hline 422 \code{PROJECT} & string & \\ 423 \code{SURVEY_NAME} & string & \\ 424 \code{IPP_RELEASE} & string & \\ 357 425 \code{JOB_TYPE} & string & \\ 358 426 \\ … … 372 440 \code{MJD_MAX} & F64 & \\ 373 441 \code{DATA_GROUP} & string & \\ 442 \code{RUN_TYPE} & string & \\ 443 \code{FWHM_MIN} & F64 & \\ 444 \code{FWHM_MAX} & F64 & \\ 374 445 \code{COMMENT} & string & \\ 375 446 \\ … … 393 464 have the name \code{ROWNUM_I.mk.fits} 394 465 395 JOB\_ID is the value of the postage stamp server's internal job id. (This is provided primarily as a debugging466 JOB\_ID is the value of the postage stamp server's internal job id. 396 467 aid.) 397 468 398 The column named PROJECT and following columns are copie sfrom the input request specification.469 The column named PROJECT and following columns are copied from the input request specification. 399 470 400 471 If ERROR\_CODE is non-zero an error occurred when processing the request specification or the job. … … 419 490 PSTAMP\_UNKNOWN\_PRODUCT & 22 & Unknown product in request specification \\ 420 491 PSTAMP\_NO\_IMAGE\_MATCH & 23 & No images matched the request \\ 421 PSTAMP\_NOT\_DESTREAKED & 24 & Image matched, but not yet de-streaked\\492 PSTAMP\_NOT\_DESTREAKED & 24 & Obsolete - No longer used\\ 422 493 PSTAMP\_NOT\_AVAILABLE & 25 & Image not available (temporary) \\ 423 494 PSTAMP\_GONE & 26 & Image is no longer available \\ 424 495 PSTAMP\_NO\_JOBS\_QUEUED & 27 & Request specification yielded no jobs. See parse\_error.txt \\ 425 496 PSTAMP\_NO\_OVERLAP & 28 & Center coordinates are not contained in any image of interest \\ 497 PSTAMP\_NOT\_AUTHORIZED & 29 & user is not allowed access to the selected data\\ 426 498 427 499 \hline -
branches/eam_branches/ipp-20130419/ippToPsps
- Property svn:mergeinfo changed
/trunk/ippToPsps merged: 35426,35451-35452,35456,35496,35502-35503
- Property svn:mergeinfo changed
-
branches/eam_branches/ipp-20130419/ippToPsps/config/ippToPspsDbSchema.sql
r35232 r35554 48 48 `purged` tinyint(4) NOT NULL default '0', 49 49 PRIMARY KEY (`batch_id`) 50 ) ENGINE=InnoDB AUTO_INCREMENT= 328286DEFAULT CHARSET=latin1;50 ) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=latin1; 51 51 SET character_set_client = @saved_cs_client; 52 52 … … 69 69 KEY `fk_skychunk` (`skychunk`), 70 70 CONSTRAINT `fk_skychunk` FOREIGN KEY (`skychunk`) REFERENCES `skychunk` (`name`) ON DELETE CASCADE 71 ) ENGINE=InnoDB AUTO_INCREMENT= 44588DEFAULT CHARSET=latin1;71 ) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=latin1; 72 72 SET character_set_client = @saved_cs_client; 73 73 … … 91 91 PRIMARY KEY (`id`), 92 92 UNIQUE KEY `unique_key` (`host`,`pid`) 93 ) ENGINE=InnoDB AUTO_INCREMENT=1 227DEFAULT CHARSET=latin1;93 ) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=latin1; 94 94 SET character_set_client = @saved_cs_client; 95 95 -
branches/eam_branches/ipp-20130419/ippToPsps/config/settings.xml
r35417 r35554 45 45 <memory>16</memory> 46 46 </loader> 47 <loader mach="ipp045"> 48 <name>ipptopsps_scratch</name> 49 <host>ipp045</host> 50 <user>dvo</user> 51 <password>dvo</password> 52 <memory>32</memory> 53 </loader> 54 <loader mach="ipp046"> 55 <name>ipptopsps_scratch</name> 56 <host>ipp046</host> 57 <user>dvo</user> 58 <password>dvo</password> 59 <memory>32</memory> 60 </loader> 61 <loader mach="ipp047"> 62 <name>ipptopsps_scratch</name> 63 <host>ipp047</host> 64 <user>dvo</user> 65 <password>dvo</password> 66 <memory>32</memory> 67 </loader> 68 <loader mach="ipp048"> 69 <name>ipptopsps_scratch</name> 70 <host>ipp048</host> 71 <user>dvo</user> 72 <password>dvo</password> 73 <memory>32</memory> 74 </loader> 75 <loader mach="ipp049"> 76 <name>ipptopsps_scratch</name> 77 <host>ipp049</host> 78 <user>dvo</user> 79 <password>dvo</password> 80 <memory>32</memory> 81 </loader> 82 <loader mach="ipp050"> 83 <name>ipptopsps_scratch</name> 84 <host>ipp050</host> 85 <user>dvo</user> 86 <password>dvo</password> 87 <memory>32</memory> 88 </loader> 89 <loader mach="ipp051"> 90 <name>ipptopsps_scratch</name> 91 <host>ipp051</host> 92 <user>dvo</user> 93 <password>dvo</password> 94 <memory>32</memory> 95 </loader> 96 <loader mach="ipp052"> 97 <name>ipptopsps_scratch</name> 98 <host>ipp052</host> 99 <user>dvo</user> 100 <password>dvo</password> 101 <memory>32</memory> 102 </loader> 103 <loader mach="ipp053"> 104 <name>ipptopsps_scratch</name> 105 <host>ipp053</host> 106 <user>dvo</user> 107 <password>dvo</password> 108 <memory>32</memory> 109 </loader> 110 <loader mach="ipp054"> 111 <name>ipptopsps_scratch</name> 112 <host>ipp054</host> 113 <user>dvo</user> 114 <password>dvo</password> 115 <memory>32</memory> 116 </loader> 117 <loader mach="ipp055"> 118 <name>ipptopsps_scratch</name> 119 <host>ipp055</host> 120 <user>dvo</user> 121 <password>dvo</password> 122 <memory>32</memory> 123 </loader> 124 <loader mach="ipp056"> 125 <name>ipptopsps_scratch</name> 126 <host>ipp056</host> 127 <user>dvo</user> 128 <password>dvo</password> 129 <memory>32</memory> 130 </loader> 131 <loader mach="ipp057"> 132 <name>ipptopsps_scratch</name> 133 <host>ipp057</host> 134 <user>dvo</user> 135 <password>dvo</password> 136 <memory>32</memory> 137 </loader> 138 <loader mach="ipp058"> 139 <name>ipptopsps_scratch</name> 140 <host>ipp058</host> 141 <user>dvo</user> 142 <password>dvo</password> 143 <memory>32</memory> 144 </loader> 145 <loader mach="ipp059"> 146 <name>ipptopsps_scratch</name> 147 <host>ipp059</host> 148 <user>dvo</user> 149 <password>dvo</password> 150 <memory>32</memory> 151 </loader> 152 <loader mach="ipp060"> 153 <name>ipptopsps_scratch</name> 154 <host>ipp060</host> 155 <user>dvo</user> 156 <password>dvo</password> 157 <memory>32</memory> 158 </loader> 159 <loader mach="ipp061"> 160 <name>ipptopsps_scratch</name> 161 <host>ipp061</host> 162 <user>dvo</user> 163 <password>dvo</password> 164 <memory>32</memory> 165 </loader> 166 <loader mach="ipp062"> 167 <name>ipptopsps_scratch</name> 168 <host>ipp062</host> 169 <user>dvo</user> 170 <password>dvo</password> 171 <memory>32</memory> 172 </loader> 173 <loader mach="ipp063"> 174 <name>ipptopsps_scratch</name> 175 <host>ipp063</host> 176 <user>dvo</user> 177 <password>dvo</password> 178 <memory>32</memory> 179 </loader> 47 180 <loader mach="ipp064"> 48 181 <name>ipptopsps_scratch</name> … … 52 185 <memory>32</memory> 53 186 </loader> 187 <loader mach="ipp065"> 188 <name>ipptopsps_scratch</name> 189 <host>ipp065</host> 190 <user>dvo</user> 191 <password>dvo</password> 192 <memory>32</memory> 193 </loader> 194 <loader mach="ipp066"> 195 <name>ipptopsps_scratch</name> 196 <host>ipp066</host> 197 <user>dvo</user> 198 <password>dvo</password> 199 <memory>32</memory> 200 </loader> 201 <loader mach="stare00"> 202 <name>ipptopsps_scratch</name> 203 <host>stare00</host> 204 <user>dvo</user> 205 <password>dvo</password> 206 <memory>64</memory> 207 </loader> 208 <loader mach="stare01"> 209 <name>ipptopsps_scratch</name> 210 <host>stare01</host> 211 <user>dvo</user> 212 <password>dvo</password> 213 <memory>64</memory> 214 </loader> 215 <loader mach="stare02"> 216 <name>ipptopsps_scratch</name> 217 <host>stare02</host> 218 <user>dvo</user> 219 <password>dvo</password> 220 <memory>64</memory> 221 </loader> 222 <loader mach="stare03"> 223 <name>ipptopsps_scratch</name> 224 <host>stare03</host> 225 <user>dvo</user> 226 <password>dvo</password> 227 <memory>64</memory> 228 </loader> 229 <loader mach="stare04"> 230 <name>ipptopsps_scratch</name> 231 <host>stare04</host> 232 <user>dvo</user> 233 <password>dvo</password> 234 <memory>64</memory> 235 </loader> 236 237 238 239 240 54 241 <loader mach="generic"> 55 242 <name>ipptopsps_scratch</name> -
branches/eam_branches/ipp-20130419/ippToPsps/doc/notes.txt
r35233 r35554 1 2 2013.04.27 3 4 need to move the conversion between mags and flux into dvopsps. 5 6 * detection table 7 * psfFlux : uses PSF_INST_MAG instead of PSF_INST_FLUX 8 * psfFluxErr : uses PSF_INST_MAG_SIG and PSF_INST_MAG instead of PSF_INST_FLUX_SIG 9 * apFlux : uses AP_MAG instead of AP_FLUX 10 * kronFlux : correctly uses KRON_FLUX 11 * kronFluxErr : correctly uses KRON_FLUX_ERR 12 13 ** psfFlux is forced to 0.0000001 instead of 0.0 -- why? 14 15 * stack detection table (same issues as detection table) 16 * psfFlux : uses PSF_INST_MAG instead of PSF_INST_FLUX 17 * psfFluxErr : uses PSF_INST_MAG_SIG and PSF_INST_MAG instead of PSF_INST_FLUX_SIG 18 * apFlux : uses AP_MAG instead of AP_FLUX 19 * kronFlux : correctly uses KRON_FLUX 20 * kronFluxErr : correctly uses KRON_FLUX_ERR 21 22 * psfFlux is set to 2 sigma if psfFlux is NULL 23 24 * object 25 * Mean PSF Mag : direct from DVO MAG 26 * Mean PSF Mag Err : direct from DVO MAG_ERR 27 * Mean Kron Mag : direct from DVO KRON MAG 28 * Mean Kron Mag Err : direct from DVO KRON MAG_ERR 29 30 * Stack PSF Mag : from DVO stack psf flux 31 * Stack PSF Mag Err : from DVO stack psf flux err 32 * Stack Kron Mag : from DVO stack kron flux 33 * Stack Kron Mag Err : from DVO stack kron flux err 34 35 36 37 38 39 old notes: 1 40 2 41 example of joining ipptopsps and gpc1 tables: -
branches/eam_branches/ipp-20130419/ippToPsps/jython/batch.py
r35417 r35554 65 65 self.scratchDb = scratchDb 66 66 self.batchType = batchType; 67 self.skipBatch = False; # set to true if there is a non-fatal error 67 68 self.pspsVoTableFilePath = self.config.configDir + "tables." + batchType + ".vot" 68 69 -
branches/eam_branches/ipp-20130419/ippToPsps/jython/detectionbatch.py
r35417 r35554 439 439 ,X_PSF_SIG \ 440 440 ,Y_PSF_SIG \ 441 ,P OW(10.0, (-0.4*PSF_INST_MAG))/ " + self.header['EXPTIME'] + " \442 , ABS((PSF_INST_MAG_SIG*(POW(10.0, (-0.4*PSF_INST_MAG)) / " + self.header['EXPTIME'] + ")) / 1.085736)\441 ,PSF_INST_FLUX / " + self.header['EXPTIME'] + " \ 442 ,PSF_INST_FLUX_SIG / " + self.header['EXPTIME'] + " \ 443 443 ,POW(10.0, (-0.4*PEAK_FLUX_AS_MAG)) / " + self.header['EXPTIME'] + " \ 444 444 ,PSF_MAJOR \ … … 450 450 ,MOMENTS_XY \ 451 451 ,MOMENTS_YY \ 452 , POW(10.0, -0.4 *AP_MAG)/ " + self.header['EXPTIME'] + " \452 ,AP_FLUX / " + self.header['EXPTIME'] + " \ 453 453 ,KRON_FLUX / " + self.header['EXPTIME'] + " \ 454 454 ,KRON_FLUX_ERR / " + self.header['EXPTIME'] + " \ … … 466 466 # self.logger.info(sql) 467 467 468 self.scratchDb.execute(sql) 469 468 # these were used above (left over from before PSF_INST_FLUX, PSF_INST_FLUX_SIG were available? 469 # ,POW(10.0, (-0.4*PSF_INST_MAG)) / " + self.header['EXPTIME'] + " 470 # ,ABS((PSF_INST_MAG_SIG*(POW(10.0, (-0.4*PSF_INST_MAG)) / " + self.header['EXPTIME'] + ")) / 1.085736) 471 # ,POW(10.0, -0.4 *AP_MAG) / " + self.header['EXPTIME'] + " 472 473 self.scratchDb.execute(sql) 474 475 # XXX EAM : I removed this old fix for invalid fluxes 470 476 # add a instFlux = 0.0 -> 0.000001 471 # XXX EAM : why is this done? 472 sql="UPDATE " + pspsTableName + " SET psfFlux = 0.0000001 WHERE psfFlux = 0"473 self.scratchDb.execute(sql)477 # XXX EAM : why is this done? 478 # sql="UPDATE " + pspsTableName + " SET psfFlux = 0.0000001 WHERE psfFlux = 0" 479 # self.scratchDb.execute(sql) 474 480 481 # NOTE : Flux limits : in the current PSPS schema, negative fluxes 482 # cause problems for sql queries which work in mags as SQL cannot do 483 # something like (f < 0.0) ? -999 : -2.5*log10(f) 484 # as a result, the negative fluxes here result in floating point errors 485 sql = "UPDATE " + pspsTableName + " SET psfFlux = 1e20 WHERE psfFlux <= 0.0" 486 self.scratchDb.execute(sql) 487 488 sql = "UPDATE " + pspsTableName + " SET apFlux = 1e20 WHERE apFlux <= 0.0" 489 self.scratchDb.execute(sql) 490 491 sql = "UPDATE " + pspsTableName + " SET kronFlux = 1e20 WHERE kronFlux <= 0.0" 492 self.scratchDb.execute(sql) 493 475 494 # we don't delete these anymore 476 495 results['NULLINSTFLUX'] = 0; … … 1016 1035 1017 1036 # XXX EAM NOTE : this is fragile : requires PS1_V4 1018 columns = "IPP_IDET X_PSF Y_PSF X_PSF_SIG Y_PSF_SIG PSF_INST_MAG PSF_INST_MAG_SIG P EAK_FLUX_AS_MAG PSF_MAJOR PSF_MINOR PSF_THETA EXT_NSIGMA PSF_QF MOMENTS_XX MOMENTS_XY MOMENTS_YY AP_MAGKRON_FLUX KRON_FLUX_ERR FLAGS FLAGS2 SKY SKY_SIGMA EXT_NSIGMA PSF_QF_PERFECT PSF_CHISQ"1037 columns = "IPP_IDET X_PSF Y_PSF X_PSF_SIG Y_PSF_SIG PSF_INST_MAG PSF_INST_MAG_SIG PSF_INST_FLUX PSF_INST_FLUX_SIG PEAK_FLUX_AS_MAG PSF_MAJOR PSF_MINOR PSF_THETA EXT_NSIGMA PSF_QF MOMENTS_XX MOMENTS_XY MOMENTS_YY AP_MAG AP_FLUX KRON_FLUX KRON_FLUX_ERR FLAGS FLAGS2 SKY SKY_SIGMA EXT_NSIGMA PSF_QF_PERFECT PSF_CHISQ" 1019 1038 1020 1039 return super(DetectionBatch, self).importIppTables(columns, regex) -
branches/eam_branches/ipp-20130419/ippToPsps/jython/objectbatch.py
r35417 r35554 137 137 ," + filter[1] + "MeanKronMag = MAG_KRON \ 138 138 ," + filter[1] + "MeanKronMagErr = MAG_KRON_ERR \ 139 ," + filter[1] + "StackPSFMag = -2.5 * log10(FLUX_PSF) + 8.9\140 ," + filter[1] + "StackPSFMagErr = FLUX_PSF_ERR / FLUX_PSF\141 ," + filter[1] + "StackKronMag = -2.5 * log10(FLUX_KRON) + 8.9\142 ," + filter[1] + "StackKronMagErr = FLUX_KRON_ERR / FLUX_KRON\139 ," + filter[1] + "StackPSFMag = STACK_PSF_MAG \ 140 ," + filter[1] + "StackPSFMagErr = STACK_PSF_MAG_ERR \ 141 ," + filter[1] + "StackKronMag = STACK_KRON_MAG \ 142 ," + filter[1] + "StackKronMagErr = STACK_KRON_MAG_ERR \ 143 143 ," + filter[1] + "20pct = MAG_20/1000 \ 144 144 ," + filter[1] + "80pct = MAG_80/1000 \ 145 145 ," + filter[1] + "Flags = (0x7fff & FLAGS) | ((FLAGS >> 11) & 0x2000) \ 146 146 ," + filter[1] + "StackDetectID = STACK_DETECT_ID" 147 148 # old method for setting the Stack (PSF,Kron) Mags: 149 # ," + filter[1] + "StackPSFMag = -2.5 * log10(FLUX_PSF) + 8.9 \ 150 # ," + filter[1] + "StackPSFMagErr = FLUX_PSF_ERR / FLUX_PSF \ 151 # ," + filter[1] + "StackKronMag = -2.5 * log10(FLUX_KRON) + 8.9 \ 152 # ," + filter[1] + "StackKronMagErr = FLUX_KRON_ERR / FLUX_KRON \ 147 153 148 154 #self.logger.info(sql) … … 216 222 cpsTableName = self.scratchDb.getDbFriendlyTableName(self.region + ".cps") 217 223 218 self.logger.infoPair("setting to null > 1e-38 and < 1e-38 in", "cps FLUX_KRON_ERR") 219 sql = "UPDATE " + cpsTableName + " set FLUX_KRON_ERR = NULL where FLUX_KRON_ERR < 1e-37 AND FLUX_KRON_ERR > -1e-37 " 224 if False: 225 self.logger.infoPair("setting to null > 1e-38 and < 1e-38 in", "cps FLUX_KRON_ERR") 226 sql = "UPDATE " + cpsTableName + " set FLUX_KRON_ERR = NULL where FLUX_KRON_ERR < 1e-37 AND FLUX_KRON_ERR > -1e-37 " 220 227 221 try:222 self.scratchDb.execute(sql)223 except:224 self.logger.errorPair("Couldn't squash out of range stuff", sql)225 return False226 227 self.logger.infoPair("setting to null > 1e-38 and < 1e-38 in", "cps FLUX_KRON")228 sql = "UPDATE " + cpsTableName + " set FLUX_KRON = NULL where FLUX_KRON < 1e-37 AND FLUX_KRON > -1e-37 "228 try: 229 self.scratchDb.execute(sql) 230 except: 231 self.logger.errorPair("Couldn't squash out of range stuff", sql) 232 return False 233 234 self.logger.infoPair("setting to null > 1e-38 and < 1e-38 in", "cps FLUX_KRON") 235 sql = "UPDATE " + cpsTableName + " set FLUX_KRON = NULL where FLUX_KRON < 1e-37 AND FLUX_KRON > -1e-37 " 229 236 230 try: 231 self.scratchDb.execute(sql) 232 except: 233 self.logger.errorPair("Couldn't squash out of range stuff", sql) 234 return False 235 236 237 237 try: 238 self.scratchDb.execute(sql) 239 except: 240 self.logger.errorPair("Couldn't squash out of range stuff", sql) 241 return False 238 242 239 243 -
branches/eam_branches/ipp-20130419/ippToPsps/jython/stackbatch.py
r35417 r35554 482 482 ,X_PSF_SIG \ 483 483 ,Y_PSF_SIG \ 484 ,P OW(10.0, (-0.4*PSF_INST_MAG))/ " + str(self.expTime) + " \485 , ABS((PSF_INST_MAG_SIG*(POW(10.0, (-0.4*PSF_INST_MAG)) / " + str(self.expTime) + ")) / 1.085736)\484 ,PSF_INST_FLUX / " + str(self.expTime) + " \ 485 ,PSF_INST_FLUX_SIG / " + str(self.expTime) + " \ 486 486 ,POW(10.0, (-0.4*PEAK_FLUX_AS_MAG)) / " + str(self.expTime) + " \ 487 487 ,SKY / " + str(self.expTime) + " \ … … 504 504 ,MOMENTS_R1 \ 505 505 ,MOMENTS_RH \ 506 , POW(10.0, -0.4*AP_MAG)/ " + str(self.expTime) + " \506 ,AP_FLUX / " + str(self.expTime) + " \ 507 507 ,NULL \ 508 508 ,KRON_FLUX / " + str(self.expTime) + " \ … … 515 515 FROM SkyChip_psf" 516 516 517 # these were used above (left over from before PSF_INST_FLUX, PSF_INST_FLUX_SIG were available? 518 # ,POW(10.0, (-0.4*PSF_INST_MAG)) / " + str(self.expTime) + " 519 # ,ABS((PSF_INST_MAG_SIG*(POW(10.0, (-0.4*PSF_INST_MAG)) / " + str(self.expTime) + ")) / 1.085736) 520 # ,POW(10.0, -0.4*AP_MAG) / " + str(self.expTime) + " 521 517 522 # print "sql: ", sql 518 523 # response = raw_input("ready to insert stack det ") … … 526 531 self.logger.infoPair("Deleting", "entries with StackDetection.objID = 0") 527 532 533 # XXX EAM : this seems quite inefficient : these commands use updates to set 534 # fields which are constant across all rows. Why not just include these in 535 # the original insert above? 536 528 537 self.scratchDb.updateAllRows("StackDetection", "surveyID", str(self.surveyID)) 529 538 … … 560 569 # response = raw_input("add primary key? ") 561 570 562 if self.stackType == "DEEP_STACK": 571 ### XXX this should not be a DEEP_STACK only case... 572 if False and self.stackType == "DEEP_STACK": 563 573 564 574 #if deep stack and instFlux = null and err not null … … 572 582 # response = raw_input("add psf flux ") 573 583 584 # NOTE : Flux limits : in the current PSPS schema, negative fluxes 585 # cause problems for sql queries which work in mags as SQL cannot do 586 # something like (f < 0.0) ? -999 : -2.5*log10(f) 587 # as a result, the negative fluxes here result in floating point errors 588 sql = "UPDATE StackDetection SET psfFlux = 1e20 WHERE psfFlux <= 0.0" 589 self.scratchDb.execute(sql) 590 591 sql = "UPDATE StackDetection SET apFlux = 1e20 WHERE apFlux <= 0.0" 592 self.scratchDb.execute(sql) 593 594 sql = "UPDATE StackDetection SET kronFlux = 1e20 WHERE kronFlux <= 0.0" 595 self.scratchDb.execute(sql) 596 574 597 #leave null instflux in 575 598 #self.scratchDb.reportAndDeleteRowsWithNULLS("StackDetection", "instFlux") … … 930 953 def populatePspsTables(self): 931 954 955 self.skipBatch = False 956 932 957 if not self.useFullTables: 933 958 if not self.getIDsFromDVO(): -
branches/eam_branches/ipp-20130419/ippToPsps/test/fulltest.sh
r35417 r35554 1 1 #!/bin/csh -f 2 3 chmod +x *.dvo *.sh 2 4 3 5 # a bit crude : get the datadir path by interpollation of the PATH element for psconfig … … 23 25 set objectbatch = 1 24 26 25 set args = "" 26 27 while ("$1" != "") 28 switch ("$1") 27 set targ = ($argv) 28 set args = "" 29 30 while ($#targ) 31 switch ("$targ[1]") 32 case -h 33 case -help 34 echo "USAGE: fulltest.sh [-XX] [+XX]" 35 echo " -XX : turn off features" 36 echo " +XX : turn on features" 37 echo " features: all, mkgpc1, initdb, initscratch, initbatch, camera, stack, object" 38 exit 2 39 case -all 40 set mkgpc1 = 0 41 set initdb = 0 42 set initscratch = 0 43 set initbatch = 0 44 set camqueue = 0 45 set cambatch = 0 46 set stackqueue = 0 47 set stackbatch = 0 48 set objectqueue = 0 49 set objectbatch = 0 50 breaksw; 29 51 case -mkgpc1 30 52 set mkgpc1 = 0 … … 52 74 breaksw; 53 75 default: 54 set args=($args $ 1);76 set args=($args $targ[1]); 55 77 breaksw; 56 78 endsw 57 shift 79 shift targ 58 80 end 81 82 set targ = ($args) 83 set args = "" 84 85 while ($#targ) 86 switch ("$targ[1]") 87 case +all 88 set mkgpc1 = 1 89 set initdb = 1 90 set initscratch = 1 91 set initbatch = 1 92 set camqueue = 1 93 set cambatch = 1 94 set stackqueue = 1 95 set stackbatch = 1 96 set objectqueue = 1 97 set objectbatch = 1 98 breaksw; 99 case +mkgpc1 100 set mkgpc1 = 1 101 breaksw; 102 case +initdb 103 set initdb = 1 104 breaksw; 105 case +initscratch 106 set initscratch = 1 107 breaksw; 108 case +initbatch 109 set initbatch = 1 110 breaksw; 111 case "+camera" 112 set camqueue = 1 113 set cambatch = 1 114 breaksw; 115 case +stack 116 set stackqueue = 1 117 set stackbatch = 1 118 breaksw; 119 case +object 120 set objectqueue = 1 121 set objectbatch = 1 122 breaksw; 123 default: 124 set args=($args $targ[1]); 125 breaksw; 126 endsw 127 shift targ 128 end 129 130 if ($args[1] != "") then 131 echo "USAGE: fulltest.sh [-XX] [+XX]" 132 echo " -XX : turn off features" 133 echo " +XX : turn on features" 134 echo " features: all, mkgpc1, initdb, initscratch, initbatch, camera, stack, object" 135 exit 2 136 endif 59 137 60 138 set stackqueuename = 0 -
branches/eam_branches/ipp-20130419/ippToPsps/test/mkgpc1data.dvo
r35417 r35554 37 37 macro mkfull 38 38 init.db 39 mkcatdir.cam PS1_V3 PS1_V4 40 mkcatdir.stk PS1_V3 PS1_V4 39 # mkcatdir.cam PS1_V3 PS1_V4 40 # mkcatdir.stk PS1_V3 PS1_V4 41 mkcatdir.cam PS1_V4 PS1_V4 42 mkcatdir.stk PS1_V4 PS1_V4 41 43 insert.stack.set 42 44 end -
branches/eam_branches/ipp-20130419/psconfig
- Property svn:mergeinfo changed (with no actual effect on merging)
-
branches/eam_branches/ipp-20130419/psphot
- Property svn:mergeinfo changed
/trunk/psphot merged: 35468
- Property svn:mergeinfo changed
-
branches/eam_branches/ipp-20130419/psphot/src
- Property svn:mergeinfo changed
/trunk/psphot/src merged: 35468
- Property svn:mergeinfo changed
-
branches/eam_branches/ipp-20130419/psphot/src/psphotStackImageLoop.c
- Property svn:mergeinfo changed (with no actual effect on merging)
-
branches/eam_branches/ipp-20130419/psvideophot
- Property svn:mergeinfo changed (with no actual effect on merging)
Note:
See TracChangeset
for help on using the changeset viewer.
