You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The introduction of ModelLibrary (JP-3690) introduced a bug where the drizzled array weights are ignored entirely when the in_memory parameter is set to True. This can be seen by modifying this unit test as follows, such that it's meaningful with respect to the weights array and weight threshold:
deftest_create_median(three_sci_as_asn, tmp_cwd):
"""Test creation of median on disk vs in memory"""lib_on_disk = ModelLibrary(three_sci_as_asn, on_disk=True)
lib_in_memory = ModelLibrary(three_sci_as_asn, on_disk=False)
# makethistestmeaningfulw.r.t. handlingofweightswith (lib_on_disk, lib_in_memory):
forlibin [lib_on_disk, lib_in_memory]:
formodelinlib:
model.wht = np.ones_like(model.data)
model.wht[4,9] = 0.5lib.shelve(model, modify=True)
median_on_disk = create_median(lib_on_disk, 0.7, on_disk=True)
median_in_memory = create_median(lib_in_memory, 0.7, on_disk=False)
assertnp.isnan(median_in_memory[4,9])
# Makesurethemedianlibraryisthesameforon-diskandin-memoryassertnp.allclose(median_on_disk, median_in_memory, equal_nan=True) ```
The text was updated successfully, but these errors were encountered:
Issue JP-3743 was created on JIRA by Ned Molter:
The introduction of ModelLibrary (JP-3690) introduced a bug where the drizzled array weights are ignored entirely when the
in_memory
parameter is set to True. This can be seen by modifying this unit test as follows, such that it's meaningful with respect to the weights array and weight threshold:The text was updated successfully, but these errors were encountered: