- Timestamp:
- Apr 2, 2014, 10:50:14 AM (12 years ago)
- Location:
- trunk
- Files:
-
- 25 edited
-
. (modified) (1 prop)
-
ippScripts/scripts/dist_defineruns.pl (modified) (1 diff)
-
ippScripts/scripts/dist_make_fileset.pl (modified) (1 diff)
-
ippScripts/scripts/ipp_apply_burntool_single.pl (modified) (1 prop)
-
ippScripts/scripts/psphot_fullforce_summary.pl (modified) (3 diffs)
-
ippScripts/scripts/publish_file.pl (modified) (1 prop)
-
ippTasks/dist.pro (modified) (1 diff)
-
ippTools/share/fftool_definebyquery_select_warps.sql (modified) (1 diff)
-
ippTools/share/fftool_result.sql (modified) (1 diff)
-
ippTools/share/fftool_summary.sql (modified) (1 diff)
-
ippTools/share/fftool_toadvance.sql (modified) (1 diff)
-
ippTools/src/fftool.c (modified) (5 diffs)
-
ippTools/src/fftoolConfig.c (modified) (1 diff)
-
ippTools/src/staticskytool.c (modified) (1 diff)
-
ippconfig/recipes/ppSub.config (modified) (1 prop)
-
ippconfig/recipes/psphot.config (modified) (3 diffs)
-
ippconfig/recipes/reductionClasses.mdc (modified) (1 prop)
-
psModules/src/objects/pmSourceIO_CFF.c (modified) (4 diffs)
-
psphot/src (modified) (1 prop)
-
psphot/src/psphotFullForce.SourceStats.c (modified) (1 diff)
-
psphot/src/psphotFullForceReadout.c (modified) (2 diffs)
-
psphot/src/psphotFullForceSummary.c (modified) (2 diffs)
-
psphot/src/psphotFullForceSummaryReadout.c (modified) (3 diffs)
-
psphot/src/psphotGalaxyShape.c (modified) (3 diffs)
-
psphot/src/psphotStackImageLoop.c (modified) (1 prop)
Legend:
- Unmodified
- Added
- Removed
-
trunk
- Property svn:mergeinfo changed
/tags/ipp-20140114 merged: 36557,36559-36560,36584-36588,36597-36602,36607-36609
- Property svn:mergeinfo changed
-
trunk/ippScripts/scripts/dist_defineruns.pl
r32701 r36633 88 88 push @stages, $stage; 89 89 } else { 90 @stages = qw(chip chip_bg camera fake warp warp_bg diff stack SSdiff sky skysingle );90 @stages = qw(chip chip_bg camera fake warp warp_bg diff stack SSdiff sky skysingle ff); 91 91 } 92 92 -
trunk/ippScripts/scripts/dist_make_fileset.pl
r35975 r36633 223 223 my $dbname = shift; 224 224 225 if (($stage eq 'stack') or ($stage eq 'diff') or ($stage eq 'SSdiff') or $stage eq 'sky' or $stage eq 'skycal' ) {225 if (($stage eq 'stack') or ($stage eq 'diff') or ($stage eq 'SSdiff') or $stage eq 'sky' or $stage eq 'skycal' or $stage eq "ff") { 226 226 return ""; 227 227 } -
trunk/ippScripts/scripts/ipp_apply_burntool_single.pl
- Property svn:mergeinfo changed (with no actual effect on merging)
-
trunk/ippScripts/scripts/psphot_fullforce_summary.pl
r36441 r36633 79 79 my ($listFile, $listName) = tempfile("/tmp/fullforce.summary.list.XXXX", UNLINK => !$save_temps ); 80 80 81 my $cff_file; 82 81 83 { 82 84 my $mdcParser = PS::IPP::Metadata::Config->new; … … 107 109 &my_die("Couldn't find input cmf: $cmf", $ff_id, $PS_EXIT_SYS_ERROR) unless $ipprc->file_exists($cmf); 108 110 print $listFile "SOURCES STR $cmf\n"; 111 if (!$cff_file) { 112 $cff_file = $ipprc->filename('PSPHOT.OUTPUT.CFF', $result->{sources_path_base}); 113 &my_die("Couldn't find input cff: $cff_file", $ff_id, $PS_EXIT_SYS_ERROR) unless $ipprc->file_exists($cff_file); 114 } 109 115 } 110 116 close $listFile; 111 117 } 118 119 &my_die("No CFF found in results: $cff_file", $ff_id, $PS_EXIT_PROG_ERROR) unless $cff_file; 120 112 121 113 122 # Recipes to use based on reduction class … … 141 150 my $command = "$psphotFullForceSummary $outroot"; 142 151 $command .= " -input $listName"; 152 $command .= " -cff $cff_file"; 143 153 $command .= " -threads $threads" if defined $threads; 144 154 if ($dump_config) { -
trunk/ippScripts/scripts/publish_file.pl
- Property svn:mergeinfo changed (with no actual effect on merging)
-
trunk/ippTasks/dist.pro
r35956 r36633 32 32 list DIST_STAGE -add "sky" 33 33 list DIST_STAGE -add "skycal" 34 list DIST_STAGE -add "ff" 34 35 35 36 $currentStage = 0 -
trunk/ippTools/share/fftool_definebyquery_select_warps.sql
r36441 r36633 5 5 JOIN chipRun USING(chip_id) 6 6 JOIN rawExp USING(exp_id) 7 JOIN skycell ON skycell.tess_id = warpSkyfile.tess_id AND skycell.skycell_id = warpSkyfile.skycell_id 7 8 WHERE warpRun.tess_id = '%s' AND warpSkyfile.skycell_id = '%s' AND rawExp.filter = '%s' 8 9 AND warpRun.state = 'full' AND warpSkyfile.quality = 0 and warpSkyfile.fault = 0 -
trunk/ippTools/share/fftool_result.sql
r36555 r36633 6 6 fullForceRun.skycal_id, 7 7 fullForceRun.workdir, 8 fullForceRun.sources_path_base, 8 9 CONCAT_WS('.', warp_id, skycell_id) AS dist_component, 9 10 stackRun.tess_id, -
trunk/ippTools/share/fftool_summary.sql
r36555 r36633 6 6 fullForceRun.skycal_id, 7 7 fullForceRun.workdir, 8 fullForceRun.sources_path_base, 8 9 'summary' AS dist_component, 9 10 stackRun.tess_id, -
trunk/ippTools/share/fftool_toadvance.sql
r36441 r36633 15 15 JOIN rawExp USING(exp_id) 16 16 LEFT JOIN fullForceResult USING(ff_id, warp_id) 17 WHERE fullForceRun.state = 'new' 17 LEFT JOIN fullForceSummary USING(ff_id) 18 WHERE fullForceRun.state = 'new' AND fullForceSummary.ff_id IS NULL 18 19 -- WHERE hook %s 19 20 GROUP BY ff_id -
trunk/ippTools/src/fftool.c
r36623 r36633 139 139 140 140 psMetadata *warpWhereMD = psMetadataAlloc(); 141 pxAddLabelSearchArgs(config, warpWhereMD, "-select_warp_label", " fullForceRun.label", "LIKE");142 pxAddLabelSearchArgs(config, warpWhereMD, "-select_warp_data_group"," fullForceRun.data_group", "LIKE");143 PXOPT_COPY_S64(config->args, warpWhereMD, "-select_warp_id", " fullForceRun.warp_id", "==");141 pxAddLabelSearchArgs(config, warpWhereMD, "-select_warp_label", "warpRun.label", "LIKE"); 142 pxAddLabelSearchArgs(config, warpWhereMD, "-select_warp_data_group","warpRun.data_group", "LIKE"); 143 PXOPT_COPY_S64(config->args, warpWhereMD, "-select_warp_id", "warpRun.warp_id", "=="); 144 144 if (!psListLength(warpWhereMD->list)) { 145 145 psError(PXTOOLS_ERR_CONFIG, false, "warp search parameters are required"); … … 148 148 return false; 149 149 } 150 if (!psListLength(warpWhereMD->list)) { 151 psError(PXTOOLS_ERR_CONFIG, false, "skycal search parameters are required"); 152 psFree(skycalWhereMD); 153 psFree(warpWhereMD); 154 return false; 155 } 156 157 PXOPT_COPY_STR(config->args, warpWhereMD, "-select_tess_id", "fullForceRun.tess_id", "=="); 158 pxAddLabelSearchArgs(config, warpWhereMD, "-select_filter", "fullForceRun.filter", "LIKE"); 159 if (!pxskycellAddWhere(config, warpWhereMD)) { 160 psError(PXTOOLS_ERR_CONFIG, false, "failed to add skycell search arguments"); 161 psFree(skycalWhereMD); 162 psFree(warpWhereMD); 163 return false; 164 } 165 150 PXOPT_COPY_F32(config->args, warpWhereMD, "-select_good_frac_min", "warpSkyfile.good_frac", ">="); 151 PXOPT_COPY_STR(config->args, warpWhereMD, "-select_tess_id", "warpRun.tess_id", "=="); 152 pxAddLabelSearchArgs(config, warpWhereMD, "-select_filter", "rawExp.filter", "LIKE"); 166 153 167 154 PXOPT_LOOKUP_BOOL(rerun, config->args, "-rerun", false); … … 186 173 psString joinHook = NULL; 187 174 if (!rerun) { 188 psStringAppend(&joinHook, "\nLEFT JOIN fullForceRun ON fullForceRun.skycal_id = fullForceRun.skycal_id");175 psStringAppend(&joinHook, "\nLEFT JOIN fullForceRun ON fullForceRun.skycal_id = skycalRun.skycal_id"); 189 176 psStringAppend(&joinHook, "\n %s\nAND fullForceRun.label = '%s'", where, label); 190 177 psStringAppend(&select, "\nAND ff_id IS NULL"); … … 502 489 psMetadata *where = psMetadataAlloc(); 503 490 PXOPT_COPY_S64(config->args, where, "-ff_id", "fullForceRun.ff_id", "=="); 504 PXOPT_COPY_S64(config->args, where, "-warp_id", "fullForceR un.warp_id", "==");491 PXOPT_COPY_S64(config->args, where, "-warp_id", "fullForceResult.warp_id", "=="); 505 492 PXOPT_COPY_S64(config->args, where, "-skycal_id", "fullForceRun.skycal_id", "=="); 506 493 PXOPT_COPY_S64(config->args, where, "-stack_id", "stackRun.stack_id", "=="); … … 510 497 PXOPT_COPY_STR(config->args, where, "-skycell_id", "stackRun.skycell_id", "LIKE"); 511 498 PXOPT_COPY_STR(config->args, where, "-filter", "stackRun.filter", "LIKE"); 512 PXOPT_COPY_S16(config->args, where, "-fault", " staticskyResult.fault", "==");499 PXOPT_COPY_S16(config->args, where, "-fault", "fullForceResult.fault", "=="); 513 500 pxskycellAddWhere(config, where); 514 501 -
trunk/ippTools/src/fftoolConfig.c
r36555 r36633 58 58 psMetadataAddStr(definebyqueryArgs, PS_LIST_TAIL, "-select_tess_id", 0, "search for tess_id", NULL); 59 59 psMetadataAddStr(definebyqueryArgs, PS_LIST_TAIL, "-select_filter", PS_META_DUPLICATE_OK, "search by filter (LIKE comparison, multiple OK)", NULL); 60 psMetadataAddF32(definebyqueryArgs, PS_LIST_TAIL, "-select_good_frac_min", 0, "mimimum good_frac in warp", 0.0); 60 61 61 62 pxskycellAddArguments(definebyqueryArgs); -
trunk/ippTools/src/staticskytool.c
r35960 r36633 1045 1045 PXOPT_COPY_STR(config->args, whereMD, "-select_skycell_id", "stackRun.skycell_id", "=="); 1046 1046 PXOPT_COPY_STR(config->args, whereMD, "-select_tess_id", "stackRun.tess_id", "=="); 1047 pxAddLabelSearchArgs(config, whereMD, "-select_filter", "stackRun.filter", "LIKE"); 1047 1048 PXOPT_COPY_F32(config->args, whereMD, "-select_good_frac_min", "stackSumSkyfile.good_frac", ">="); 1048 1049 pxAddLabelSearchArgs(config, whereMD, "-select_label", "staticskyRun.label", "LIKE"); 1049 1050 pxAddLabelSearchArgs(config, whereMD, "-select_data_group", "staticskyRun.data_group", "LIKE"); 1050 pxAddLabelSearchArgs(config, whereMD, "-select_filter", "stackRun.filter", "LIKE");1051 1051 if (!pxskycellAddWhere(config, whereMD)) { 1052 1052 psError(PXTOOLS_ERR_CONFIG, false, "failed to add skycell search arguments"); -
trunk/ippconfig/recipes/ppSub.config
- Property svn:mergeinfo changed (with no actual effect on merging)
-
trunk/ippconfig/recipes/psphot.config
r36454 r36633 195 195 196 196 EXT.NSIGMA.LIMIT.USE BOOL TRUE 197 198 EXT_MODEL_TYPE_FOR_CFF STR BEST 197 199 198 200 # Limits on extended source fits by galactic coordinates … … 440 442 GALAXY_SHAPES_STYLE STR R_MAJ_R_MIN 441 443 442 GALAXY_SHAPES_FR_MAJOR_MIN F32 0. 5443 GALAXY_SHAPES_FR_MAJOR_MAX F32 2.00444 GALAXY_SHAPES_FR_MAJOR_MIN F32 0.8 445 GALAXY_SHAPES_FR_MAJOR_MAX F32 1.60 444 446 GALAXY_SHAPES_FR_MAJOR_DEL F32 0.05 445 GALAXY_SHAPES_FR_MINOR_MIN F32 0. 5446 GALAXY_SHAPES_FR_MINOR_MAX F32 2.00447 GALAXY_SHAPES_FR_MINOR_MIN F32 0.8 448 GALAXY_SHAPES_FR_MINOR_MAX F32 1.60 447 449 GALAXY_SHAPES_FR_MINOR_DEL F32 0.05 448 450 … … 489 491 PEAKS_NMAX_TOTAL S32 0 # set this to limit the allowed number of peaks - Yields fault instead of avoid memory explosion 490 492 493 EXT_MODEL_TYPE_FOR_CFF STR PS_MODEL_DEV 491 494 492 495 SAVE.RESID BOOL TRUE -
trunk/ippconfig/recipes/reductionClasses.mdc
- Property svn:mergeinfo changed (with no actual effect on merging)
-
trunk/psModules/src/objects/pmSourceIO_CFF.c
r36623 r36633 126 126 pmModel *model = pmModelAlloc (modelType); 127 127 source->modelPSF = model; 128 source->type = PM_SOURCE_TYPE_STAR; // XXX this should be added to the flags 128 // RoughClass wants source type to be unknown 129 // source->type = PM_SOURCE_TYPE_STAR; // XXX this should be added to the flags 130 source->type = PM_SOURCE_TYPE_UNKNOWN; 129 131 130 132 // XXX we can set this in general, but for a specific image, we need to weed out SATSTARS and … … 178 180 source->moments->My = Y; 179 181 source->moments->Mrf = kronRadius * 0.4; // kronRadius is 2.5 * first radial moment 180 source->tmpFlags |= PM_SOURCE_TMPF_MOMENTS_MEASURED; 181 // XXX does the above cause a problem with pmSourceMoments (do we run it? yes we do) 182 183 // Don't mark the moments as measured because that causes many fields to be left blank. 184 // The moments code knows not to change the position or the Mrf for external sources 185 // source->tmpFlags |= PM_SOURCE_TMPF_MOMENTS_MEASURED; 182 186 183 187 if (isfinite(petRadius)) { … … 246 250 247 251 pmModelType sersicModelType = pmModelClassGetType("PS_MODEL_SERSIC"); 252 253 psString modelToChoose = psMetadataLookupStr(&mdok, recipe, "EXT_MODEL_TYPE_FOR_CFF"); 254 pmModelType selectedModelType = -1; 255 if (mdok && modelToChoose != NULL) { 256 if (strcmp(modelToChoose, "BEST")) { 257 selectedModelType = pmModelClassGetType(modelToChoose); 258 } 259 } 248 260 249 261 for (int i = 0; i < sources->n; i++) { … … 273 285 theta = 0; 274 286 } else { 275 // Choose the extended model to use for this source. 276 // For now we use the one set as the modelEXT for this source which had the best fit. 277 // XXX: make this controllable by recipe 278 // use best (as implemented here) 279 // choose specific type 287 // Find the model with the selected type. If selected type is -1 choose the one selected ad 288 // modelEXT which was the best 280 289 int iModel = -1; 281 290 if (source->modelEXT) { 282 pmModelType ext_model_type = source->modelEXT->type;291 pmModelType ext_model_type = selectedModelType != -1 ? selectedModelType : source->modelEXT->type; 283 292 for (int j=0; j<source->modelFits->n; j++) { 284 293 pmModel *aModel = source->modelFits->data[j]; -
trunk/psphot/src
- Property svn:mergeinfo changed
/tags/ipp-20140114/psphot/src merged: 36588,36599,36607
- Property svn:mergeinfo changed
-
trunk/psphot/src/psphotFullForce.SourceStats.c
r36375 r36633 85 85 psAssert (markVal, "missing MARK.PSPHOT"); 86 86 87 psArray *sources = detections->allSources; 87 // psArray *sources = detections->allSources; 88 psArray *sources = detections->newSources ? detections->newSources : detections->allSources; 88 89 89 90 // generate the array of sources, define the associated pixel -
trunk/psphot/src/psphotFullForceReadout.c
r36630 r36633 52 52 psphotLoadExtSources (config, view, filerule); 53 53 54 #ifdef notmoved 55 // XXX: moved down below 54 56 // merge the newly selected sources into the existing list (detections->allSources) 55 57 // NOTE: merge OLD and NEW 56 58 psphotMergeSources (config, view, filerule); 59 #endif 57 60 58 61 // construct sources and measure moments and other basic stats (saved on detections->allSources) … … 63 66 return psphotReadoutCleanup (config, view, filerule); 64 67 } 68 69 // classify sources based on moments, brightness. if a PSF model has been loaded, the PSF 70 // clump defined for it is used not measured (detections->newSources) 71 if (!psphotRoughClass (config, view, filerule)) { // pass 1 72 psError (PSPHOT_ERR_UNKNOWN, false, "failed to determine rough classifications"); 73 return psphotReadoutCleanup (config, view, filerule); 74 } 75 76 // merge the newly selected sources into the existing list (detections->allSources) 77 // NOTE: merge OLD and NEW 78 psphotMergeSources (config, view, filerule); 79 65 80 66 81 // generate a psf model for any readouts which need one -
trunk/psphot/src/psphotFullForceSummary.c
r36441 r36633 78 78 usage(); 79 79 } 80 if ((N = psArgumentGet(argc, argv, "-cff"))) { 81 if (argc <= N+1) { 82 psErrorStackPrint(stderr, "Expected to see 1 more argument; saw %d", argc - 1); 83 usage(); 84 } 85 psArgumentRemove(N, &argc, argv); 86 87 // We read CFF file as table not as sources. All we want are the nominal parameters input to psphotFullForce 88 psMetadataAddStr(config->arguments, PS_LIST_TAIL, "CFF_FILE", 0, "CFF file with nominal parameters", argv[N]); 89 psArgumentRemove(N, &argc, argv); 90 } else { 91 psErrorStackPrint(stderr, "-cff must be supplied."); 92 usage(); 93 } 80 94 81 95 if (argc < 2) { … … 148 162 } 149 163 output->save = true; 164 165 // We read cff file as a table not as sources 166 psString cffName = psMetadataLookupStr(NULL, config->arguments, "CFF_FILE"); 167 if (!cffName) { 168 psError(PSPHOT_ERR_CONFIG, true, "CFF_FILE is missing from arguments"); 169 return false; 170 } 171 psString resolvedName = pmConfigConvertFilename(cffName, config, false, false); 172 if (!resolvedName) { 173 psError(PSPHOT_ERR_CONFIG, false, "failed to resolve CFF_FILE %s", cffName); 174 return false; 175 } 176 psFits *fits = psFitsOpen(resolvedName, "r"); 177 if (!fits) { 178 psError(PSPHOT_ERR_CONFIG, false, "failed to open fits CFF_FILE %s", resolvedName); 179 return false; 180 } 181 psArray *inTable = psFitsReadTable(fits); 182 if (!inTable) { 183 psError(PSPHOT_ERR_CONFIG, false, "failed to read cff fits table from CFF_FILE %s", resolvedName); 184 return false; 185 } 186 psFitsClose(fits); 187 188 // Convert to an array indexed by ID 189 psArray *sortedTable = psArrayAlloc(4*inTable->n); 190 for (int i=0; i<inTable->n; i++) { 191 psMetadata *row = inTable->data[i]; 192 psS32 ID = psMetadataLookupS32(&status, row, "ID"); 193 if (ID >= sortedTable->n) { 194 sortedTable = psArrayRealloc(sortedTable, 2*ID); 195 } 196 if (sortedTable->data[ID]) { 197 psError(PSPHOT_ERR_CONFIG, true, "Duplicate row with ID %d", ID); 198 return false; 199 } 200 sortedTable->data[ID] = psMemIncrRefCounter(row); 201 } 202 psMetadataAddArray(config->arguments, PS_LIST_TAIL, "CFF_TABLE", PS_META_REPLACE, "cff table", sortedTable); 203 psFree(inTable); 204 psFree(sortedTable); 150 205 151 206 return true; -
trunk/psphot/src/psphotFullForceSummaryReadout.c
r36441 r36633 14 14 psArray *zeroPt; 15 15 psArray *exptime; 16 psArray *cffTable; 16 17 } galaxyShapeOptions; 17 18 … … 69 70 if (!setOptions(&options, readout, recipe, true)) { 70 71 psError (PS_ERR_UNKNOWN, false, "problem determining galaxy shape options."); 72 return false; 73 } 74 options.cffTable = psMetadataLookupPtr(NULL, config->arguments, "CFF_TABLE"); 75 if (!options.cffTable) { 76 psError (PS_ERR_UNKNOWN, true, "Cannot find cff table in arguments."); 71 77 return false; 72 78 } … … 309 315 // copy the best fit params to the model 310 316 psEllipseAxes axes = pmPSF_ModelToAxes(outSrc->modelEXT->params->data.F32, outSrc->modelEXT->type); 311 axes.major *= options->rMajor->data.F32[min_j]; 312 axes.minor *= options->rMinor->data.F32[min_j]; 317 if (outSrc->seq >= options->cffTable->n) { 318 psError(PS_ERR_PROGRAMMING, true, "object sequence number %d is larger than cff table length %ld", 319 outSrc->seq, options->cffTable->n); 320 return NULL; 321 } 322 psMetadata *row = options->cffTable->data[outSrc->seq]; 323 if (!row) { 324 psError (PS_ERR_PROGRAMMING, true, "NO cff data for object %d", outSrc->seq); 325 psFree(outSrc); 326 return NULL; 327 } 328 bool mdok; 329 psF32 rMajor = psMetadataLookupF32(&mdok, row, "R_MAJOR"); 330 if (!mdok) { 331 psError (PS_ERR_PROGRAMMING, true, "can't find R_MAJOR for object %d", outSrc->seq); 332 psFree(outSrc); 333 return NULL; 334 } 335 psF32 rMinor = psMetadataLookupF32(&mdok, row, "R_MINOR"); 336 if (!mdok) { 337 psError (PS_ERR_PROGRAMMING, true, "can't find R_MINOR for object %d", outSrc->seq); 338 psFree(outSrc); 339 return NULL; 340 } 341 axes.major = rMajor * options->rMajor->data.F32[min_j]; 342 axes.minor = rMinor * options->rMinor->data.F32[min_j]; 313 343 pmPSF_AxesToModel (outSrc->modelEXT->params->data.F32, axes, outSrc->modelEXT->type); 314 344 outSrc->modelEXT->chisq = minChisq; -
trunk/psphot/src/psphotGalaxyShape.c
r36441 r36633 205 205 if (!(source->tmpFlags & PM_SOURCE_TMPF_MOMENTS_MEASURED)) continue; 206 206 if (source->mode & PM_SOURCE_MODE_MOMENTS_FAILURE) continue; 207 if (!source->modelPSF) continue; 207 208 208 209 // psphotSetRadiusMomentsExact sets the radius based on Mrf … … 274 275 275 276 int i = source->galaxyFits->chisq->n - 1; 276 float thisChisq = source->galaxyFits->chisq->data.F32[i]; 277 if (isfinite(thisChisq) && (!isfinite(chisqBest) || thisChisq < chisqBest)) { 278 chisqBest = thisChisq; 279 fRmajorBest = fRmajor; 280 fRminorBest = fRminor; 277 float flux = source->galaxyFits->Flux->data.F32[i]; 278 if (isfinite(flux)) { 279 float thisChisq = source->galaxyFits->chisq->data.F32[i]; 280 if (isfinite(thisChisq) && isfinite(flux) && (!isfinite(chisqBest) || thisChisq < chisqBest)) { 281 chisqBest = thisChisq; 282 fRmajorBest = fRmajor; 283 fRminorBest = fRminor; 284 } 281 285 } 286 // reset I0 to avoid potential problems on the next iteration 287 PAR[PM_PAR_I0] = 1.0; 282 288 } 283 289 } 284 290 291 #define SAVE_BEST_MODEL 285 292 #ifdef SAVE_BEST_MODEL 286 293 // Save model with smallest chisq … … 301 308 psphotGalaxyShapeSource (pcm, source, maskVal, psfSize, false); 302 309 303 // Replace modelEXT with this model 304 // XXX: only do this if the model is good 305 psFree (source->modelEXT); 306 307 source->modelEXT = psMemIncrRefCounter (pcm->modelConv); 308 source->type = PM_SOURCE_TYPE_EXTENDED; 309 source->mode |= PM_SOURCE_MODE_EXTMODEL; 310 source->mode |= PM_SOURCE_MODE_NONLINEAR_FIT; 311 312 // cache the model flux 313 pmPCMCacheModel (source, maskVal, psfSize, fitOptions->nsigma); 310 // Replace modelEXT with this model, if the model is good 311 if (isfinite(PAR[PM_PAR_I0])) { 312 psFree (source->modelEXT); 313 314 source->modelEXT = psMemIncrRefCounter (pcm->modelConv); 315 source->type = PM_SOURCE_TYPE_EXTENDED; 316 source->mode |= PM_SOURCE_MODE_EXTMODEL; 317 source->mode |= PM_SOURCE_MODE_NONLINEAR_FIT; 318 319 // cache the model flux 320 pmPCMCacheModel (source, maskVal, psfSize, fitOptions->nsigma); 321 } 314 322 } 315 323 -
trunk/psphot/src/psphotStackImageLoop.c
- Property svn:mergeinfo changed (with no actual effect on merging)
Note:
See TracChangeset
for help on using the changeset viewer.
