Changeset 153 for trunk/archive/pslib/include/psObjects.h
- Timestamp:
- Mar 9, 2004, 12:28:16 PM (22 years ago)
- File:
-
- 1 edited
-
trunk/archive/pslib/include/psObjects.h (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/archive/pslib/include/psObjects.h
r149 r153 20 20 /***********************************************************************************************************/ 21 21 22 /* Object definition, to handle both objects we detect, and catalogues */22 /** Object definition, to handle both objects we detect, and catalogues */ 23 23 typedef struct { 24 psOTAPos *otaPos; // Centre position on OTA, with associated error25 psSkyPos *skyPos; // Position on the sky, with associated error26 float mag, magErr; // Magnitude and associated error27 float isoMag, isoMagErr; // Isophotal magnitude and associated error28 float fwhm, fwhmErr; // FWHM and associated error29 float ellipA, ellipB; // Elliptical semi-major (A) and semi-minor (B) axes30 float ellipAngle; // Ellipse position angle31 float sky, skyErr; // Local sky level, and associated error32 float colour, colourErr; // Colour and associated error, if known33 enum psColourRef colourRef; // Colour reference34 psBitMask *quality; // Bit mask for quality information24 psOTAPos *otaPos; //!< Centre position on OTA, with associated error 25 psSkyPos *skyPos; //!< Position on the sky, with associated error 26 float mag, magErr; //!< Magnitude and associated error 27 float isoMag, isoMagErr; //!< Isophotal magnitude and associated error 28 float fwhm, fwhmErr; //!< FWHM and associated error 29 float ellipA, ellipB; //!< Elliptical semi-major (A) and semi-minor (B) axes 30 float ellipAngle; //!< Ellipse position angle 31 float sky, skyErr; //!< Local sky level, and associated error 32 float colour, colourErr; //!< Colour and associated error, if known 33 enum psColourRef colourRef; //!< Colour reference 34 psBitMask *quality; //!< Bit mask for quality information 35 35 } psObject; 36 36 37 /* Constructor */37 /** Constructor */ 38 38 psObject * 39 39 psObjectNew(void); 40 40 41 /* Destructor */41 /** Destructor */ 42 42 void 43 43 psObjectDel(psObject *restrict myObject); … … 45 45 /***********************************************************************************************************/ 46 46 47 /* An assembly of objects */47 /** An assembly of objects */ 48 48 PS_DECLARE_ARRAY_TYPE(psObject); 49 49 PS_CREATE_ARRAY_TYPE(psObject); … … 51 51 /***********************************************************************************************************/ 52 52 53 /* Associates objects on an image with the image */53 /** Associates objects on an image with the image */ 54 54 typedef struct { 55 const psImage *image; // Image that produced the objects, which has metadata we need56 psObjectArray *objects; // The objects55 const psImage *image; //!< Image that produced the objects, which has metadata we need 56 psObjectArray *objects; //!< The objects 57 57 } psImageObjects; 58 58 59 /* Constructor */59 /** Constructor */ 60 60 psImageObjects * 61 psImageObjectsNew(const psImage *image, // Image that produced the objects, which has metadata we need62 psObjectArray *objects // The objects61 psImageObjectsNew(const psImage *image, //!< Image that produced the objects, which has metadata we need 62 psObjectArray *objects //!< The objects 63 63 ); 64 64 65 /* Destructor */65 /** Destructor */ 66 66 void 67 psImageObjectsDel(psImageObjects *restrict myImageObjects // Object to destroy67 psImageObjectsDel(psImageObjects *restrict myImageObjects //!< Object to destroy 68 68 ); 69 69 70 70 /***********************************************************************************************************/ 71 71 72 /* Objects from a catalogue */72 /** Objects from a catalogue */ 73 73 typedef struct { 74 enum psCatalogue catalogue; // Source catalogue from which objects come75 psObjectArray *object; // The objects74 enum psCatalogue catalogue; //!< Source catalogue from which objects come 75 psObjectArray *object; //!< The objects 76 76 } psCatalogueObjects; 77 77 78 /* Constructor */78 /** Constructor */ 79 79 psCatalogueObjects * 80 psCatalogueObjectsNew(enum psCatalogue *catalogue, // Source catalogue81 psObjectArray *objects // The objects80 psCatalogueObjectsNew(enum psCatalogue *catalogue, //!< Source catalogue 81 psObjectArray *objects //!< The objects 82 82 ); 83 83 84 /* Destructor */84 /** Destructor */ 85 85 void 86 psCatalogueObjectsDel(psCatalogeObjects *restrict myCatalogueObjects // Object to destroy86 psCatalogueObjectsDel(psCatalogeObjects *restrict myCatalogueObjects //!< Object to destroy 87 87 ); 88 88 89 89 /***********************************************************************************************************/ 90 90 91 /* A "super" object --- an object with multiple detections in different images */91 /** A "super" object --- an object with multiple detections in different images */ 92 92 typedef struct { 93 const psImageArray *images; // Images that provided the different measurements94 const psObjectArray *objects; // Individual object measurements93 const psImageArray *images; //!< Images that provided the different measurements 94 const psObjectArray *objects; //!< Individual object measurements 95 95 96 96 /* Derived quantities */ 97 psSkyPos *meanSkyPos; // Mean position on the sky98 double pmRA, pmDec; // Proper motion in RA and Dec99 double pmRAErr, pmDecErr; // Errors in proper motion100 float posChi2; // chi^2 for position97 psSkyPos *meanSkyPos; //!< Mean position on the sky 98 double pmRA, pmDec; //!< Proper motion in RA and Dec 99 double pmRAErr, pmDecErr; //!< Errors in proper motion 100 float posChi2; //!< chi^2 for position 101 101 } psSuperObject; 102 102 103 /* Constructor */103 /** Constructor */ 104 104 psSuperObject * 105 psSuperObjectNew(const psImageArray *images, // The images with the measurements106 const psObjectArray *objects // Object measurements105 psSuperObjectNew(const psImageArray *images, //!< The images with the measurements 106 const psObjectArray *objects //!< Object measurements 107 107 ); 108 108 109 /* Destructor */109 /** Destructor */ 110 110 void 111 psSuperObjectDel(psSuperObject *restrict mySuperObject // Object to destroy111 psSuperObjectDel(psSuperObject *restrict mySuperObject //!< Object to destroy 112 112 ); 113 113 … … 118 118 119 119 120 /* Correlate two OTA object arrays */ 121 /* 120 /** Correlate two OTA object arrays. 122 121 * Returns an array with the indices of the object in the second bunch that matched the corresponding object 123 122 * in the first bunch, or -1 if none that match. 124 123 */ 125 124 psIntArray * 126 psCorrelateObjects(const psObjectArray *restrict myObjects1, // First bunch of objects127 const psObjectArray *restrict myObjects2, // Second bunch of objects128 const psOTADescription *myOTA1, // OTA description for first bunch of objects, or NULL for129 // sky130 const psOTADescription *myOTA2 // OTA description for second bunch of objects, or NULL for131 // sky125 psCorrelateObjects(const psObjectArray *restrict myObjects1, //!< First bunch of objects 126 const psObjectArray *restrict myObjects2, //!< Second bunch of objects 127 const psOTADescription *myOTA1, //!< OTA description for first bunch of objects, or NULL for 128 //!< sky 129 const psOTADescription *myOTA2 //!< OTA description for second bunch of objects, or NULL for 130 //!< sky 132 131 ); 133 132 134 133 135 /* Get matched lists from a correlated index array */ 136 /* Returns a status number, and matched1 and matched2 are manipulated to contain matches */ 134 /** Get matched lists from a correlated index array Returns a status number, and matched1 and matched2 135 * are manipulated to contain matches 136 */ 137 137 int 138 psGetCorrelatedMatches(const psIntArray matches, // Index array specifying matches */139 const psObjectArray *restrict myObjects1, // First bunch of objects140 const psObjectArray *restrict myObjects2, // Second bunch of objects141 psObjectArray *matched1, // Matched objects in first bunch142 psObjectArray *matched2 // Matched objects in second bunch138 psGetCorrelatedMatches(const psIntArray matches, //!< Index array specifying matches */ 139 const psObjectArray *restrict myObjects1, //!< First bunch of objects 140 const psObjectArray *restrict myObjects2, //!< Second bunch of objects 141 psObjectArray *matched1, //!< Matched objects in first bunch 142 psObjectArray *matched2 //!< Matched objects in second bunch 143 143 ); 144 144 … … 147 147 /* Object selection */ 148 148 149 /* Get objects within a particular magnitude range */149 /** Get objects within a particular magnitude range */ 150 150 psObjectArray * 151 psSelectObjectMag(psObjectArray *restrict myArray, // Bunch of objects to select from152 float magLower, // Lower bound for magnitude153 float magUpper // Upper bound for magnitude151 psSelectObjectMag(psObjectArray *restrict myArray, //!< Bunch of objects to select from 152 float magLower, //!< Lower bound for magnitude 153 float magUpper //!< Upper bound for magnitude 154 154 ); 155 155 156 /* Get objects within a radius on the sky */156 /** Get objects within a radius on the sky */ 157 157 psObjectArray * 158 psSelectObjectSkyDist(psObjectArray *restrict myArray, // Bunch of objects to select from159 psSkyPos *skyPos, // Position on the sky160 float radius, // Radius of search161 int circleOrSquare // Circle = 1, Square = 2158 psSelectObjectSkyDist(psObjectArray *restrict myArray, //!< Bunch of objects to select from 159 psSkyPos *skyPos, //!< Position on the sky 160 float radius, //!< Radius of search 161 int circleOrSquare //!< Circle = 1, Square = 2 162 162 ); 163 163 164 /* Get objects within a particular colour range */164 /** Get objects within a particular colour range */ 165 165 psObjectArray * 166 psSelectObjectColour(psObjectArray *restrict myArray, // Bunch of objects to select from167 float magLower, // Lower bound for colour168 float magUpper, // Upper bound for colour169 enum psColourRef colourRef // Only select those with this colour reference166 psSelectObjectColour(psObjectArray *restrict myArray, //!< Bunch of objects to select from 167 float magLower, //!< Lower bound for colour 168 float magUpper, //!< Upper bound for colour 169 enum psColourRef colourRef //!< Only select those with this colour reference 170 170 ); 171 171
Note:
See TracChangeset
for help on using the changeset viewer.
