Changeset 15401
- Timestamp:
- Oct 28, 2007, 3:42:03 PM (19 years ago)
- Location:
- branches/eam_branch_20071023/psastro/src
- Files:
-
- 1 added
- 1 deleted
- 5 edited
-
Makefile.am (modified) (1 diff)
-
psastro.h (modified) (2 diffs)
-
psastroArguments.c (modified) (1 diff)
-
psastroDefineFiles.c (modified) (3 diffs)
-
psastroEnforceChip.c (deleted)
-
psastroEnforceChips.c (added)
-
psastroMosaicAstrom.c (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
branches/eam_branch_20071023/psastro/src/Makefile.am
r12806 r15401 33 33 psastroLuminosityFunction.c \ 34 34 psastroRefstarSubset.c \ 35 psastroEnforceChips.c \ 35 36 psastroMosaicAstrom.c \ 36 37 psastroMosaicGradients.c \ -
branches/eam_branch_20071023/psastro/src/psastro.h
r15195 r15401 27 27 bool psastroDataSave (pmConfig *config); 28 28 bool psastroDefineFiles (pmConfig *config, pmFPAfile *input); 29 bool psastroDefineFile (pmConfig *config, pmFPA *input, char *filerule, char *argname, pmFPAfileType fileType, pmDetrendType detrendType); 29 30 bool psastroAnalysis (pmConfig *config); 30 31 … … 78 79 int psastroSortByMag (const void *a, const void *b); 79 80 81 bool psastroEnforceChips (pmConfig *config, pmFPA *fpa, psMetadata *recipe); 82 80 83 # endif /* PSASTRO_H */ -
branches/eam_branch_20071023/psastro/src/psastroArguments.c
r12992 r15401 36 36 psMetadataAddStr (config->arguments, PS_LIST_TAIL, "CHIP_SELECTIONS", PS_META_REPLACE, "", argv[N]); 37 37 psArgumentRemove (N, &argc, argv); 38 } 39 40 // apply the chip correction based on the reference astrometry? 41 if ((N = psArgumentGet (argc, argv, "-fixchips"))) { 42 psArgumentRemove (N, &argc, argv); 43 psMetadataAddBool (config->arguments, PS_LIST_TAIL, "PSASTRO.FIX.CHIPS", PS_META_REPLACE, "", true); 44 } 45 // define the reference astrometry file 46 status = pmConfigFileSetsMD (config->arguments, &argc, argv, "REF.ASTROM", "-refastrom", "-refastromlist"); 47 if (status) { 48 // if supplied, assume -fixchips is desired 49 psMetadataAddBool (config->arguments, PS_LIST_TAIL, "PSASTRO.FIX.CHIPS", PS_META_REPLACE, "", true); 38 50 } 39 51 -
branches/eam_branch_20071023/psastro/src/psastroDefineFiles.c
r15359 r15401 4 4 5 5 // these calls bind the I/O handle to the specified fpa 6 bool status; 7 8 // select the current recipe 9 psMetadata *recipe = psMetadataLookupPtr (&status, config->recipes, PSASTRO_RECIPE); 10 if (!recipe) { 11 psError(PSASTRO_ERR_CONFIG, false, "Can't find PSASTRO recipe!\n"); 12 return false; 13 } 6 14 7 15 pmFPAfile *output = pmFPAfileDefineOutput (config, input->fpa, "PSASTRO.OUTPUT"); … … 12 20 output->save = true; 13 21 14 // XXX not sure of this: should this be bind from args? 15 pmFPAfile *refAstrom = pmFPAfileDefineFromConf (&status, config, "PSASTRO.REF.ASTROM"); 16 if (!refAstrom) { 17 psError(PSASTRO_ERR_CONFIG, false, "Failed to load ref astrometry"); 18 return false; 22 bool fixChips = psMetadataLookupBool (&status, recipe, "PSASTRO.FIX.CHIPS"); 23 24 if (fixChips) { 25 if (!psastroDefineFile (config, input->fpa, "PSASTRO.REF.ASTROM", "REF.ASTROM", PM_FPA_FILE_ASTROM, PM_DETREND_TYPE_ASTROM)) { 26 psError (PS_ERR_IO, false, "Can't find a reference astrometry file"); 27 return NULL; 28 } 19 29 } 20 30 … … 31 41 return true; 32 42 } 43 44 bool psastroDefineFile (pmConfig *config, pmFPA *input, char *filerule, char *argname, pmFPAfileType fileType, pmDetrendType detrendType) { 45 46 bool status; 47 pmFPAfile *file; 48 49 // look for the file on the argument list 50 file = pmFPAfileDefineFromArgs (&status, config, filerule, argname); 51 if (!status) { 52 psError (PS_ERR_UNKNOWN, false, "failed to load find definition"); 53 return false; 54 } 55 if (file) { 56 if (file->type != fileType) { 57 psError(PS_ERR_IO, true, "%s is not of type %s", filerule, pmFPAfileStringFromType (fileType)); 58 return false; 59 } 60 return true; 61 } 62 63 // look for the file in the camera config table 64 file = pmFPAfileDefineFromConf (&status, config, filerule); 65 if (!status) { 66 psError (PS_ERR_UNKNOWN, false, "failed to load find definition"); 67 return false; 68 } 69 if (file) { 70 if (file->type != fileType) { 71 psError(PS_ERR_IO, true, "%s is not of type %s", filerule, pmFPAfileStringFromType (fileType)); 72 return false; 73 } 74 return true; 75 } 76 77 // look for the file to be loaded from the detrend database 78 file = pmFPAfileDefineFromDetDB (&status, config, filerule, input, detrendType); 79 if (!status) { 80 psError (PS_ERR_UNKNOWN, false, "failed to load file definition"); 81 return false; 82 } 83 if (file) { 84 if (file->type != fileType) { 85 psError(PS_ERR_IO, true, "%s is not of type %s", filerule, pmFPAfileStringFromType (fileType)); 86 return false; 87 } 88 return true; 89 } 90 return false; 91 } 92 -
branches/eam_branch_20071023/psastro/src/psastroMosaicAstrom.c
r15359 r15401 21 21 pmFPA *fpa = input->fpa; 22 22 23 // XXX before we do object matches, we need to fix failed chips 24 // compare chips with supplied mosaic model 25 // adjust significant outliers to match model 26 27 if (!psastroEnforceChips (fpa, recipe) { 23 // before we do object matches, we need to (optionally) fix failed chips. We compare chips with 24 // the supplied mosaic model. Adjust significant outliers to match model. 25 if (!psastroEnforceChips (config, fpa, recipe)) { 28 26 psError(PSASTRO_ERR_UNKNOWN, false, "failed to align problematic chips"); 29 27 return false;
Note:
See TracChangeset
for help on using the changeset viewer.
