For unknown reasons, on some UNIX variants (including Linux), the quantity int((2.0-1.0)/0.1) is evaluated as 9 instead of 10. As a workaround, I would add +1 to such int() statements. However, on architectures which evaluate the equation properly (such as Solaris), this obviously causes problems. The fix is to simply use nint() instead of int()+1. I thought I had already fixed all of these, but Tom Brown found one more instance. Thanks, Tom.
Prior to this patch, if you modified one of the *.h files, you would have to type make clean, then make, to ensure that the new parameters were propagated into the program. This patchset fixes the Makefiles so that they will automatically recompile any source-code files that depend on the *.h file, so you just have to type make after modifying the *.h file.
When reading input files, StarFISH considers the first "word" in each line to be the data, and it uses SPACE characters to define the boundaries of this "word". This patch generalizes the string parser so that TAB characters can also be used as whitespace. Without this patch, the TAB character would be considered part of the data word.
By default, StarFISH uses a rather complex algorithm to add photometric errors to the synthetic CMDs. It involves binning the AST results into 2-dimensional histograms, which are re-expressed as cumulative functions, and these are interpolated in the CMD to the position of each synthetic star.
As an alternative, Mike Barker came up with a more straightforward scheme, in which the algorithm simply identifies the artificial star which is closest to the model star in the CMD plane, and adopts the scattering and dropout state of that artificial star. I find that this algorithm is not only simpler, but runs faster and produces better synthetic CMDs. Thanks for contributing it, Mike!
After installing the patchset, simply set the err_method parameter in the synth.dat file to "2" to use it. This is the parameter whose comment reads 0 = use AST errs; 1 = use analytic err model.
Confidence intervals on each SFH are determined by deviating from the best-fit position in parameter space. This involves choosing a parameter-space direction and moving in that direction until a threshhold increase in chi-squared is reached. This is done for many thousands of parameter-space directions. Sometimes, a single step in a given direction changes chi-squared very slowly, so a large number of steps is required to cross the chi-squared threshhold. This patch will increase the step-size when it detects that the step has resulted in a very small increase in chi-squared. This significantly reduces the time required to determine the confidence intervals.
As StarFISH converges toward the best fit, it reports the curent chi-squared value to the screen. This usually results in a large number of lines being dumped to the terminal. This patch adds a C routine to output the chi-squared values to the screen without adding newlines, so the total output to the terminal is a much smaller number of lines.