Changeset 36834 for trunk/psModules/src/astrom
- Timestamp:
- Jun 7, 2014, 6:37:32 AM (12 years ago)
- Location:
- trunk/psModules/src/astrom
- Files:
-
- 6 edited
- 2 copied
-
Makefile.am (modified) (2 diffs)
-
pmAstrometryModel.c (modified) (2 diffs)
-
pmAstrometryModel.h (modified) (1 diff)
-
pmAstrometryObjects.c (modified) (2 diffs)
-
pmAstrometryObjects.h (modified) (1 diff)
-
pmAstrometryVisual.c (modified) (3 diffs)
-
pmKHcorrect.c (copied) (copied from branches/eam_branches/ipp-20140423/psModules/src/astrom/pmKHcorrect.c )
-
pmKHcorrect.h (copied) (copied from branches/eam_branches/ipp-20140423/psModules/src/astrom/pmKHcorrect.h )
Legend:
- Unmodified
- Added
- Removed
-
trunk/psModules/src/astrom/Makefile.am
r20801 r36834 11 11 pmAstrometryRefstars.c \ 12 12 pmAstrometryWCS.c \ 13 pmAstrometryVisual.c 13 pmAstrometryVisual.c \ 14 pmKHcorrect.c 14 15 15 16 pkginclude_HEADERS = \ … … 21 22 pmAstrometryRefstars.h \ 22 23 pmAstrometryWCS.h \ 23 pmAstrometryVisual.h 24 pmAstrometryVisual.h \ 25 pmKHcorrect.h 24 26 25 27 CLEANFILES = *~ -
trunk/psModules/src/astrom/pmAstrometryModel.c
r26260 r36834 39 39 #include "pmFPAExtent.h" 40 40 #include "pmFPAfileFitsIO.h" 41 #include "pmConcepts.h" 41 42 #include "pmAstrometryWCS.h" 42 43 #include "pmAstrometryUtils.h" … … 452 453 } 453 454 454 int pmConceptsChipNumberFromName (pmFPA *fpa, char *name) {455 456 for (int i = 0; i < fpa->chips->n; i++) {457 pmChip *chip = fpa->chips->data[i];458 if (!chip) continue;459 char *thisone = psMetadataLookupStr (NULL, chip->concepts, "CHIP.NAME");460 if (!thisone) continue;461 if (!strcmp (name, thisone)) return (i);462 }463 return -1;464 }465 466 pmChip *pmConceptsChipFromName (pmFPA *fpa, char *name) {467 468 for (int i = 0; i < fpa->chips->n; i++) {469 pmChip *chip = fpa->chips->data[i];470 if (!chip) continue;471 char *thisone = psMetadataLookupStr (NULL, chip->concepts, "CHIP.NAME");472 if (!thisone) continue;473 if (!strcmp (name, thisone)) return (chip);474 }475 return NULL;476 }477 478 455 // first layer converts Chip to Focal Plane 479 456 bool pmAstromModelReadChips (pmFPAfile *file) { -
trunk/psModules/src/astrom/pmAstrometryModel.h
r18601 r36834 27 27 bool pmAstromModelWriteChips (pmFPAfile *file); 28 28 29 int pmConceptsChipNumberFromName (pmFPA *fpa, char *name);30 pmChip *pmConceptsChipFromName (pmFPA *fpa, char *name);31 32 29 bool pmAstromModelReadForView (const pmFPAview *view, pmFPAfile *file, const pmConfig *config); 33 30 bool pmAstromModelReadFPA (pmFPAfile *file); -
trunk/psModules/src/astrom/pmAstrometryObjects.c
r31671 r36834 571 571 psMemSetDeallocator (stats, (psFreeFunc)pmAstromStatsFree); 572 572 573 // stats->center = {0, 0, 0, 0}; 574 // stats->offset = {0, 0, 0, 0}; 575 stats->angle = 0.0; 576 stats->scale = 1.0; 577 stats->minMetric = 0.0; 578 stats->minVar = 0.0; 579 stats->nMatch = 0; 580 stats->nTest = 0; 581 stats->nSigma = 0; 573 stats->center.x = 0; 574 stats->center.y = 0; 575 stats->center.xErr = 0; 576 stats->center.yErr = 0; 577 578 stats->offset.x = 0; 579 stats->offset.y = 0; 580 stats->offset.xErr = 0; 581 stats->offset.yErr = 0; 582 583 stats->angle = 0.0; 584 stats->scale = 1.0; 585 stats->minMetric = 0.0; 586 stats->minVar = 0.0; 587 stats->nMatch = 0; 588 stats->nTest = 0; 589 stats->nSigma = 0; 582 590 583 591 return (stats); … … 914 922 // fprintf (stderr, "sigma: nMatch: %d, nTest: %d, nTen: %d\n", stats->nMatch, stats->nTest, sort->data.U32[sort->n - 10]); 915 923 916 917 psFree (sort); 924 psFree (sort); 918 925 psFree (listNP); 919 926 psFree (gridNP); -
trunk/psModules/src/astrom/pmAstrometryObjects.h
r26260 r36834 42 42 float Color; ///< object color 43 43 float dMag; ///< error on object magnitude 44 float SBinst; ///< surface brightness, used for Koppenhoefer correction 44 45 } 45 46 pmAstromObj; -
trunk/psModules/src/astrom/pmAstrometryVisual.c
r35768 r36834 946 946 KapaSendLabel (kapa2, "X (FP)", KAPA_LABEL_XM); 947 947 KapaSendLabel (kapa2, "Y (FP)", KAPA_LABEL_YM); 948 KapaSendLabel (kapa2, "pmAstromGridAngle re siduals. Box: Correlation Peak.", KAPA_LABEL_XP);948 KapaSendLabel (kapa2, "pmAstromGridAngle red: raw, black: ref.", KAPA_LABEL_XP); 949 949 950 950 // plot the REF data. (also calculate the plot ranges, accumulate the plot vectors) … … 966 966 KapaSetLimits(kapa2, &graphdata); 967 967 968 psStats *stats = psStatsAlloc(PS_STAT_SAMPLE_MEDIAN );968 psStats *stats = psStatsAlloc(PS_STAT_SAMPLE_MEDIAN | PS_STAT_MIN | PS_STAT_MAX ); 969 969 psVectorStats (stats, zPlot, NULL, NULL, 0); 970 float zero = stats->sampleMedian + 3.0; 971 float range = 6.0; 972 970 float range = stats->max - stats->min; 971 range = PS_MAX (0.5, PS_MIN (6.0, range)); 972 float zero = stats->sampleMedian + 0.25*range; 973 974 float maxZ = zPlot->data.F32[0], minZ = zPlot->data.F32[0]; 973 975 for (int i = 0; i < zPlot->n; i++) { 976 maxZ = PS_MAX (maxZ, zPlot->data.F32[i]); 977 minZ = PS_MIN (minZ, zPlot->data.F32[i]); 974 978 float value = (zero - zPlot->data.F32[i]) / range; 975 979 zPlot->data.F32[i] = PS_MAX(0.0, PS_MIN(1.0, value)); 976 980 } 981 fprintf (stderr, "ref mags: %f to %f (%f median)\n", minZ, maxZ, stats->sampleMedian); 977 982 978 983 // the point size will be scaled from the z vector … … 998 1003 psStatsInit(stats); 999 1004 psVectorStats (stats, zPlot, NULL, NULL, 0); 1000 zero = stats->sampleMedian + 3.0; 1001 range = 6.0; 1002 1005 range = stats->max - stats->min; 1006 range = PS_MAX (0.5, PS_MIN (6.0, range)); 1007 zero = stats->sampleMedian + 0.25*range; 1008 // zero = stats->sampleMedian + 1.0; 1009 // range = 6.0; 1010 1011 maxZ = zPlot->data.F32[0], minZ = zPlot->data.F32[0]; 1003 1012 for (int i = 0; i < zPlot->n; i++) { 1013 maxZ = PS_MAX (maxZ, zPlot->data.F32[i]); 1014 minZ = PS_MIN (minZ, zPlot->data.F32[i]); 1004 1015 float value = (zero - zPlot->data.F32[i]) / range; 1005 1016 zPlot->data.F32[i] = PS_MAX(0.0, PS_MIN(1.0, value)); 1006 1017 } 1018 fprintf (stderr, "raw mags: %f to %f (%f median)\n", minZ, maxZ, stats->sampleMedian); 1007 1019 1008 1020 // the point size will be scaled from the z vector
Note:
See TracChangeset
for help on using the changeset viewer.
