Changeset 6849
- Timestamp:
- Apr 12, 2006, 8:29:24 PM (20 years ago)
- Location:
- trunk/ppImage/src
- Files:
-
- 2 added
- 1 deleted
- 9 edited
-
Makefile.am (modified) (3 diffs)
-
ppImage.c (modified) (1 diff)
-
ppImage.h (modified) (2 diffs)
-
ppImageConfig.c (modified) (2 diffs)
-
ppImageDetrendCell.c (deleted)
-
ppImageDetrendReadout.c (added)
-
ppImageLoop.c (modified) (1 diff)
-
ppImageOptions.c (modified) (2 diffs)
-
ppImageOptions.h (modified) (1 diff)
-
ppImageParseDetrend.c (modified) (1 diff)
-
ppImageRebinReadout.c (added)
-
ppTest.c (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ppImage/src/Makefile.am
r6832 r6849 3 3 noinst_HEADERS = \ 4 4 ppImage.h \ 5 ppImageDetrend.h \6 5 ppImageOptions.h \ 7 6 ppMem.h … … 15 14 ppImageParseDetrend.c \ 16 15 ppImageLoop.c \ 17 ppImageDetrend Cell.c \16 ppImageDetrendReadout.c \ 18 17 ppImageDetrendMask.c \ 19 18 ppImageDetrendBias.c \ 20 19 ppImageDetrendNonLinear.c \ 20 ppImageRebinReadout.c \ 21 21 ppMem.c 22 22 # ppImageParseCamera.c \ … … 35 35 ppMem.c 36 36 37 38 39 37 clean-local: 40 38 -rm -f TAGS -
trunk/ppImage/src/ppImage.c
r6817 r6849 9 9 // Determine camera, format from header if not already defined 10 10 // Construct camera in preparation for reading 11 pmConfig *config = ppImageConfig( argc, argv);11 pmConfig *config = ppImageConfig(&argc, argv); 12 12 13 13 // Set various tasks (define optional operations) -
trunk/ppImage/src/ppImage.h
r6817 r6849 12 12 13 13 // Get the configuration 14 pmConfig *ppImageConfig(int argc, char **argv);14 pmConfig *ppImageConfig(int *argc, char **argv); 15 15 16 16 // Determine what type of camera, and initialise … … 30 30 bool ppImageDetrendNonLinearPolynomial(pmReadout *input, psMetadataItem *dataItem); 31 31 32 bool ppImageRebinReadout (pmConfig *config, pmFPAview *view, char *filename); 33 32 34 #endif // Pau. -
trunk/ppImage/src/ppImageConfig.c
r6823 r6849 6 6 } 7 7 8 pmConfig *ppImageConfig(int argc, char **argv)8 pmConfig *ppImageConfig(int *argc, char **argv) 9 9 { 10 10 11 11 bool status; 12 12 13 if ( argc == 1) usage ();13 if (*argc == 1) usage (); 14 14 15 15 // load the site-wide configuration information 16 pmConfig *config = pmConfigRead( &argc, argv);16 pmConfig *config = pmConfigRead(argc, argv); 17 17 if (! config) { 18 18 psErrorStackPrint(stderr, "Can't find site configuration!\n"); … … 25 25 // if these command-line options are supplied, load the file name lists into config->arguments 26 26 // override any configuration-specified source for these files 27 status = pmConfigFileSetsMD (config->arguments, &argc, argv, "BIAS", "-bias", "-biaslist");28 status = pmConfigFileSetsMD (config->arguments, &argc, argv, "DARK", "-dark", "-darklist");29 status = pmConfigFileSetsMD (config->arguments, &argc, argv, "FLAT", "-flat", "-flatlist");30 status = pmConfigFileSetsMD (config->arguments, &argc, argv, "MASK", "-mask", "-masklist");31 status = pmConfigFileSetsMD (config->arguments, &argc, argv, "FRINGE", "-fringe", "-fringelist");27 status = pmConfigFileSetsMD (config->arguments, argc, argv, "BIAS", "-bias", "-biaslist"); 28 status = pmConfigFileSetsMD (config->arguments, argc, argv, "DARK", "-dark", "-darklist"); 29 status = pmConfigFileSetsMD (config->arguments, argc, argv, "FLAT", "-flat", "-flatlist"); 30 status = pmConfigFileSetsMD (config->arguments, argc, argv, "MASK", "-mask", "-masklist"); 31 status = pmConfigFileSetsMD (config->arguments, argc, argv, "FRINGE", "-fringe", "-fringelist"); 32 32 33 33 // the input file is a required argument; if not found, we will exit 34 status = pmConfigFileSetsMD (config->arguments, &argc, argv, "INPUT", "-file", "-list");34 status = pmConfigFileSetsMD (config->arguments, argc, argv, "INPUT", "-file", "-list"); 35 35 if (!status) { usage ();} 36 36 37 if (! psArgumentParse(config->arguments, &argc, argv) ||argc != 2) {37 if (! psArgumentParse(config->arguments, argc, argv) || *argc != 2) { 38 38 usage (); 39 39 } -
trunk/ppImage/src/ppImageLoop.c
r6817 r6849 37 37 ppImageDetrendReadout (options, config, view); 38 38 39 if (options->doBin1) { 40 ppImageRebinReadout (config, view, "PPIMAGE.BIN1"); 41 } 42 43 if (options->doBin2) { 44 ppImageRebinReadout (config, view, "PPIMAGE.BIN2"); 45 } 46 39 47 pmFPAfileIOChecks (config->files, view, PM_FPA_AFTER); 40 48 } -
trunk/ppImage/src/ppImageOptions.c
r6817 r6849 23 23 ppImageOptions *ppImageOptionsParse(pmConfig *config) 24 24 { 25 25 bool status; 26 26 ppImageOptions *options = ppImageOptionsAlloc (); 27 27 … … 137 137 138 138 // Mask recipe options 139 if (psMetadataLookupBool(NULL, recipe, "MASK")) { 140 options->doMask = true; 141 } 139 options->doMask = psMetadataLookupBool(NULL, recipe, "MASK"); 140 options->doBias = psMetadataLookupBool(NULL, recipe, "BIAS"); 141 options->doDark = psMetadataLookupBool(NULL, recipe, "DARK"); 142 options->doFlat = psMetadataLookupBool(NULL, recipe, "FLAT"); 142 143 143 // Bias recipe options 144 if (psMetadataLookupBool(NULL, recipe, "BIAS")) { 145 options->doBias = true; 146 } 144 // binned image options 145 options->xBin1 = psMetadataLookupS32(&status, recipe, "BIN1.XBIN"); 146 if (!status) options->xBin1 = 16; 147 options->yBin1 = psMetadataLookupS32(&status, recipe, "BIN1.YBIN"); 148 if (!status) options->yBin1 = 16; 147 149 148 // Dark recipe options149 if ( psMetadataLookupBool(NULL, recipe, "DARK")) {150 options->doDark = true; 151 }150 options->xBin2 = psMetadataLookupS32(&status, recipe, "BIN2.XBIN"); 151 if (!status) options->xBin1 = 16; 152 options->yBin2 = psMetadataLookupS32(&status, recipe, "BIN2.YBIN"); 153 if (!status) options->yBin1 = 16; 152 154 153 // Flat recipe options 154 if (psMetadataLookupBool(NULL, recipe, "FLAT")) { 155 options->doFlat = true; 156 } 155 options->doBin1 = psMetadataLookupBool(NULL, recipe, "BIN1.FITS"); 156 options->doBin2 = psMetadataLookupBool(NULL, recipe, "BIN2.FITS"); 157 157 158 // options->doBin1JPEG = psMetadataLookupBool(NULL, recipe, "BIN1.JPEG"); 159 // options->doBin2JPEG = psMetadataLookupBool(NULL, recipe, "BIN2.JPEG"); 160 158 161 return options; 159 162 } -
trunk/ppImage/src/ppImageOptions.h
r6817 r6849 11 11 bool doSource; // Source identification and photometry 12 12 bool doAstrom; // Astrometry 13 13 14 bool doOverscan; // Overscan subtraction 14 15 pmOverscanOptions *overscan; // Overscan options 16 15 17 bool doNonLin; // Non-linearity correction 16 18 psDataType nonLinearType; 17 19 psMetadataItem *nonLinearData; 18 20 void *nonLinearSource; 21 22 bool doBin1; 23 int xBin1, yBin1; 24 25 bool doBin2; 26 int xBin2, yBin2; 27 19 28 } ppImageOptions; 20 29 -
trunk/ppImage/src/ppImageParseDetrend.c
r6817 r6849 48 48 49 49 // XXX do these need to construct a new fpa? 50 // pmFPAfileDefine (config->files, config->camera, input->input, "PPIMAGE.BIN1"); 51 // pmFPAfileDefine (config->files, config->camera, input->input, "PPIMAGE.BIN2"); 52 // pmFPAfileDefine (config->files, config->camera, input->input, "PPIMAGE.JPG1"); 53 // pmFPAfileDefine (config->files, config->camera, input->input, "PPIMAGE.JPG2"); 50 if (options->doBin1) { 51 pmFPAfileFromFPA (config, input->fpa, options->xBin1, options->yBin1, "PPIMAGE.BIN1"); 52 } 53 if (options->doBin2) { 54 pmFPAfileFromFPA (config, input->fpa, options->xBin2, options->yBin2, "PPIMAGE.BIN2"); 55 } 56 // pmFPAfileDefine (config->files, config->camera, input->fpa, "PPIMAGE.JPG1"); 57 // pmFPAfileDefine (config->files, config->camera, input->fpa, "PPIMAGE.JPG2"); 54 58 55 59 // ppImage is supplied with an output name, which may be used by multiple -
trunk/ppImage/src/ppTest.c
r6795 r6849 91 91 92 92 // Add in a source file 93 pmFPAview *view = pmFPAAddSource (fpa, phu, cameraFormat);93 pmFPAview *view = pmFPAAddSourceFromHeader(fpa, phu, cameraFormat); 94 94 printf("View chip: %d\n", view->chip); 95 95 printf("View cell: %d\n", view->cell); … … 101 101 psMetadata *newFormat = psMetadataConfigParse(NULL, NULL, "mcshort_splice.config", true); 102 102 pmConfigConformHeader(phu, newFormat); 103 pmFPAview *newView = pmFPAAddSource (newFPA, phu, newFormat);103 pmFPAview *newView = pmFPAAddSourceFromHeader(newFPA, phu, newFormat); 104 104 printf("View chip: %d\n", newView->chip); 105 105 printf("View cell: %d\n", newView->cell);
Note:
See TracChangeset
for help on using the changeset viewer.
