Changeset 37892 for trunk/doc/release.2015/ps1.analysis/analysis.tex
- Timestamp:
- Feb 4, 2015, 2:49:56 PM (11 years ago)
- File:
-
- 1 edited
-
trunk/doc/release.2015/ps1.analysis/analysis.tex (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/doc/release.2015/ps1.analysis/analysis.tex
r37865 r37892 1157 1157 discussed in the section on Galaxy models. 1158 1158 1159 \section{PSPhot Structures and Data Elements}1160 1161 The following structures are described in detail in the document1162 `Pan-STARRS PS-1 Image Processing Pipeline Modules Supplementary1163 Design Requirements' (psModules SDRS; PSDC-430-012).1164 1165 \begin{verbatim}1166 pmModel1167 pmModelGroup1168 pmGrowthCurve1169 pmPSF1170 pmPSFTry1171 pmSource1172 pmPeak1173 pmMoments1174 \end{verbatim}1175 1176 \note{psphot is supposed to operate on individual readouts, and use1177 the techniques used by ppImage to extract header-related metadata.1178 currently, psphot uses an alternative to the psReadout until the1179 ppImage code can be folded together with psphot}.1180 1181 \subsection{Top-Level APIs}1182 1183 \begin{verbatim}1184 psMetadata *psphotArguments (int *argc, char **argv);1185 \end{verbatim}1186 Load the command-line arguments, parse the configuration file, and1187 place the configuration information on a single metadata structure.1188 This function searches for the following command line option flags,1189 and places their corresponding values on the output metadata with the1190 given name. These options override any such values in the1191 configuration file.1192 \begin{verbatim}1193 -mask (filename) : MASK_IMAGE1194 -weight (filename) : WEIGHT_IMAGE1195 -resid (filename) : RESID_IMAGE1196 -region [x0:x1,y0:y1] : ANALYSIS_REGIONP1197 -photcode (code) : PHOTCODE1198 -psf (filename) : PSF_INPUT_FILE1199 -modeltest x y : TEST_FIT_X, TEST_FIT_Y1200 -model (name) : TEST_FIT_MODEL1201 -fitmode (name) : TEST_FIT_MODE1202 -fitset (name) : TEST_FIT_SET1203 \end{verbatim}1204 1205 The following option flags can be used to set any option:1206 \begin{verbatim}1207 -D (key) (value) : any string value1208 -Df (key) (value) : any F32 value1209 -Di (key) (value) : any S32 value1210 \end{verbatim}1211 1212 The function next examines the remaining command-line arguments and1213 complains if there are not exactly 3 arguments, reporting the program1214 usage. It sets default configuration variables, and then loads the1215 configuration file specified as the third command-line option.1216 Finally, it sets the \code{IMAGE} and \code{OUTPUT\_FILE} config1217 options to arguments 1 and 2, respecitively.1218 1219 \begin{verbatim}1220 eamReadout *psphotSetup (psMetadata *config);1221 \end{verbatim}1222 This function examines the configuration data in \code{config} and1223 loads the image into memory. It constructs the weight and mask images1224 if they have not been specified, or loads the specified images. The1225 weight image is built based on the read noise and gain of the image,1226 as extracted from the header or from the configuration options1227 directly. It defines the mask based on the selection image region,1228 the values for saturation and the \code{min\_VALID\_PIXEL}.1229 1230 \begin{verbatim}1231 bool psphotModelTest (eamReadout *imdata, psMetadata *config);1232 \end{verbatim}1233 This function is an optional test mode for psphot. If the test mode1234 has been selected, this function will attempt to fit a single object1235 with the requested model. It writes out subimage containing the1236 source, the difference, the mask, and the weight. This function may1237 load a PSF model or fit a floating model.1238 1239 \begin{verbatim}1240 psStats *psphotImageStats (eamReadout *imdata, psMetadata *config);1241 \end{verbatim}1242 Measure the basic image properties: median sky, expected sky sigma1243 1244 \begin{verbatim}1245 psPolynomial2D *psphotImageBackground (eamReadout *imdata, psMetadata *config, psStats *sky);1246 \end{verbatim}1247 Model the image background as a 2D polynomial and subtract from the1248 image. The should use a more sophisticated model and return the1249 subtracted image.1250 1251 \begin{verbatim}1252 psArray *psphotFindPeaks (eamReadout *imdata, psMetadata *config, psStats *sky);1253 \end{verbatim}1254 Create a smoothed image and find all local peaks above the threshold1255 level (uses: \code{PEAKS\_SMOOTH\_SIGMA, PEAKS\_SMOOTH\_NSIGMA,1256 PEAKS\_NSIGMA\_LIMIT, PEAKS\_OUTPUT\_FILE})1257 1258 \begin{verbatim}1259 psArray *psphotSourceStats (eamReadout *imdata, psMetadata *config, psArray *allpeaks);1260 \end{verbatim}1261 Create the basic source structures for all peaks, define the initial1262 pixels, measure the local sky (sky offset) and the source moments.1263 1264 \begin{verbatim}1265 bool psphotRoughClass (psArray *sources, psMetadata *config);1266 \end{verbatim}1267 Find the PSF clump and make the first cut source identifications1268 1269 \begin{verbatim}1270 bool psphotBasicDeblend (psArray *sources, psMetadata *config, psStats *sky);1271 \end{verbatim}1272 Find all blended peaks and tag, group with single primary source.1273 1274 \begin{verbatim}1275 pmPSF *psphotChoosePSF (psMetadata *config, psArray *sources, psStats *sky);1276 \end{verbatim}1277 Try each of the selected PSF models on a subset of likely PSF stars.1278 Measure the metric (aperture residual scatter) for each PSF model and1279 choose the best model.1280 1281 \begin{verbatim}1282 bool psphotEnsemblePSF (eamReadout *imdata, psMetadata *config, psArray *sources, pmPSF *psf, psStats *sky);1283 \end{verbatim}1284 Perform simultaneous fitting to all sources in the array using a1285 linear fitting process which assumes all sources are PSFs and their1286 positions are fixed. Set the positions based on the bilinear1287 interpolation of the peak implied by the 3x3 square of pixels1288 containing the peak. Local sky is also assumed to be correctly subtracted.1289 1290 \begin{verbatim}1291 bool psphotFullFit (eamReadout *imdata, psMetadata *config, psArray *sources, pmPSF *psf, psStats *sky);1292 \end{verbatim}1293 Fit all sources in sequence starting from the brightest, and1294 subtracting the sources as they are fitted. This function only1295 attempts single PSF and single EXT models and chooses between them.1296 The sources are assumed to have been subtracted in advance (ie, using1297 psphotEnsembleFit). The models which do not succeed are re-subtracted1298 using the prior model.1299 1300 \begin{verbatim}1301 bool psphotBlendFit (eamReadout *imdata, psMetadata *config, psArray *sources, pmPSF *psf, psStats *sky);1302 \end{verbatim}1303 Fit all sources in sequence starting from the brightest, and1304 subtracting the sources as they are fitted. This function attempts a1305 multi-source fit for blended sources, or a single PSF if it is not a1306 blend, followed by both EXT and DBL models and chooses between them.1307 The sources are assumed to have been subtracted in advance (ie, using1308 psphotEnsembleFit). The models which do not succeed are re-subtracted1309 using the prior model.1310 1311 \begin{verbatim}1312 bool psphotReplaceUnfit (psArray *sources);1313 \end{verbatim}1314 After models have been attempted for all sources, this function1315 replaces the sources which were temporarily subtracted, but which did1316 not succeed or converge on a good solution.1317 1318 \begin{verbatim}1319 bool psphotApplyPSF (eamReadout *imdata, psMetadata *config, psArray *sources, pmPSF *psf, psStats *sky);1320 \end{verbatim}1321 Attempt to fit the PSF model to all sources in brightness order,1322 subtracting the resulting model if successful. Only attempts single1323 PSF models.1324 1325 \begin{verbatim}1326 bool psphotFitExtended (eamReadout *imdata, psMetadata *config, psArray *sources, psStats *skyStats);1327 \end{verbatim}1328 Attempt to fit the PSF model to all sources in brightness order,1329 subtracting the resulting model if successful. Only attempts single1330 EXT models.1331 1332 \begin{verbatim}1333 bool psphotApResid (eamReadout *imdata, psArray *sources, psMetadata *config, pmPSF *psf);1334 \end{verbatim}1335 Measure the curve-of-growth and the aperture correction trend.1336 1337 \begin{verbatim}1338 void psphotOutput (eamReadout *imdata, psMetadata *config, psArray *sources, pmPSF *psf, psStats *sky);1339 \end{verbatim}1340 Write out data in various formats as selected.1341 1342 \section{User's Guide}1343 1344 \subsection{Configuration Parameters}1345 1346 \begin{verbatim}1347 FAINT_SN_LIM1348 FIT_MAX_CHI1349 FIT_MIN_SN1350 FIT_NSIGMA1351 FIT_PADDING1352 FIT_RADIUS1353 GAIN1354 GAL_MODEL1355 GAL_MOMENTS_RADIUS1356 INNER_RADIUS1357 INPUT1358 MASK1359 NOISE1360 NSUBSET1361 OUTER_RADIUS1362 OUTPUT1363 OUTPUT_MODE1364 PEAK_NSIGMA1365 PSF_MODEL_N1366 PSF_MOMENTS_RADIUS1367 PSF_SHAPE_NSIGMA1368 RDNOISE1369 SATURATE1370 SMOOTH_NSIGMA1371 SMOOTH_SIGMA1372 XMAX1373 XMIN1374 YMAX1375 YMIN1376 \end{verbatim}1377 1378 \subsection{Command-Line Arguments and Options}1379 1380 1159 \subsection{Input \& Output Data Formats} 1381 1160 1382 1161 \section{Sample Tests} 1383 1162 1384 \section{Further Work to be Completed}1385 1386 \begin{itemize}1387 \item convert to pmCell as input data1388 \item loop over all readouts in a pmCell1389 \item write out multiple files?1390 \item better method for defining the recipe?1391 \item additional options for image background1392 \item image background should return a background image1393 \end{itemize}1394 1395 1163 \end{document}
Note:
See TracChangeset
for help on using the changeset viewer.
