Thank you Eric,
I think I've got Lenstool working with extra parameters. With your pointers, it isn't actually too hard - it's just knowing where to look in the first place. For future reference on the mailing list, therefore, I've appended my change log to the bottom of this email.
A couple of curiosities along the way:
1) the ID numbers of new parameters must be between CX and PMASS. You can't add them at the end. The "block" variable, which lists all the parameters to be optimised, includes a load of cosmology parameters, etc. that all get ignored. They should probably be removed, because they are really optimised from "cblock".
2) o_set_lmin.c and o_set_lmax.c are redundant. They do the same as o_set_lens.c, but they act on a variable with a different name.
Best,
Richard
CHANGES TO LENSTOOL TO ADD NEW PARAMETERS TO A POTENTIAL
include/dimension.h - Increase NPAMAX from 35 to 37
include/structure.h - Expand pot structure to include new variables... these ***must be between CX and PMASS***
include/fonction.h - Add new functions that define the new potential to declarataion list
src/r_potentiel.c - Read in from .par file baseline values of skew and skewtheta
src/r_limit.c - Read in from .par file limits within which to optimise skew and skewtheta
src/e_pot.c - Add code to create the new potential
src/e_grad.c - Add code to create the new potential
src/e_grad2.c - Add code to create the new potential
src/o_print_res.c - Write the two new parameters to best.par in writePotentiel() and bestopt.par in writeLimit().
src/o_rescale.c - List new variables in all three LT<->Bayesys lookup tables
src/o_set_lens.c - List variables in all three LT<->Bayesys lookup tables
src/o_set_lmin.c - List variables in both LT<->Bayesys lookup tables (these routines seem superfluous & o_set_lens could have been reused)
src/o_set_lmax.c - List variables in both LT<->Bayesys lookup tables (these routines seem superfluous & o_set_lens could have been reused)
src/bayesapp.c - Define human readable names for the two new variables in getParName(), convert degrees to radians for angle param in lt2bayes()
src/o_print.c - Change output to map.res... but I don't know what that is, or whether it is needed???
src/main.c - Print a quick notice that this is a forked version of LT