Closed jzuhone closed 1 year ago
Awesome! One thing that might be good is a version
parameter to specify the version of the model. I suppose most of the time you want to the latest release (which is the default) but for testing it would be good to be able to pin it.
I've been scratching my head for a few minutes and writing down, then deleting ideas, about how to make this fit in more easily with the existing structure that MATLAB and other Python tools use for initializing models. Basically there is no precedent for nested/embedded components, so I'm a bit worried about this requiring substantial upstream changes to use.
Maybe this model itself is OK and all that needs work is the HRC model to use this new model in a way that is consistent with existing APIs. So perhaps this PR needs a companion demonstration HRC model that "just works" in xija_gui_fit. At first glance that would mean that ACIS components like ccd_count
or clocking
would be treated as formal parameters of the HRC model but would get passed through to the embedded DPA model. Maybe the HRC model comp
could be a property that does this delgation for the right components? Just thinking out loud.
I'm also curious if this serializes to JSON and Python properly.
@taldcroft Here's a working example in xija_gui_fit
for the HRC model Dan passed to me:
Note the presence of the 1DPAMZT model data. Histogram:
Here is the JSON file you need for this:
@jzuhone - unfortunately I'm no longer able to run xija_gui_fit, see #126.
@taldcroft I have a fix for this incoming.
Hum, just noticed it works fine for an old DPA model, so maybe it is particular to this spec file?
I rebased this on top of the merged #127
Closing this because we decided not to use it.
Description
This PR provides a new class that calls a separate xija model from another model and returns the temperature data as a node, which then can be used as any other component.
Still need to provide a docstring and some tests, this is just here to start discussion and review.
Interface impacts
Testing
Unit tests
Independent check of unit tests by [REVIEWER NAME]
Functional tests
No functional testing.