-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Fri, 11 Dec 2020 04:51:05 -0800 Tom Keffer <tkef...@gmail.com> wrote:
> I'm not understanding what you are asking. I gather you want to use an > expression like > $f($x, $y, $z). > in a Cheetah template, where f() is your model, and x, y, and z are > parameters? If so, what's to stop you from simply using $x, $y, and > $z in the template? Thanks for your reply to my rather muddled query. I'm writing a WeeWX extension that lets the User choose from a suite of models. There are too many to calculate, so I want to calculate only those of interest. I'm struggling to explain this to myself, too, and my conceptualization of the problem is evolving, so I apologize for inconsistency with my previous posts. The models don't really have parameters. There are underlying parameterized calculations, but the choice of the model dictates the choice of the parameters. I expect the User to choose a handful of models. I'll make each chosen model *name* the *name* of an XType variable and ignore the models that are not chosen. I'll provide a Cheetah template for a standard HTML report that includes group breaks for each temperature development model and lines for daily min/max temperatures, growing-degree-days, cumulative degree-days, and development event horizons. In the model headers I'd like to show the actual calculation parameters used by the model. These are not in the User-defined part of the config, but in the model-definition part of the config, which I'd rather the User kept his paws out of, so I need to walk the various configs in the template in the same way that I walk the same configs in the XType instantiation code to look up parameters by model *name* ... unless there's a way to get an XType variable to cough up metadata in addition to numerical series. I've settled on a solution, though. I'll include my Python XType instantiation module in my Cheetah template and reference the same config-walking code (a non-User-oriented class) in both places. (The config-walking code should not need to be run on each evaluation of the XType variable but only at instantiation. It will need to be run on every Cheetah report generation.) Upon sober reflection, it doesn't seem that that is too often or too expensive. - -- .. Be Seeing You, .. Chuck Rhode, Sheboygan, WI, USA .. Weather: http://LacusVeris.com/WX .. 30° — Wind NNW 9 mph — Sky overcast. -----BEGIN PGP SIGNATURE----- iF0EARECAB0WIQT+MY/5I/LMPSswTbVg2/xipKOWUgUCX9Wj7QAKCRBg2/xipKOW UqnVAJ98hay31xSFw1mKDKQboCYRIu/+uwCfTKHWIicOQvbatTk8DebdznaU6D4= =wqlq -----END PGP SIGNATURE----- -- You received this message because you are subscribed to the Google Groups "weewx-user" group. To unsubscribe from this group and stop receiving emails from it, send an email to weewx-user+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/weewx-user/20201212231732.189fae62%40wealthy.