Changeset 6062 for branches/eam_rel9_p0/psModules/src/objects/pmObjects.h
- Timestamp:
- Jan 19, 2006, 4:38:28 PM (21 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/eam_rel9_p0/psModules/src/objects/pmObjects.h
r5990 r6062 4 4 * images is one of the critical tasks of the IPP or any astronomical software 5 5 * system. This file will define structures and functions related to the task 6 * of source detection and measurement. The elements defined in this section 6 * of source detection and measurement. The elements defined in this section 7 7 * are generally low-level components which can be connected together to 8 8 * construct a complete object measurement suite. … … 10 10 * @author GLG, MHPCC 11 11 * 12 * @version $Revision: 1.4.4. 3$ $Name: not supported by cvs2svn $13 * @date $Date: 2006-01- 15 18:21:19$12 * @version $Revision: 1.4.4.4 $ $Name: not supported by cvs2svn $ 13 * @date $Date: 2006-01-20 02:38:28 $ 14 14 * 15 15 * Copyright 2004 Maui High Performance Computing Center, University of Hawaii … … 27 27 #include <math.h> 28 28 #include "pslib.h" 29 #include "pm Astrometry.h"29 #include "pmFPA.h" 30 30 /** 31 31 * In the object analysis process, we will use specific mask values to mark the … … 45 45 46 46 /** pmPeakType 47 * 47 * 48 48 * A peak pixel may have several features which may be determined when the 49 49 * peak is found or measured. These are specified by the pmPeakType enum. … … 52 52 * edge. The PM_PEAK_FLAT represents a peak pixel which has more than a specific 53 53 * number of neighbors at the same value, within some tolarence: 54 * 54 * 55 55 */ 56 56 typedef enum { … … 63 63 64 64 /** pmPeak data structure 65 * 65 * 66 66 * A source has the capacity for several types of measurements. The 67 67 * simplest measurement of a source is the location and flux of the peak pixel 68 68 * associated with the source: 69 * 69 * 70 70 */ 71 71 typedef struct … … 80 80 81 81 /** pmMoments data structure 82 * 82 * 83 83 * One of the simplest measurements which can be made quickly for an object 84 84 * are the object moments. We specify a structure to carry the moment information 85 85 * for a specific source: 86 * 86 * 87 87 */ 88 88 typedef struct … … 103 103 104 104 /** pmPSFClump data structure 105 * 105 * 106 106 * A collection of object moment measurements can be used to determine 107 107 * approximate object classes. The key to this analysis is the location and 108 108 * statistics (in the second-moment plane, 109 * 109 * 110 110 */ 111 111 typedef struct … … 130 130 131 131 /** pmModel data structure 132 * 132 * 133 133 * Every source may have two types of models: a PSF model and a EXT (extended-source) 134 134 * model. The PSF model represents the best fit of the image PSF to the specific … … 136 136 * object by the PSF, not by the fit. The EXT model represents the best fit of 137 137 * the given model to the object, with all shape parameters floating in the fit. 138 * 138 * 139 139 */ 140 140 typedef struct … … 152 152 153 153 /** pmSourceType enumeration 154 * 154 * 155 155 * A given source may be identified as most-likely to be one of several source 156 156 * types. The pmSource entry pmSourceType defines the current best-guess for this 157 157 * source. 158 * 158 * 159 159 * XXX: The values given below are currently illustrative and will require 160 160 * some modification as the source classification code is developed. (TBD) 161 * 161 * 162 162 */ 163 163 typedef enum { … … 186 186 187 187 /** pmSource data structure 188 * 188 * 189 189 * This source has the capacity for several types of measurements. The 190 190 * simplest measurement of a source is the location and flux of the peak pixel 191 191 * associated with the source: 192 * 192 * 193 193 */ 194 194 typedef struct … … 224 224 225 225 /** pmMomentsAlloc() 226 * 226 * 227 227 */ 228 228 pmMoments *pmMomentsAlloc(); … … 230 230 231 231 /** pmModelAlloc() 232 * 232 * 233 233 */ 234 234 pmModel *pmModelAlloc(pmModelType type); … … 236 236 237 237 /** pmSourceAlloc() 238 * 238 * 239 239 */ 240 240 pmSource *pmSourceAlloc(); … … 242 242 243 243 /** pmFindVectorPeaks() 244 * 244 * 245 245 * Find all local peaks in the given vector above the given threshold. A peak 246 246 * is defined as any element with a value greater than its two neighbors and with … … 256 256 * a vector containing the coordinates (element number) of the detected peaks 257 257 * (type psU32). 258 * 258 * 259 259 */ 260 260 psVector *pmFindVectorPeaks( … … 265 265 266 266 /** pmFindImagePeaks() 267 * 267 * 268 268 * Find all local peaks in the given image above the given threshold. This 269 269 * function should find all row peaks using pmFindVectorPeaks, then test each row … … 276 276 * peaks at the (+x,+y) corner. When selecting the peaks, their type must also be 277 277 * set. The result of this function is an array of pmPeak entries. 278 * 278 * 279 279 */ 280 280 psArray *pmFindImagePeaks( … … 285 285 286 286 /** pmCullPeaks() 287 * 287 * 288 288 * Eliminate peaks from the psList that have a peak value above the given 289 289 * maximum, or fall outside the valid region. 290 * 290 * 291 291 */ 292 292 psList *pmCullPeaks( … … 298 298 299 299 /** pmPeaksSubset() 300 * 300 * 301 301 * Create a new peaks array, removing certain types of peaks from the input 302 302 * array of peaks based on the given criteria. Peaks should be eliminated if they … … 304 304 * the valid region. The result of the function is a new array with a reduced 305 305 * number of peaks. 306 * 306 * 307 307 */ 308 308 psArray *pmPeaksSubset( … … 314 314 315 315 /** pmSourceDefinePixels() 316 * 316 * 317 317 * Define psImage subarrays for the source located at coordinates x,y on the 318 318 * image set defined by readout. The pixels defined by this operation consist of … … 326 326 * example). This function should be used to define a region of interest around a 327 327 * source, including both source and sky pixels. 328 * 328 * 329 329 * XXX: must code this. 330 * 330 * 331 331 */ 332 332 // XXX: Uncommenting the pmReadout causes compile errors. … … 341 341 342 342 /** pmSourceLocalSky() 343 * 343 * 344 344 * Measure the local sky in the vicinity of the given source. The Radius 345 345 * defines the square aperture in which the moments will be measured. This … … 351 351 * This function allocates the pmMoments structure. The resulting sky is used to 352 352 * set the value of the pmMoments.sky element of the provided pmSource structure. 353 * 353 * 354 354 */ 355 355 bool pmSourceLocalSky( … … 361 361 362 362 /** pmSourceMoments() 363 * 363 * 364 364 * Measure source moments for the given source, using the value of 365 365 * source.moments.sky provided as the local background value and the peak … … 368 368 * are measured within the given circular radius of the source.peak coordinates. 369 369 * The return value indicates the success (TRUE) of the operation. 370 * 370 * 371 371 */ 372 372 bool pmSourceMoments( … … 377 377 378 378 /** pmSourcePSFClump() 379 * 379 * 380 380 * We use the source moments to make an initial, approximate source 381 381 * classification, and as part of the information needed to build a PSF model for … … 386 386 * similar. The function returns a pmPSFClump structure, representing the 387 387 * centroid and size of the clump in the sigma_x, sigma_y second-moment plane. 388 * 388 * 389 389 * The goal is to identify and characterize the stellar clump within the 390 390 * sigma_x, sigma_y second-moment plane. To do this, an image is constructed to … … 397 397 * * used to calculate the median and standard deviation of the sigma_x, sigma_y 398 398 * values. These resulting values are returned via the pmPSFClump structure. 399 * 399 * 400 400 * The return value indicates the success (TRUE) of the operation. 401 * 401 * 402 402 * XXX: Limit the S/N of the candidate sources (part of Metadata)? (TBD). 403 403 * XXX: Save the clump parameters on the Metadata (TBD) 404 * 404 * 405 405 */ 406 406 pmPSFClump pmSourcePSFClump( … … 411 411 412 412 /** pmSourceRoughClass() 413 * 413 * 414 414 * Based on the specified data values, make a guess at the source 415 415 * classification. The sources are provides as a psArray of pmSource entries. … … 418 418 * can be extracted from the metadata using the given keywords. Except as noted, 419 419 * the data type for these parameters are psF32. 420 * 420 * 421 421 */ 422 422 bool pmSourceRoughClass( … … 428 428 429 429 /** pmSourceModelGuess() 430 * 430 * 431 431 * Convert available data to an initial guess for the given model. This 432 432 * function allocates a pmModel entry for the pmSource structure based on the … … 434 434 * are specified for each model below. The guess values are placed in the model 435 435 * parameters. The function returns TRUE on success or FALSE on failure. 436 * 436 * 437 437 */ 438 438 pmModel *pmSourceModelGuess( … … 443 443 444 444 /** pmContourType 445 * 445 * 446 446 * Only one type is defined at present. 447 * 447 * 448 448 */ 449 449 typedef enum { … … 455 455 456 456 /** pmSourceContour() 457 * 457 * 458 458 * Find points in a contour for the given source at the given level. If type 459 459 * is PM_CONTOUR_CRUDE, the contour is found by starting at the source peak, … … 465 465 * This function may be used as part of the model guess inputs. Other contour 466 466 * types may be specified in the future for more refined contours (TBD) 467 * 467 * 468 468 */ 469 469 psArray *pmSourceContour( … … 476 476 477 477 /** pmSourceFitModel() 478 * 478 * 479 479 * Fit the requested model to the specified source. The starting guess for the 480 480 * model is given by the input source.model parameter values. The pixels of … … 482 482 * function calls psMinimizeLMChi2() on the image data. The function returns TRUE 483 483 * on success or FALSE on failure. 484 * 484 * 485 485 */ 486 486 bool pmSourceFitModel( … … 492 492 493 493 /** pmModelFitStatus() 494 * 494 * 495 495 * This function wraps the call to the model-specific function returned by 496 496 * pmModelFitStatusFunc_GetFunction. The model-specific function examines the 497 497 * model parameters, parameter errors, Chisq, S/N, and other parameters available 498 498 * from model to decide if the particular fit was successful or not. 499 * 499 * 500 500 * XXX: Must code this. 501 * 501 * 502 502 */ 503 503 bool pmModelFitStatus( … … 507 507 508 508 /** pmSourceAddModel() 509 * 509 * 510 510 * Add the given source model flux to/from the provided image. The boolean 511 511 * option center selects if the source is re-centered to the image center or if … … 514 514 * is at most the pixel range specified by the source.pixels image. The success 515 515 * status is returned. 516 * 516 * 517 517 */ 518 518 bool pmSourceAddModel( … … 526 526 527 527 /** pmSourceSubModel() 528 * 528 * 529 529 * Subtract the given source model flux to/from the provided image. The 530 530 * boolean option center selects if the source is re-centered to the image center … … 533 533 * image is at most the pixel range specified by the source.pixels image. The 534 534 * success status is returned. 535 * 535 * 536 536 */ 537 537 bool pmSourceSubModel( … … 545 545 546 546 /** 547 * 547 * 548 548 * The function returns both the magnitude of the fit, defined as -2.5log(flux), 549 549 * where the flux is integrated under the model, theoretically from a radius of 0 … … 552 552 * not excluded by the aperture mask. The model flux is calculated by calling the 553 553 * model-specific function provided by pmModelFlux_GetFunction. 554 * 554 * 555 555 * XXX: must code this. 556 * 556 * 557 557 */ 558 558 bool pmSourcePhotometry( … … 566 566 567 567 /** 568 * 568 * 569 569 * This function converts the source classification into the closest available 570 570 * approximation to the Dophot classification scheme: 571 571 * XXX EAM : fix this to use current source classification scheme 572 * 572 * 573 573 * PM_SOURCE_DEFECT: 8 574 574 * PM_SOURCE_SATURATED: 8 … … 585 585 * PM_SOURCE_POOR_FIT_GAL: 2 586 586 * PM_SOURCE_OTHER: ? 587 * 587 * 588 588 */ 589 589 int pmSourceDophotType( … … 593 593 594 594 /** pmSourceSextractType() 595 * 595 * 596 596 * This function converts the source classification into the closest available 597 597 * approximation to the Sextractor classification scheme. the correspondence is 598 598 * not yet defined (TBD) . 599 * 599 * 600 600 * XXX: Must code this. 601 * 601 * 602 602 */ 603 603 int pmSourceSextractType( … … 606 606 607 607 /** pmSourceFitModel_v5() 608 * 608 * 609 609 * Fit the requested model to the specified source. The starting guess for the 610 610 * model is given by the input source.model parameter values. The pixels of … … 612 612 * function calls psMinimizeLMChi2() on the image data. The function returns TRUE 613 613 * on success or FALSE on failure. 614 * 614 * 615 615 */ 616 616 bool pmSourceFitModel_v5( … … 622 622 623 623 /** pmSourceFitModel_v7() 624 * 624 * 625 625 * Fit the requested model to the specified source. The starting guess for the 626 626 * model is given by the input source.model parameter values. The pixels of … … 628 628 * function calls psMinimizeLMChi2() on the image data. The function returns TRUE 629 629 * on success or FALSE on failure. 630 * 630 * 631 631 */ 632 632 bool pmSourceFitModel_v7( … … 638 638 639 639 /** pmSourcePhotometry() 640 * 640 * 641 641 * XXX: Need descriptions 642 * 642 * 643 643 */ 644 644 bool pmSourcePhotometry(
Note:
See TracChangeset
for help on using the changeset viewer.
