Changeset 39411
- Timestamp:
- Feb 27, 2016, 8:59:21 AM (10 years ago)
- Location:
- branches/eam_branches/ohana.20160226/src
- Files:
-
- 31 edited
-
libdvo/include/dvo_util.h (modified) (2 diffs)
-
libdvo/include/dvodb.h (modified) (1 diff)
-
libdvo/src/AstromOffsetMapUtils.c (modified) (1 diff)
-
libdvo/src/ImageOps.c (modified) (1 diff)
-
libdvo/src/dbExtractImages.c (modified) (1 diff)
-
libdvo/src/db_utils.c (modified) (1 diff)
-
libdvo/src/dvo_util.c (modified) (2 diffs)
-
libdvo/src/match_image.c (modified) (2 diffs)
-
libkapa/rotfont/courier12.h (modified) (1 diff)
-
libkapa/rotfont/courier24.h (modified) (1 diff)
-
libkapa/rotfont/courier8.h (modified) (1 diff)
-
libkapa/rotfont/fixed.h (modified) (1 diff)
-
libkapa/src/DrawRotString.c (modified) (6 diffs)
-
libkapa/src/KapaOpen.c (modified) (2 diffs)
-
libkapa/src/PSRotFont.c (modified) (4 diffs)
-
libkapa/src/RotFont.c (modified) (2 diffs)
-
libkapa/src/bDrawRotFont.c (modified) (3 diffs)
-
relastro/include/relastro.h (modified) (1 diff)
-
relastro/src/BrightCatalog.c (modified) (8 diffs)
-
relastro/src/ImageOps.c (modified) (5 diffs)
-
relastro/src/MosaicOps.c (modified) (1 diff)
-
relastro/src/UpdateObjects.c (modified) (3 diffs)
-
relastro/src/dvo_astrom_ops.c (modified) (8 diffs)
-
relastro/src/high_speed_utils.c (modified) (2 diffs)
-
relastro/src/indexCatalogs.c (modified) (3 diffs)
-
relastro/src/plot_scatter.c (modified) (1 diff)
-
relastro/src/plotstuff.c (modified) (3 diffs)
-
relastro/src/relastro_merge_source.c (modified) (1 diff)
-
relastro/src/share_icrf_obj.c (modified) (1 diff)
-
relastro/src/share_mean_pos.c (modified) (1 diff)
-
relastro/src/share_meas_pos.c (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
branches/eam_branches/ohana.20160226/src/libdvo/include/dvo_util.h
r27435 r39411 61 61 // There is no need to release memory pointed to by return value. 62 62 // It will be freed when dvoConfigFree() is invoked. 63 Image *dvoImageByExternID(dvoConfig *dvoConfig, int sourceID,int externID);63 Image *dvoImageByExternID(dvoConfig *dvoConfig, unsigned short sourceID, unsigned int externID); 64 64 65 65 // Loads the sky table for the database. … … 72 72 // return a list of detections from a particular image id 73 73 // Use dvoFree() to free the memory pointed to by results 74 off_t dvoGetDetections(SkyList *skylist, int imageID, dvoDetection **results,int *pMaxDetID);74 off_t dvoGetDetections(SkyList *skylist, unsigned int imageID, dvoDetection **results, unsigned int *pMaxDetID); 75 75 76 76 // free memory returned by various dvo util functions -
branches/eam_branches/ohana.20160226/src/libdvo/include/dvodb.h
r39308 r39411 490 490 double TimeValue (time_t time, time_t TimeReference, int TimeFormat); 491 491 492 void image_subset PROTO((Image *image, off_t Nimage, off_t **Subset, off_t *Nsubset, SkyRegionSelection *selection, unsigned long inttzero, double trange, int TimeSelect));493 off_t match_image_subset PROTO((Image *image, off_t *subset, off_t Nsubset, unsigned intT, short int S));492 void image_subset PROTO((Image *image, off_t Nimage, off_t **Subset, off_t *Nsubset, SkyRegionSelection *selection, e_time tzero, double trange, int TimeSelect)); 493 off_t match_image_subset PROTO((Image *image, off_t *subset, off_t Nsubset, e_time T, short int S)); 494 494 495 495 // dvo DB field functions -
branches/eam_branches/ohana.20160226/src/libdvo/src/AstromOffsetMapUtils.c
r39409 r39411 11 11 off_t i; 12 12 for (i = 0; i < Nimages; i++) { 13 if (images[i].imageID < 0) continue;13 // if (images[i].imageID < 0) continue; 14 14 15 15 unsigned int imageID = images[i].imageID; -
branches/eam_branches/ohana.20160226/src/libdvo/src/ImageOps.c
r39347 r39411 5 5 void image_subset (Image *image, off_t Nimage, off_t **Subset, off_t *Nsubset, 6 6 SkyRegionSelection *selection, 7 unsigned long inttzero, double trange, int TimeSelect)7 e_time tzero, double trange, int TimeSelect) 8 8 { 9 9 -
branches/eam_branches/ohana.20160226/src/libdvo/src/dbExtractImages.c
r39308 r39411 55 55 /* return image.field based on the selection */ 56 56 dbValue dbExtractImages (Image *image, off_t Nimage, off_t N, dbField *field) { 57 OHANA_UNUSED_PARAM(Nimage); // XXX: not sure why this is supplied 57 58 58 59 double x, y; -
branches/eam_branches/ohana.20160226/src/libdvo/src/db_utils.c
r31636 r39411 10 10 // by default, no graphdata 11 11 int GetGraphdata(Graphdata *graph, int *kapa, char *name) { 12 OHANA_UNUSED_PARAM(graph); 13 OHANA_UNUSED_PARAM(kapa); 14 OHANA_UNUSED_PARAM(name); 12 15 return FALSE; 13 16 } -
branches/eam_branches/ohana.20160226/src/libdvo/src/dvo_util.c
r38553 r39411 1 #include <dvo_util.h> 2 1 3 // dvo_util.c 2 4 // This file contains a set of functions that provide simple read-only access to a dvo database 3 5 // 4 #include <dvo_util.h> 5 6 void dvoFree(void *ptr) 7 { 8 if (ptr) { 9 FREE(ptr); 10 } 11 } 12 13 dvoConfig * dvoConfigAlloc() 14 { 15 dvoConfig *config; 16 17 ALLOCATE(config, dvoConfig, 1); 18 19 memset(config, 0, sizeof(dvoConfig)); 20 return config; 21 } 22 23 void dvoConfigFree(dvoConfig *dvoConfig) 24 { 25 if (dvoConfig) { 26 if (dvoConfig->skyTable) { 27 SkyTableFree(dvoConfig->skyTable); 28 } 29 if (dvoConfig->images) { 30 gfits_db_free(&dvoConfig->imageDB); 31 } 32 FREE(dvoConfig); 33 } 34 } 35 36 dvoConfig *dvoConfigRead(int *argc, char **argv) 37 { 38 dvoConfig *dvoConfig = dvoConfigAlloc(); 39 char MasterPhotcodeFile[256]; 40 41 char *file = SelectConfigFile(argc, argv, "ptolemy"); 42 char *configData = LoadConfigFile(file); 43 if (!configData) { 44 fprintf(stderr, "ERROR: can't find configuration file %s\n", file); 45 if (file) { 46 FREE(file); 47 } 48 exit(3); 49 } 50 FREE (file); 51 file = NULL; 52 53 ScanConfig (configData, "GSCFILE", "%s", 0, dvoConfig->gscfile); 54 ScanConfig (configData, "CATDIR", "%s", 0, dvoConfig->catdir); 55 ScanConfig (configData, "CATMODE", "%s", 0, dvoConfig->catmode); 56 ScanConfig (configData, "CATFORMAT", "%s", 0, dvoConfig->catformat); 57 ScanConfig (configData, "PHOTCODE_FILE", "%s", 0, MasterPhotcodeFile); 58 if (!ScanConfig (configData, "SKY_DEPTH", "%d", 0, &dvoConfig->skyDepth)) { 59 dvoConfig->skyDepth = 2; 60 } 61 if (!ScanConfig (configData, "SKY_TABLE", "%s", 0, dvoConfig->skyTableFile)) { 62 dvoConfig->skyTableFile[0] = 0; 63 } 64 65 snprintf (dvoConfig->photcodeFile, 256, "%s/Photcodes.dat", dvoConfig->catdir); 66 if (!LoadPhotcodes (dvoConfig->photcodeFile, MasterPhotcodeFile, FALSE)) { 67 fprintf (stderr, "error loading photcode table %s or master file %s\n", 68 dvoConfig->photcodeFile, MasterPhotcodeFile); 69 exit (1); 70 } 71 72 double zero_point; 73 ScanConfig (configData, "ZERO_PT", "%lf", 0, &zero_point); 74 SetZeroPoint (zero_point); 6 7 void dvoFree(void *ptr) { 8 if (ptr) { 9 FREE(ptr); 10 } 11 } 12 13 dvoConfig *dvoConfigAlloc() { 14 dvoConfig *config; 15 16 ALLOCATE(config, dvoConfig, 1); 17 18 memset(config, 0, sizeof(dvoConfig)); 19 return config; 20 } 21 22 void dvoConfigFree(dvoConfig *dvoConfig) { 23 if (dvoConfig) { 24 if (dvoConfig->skyTable) { 25 SkyTableFree(dvoConfig->skyTable); 26 } 27 if (dvoConfig->images) { 28 gfits_db_free(&dvoConfig->imageDB); 29 } 30 FREE(dvoConfig); 31 } 32 } 33 34 dvoConfig *dvoConfigRead(int *argc, char **argv) { 35 dvoConfig *dvoConfig = dvoConfigAlloc(); 36 char MasterPhotcodeFile[256]; 37 38 char *file = SelectConfigFile(argc, argv, "ptolemy"); 39 char *configData = LoadConfigFile(file); 40 if (!configData) { 41 fprintf(stderr, "ERROR: can't find configuration file %s\n", file); 42 if (file) { 43 FREE(file); 44 } 45 exit(3); 46 } 47 FREE (file); 48 file = NULL; 49 50 ScanConfig (configData, "GSCFILE", "%s", 0, dvoConfig->gscfile); 51 ScanConfig (configData, "CATDIR", "%s", 0, dvoConfig->catdir); 52 ScanConfig (configData, "CATMODE", "%s", 0, dvoConfig->catmode); 53 ScanConfig (configData, "CATFORMAT", "%s", 0, dvoConfig->catformat); 54 ScanConfig (configData, "PHOTCODE_FILE", "%s", 0, MasterPhotcodeFile); 55 if (!ScanConfig (configData, "SKY_DEPTH", "%d", 0, &dvoConfig->skyDepth)) { 56 dvoConfig->skyDepth = 2; 57 } 58 if (!ScanConfig (configData, "SKY_TABLE", "%s", 0, dvoConfig->skyTableFile)) { 59 dvoConfig->skyTableFile[0] = 0; 60 } 61 62 snprintf (dvoConfig->photcodeFile, 256, "%s/Photcodes.dat", dvoConfig->catdir); 63 if (!LoadPhotcodes (dvoConfig->photcodeFile, MasterPhotcodeFile, FALSE)) { 64 fprintf (stderr, "error loading photcode table %s or master file %s\n", 65 dvoConfig->photcodeFile, MasterPhotcodeFile); 66 exit (1); 67 } 68 69 double zero_point; 70 ScanConfig (configData, "ZERO_PT", "%lf", 0, &zero_point); 71 SetZeroPoint (zero_point); 75 72 76 73 #if (DVO_UTIL_READ_CAMERA_CONFIG) 77 // at one point I thought reading the camera configuration might be useful78 // but we didn't need it79 if (!ScanConfig (configData, "CAMERA_CONFIG", "%s", 0, dvoConfig->cameraConfig)) {80 fprintf (stderr, "can't find CAMERA_CONFIG in configuration\n");81 exit (3);82 }83 char * cameraConfigData = LoadConfigFile(dvoConfig->cameraConfig);84 if (!cameraConfigData) {85 fprintf (stderr, "failed to load %s\n", dvoConfig->cameraConfig);86 exit (3);87 }88 89 ScanConfig (cameraConfigData, "NCCD", "%d", 1, &dvoConfig->nCCD);74 // at one point I thought reading the camera configuration might be useful 75 // but we didn't need it 76 if (!ScanConfig (configData, "CAMERA_CONFIG", "%s", 0, dvoConfig->cameraConfig)) { 77 fprintf (stderr, "can't find CAMERA_CONFIG in configuration\n"); 78 exit (3); 79 } 80 char * cameraConfigData = LoadConfigFile(dvoConfig->cameraConfig); 81 if (!cameraConfigData) { 82 fprintf (stderr, "failed to load %s\n", dvoConfig->cameraConfig); 83 exit (3); 84 } 85 86 ScanConfig (cameraConfigData, "NCCD", "%d", 1, &dvoConfig->nCCD); 90 87 #endif 91 88 92 return (dvoConfig); 93 } 94 95 int dvoLoadImages(dvoConfig *dvoConfig) 96 { 97 if (dvoConfig->images) { 98 return TRUE; 99 } 100 101 char filename[256]; 89 return (dvoConfig); 90 } 91 92 int dvoLoadImages(dvoConfig *dvoConfig) { 93 if (dvoConfig->images) { 94 return TRUE; 95 } 96 97 char filename[256]; 102 98 103 snprintf (filename, 256, "%s/Images.dat", dvoConfig->catdir); 104 105 gfits_db_init (&dvoConfig->imageDB); 106 dvoConfig->imageDB.lockstate = LCK_SOFT; 107 dvoConfig->imageDB.timeout = 120.0; 108 109 if (!gfits_db_lock (&dvoConfig->imageDB, filename)) { 110 fprintf (stderr, "error opening image catalog %s (1)\n", filename); 111 return (FALSE); 112 } 113 114 if (dvoConfig->imageDB.dbstate == LCK_EMPTY) { 115 fprintf (stderr, "note: image catalog is empty\n"); 116 ALLOCATE (dvoConfig->images, Image, 1); 117 dvoConfig->nImages = 1; 118 return (TRUE); 119 } 120 121 int status = dvo_image_load (&dvoConfig->imageDB, TRUE, FALSE); 122 gfits_db_close (&dvoConfig->imageDB); 123 124 if (!status) { 125 fprintf (stderr, "problem loading image database table\n"); 126 return (FALSE); 127 } 128 129 dvoConfig->images = gfits_table_get_Image (&dvoConfig->imageDB.ftable, &dvoConfig->nImages, &dvoConfig->imageDB.scaledValue, &dvoConfig->imageDB.nativeOrder); 130 if (!dvoConfig->images) { 131 fprintf (stderr, "problem loading images\n"); 132 return (FALSE); 133 } 134 99 snprintf (filename, 256, "%s/Images.dat", dvoConfig->catdir); 100 101 gfits_db_init (&dvoConfig->imageDB); 102 dvoConfig->imageDB.lockstate = LCK_SOFT; 103 dvoConfig->imageDB.timeout = 120.0; 104 105 if (!gfits_db_lock (&dvoConfig->imageDB, filename)) { 106 fprintf (stderr, "error opening image catalog %s (1)\n", filename); 107 return (FALSE); 108 } 109 110 if (dvoConfig->imageDB.dbstate == LCK_EMPTY) { 111 fprintf (stderr, "note: image catalog is empty\n"); 112 ALLOCATE (dvoConfig->images, Image, 1); 113 dvoConfig->nImages = 1; 135 114 return (TRUE); 136 } 137 Image *dvoImageByExternID(dvoConfig *dvoConfig, int sourceID, int externID) 138 { 139 int i; 115 } 116 117 int status = dvo_image_load (&dvoConfig->imageDB, TRUE, FALSE); 118 gfits_db_close (&dvoConfig->imageDB); 119 120 if (!status) { 121 fprintf (stderr, "problem loading image database table\n"); 122 return (FALSE); 123 } 124 125 dvoConfig->images = gfits_table_get_Image (&dvoConfig->imageDB.ftable, &dvoConfig->nImages, &dvoConfig->imageDB.scaledValue, &dvoConfig->imageDB.nativeOrder); 126 if (!dvoConfig->images) { 127 fprintf (stderr, "problem loading images\n"); 128 return (FALSE); 129 } 130 131 return (TRUE); 132 } 133 134 Image *dvoImageByExternID(dvoConfig *dvoConfig, unsigned short sourceID, unsigned int externID) { 135 136 unsigned int i; 140 137 141 if (!dvoLoadImages(dvoConfig)) return NULL; 142 143 for (i=0; i<dvoConfig->nImages; i++) { 144 Image *image = dvoConfig->images + i; 145 if ((image->externID == externID) && (image->sourceID == sourceID)) { 146 BuildChipMatch(dvoConfig->images, dvoConfig->nImages); 147 return image; 148 } 149 } 150 fprintf(stderr, "can't find image for %d %d\n", sourceID, externID); 151 return NULL; 152 } 153 154 SkyTable *dvoLoadSkyTable(dvoConfig *dvoConfig) 155 { 156 if (!dvoConfig->skyTable) { 157 char *skyfile = ""; 158 dvoConfig->skyTable = SkyTableLoadOptimal(dvoConfig->catdir, skyfile, dvoConfig->gscfile, 159 FALSE, dvoConfig->skyDepth, 0); 160 } 161 162 if (dvoConfig->skyTable == NULL) { 163 fprintf(stderr, "failed to load SkyTable\n"); 164 return NULL; 165 } 166 167 SkyTableSetFilenames(dvoConfig->skyTable, dvoConfig->catdir, "cpt"); 168 169 return dvoConfig->skyTable; 170 } 171 172 SkyList *dvoSkyListByExternID(dvoConfig *dvoConfig, int sourceID, int externID, Image **ppImage) 173 { 174 Image *image = dvoImageByExternID(dvoConfig, sourceID, externID); 175 if (image == NULL) { 176 // fprintf(stderr, "can't find image for %d %d\n", sourceID, externID); 177 return NULL; 178 } 179 180 if (dvoLoadSkyTable(dvoConfig) == NULL) { 181 fprintf(stderr, "failed to load Sky table\n"); 182 return NULL; 183 } 184 SkyList *skylist = SkyListByImage(dvoConfig->skyTable, -1, image); 185 if (!skylist->Nregions) { 186 fprintf(stderr, "failed to find SkyList for image %d %d\n", sourceID, externID); 187 return NULL; 188 } 189 190 *ppImage = image; 191 192 return skylist; 193 } 194 195 off_t dvoGetDetections(SkyList *skylist, int imageID, dvoDetection **results, int *pMaxDetID) 196 { 138 if (!dvoLoadImages(dvoConfig)) return NULL; 139 140 for (i = 0; i < dvoConfig->nImages; i++) { 141 Image *image = dvoConfig->images + i; 142 if ((image->externID == externID) && (image->sourceID == sourceID)) { 143 BuildChipMatch(dvoConfig->images, dvoConfig->nImages); 144 return image; 145 } 146 } 147 fprintf(stderr, "can't find image for %d %d\n", sourceID, externID); 148 return NULL; 149 } 150 151 SkyTable *dvoLoadSkyTable(dvoConfig *dvoConfig) { 152 if (!dvoConfig->skyTable) { 153 char *skyfile = ""; 154 dvoConfig->skyTable = SkyTableLoadOptimal(dvoConfig->catdir, skyfile, dvoConfig->gscfile, 155 FALSE, dvoConfig->skyDepth, 0); 156 } 157 158 if (dvoConfig->skyTable == NULL) { 159 fprintf(stderr, "failed to load SkyTable\n"); 160 return NULL; 161 } 162 163 SkyTableSetFilenames(dvoConfig->skyTable, dvoConfig->catdir, "cpt"); 164 165 return dvoConfig->skyTable; 166 } 167 168 SkyList *dvoSkyListByExternID(dvoConfig *dvoConfig, int sourceID, int externID, Image **ppImage) { 169 Image *image = dvoImageByExternID(dvoConfig, sourceID, externID); 170 if (image == NULL) { 171 // fprintf(stderr, "can't find image for %d %d\n", sourceID, externID); 172 return NULL; 173 } 174 175 if (dvoLoadSkyTable(dvoConfig) == NULL) { 176 fprintf(stderr, "failed to load Sky table\n"); 177 return NULL; 178 } 179 SkyList *skylist = SkyListByImage(dvoConfig->skyTable, -1, image); 180 if (!skylist->Nregions) { 181 fprintf(stderr, "failed to find SkyList for image %d %d\n", sourceID, externID); 182 return NULL; 183 } 184 185 *ppImage = image; 186 187 return skylist; 188 } 189 190 off_t dvoGetDetections(SkyList *skylist, unsigned int imageID, dvoDetection **results, unsigned int *pMaxDetID) { 197 191 int GetMeasures = 1; 198 192 int reg; … … 204 198 *pMaxDetID = -1; 205 199 for (reg=0; reg< skylist->Nregions; reg++) { 206 /* lock, load, unlock catalog */ 207 Catalog catalog; 208 209 dvo_catalog_init (&catalog, TRUE); 210 catalog.filename = skylist->filename[reg]; 211 catalog.catflags = GetMeasures ? DVO_LOAD_AVERAGE | DVO_LOAD_MEASURE | DVO_LOAD_SECFILT : DVO_LOAD_AVERAGE | DVO_LOAD_SECFILT; 212 catalog.Nsecfilt = 0; 213 214 // an error exit status here is a significant error 215 if (!dvo_catalog_open (&catalog, NULL, FALSE, "r")) { 216 fprintf (stderr, "ERROR: failure to open catalog file %s\n", catalog.filename); 217 exit (2); 200 /* lock, load, unlock catalog */ 201 Catalog catalog; 202 203 dvo_catalog_init (&catalog, TRUE); 204 catalog.filename = skylist->filename[reg]; 205 catalog.catflags = GetMeasures ? DVO_LOAD_AVERAGE | DVO_LOAD_MEASURE | DVO_LOAD_SECFILT : DVO_LOAD_AVERAGE | DVO_LOAD_SECFILT; 206 catalog.Nsecfilt = 0; 207 208 // an error exit status here is a significant error 209 if (!dvo_catalog_open (&catalog, NULL, FALSE, "r")) { 210 fprintf (stderr, "ERROR: failure to open catalog file %s\n", catalog.filename); 211 exit (2); 212 } 213 dvo_catalog_unlock (&catalog); 214 215 off_t Nmeasure = catalog.Nmeasure; 216 217 off_t i; 218 for (i=0; i< Nmeasure; i++) { 219 Measure *m = catalog.measure + i; 220 if (m->imageID != imageID) { 221 continue; 218 222 } 219 dvo_catalog_unlock (&catalog); 220 221 off_t Nmeasure = catalog.Nmeasure; 222 223 off_t i; 224 for (i=0; i< Nmeasure; i++) { 225 Measure *m = catalog.measure + i; 226 if (m->imageID != imageID) { 227 continue; 228 } 229 Average *a = catalog.average + m->averef; 223 Average *a = catalog.average + m->averef; 230 224 231 dvoDetection *det = detections + Ndetect;232 233 det->valid = 1;234 det->ave = *a;235 det->meas = *m;225 dvoDetection *det = detections + Ndetect; 226 227 det->valid = 1; 228 det->ave = *a; 229 det->meas = *m; 236 230 #ifdef notdfe 237 det->objID = a->objID;238 det->catID = m->catID;239 det->detID = m->detID;240 det->pspsObjID = a->extID;241 det->pspsDetID = m->extID;231 det->objID = a->objID; 232 det->catID = m->catID; 233 det->detID = m->detID; 234 det->pspsObjID = a->extID; 235 det->pspsDetID = m->extID; 242 236 #endif 243 237 244 if ((int) det->meas.detID > *pMaxDetID) { 245 *pMaxDetID = det->meas.detID; 246 } 247 248 Ndetect++; 249 CHECK_REALLOCATE(detections, dvoDetection, detectionsArrayLength, Ndetect, 1000); 238 if (det->meas.detID > *pMaxDetID) { 239 *pMaxDetID = det->meas.detID; 250 240 } 251 241 252 dvo_catalog_free (&catalog); 242 Ndetect++; 243 CHECK_REALLOCATE(detections, dvoDetection, detectionsArrayLength, Ndetect, 1000); 244 } 245 246 dvo_catalog_free (&catalog); 253 247 } 254 248 size_t NInvalidDetID = 0; 255 249 if (Ndetect) { 256 dvoDetection *sorted; 257 ALLOCATE(sorted, dvoDetection, *pMaxDetID + 1); 258 259 memset(sorted, 0, sizeof(dvoDetection) * *pMaxDetID); 260 off_t i; 261 for (i = 0; i < Ndetect; i++) { 262 263 if (detections[i].meas.detID < 0 || detections[i].meas.detID > (*pMaxDetID + 1)) 264 NInvalidDetID++; 265 else 266 sorted[detections[i].meas.detID] = detections[i]; 267 } 268 *results = sorted; 250 dvoDetection *sorted; 251 ALLOCATE(sorted, dvoDetection, *pMaxDetID + 1); 252 253 memset(sorted, 0, sizeof(dvoDetection) * *pMaxDetID); 254 off_t i; 255 for (i = 0; i < Ndetect; i++) { 256 257 // if (detections[i].meas.detID < 0 || detections[i].meas.detID > (*pMaxDetID + 1)) 258 259 if (detections[i].meas.detID > (*pMaxDetID + 1)) 260 NInvalidDetID++; 261 else 262 sorted[detections[i].meas.detID] = detections[i]; 263 } 264 *results = sorted; 269 265 } else { 270 *results = NULL;266 *results = NULL; 271 267 } 272 268 -
branches/eam_branches/ohana.20160226/src/libdvo/src/match_image.c
r31635 r39411 1 1 # include "dvo.h" 2 2 3 off_t match_image (Image *image, off_t Nimage, unsigned intT, short int S) {3 off_t match_image (Image *image, off_t Nimage, e_time T, short int S) { 4 4 5 5 off_t N, Nlo, Nhi, N1, N2; … … 37 37 } 38 38 39 off_t match_image_subset (Image *image, off_t *subset, off_t Nsubset, unsigned intT, short int S) {39 off_t match_image_subset (Image *image, off_t *subset, off_t Nsubset, e_time T, short int S) { 40 40 41 41 off_t N, Nlo, Nhi, N1, N2; -
branches/eam_branches/ohana.20160226/src/libkapa/rotfont/courier12.h
r38991 r39411 63 63 static unsigned char courier12_31_bits[] = { 64 64 0x00}; 65 static unsigned char courier12_32_bits[] = {}; 65 static unsigned char courier12_32_bits[] = { 66 0x00}; 66 67 static unsigned char courier12_33_bits[] = { 67 68 0x01, 0x01, 0x01, 0x01, 0x01, 0x00, 0x02}; -
branches/eam_branches/ohana.20160226/src/libkapa/rotfont/courier24.h
r38991 r39411 63 63 static unsigned char courier24_31_bits[] = { 64 64 0x00}; 65 static unsigned char courier24_32_bits[] = {}; 65 static unsigned char courier24_32_bits[] = { 66 0x00}; 66 67 static unsigned char courier24_33_bits[] = { 67 68 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x00, 0x00, 0x07, -
branches/eam_branches/ohana.20160226/src/libkapa/rotfont/courier8.h
r38991 r39411 63 63 static unsigned char courier8_31_bits[] = { 64 64 0x00}; 65 static unsigned char courier8_32_bits[] = {}; 65 static unsigned char courier8_32_bits[] = { 66 0x00}; 66 67 static unsigned char courier8_33_bits[] = { 67 68 0x01, 0x01, 0x01, 0x01}; -
branches/eam_branches/ohana.20160226/src/libkapa/rotfont/fixed.h
r5854 r39411 62 62 static unsigned char fixed_31_bits[] = { 63 63 0x01}; 64 static unsigned char fixed_32_bits[] = {}; 64 static unsigned char fixed_32_bits[] = { 65 0x00}; 65 66 static unsigned char fixed_33_bits[] = { 66 67 0x1, 0x1, 0x1, 0x1, 0x1, 0x0, 0x01}; -
branches/eam_branches/ohana.20160226/src/libkapa/src/DrawRotString.c
r38986 r39411 36 36 unsigned char *bitmap; 37 37 char *currentname, basename[64]; 38 int i,dy, dx, N, X, Y, code, protect;38 int dy, dx, N, X, Y, code, protect; 39 39 int dX, Xoff, dY, Yoff, YoffBase; 40 40 int currentsize, basesize; … … 76 76 YoffBase = Yoff; 77 77 /* draw characters one-by-one */ 78 unsigned int i; 78 79 for (i = 0; i < strlen(string); i++) { 79 80 N = (int)(string[i]); … … 150 151 int ii, jj, byte_line, byte, bit, flag; 151 152 unsigned long int fore; 152 double i , j, cs, sn, rscale, tmp;153 double ix, iy, cs, sn, rscale, tmp; 153 154 int X, Y, X0, X1, X2, Y0, Y1, Y2, x0, y0; 154 155 … … 212 213 XSetForeground (RotDisplay, RotGC, fore); 213 214 if (scale > 1) { 214 for (i = X1; i <= X2; i+=1) {215 for ( j = Y1; j <= Y2; j+=1) {216 tmp = rscale*(cs*(i - X0) + sn*(j- Y0)) + x0; ii = NEARINT (tmp);217 tmp = rscale*(cs*( j - Y0) - sn*(i- X0)) + y0; jj = NEARINT (tmp);215 for (ix = X1; ix <= X2; ix += 1) { 216 for (iy = Y1; iy <= Y2; iy += 1) { 217 tmp = rscale*(cs*(ix - X0) + sn*(iy - Y0)) + x0; ii = NEARINT (tmp); 218 tmp = rscale*(cs*(iy - Y0) - sn*(ix - X0)) + y0; jj = NEARINT (tmp); 218 219 /* fprintf (stderr, "%d %d %d %d\n", i, j, ii, jj); */ 219 220 if ((ii < 0) || (ii >= dx) || (jj < 0) || (jj >= dy)) continue; … … 221 222 bit = ii % 8; 222 223 flag = 0x01 & (bitmap[byte] >> bit); 223 if (flag) XDrawPoint (RotDisplay, RotWindow, RotGC, x + i , y + j);224 if (flag) XDrawPoint (RotDisplay, RotWindow, RotGC, x + ix, y + iy); 224 225 } 225 226 } 226 227 } else { 227 for (i = X1; i <= X2; i+=scale) {228 for ( j = Y1; j <= Y2; j+=scale) {229 tmp = rscale*(cs*(i - X0) + sn*(j- Y0)) + x0; ii = NEARINT (tmp);230 tmp = rscale*(cs*( j - Y0) - sn*(i- X0)) + y0; jj = NEARINT (tmp);228 for (ix = X1; ix <= X2; ix+=scale) { 229 for (iy = Y1; iy <= Y2; iy+=scale) { 230 tmp = rscale*(cs*(ix - X0) + sn*(iy - Y0)) + x0; ii = NEARINT (tmp); 231 tmp = rscale*(cs*(iy - Y0) - sn*(ix - X0)) + y0; jj = NEARINT (tmp); 231 232 /* fprintf (stderr, "%d %d %d %d\n", i, j, ii, jj); */ 232 233 if ((ii < 0) || (ii >= dx) || (jj < 0) || (jj >= dy)) continue; … … 236 237 /* fprintf (stderr, "%2d %2d %3d %3d %1d %f %f\n", i, j, ii, jj, flag, 237 238 rscale*(cs*(i - X0) + sn*(j - Y0)) + x0, rscale*(cs*(j - Y0) - sn*(i - X0)) + y0); */ 238 if (flag) XDrawPoint (RotDisplay, RotWindow, RotGC, x + i , y + j);239 if (flag) XDrawPoint (RotDisplay, RotWindow, RotGC, x + ix, y + iy); 239 240 } 240 241 } 241 242 # if (0) 242 for (i = 0; i < dx; i++) {243 for ( j = 0; j < dy; j++) {244 tmp = scale*(cs*(i - x0) - sn*(j- y0)) + X0; ii = NEARINT (tmp);245 tmp = scale*(cs*( j - y0) + sn*(i- x0)) + Y0; jj = NEARINT (tmp);243 for (ix = 0; ix < dx; ix++) { 244 for (iy = 0; iy < dy; iy++) { 245 tmp = scale*(cs*(ix - x0) - sn*(iy - y0)) + X0; ii = NEARINT (tmp); 246 tmp = scale*(cs*(iy - y0) + sn*(ix - x0)) + Y0; jj = NEARINT (tmp); 246 247 /* if ((ii < 0) || (ii >= dx) || (jj < 0) || (jj >= dy)) continue; */ 247 byte = byte_line * j + (i/ 8);248 bit = i % 8;248 byte = byte_line * iy + (ix / 8); 249 bit = ix % 8; 249 250 flag = 0x01 & (bitmap[byte] >> bit); 250 fprintf (stderr, "%2d %2d %3d %3d %1d %f %f\n", i , j, ii, jj, flag,251 scale*(cs*(i - x0) - sn*(j - y0)) + X0, scale*(cs*(j - y0) + sn*(i- x0)) + Y0);251 fprintf (stderr, "%2d %2d %3d %3d %1d %f %f\n", ix, iy, ii, jj, flag, 252 scale*(cs*(ix - x0) - sn*(iy - y0)) + X0, scale*(cs*(iy - y0) + sn*(ix - x0)) + Y0); 252 253 if (flag) XDrawPoint (RotDisplay, RotWindow, RotGC, x + ii, y + jj); 253 254 } -
branches/eam_branches/ohana.20160226/src/libkapa/src/KapaOpen.c
r39225 r39411 10 10 11 11 static int Nvalid = 0; 12 static int *VALID = NULL;12 static u_int32_t *VALID = NULL; 13 13 14 14 int KapaLaunchCommand (char *line); … … 146 146 if (Nvalid == 0) { 147 147 Nvalid = 1; 148 ALLOCATE (VALID, int, Nvalid);148 ALLOCATE (VALID, u_int32_t, Nvalid); 149 149 } else { 150 150 Nvalid ++; 151 REALLOCATE (VALID, int, Nvalid);151 REALLOCATE (VALID, u_int32_t, Nvalid); 152 152 } 153 153 -
branches/eam_branches/ohana.20160226/src/libkapa/src/PSRotFont.c
r38986 r39411 7 7 8 8 char *segment, basename[64], *currentname; 9 int i,N, code, protect;9 int N, code, protect; 10 10 int dX, dY, Xoff, Yoff, X, Y, Nseg, NSEG, YoffBase; 11 11 double cs, sn, currentscale; … … 78 78 YoffBase = 0; 79 79 /* accumulate string segments with common state */ 80 81 unsigned int i; 80 82 for (i = 0; i < strlen (string); i++) { 81 83 N = (int)(string[i]); … … 198 200 int PSRotStrlen (char *c) { 199 201 200 int i,N, dX, code;202 int N, dX, code; 201 203 double currentscale, scale; 202 204 … … 208 210 209 211 code = FALSE; 212 213 unsigned int i; 210 214 for (i = 0; i < strlen (c); i++) { 211 215 N = (int)(c[i]); -
branches/eam_branches/ohana.20160226/src/libkapa/src/RotFont.c
r39339 r39411 95 95 int RotStrlen (char *c) { 96 96 97 int i,N, dX, code;97 int N, dX, code; 98 98 double scale; 99 99 … … 106 106 107 107 code = FALSE; 108 109 unsigned int i; 108 110 for (i = 0; i < strlen (c); i++) { 109 111 N = (int)(c[i]); -
branches/eam_branches/ohana.20160226/src/libkapa/src/bDrawRotFont.c
r30603 r39411 14 14 unsigned char *bitmap; 15 15 char *currentname, basename[64]; 16 int i,dy, dx, N, X, Y, code, protect;16 int dy, dx, N, X, Y, code, protect; 17 17 int dX, Xoff, dY, Yoff, YoffBase; 18 18 int currentsize, basesize; … … 57 57 YoffBase = Yoff; 58 58 /* draw characters one-by-one */ 59 60 unsigned int i; 59 61 for (i = 0; i < strlen(string); i++) { 60 62 N = (int)(string[i]); … … 125 127 126 128 int bDrawRotBitmap (bDrawBuffer *buffer, int x, int y, int dx, int dy, unsigned char *bitmap, int mode, double angle, double scale) { 129 OHANA_UNUSED_PARAM(mode); 127 130 128 131 int ii, jj, byte_line, byte, bit, flag; -
branches/eam_branches/ohana.20160226/src/relastro/include/relastro.h
r39396 r39411 88 88 off_t *NMEASURE; // allocated Measures per catalog 89 89 int *index; // lookup table catID -> catalog[i] 90 int*catIDs; // lookup table catID <- catalog[i]91 int maxID;// max catID value to date90 unsigned int *catIDs; // lookup table catID <- catalog[i] 91 unsigned int maxID; // max catID value to date 92 92 } CatalogSplitter; 93 93 -
branches/eam_branches/ohana.20160226/src/relastro/src/BrightCatalog.c
r39396 r39411 798 798 catalogs->maxID = 0; 799 799 ALLOCATE (catalogs->index, int, catalogs->maxID + 1); 800 for (i = 0; i <= catalogs->maxID; i++) catalogs->index[i] = -1; 800 801 unsigned int ID; 802 for (ID = 0; ID <= catalogs->maxID; ID++) catalogs->index[ID] = -1; 801 803 802 804 catalogs->Nsecfilt = Nsecfilt; … … 807 809 ALLOCATE (catalogs->catalog, Catalog, catalogs->NCATALOG); 808 810 809 ALLOCATE (catalogs->catIDs, int,catalogs->NCATALOG);810 ALLOCATE (catalogs->NAVERAGE, off_t, catalogs->NCATALOG);811 ALLOCATE (catalogs->NMEASURE, off_t, catalogs->NCATALOG);811 ALLOCATE (catalogs->catIDs, unsigned int, catalogs->NCATALOG); 812 ALLOCATE (catalogs->NAVERAGE, off_t, catalogs->NCATALOG); 813 ALLOCATE (catalogs->NMEASURE, off_t, catalogs->NCATALOG); 812 814 813 815 for (i = 0; i < catalogs->NCATALOG; i++) { … … 844 846 845 847 // find the max value of catID in this BrightCatalog 846 int catIDmax = 0;848 unsigned int catIDmax = 0; 847 849 for (i = 0; i < bcatalog->Naverage; i++) { 848 850 catIDmax = MAX(catIDmax, bcatalog->average[i].catID); … … 850 852 // XXX validate the measure ID range here 851 853 852 int maxIDold = catalogs->maxID;854 unsigned int maxIDold = catalogs->maxID; 853 855 catalogs->maxID = MAX (maxIDold, catIDmax); 854 856 855 857 // extend the index array and init 856 858 REALLOCATE (catalogs->index, int, catalogs->maxID + 1); 857 for (i = maxIDold + 1; i <= catalogs->maxID; i++) catalogs->index[i] = -1; 859 860 unsigned int id; 861 for (id = maxIDold + 1; id <= catalogs->maxID; id++) catalogs->index[id] = -1; 858 862 859 863 // identify the new catID values 860 864 for (i = 0; i < bcatalog->Naverage; i++) { 861 int catID = bcatalog->average[i].catID;865 unsigned int catID = bcatalog->average[i].catID; 862 866 assert (catID > 0); 863 867 assert (catID < catalogs->maxID + 1); … … 881 885 882 886 if (catalogs->Ncatalog >= catalogs->NCATALOG) { 887 int oldNCATALOG = catalogs->NCATALOG; 883 888 catalogs->NCATALOG += 16; 884 889 // fprintf (stderr, "realloc catalogs->catalog: old: %llx ", (long long) catalogs->catalog); … … 894 899 // fprintf (stderr, "new: %llx - %llx\n", (long long) catalogs->NMEASURE, (long long) (catalogs->NMEASURE + sizeof(off_t)*catalogs->NCATALOG)); 895 900 896 REALLOCATE (catalogs->catIDs, int,catalogs->NCATALOG);901 REALLOCATE (catalogs->catIDs, unsigned int, catalogs->NCATALOG); 897 902 898 903 int j; 899 for (j = catalogs->NCATALOG - 16; j < catalogs->NCATALOG; j++) {904 for (j = oldNCATALOG; j < catalogs->NCATALOG; j++) { 900 905 dvo_catalog_init (&catalogs->catalog[j], TRUE); 901 906 catalogs->catIDs[j] = 0; … … 917 922 // assign the averages to the corresponding catalog 918 923 for (i = 0; i < bcatalog->Naverage; i++) { 919 int ID = bcatalog->average[i].catID;924 unsigned int ID = bcatalog->average[i].catID; 920 925 int Nc = catalogs->index[ID]; 921 926 assert (Nc > -1); … … 942 947 // XXX what about averef and related links? Do I need them? 943 948 for (i = 0; i < bcatalog->Nmeasure; i++) { 944 int ID = bcatalog->measure[i].catID;949 unsigned int ID = bcatalog->measure[i].catID; 945 950 int Nc = catalogs->index[ID]; 946 951 assert (Nc > -1); -
branches/eam_branches/ohana.20160226/src/relastro/src/ImageOps.c
r39381 r39411 508 508 m = ImageToMeasure[im][i]; 509 509 c = ImageToCatalog[im][i]; 510 myAssert (c < Ncatalog, "oops"); 510 511 511 512 Measure *measure = &catalog[c].measure[m]; … … 653 654 m = ImageToMeasure[im][i]; 654 655 c = ImageToCatalog[im][i]; 656 myAssert (c < Ncatalog, "oops"); 655 657 656 658 MeasureTiny *measure = &catalog[c].measureT[m]; … … 753 755 m = ImageToMeasure[im][i]; 754 756 c = ImageToCatalog[im][i]; 757 myAssert (c < Ncatalog, "oops"); 755 758 756 759 MeasureTiny *measure = &catalog[c].measureT[m]; … … 829 832 m = ImageToMeasure[im][i]; 830 833 c = ImageToCatalog[im][i]; 834 myAssert (c < Ncatalog, "oops"); 831 835 832 836 // XXX should I use the raw coords or just measure.X,Y -> R,D? … … 871 875 m = ImageToMeasure[im][i]; 872 876 c = ImageToCatalog[im][i]; 877 myAssert (c < Ncatalog, "oops"); 873 878 874 879 MeasureTiny *measure = &catalog[c].measureT[m]; -
branches/eam_branches/ohana.20160226/src/relastro/src/MosaicOps.c
r37038 r39411 274 274 // extend each host image table to include the mosaic 'images' needed by the host 275 275 int select_mosaics_hostregion (RegionHostTable *regionHosts, Image *image, off_t Nimage) { 276 OHANA_UNUSED_PARAM(Nimage); 276 277 277 278 int i; -
branches/eam_branches/ohana.20160226/src/relastro/src/UpdateObjects.c
r39409 r39411 121 121 // be called with just MeasureTiny set and Measure == NULL 122 122 int UpdateObjects_Chips (Average *average, SecFilt *secfilt, MeasureTiny *measure, Measure *measureBig, int Nsecfilt, FitStats *fitStats, int cat, off_t measOff) { 123 OHANA_UNUSED_PARAM(Nsecfilt); 123 124 124 125 int k; … … 552 553 // be called with just MeasureTiny set and Measure == NULL 553 554 int UpdateObjects_Stack (Average *average, SecFilt *secfilt, MeasureTiny *measure, Measure *measureBig, int Nsecfilt, FitStats *fitStats) { 555 OHANA_UNUSED_PARAM(Nsecfilt); 554 556 555 557 int status; … … 651 653 652 654 int UpdateObjects_SelectMeasures (FitStats *fit, Average *average, SecFilt *secfilt, MeasureTiny *measure, Measure *measureBig, int isStack, int *stackEntry) { 655 OHANA_UNUSED_PARAM(secfilt); 653 656 654 657 // I've already allocated fit->points (and fit->sample) with space for fit->NpointsAlloc entries -
branches/eam_branches/ohana.20160226/src/relastro/src/dvo_astrom_ops.c
r37038 r39411 2 2 /* the Measure carries the instantaneous mean position at the epoch t */ 3 3 4 // average & secfilt no longer used since R and D are now in measure 5 4 6 double getMeanR (MeasureTiny *measure, Average *average, SecFilt *secfilt) { 7 OHANA_UNUSED_PARAM(average); 8 OHANA_UNUSED_PARAM(secfilt); 5 9 6 10 double ra; … … 14 18 15 19 double getMeanD (MeasureTiny *measure, Average *average, SecFilt *secfilt) { 20 OHANA_UNUSED_PARAM(average); 21 OHANA_UNUSED_PARAM(secfilt); 16 22 17 23 double dec; … … 25 31 26 32 int setMeanR (double ra_fit, MeasureTiny *measure, Average *average, SecFilt *secfilt) { 33 OHANA_UNUSED_PARAM(average); 34 OHANA_UNUSED_PARAM(secfilt); 27 35 28 36 // old: measure[0].dR += (ra_fit - average[0].R) * 3600.0; … … 34 42 35 43 int setMeanD (double dec_fit, MeasureTiny *measure, Average *average, SecFilt *secfilt) { 44 OHANA_UNUSED_PARAM(average); 45 OHANA_UNUSED_PARAM(secfilt); 36 46 37 47 // old: measure[0].dD += (dec_fit - average[0].D) * 3600.0; … … 43 53 44 54 double getMeanR_Big (Measure *measure, Average *average, SecFilt *secfilt) { 55 OHANA_UNUSED_PARAM(average); 56 OHANA_UNUSED_PARAM(secfilt); 45 57 46 58 double ra; … … 54 66 55 67 double getMeanD_Big (Measure *measure, Average *average, SecFilt *secfilt) { 68 OHANA_UNUSED_PARAM(average); 69 OHANA_UNUSED_PARAM(secfilt); 56 70 57 71 double dec; … … 65 79 66 80 int setMeanR_Big (double ra_fit, Measure *measure, Average *average, SecFilt *secfilt) { 81 OHANA_UNUSED_PARAM(average); 82 OHANA_UNUSED_PARAM(secfilt); 67 83 68 84 // old: measure[0].dR += (ra_fit - average[0].R) * 3600.0; … … 74 90 75 91 int setMeanD_Big (double dec_fit, Measure *measure, Average *average, SecFilt *secfilt) { 92 OHANA_UNUSED_PARAM(average); 93 OHANA_UNUSED_PARAM(secfilt); 76 94 77 95 // measure[0].dD += (dec_fit - average[0].D) * 3600.0; -
branches/eam_branches/ohana.20160226/src/relastro/src/high_speed_utils.c
r38601 r39411 8 8 #define DEFAULT_WHERE_B "((flags & 0x01000000) == 0) && ((flags & 0x04000000) && ((y:nphot > 1) || (z:nphot > 1)) &&((y:err < 0.2) || (z:err < 0.2)))" 9 9 10 11 extern char **isolate_elements(int, char **, int *);12 10 13 11 int print_error(); … … 76 74 // parse it into elements of the where condition 77 75 char **cstack = NULL; 78 int Ncstack;76 unsigned int Ncstack; 79 77 cstack = isolate_elements(nWords, words, &Ncstack); 80 78 free(words); -
branches/eam_branches/ohana.20160226/src/relastro/src/indexCatalogs.c
r36630 r39411 1 1 # include "relastro.h" 2 2 3 static int catIDmax = 0;4 static int *catIDseq = NULL;5 static int *objIDmax = NULL;6 static int **objIDseq = NULL;3 static unsigned int catIDmax = 0; 4 static int *catIDseq = NULL; 5 static unsigned int *objIDmax = NULL; 6 static int **objIDseq = NULL; 7 7 8 8 int indexCatalogs (Catalog *catalog, int Ncatalog) { … … 19 19 20 20 ALLOCATE (catIDseq, int, catIDmax + 1); 21 for (i = 0; i < catIDmax + 1; i++) { 22 catIDseq[i] = -1; 21 22 unsigned int ID; 23 for (ID = 0; ID < catIDmax + 1; ID++) { 24 catIDseq[ID] = -1; 23 25 } 24 26 25 27 for (i = 0; i < Ncatalog; i++) { 26 int catID = catalog[i].catID;28 unsigned int catID = catalog[i].catID; 27 29 catIDseq[catID] = i; 28 30 } 29 31 30 ALLOCATE (objIDmax, int, Ncatalog);31 ALLOCATE (objIDseq, int *, Ncatalog);32 ALLOCATE (objIDmax, unsigned int, Ncatalog); 33 ALLOCATE (objIDseq, int *, Ncatalog); 32 34 for (i = 0; i < Ncatalog; i++) { 33 35 objIDmax[i] = 0; … … 37 39 38 40 ALLOCATE (objIDseq[i], int, objIDmax[i] + 1); 39 for ( j = 0; j < objIDmax[i] + 1; j++) {40 objIDseq[i][ j] = -1;41 for (ID = 0; ID < objIDmax[i] + 1; ID++) { 42 objIDseq[i][ID] = -1; 41 43 } 42 44 43 45 for (j = 0; j < catalog[i].Naverage; j++) { 44 int objID = catalog[i].average[j].objID;46 unsigned int objID = catalog[i].average[j].objID; 45 47 objIDseq[i][objID] = j; 46 48 } -
branches/eam_branches/ohana.20160226/src/relastro/src/plot_scatter.c
r17203 r39411 2 2 3 3 void plot_scatter (Catalog *catalog, int Ncatalog) { 4 OHANA_UNUSED_PARAM(catalog); 5 OHANA_UNUSED_PARAM(Ncatalog); 4 6 5 7 # if (0) -
branches/eam_branches/ohana.20160226/src/relastro/src/plotstuff.c
r39396 r39411 44 44 45 45 void JpegPlot (Graphdata *graphmode, int N, char *filename) { 46 OHANA_UNUSED_PARAM(graphmode); 46 47 47 48 if (Xgraph[N] == 0) return; … … 52 53 53 54 void PSPlot (Graphdata *graphmode, int N, char *filename) { 55 OHANA_UNUSED_PARAM(graphmode); 54 56 55 57 if (Xgraph[N] == 0) return; … … 79 81 80 82 void PlotVector (int Npts, double *vect, int mode, int N, char *type) { 83 OHANA_UNUSED_PARAM(mode); 81 84 82 85 float *values; -
branches/eam_branches/ohana.20160226/src/relastro/src/relastro_merge_source.c
r38986 r39411 22 22 // load data from each region file, only use bright stars 23 23 for (i = 0; i < sky[0].Nregions; i++) { 24 if (sky[0].regions[i].index == CAT_ID_SRC) { 24 myAssert (sky[0].regions[i].index >= 0, "oops"); 25 if ((unsigned int) sky[0].regions[i].index == CAT_ID_SRC) { 25 26 catalog_src.filename = sky[0].filename[i]; 26 27 region_src = &sky[0].regions[i]; 27 28 } 28 29 // currently, we only accept dst == src... 29 if ( sky[0].regions[i].index == CAT_ID_DST) {30 if ((unsigned int) sky[0].regions[i].index == CAT_ID_DST) { 30 31 catalog_dst.filename = sky[0].filename[i]; 31 32 // region_dst = &sky[0].regions[i]; -
branches/eam_branches/ohana.20160226/src/relastro/src/share_icrf_obj.c
r37807 r39411 99 99 int cat, ave, meas; 100 100 ICRFdata (i, &cat, &ave, &meas); 101 myAssert (cat < Ncatalog, "oops"); 101 102 102 103 Average *average = &catalog[cat].average[ave]; -
branches/eam_branches/ohana.20160226/src/relastro/src/share_mean_pos.c
r38062 r39411 107 107 continue; 108 108 } 109 109 myAssert (catSeq < Ncatalog, "oops"); 110 110 111 catalog[catSeq].average[objSeq].R = meanpos[i].R; 111 112 catalog[catSeq].average[objSeq].D = meanpos[i].D; -
branches/eam_branches/ohana.20160226/src/relastro/src/share_meas_pos.c
r38062 r39411 101 101 continue; 102 102 } 103 myAssert (catSeq < Ncatalog, "oops"); 104 103 105 off_t m = catalog[catSeq].average[objSeq].measureOffset; 104 106 for (k = 0; k < catalog[catSeq].average[objSeq].Nmeasure; k++, m++) {
Note:
See TracChangeset
for help on using the changeset viewer.
