Changeset 14647
- Timestamp:
- Aug 23, 2007, 1:42:41 PM (19 years ago)
- Location:
- trunk/psModules/src/camera
- Files:
-
- 6 edited
-
pmFPA.h (modified) (2 diffs)
-
pmFPAfile.c (modified) (2 diffs)
-
pmFPAfile.h (modified) (2 diffs)
-
pmFPAfileDefine.c (modified) (11 diffs)
-
pmFPAfileDefine.h (modified) (2 diffs)
-
pmFPAfileIO.c (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psModules/src/camera/pmFPA.h
r14201 r14647 6 6 * @author Eugene Magnier, IfA 7 7 * 8 * @version $Revision: 1.1 5$ $Name: not supported by cvs2svn $9 * @date $Date: 2007-0 7-14 03:17:18$8 * @version $Revision: 1.16 $ $Name: not supported by cvs2svn $ 9 * @date $Date: 2007-08-23 23:42:41 $ 10 10 * Copyright 2005-2006 Institute for Astronomy, University of Hawaii 11 11 */ … … 18 18 19 19 #define FPA_ASTROM 1 ///< Include astrometry information in the structures? 20 21 // Return chip position, given FPA position; calculations are all done in pixel units 22 #define PM_FPA_TO_CHIP(pos, chip0, chipParity) \ 23 (((pos) - (chip0))*(chipParity)) 24 25 // Return cell position, given chip position; calculations are all done in pixel units 26 #define PM_CHIP_TO_CELL(pos, cell0, cellParity, binning) \ 27 (((pos) - (cell0))*(cellParity)/(binning)) 28 29 // Return chip position, given a cell position; calculations are all done in pixel units 30 #define PM_CELL_TO_CHIP(pos, cell0, cellParity, binning) \ 31 ((pos)*(binning)*(cellParity) + (cell0)) 32 33 // Return FPA position, given a chip position; calculations are all done in pixel units 34 #define PM_CHIP_TO_FPA(pos, chip0, chipParity) \ 35 ((pos)*(chipParity) + (chip0)) 20 36 21 37 /// Focal plane array (the entirety of the camera) -
trunk/psModules/src/camera/pmFPAfile.c
r14202 r14647 32 32 psFree (file->camera); 33 33 psFree (file->format); 34 psFree (file->formatName); 34 35 psFree (file->name); 35 36 … … 73 74 file->camera = NULL; 74 75 file->format = NULL; 76 file->formatName = NULL; 75 77 file->name = NULL; 76 78 -
trunk/psModules/src/camera/pmFPAfile.h
r14202 r14647 4 4 * @author EAM, IfA 5 5 * 6 * @version $Revision: 1. 19$ $Name: not supported by cvs2svn $7 * @date $Date: 2007-0 7-14 03:17:44$6 * @version $Revision: 1.20 $ $Name: not supported by cvs2svn $ 7 * @date $Date: 2007-08-23 23:42:41 $ 8 8 * Copyright 2004-2005 Institute for Astronomy, University of Hawaii 9 9 */ … … 91 91 psMetadata *camera; // Camera configuration 92 92 psMetadata *format; // Camera format 93 char *formatName; // name of the camera format 93 94 } 94 95 pmFPAfile; -
trunk/psModules/src/camera/pmFPAfileDefine.c
r14596 r14647 203 203 } 204 204 file->format = psMemIncrRefCounter(format); 205 file->formatName = psStringCopy(formatName); 205 206 206 207 if (fpa) { … … 351 352 psFree (format); 352 353 file->format = psMemIncrRefCounter(format); 354 file->formatName = psStringCopy(config->formatName); 353 355 354 356 // adjust the rules to identify these files in the file->names data … … 440 442 // save the pmFPAfile on config->files 441 443 // return the pmFPAfile (a view to the one saved on config->files) 442 pmFPAfile *pmFPAfileBindFromArgs (bool *success, pmFPAfile *input, constpmConfig *config, const char *filename, const char *argname)444 pmFPAfile *pmFPAfileBindFromArgs (bool *success, pmFPAfile *input, pmConfig *config, const char *filename, const char *argname) 443 445 { 444 446 PS_ASSERT_PTR_NON_NULL(input, NULL); … … 511 513 512 514 if (!format) { 513 format = pmConfigCameraFormatFromHeader( (pmConfig*)config, phu, true);515 format = pmConfigCameraFormatFromHeader(config, phu, true); 514 516 if (!format) { 515 517 psError(PS_ERR_IO, false, "Failed to read CCD format from %s\n", realName); … … 562 564 psFree(file->format); 563 565 file->format = format; 566 file->formatName = psStringCopy(config->formatName); 564 567 565 568 if (success) *success = true; … … 639 642 psFree (file->format); 640 643 file->format = format; 644 file->formatName = psStringCopy(config->formatName); 641 645 642 646 // adjust the rules to identify these files in the file->names data … … 925 929 pmFPAfile *file = pmFPAfileDefineOutput (config, fpa, filename); 926 930 if (!file) { 927 psError StackPrint(stderr, "file %s not defined\n", filename);931 psError(PS_ERR_UNEXPECTED_NULL, false, "file %s not defined\n", filename); 928 932 return NULL; 929 933 } … … 944 948 pmFPAfile *file = pmFPAfileDefineOutput (config, NULL, filename); 945 949 if (!file) { 946 psError StackPrint(stderr, "file %s not defined\n", filename);950 psError(PS_ERR_UNEXPECTED_NULL, false, "file %s not defined\n", filename); 947 951 return NULL; 948 952 } 949 953 if (!file->camera) { 950 psError StackPrint(stderr, "file %s does not define a new camera\n", filename);954 psError(PS_ERR_UNEXPECTED_NULL, false, "file %s does not define a new camera\n", filename); 951 955 return NULL; 952 956 } … … 987 991 } 988 992 if (!file) { 989 psError StackPrint(stderr, "file %s not defined\n", filename);993 psError(PS_ERR_UNEXPECTED_NULL, false, "file %s not defined\n", filename); 990 994 return NULL; 991 995 } … … 1030 1034 } 1031 1035 if (!file) { 1032 psError StackPrint(stderr, "file %s not defined\n", filename);1036 psError(PS_ERR_UNEXPECTED_NULL, false, "file %s not defined\n", filename); 1033 1037 return NULL; 1034 1038 } … … 1075 1079 } 1076 1080 if (!file) { 1077 psError StackPrint(stderr, "file %s not defined\n", filename);1081 psError(PS_ERR_UNEXPECTED_NULL, false, "file %s not defined\n", filename); 1078 1082 return NULL; 1079 1083 } -
trunk/psModules/src/camera/pmFPAfileDefine.h
r13931 r14647 4 4 * @author EAM, IfA 5 5 * 6 * @version $Revision: 1.1 3$ $Name: not supported by cvs2svn $7 * @date $Date: 2007-0 6-21 22:45:27$6 * @version $Revision: 1.14 $ $Name: not supported by cvs2svn $ 7 * @date $Date: 2007-08-23 23:42:41 $ 8 8 * Copyright 2004-2005 Institute for Astronomy, University of Hawaii 9 9 */ … … 49 49 // Note that the returned pmFPAfile is a view only, so it should not be freed by the caller --- the only 50 50 // reference count is held by the config->files metadata. 51 pmFPAfile *pmFPAfileBindFromArgs (bool *found, pmFPAfile *input, constpmConfig *config, const char *filename, const char *argname);51 pmFPAfile *pmFPAfileBindFromArgs (bool *found, pmFPAfile *input, pmConfig *config, const char *filename, const char *argname); 52 52 53 53 // look for the given argname on the argument list. find the give filename from the file rules -
trunk/psModules/src/camera/pmFPAfileIO.c
r14206 r14647 26 26 #include "pmMoments.h" 27 27 #include "pmResiduals.h" 28 #include "pmGrowthCurve.h" 29 #include "pmPSF.h" 28 30 #include "pmModel.h" 29 31 #include "pmSource.h" 30 32 #include "pmSourceIO.h" 31 #include "pmGrowthCurve.h"32 33 #include "pmResiduals.h" 33 #include "pmPSF.h"34 34 #include "pmPSF_IO.h" 35 35 #include "pmFPA_JPEG.h" … … 188 188 break; 189 189 case PM_FPA_FILE_PSF: 190 status = pm FPAviewReadPSFmodel(view, file, config);190 status = pmPSFmodelReadForView (view, file, config); 191 191 break; 192 192 case PM_FPA_FILE_JPEG: … … 335 335 // (existing) fpa 336 336 if (file->type == PM_FPA_FILE_PSF) { 337 if (!pm FPAviewCheckDataStatusForPSFmodel(view, file)) {337 if (!pmPSFmodelCheckDataStatusForView (view, file)) { 338 338 psTrace("psModules.camera", 6, "skip write for %s, no data for this entry", file->name); 339 339 return true; … … 402 402 403 403 case PM_FPA_FILE_PSF: 404 status = pm FPAviewWritePSFmodel(view, file, config);404 status = pmPSFmodelWriteForView (view, file, config); 405 405 break; 406 406 … … 757 757 return false; 758 758 } 759 file->formatName = psStringCopy(config->formatName); 760 759 761 } else { 760 762 bool valid; … … 798 800 break; 799 801 case PM_FPA_FILE_PSF: 800 status = pmPSF _WritePHU (view, file, config);802 status = pmPSFmodelWritePHU (view, file, config); 801 803 break; 802 804 case PM_FPA_FILE_SX:
Note:
See TracChangeset
for help on using the changeset viewer.
