# version 2.2.2 - If expected variance is negative for some obscure reasons in likelihood.x, likelihood_2c.x or mlikelihood.x, it is automatically # set to sigma_bkg**2. This eliminates annoying floating exception errors 05/06/01 # ICF enclosed flux scaling is applied only if encflux > 0.0. Modified t_gimfit2d.x, t_c2gimfit2d.x, t_mgimfit2d.x 05/05/01 # More stability modifications. Due to improperly checked boundary reflections in icf_param, parameter values could be outside # min-max range (e.g. negative r_e!). Fixed in icf_param.x 05/07/01 # GIMFIT2D, C2GIMFIT2D and MGIMFIT2D now all check if the output residual image, the output model image and the logfile already exist before # trying to start the fit for an object. More robust to the "racing problem" 05/07/01 # icx and icy in ginit_param.x cannot be less than im_dim/4 or greater than im_dim*(3/4). If they are, then dx and dy are both set to # zero. Faint objects may have bad dx and dy determinations due to large errors in estimated total flux. Modified ginit_param.x 05/07/01 # Fixed background bookkeeping error in MGIMFIT2D when dobkg=no 06/20/01 # Modified symmetrization routine so that it produces correct symmetrized mask images! Modified GALPARAM so that when dosym=yes, an # output symmetrized mask image is also created. 07/01/01 # Modified GSCRIPTER and GGROUPER so that the output scripts can be written out in PYRAF form if dopyraf=yes or in the usual IRAF CL # form if dopyraf=no. 09/04/01 # Timestamp commands have been disabled in GIMFIT2D, C2GIMFIT2D, and MGIMFIT2D until PYRAF can deal with them. The timestamps are # now in the scripts. 09/04/01 # Now possible to reject saturated pixels from fits by setting gim2d.rejsat to yes and gim2d.satlevel to the pixel saturation value 09/29/01 # PYRAF scripts can now also be produced by GSIMUL 10/09/01 # Changed names of all likelihood routines from *likelihood* to *lk* to avoid multiply defined symbols on some architectures. 05/21/02 # Improved "racing protection" with ifnoerr conditions. Modified GIMFIT2D, C2GIMFIT2D, and MGIMFIT2D. 07/10/02 # Modified GSIMUL so that it puts XGAL-like header keywords in simulated image and so that the segmentation image of the tmpl + simulated image # is kept in xgalroot+i+_tmpl_m 07/29/02 # Modified XGAL so that it does not load all of the input science, mask and sigma images into memory to work. It now loads only the relevant image # sections for a given object. Needed to do this for really large images like GOODS mosaics or CFHTLS 02/06/03 # # version 3.0 - Temperature is now frozen when convergence has been achieved - Mar02/2004 # When bkg_npix requirement is not met and original image must be used, bkg buffers are now (xmax-xmin)*(ymax-ymin) instead of full original image dimensions - Mar02/2004 # Fixed out of bound error in XGAL - Mar02/2004 # Fixed out of bound error in G2DMODEL - Apr14/2004 # Asymmetric indices are now given to three decimal places - May12/2004 # Eliminated absolute lower total flux limit of 1 DU - 26July2004 # version 3.1 - Fixed two typos in C2GIMFIT2D in the calculations of the best-fit values for ftot,bt and sky - 26Oct2004 # Maximum number of Metropolis trials (NMETMAX=50000) now implemented in GIMFIT2D, C2GIMFIT2D, and MGIMFIT2D - 8Nov2004 # New bkgparam=yes behavior. If temperature for db parameter is positive, same as before. If T(db) < 0.0 and min(db)=max(db), then # bkg level is as specified in mdpar file. It is not recalculated. bkgsig is recalculated as before. and T(db)=0. If T(db) < 0.0 and min(db) # != max(db), then bkg level is as specified in mdpar file. It is not recalculated. bkgsig is recalculated as before. and T(db)= # -T(db,mdparfile). Changes made in BKG_PARAM routine - 23Nov2004 # If disk input T is negative, then disk PA is forced to be equal to bulge PA. Implemented GIMFIT2D, C2GIMFIT2D, and MGIMFIT2D - 23Nov2004 # Initial seed value now written to output model and residual image headers. Implemented in GIMFIT2D, C2GIMFIT2D, and MGIMFIT2D - 23Oct2005 # Fixed some extern statements so that compiling on mac OSX would work - 8Feb2008 # version 3.2 - If mdpar parameter values are supposed to remain fixed, they remain so through the pure bulge/pure disk tests in GIMFIT2D, C2GIMFIT2D, and MGIMFIT2D - 12Jun2008 # Increased bkg area on parent image to avoid problems for smaller galaxies in the wings of larger ones,i.e.,exarea = float(nx*ny)*(float(bkg_npix)/float(nbkg))*10.0 - 21Nov2008