Add eclipse support to the SimZDepSolarHeat class and fix crashes in xija_gui_fit - #148
Conversation
c05f74e to
a029189
Compare
a029189 to
434e8d3
Compare
|
Sorry for the delay on review on this one @jzuhone . Quick question on the eclipse support - should SimZDepSolarHeat just extend SolarHeat? I didn't look carefully to see if there are reasons it cannot. |
|
@jeanconn it cannot in this case--the |
That is quite plausible. For these models it is entirely possible that a solar heat input is actually negative, in which case the eclipse will cause an increase in the heat input. Basically without eclipses there is a degeneracy in the solar heat input and the heat sink. The eclipse breaks that degeneracy by uniquely defining "zero" solar heat input. Here the hands are waving only a bit. 😄 This looks fine then (noting that I did not review the GUI fit changes), but please do one quick sanity check and confirm that you can get the |
|
Hmm... I did a quick 1-param fit of the CEA model with one plot open (the CEA temp vs. time plot) as a sanity check and it crashed in a way that seems related to the PR changes: I've never seen an error like |
|
@jzuhone - maybe for this PR it would be best to drop the xija_gui_fit changes and tackle that in a separate PR. |
|
@taldcroft this error you saw is the already existing error that I cannot seem to get rid of, and should appear also on the master branch. It seems to be worse on the CEA model for some reason, but it also seems to go pretty deep. |
taldcroft
left a comment
There was a problem hiding this comment.
I rebuilt the compiled bits and tried again. This time I didn't get any crashes after a few basic tests. Not sure if rebuilding had anything to do with it, but at least it seems basically functional for me.
Description
The
SimZDepSolarHeatclass is used to model pitch-based solar heating for the ACIS FP, ACIS PSMC, and HRC CEA thermal models. It has a separate set of pitch bins for a specified set of SIM-Z ranges.Unlike the other pitch-based solar heating classes, it does not have support for eclipses. This PR adds that support by adding the appropriate code to the
dvalsproperty andeclipse_comp=Noneto the__init__method.In order for the above models to use this functionality, they will have to include the eclipse component in the
SimZDepSolarHeatsetup. Until that is done, the models should operate in the same way without any changes, sinceeclipse_compwill beNoneby default.While I was carrying out this work, I was confronted again with the fact that
xija_gui_fitsometimes tends to crash with the following message when working with plots and trying to zoom in, pan, or otherwise manipulate them:I made some small edits to try to reduce the frequency of these crashes, but I determined that preventing them entirely is very difficult.
Interface impacts
None on the existing thermal models until they implement eclipses. Hopefully
xija_gui_fitwill crash less.Testing
Unit tests
Independent check of unit tests by [REVIEWER NAME]
Functional tests
xija_gui_fit, models loaded OK without having eclipse component defined.On the
xija_gui_fitside, I opened the HRC CEA model, opened many plots, zoomed in and out on many plots, panned plots, and closed and re-opened plots, all without crashing (but I don't think the problem is entirely solved).