I am editing my original question, as I have figured out a method of doing what I want.
Now my question is if there is a more elegant, efficient way to do the following:
Options[f] = {
Energy -> energy,
Temperature -> Func[Energy*Frequency, {Energy, Frequency}],
Frequency -> freq
};
f[OptionsPattern[]] := Module[{energy, temperature, frequency},
energy = OptionValue[Energy];
frequency = OptionValue[Frequency];
temperature = If[
Head[OptionValue[Temperature]] === Func,
OptionValue[Temperature][[1]] /. Map[# -> OptionValue[#] &,
Flatten[{OptionValue[Temperature][[2]]}]],
OptionValue[Temperature]
];
{
Energy -> energy,
Frequency -> frequency,
Temperature -> temperature
}]
Please note that this has the needed generalization to change what options are used as arguments to the passed function or if desired a value (or variable) can be directly inserted as an option.
For this application I have >70 Options (parameters) and I would like to be able to insert (if desired) a function with arguments based on any of the other options, or directly insert a value (if a function "Func" isn't desired.)
Is this more clear?
Thanks again!
fas a function name and as a paramter as well. Use another symbol for thefinside your function. I would also suggest that using strings for your option names may be safer (i.e."TemperatureFunction"instead of the plainTemperatureFunction) (see e.g. Why are some option values symbols, other strings?. – MarcoB Jun 03 '18 at 21:17