Closed aphearin closed 5 years ago
@evevkovacs - I did some offline experiments on how this function behaves when it is passed a redshift array rather than float, and it does indeed raise a ValueError with the "object too deep" error message. So I do think this PR is likely to resolve the bug, and it's probably worth merging, pulling and resubmitting the full job concurrently with testing in the interactive session.
This PR resolves a bug leading to the failed job reported by @evevkovacs.
I'm a little puzzled by this error and I'm not sure that this is the right fix. This "object too deep" error usually happens when the input array has the wrong shape, for example if np.interp is passed a 2-d array. At the very least, the
remap_stellar_mass_in_snapshot
function should have been passed a float for the redshift, so that smells like the culprit even though the traceback does not quite make sense; this PR does fix that error by passing in the snapshot redshift rather than an array.Additionally, before calling the
remap_stellar_mass_in_snapshot
function from within the write_healpix script, I added in some assert statements to enforce that all arguments have the correct shape. So I think this code is ready to run again, and if it fails again then this time it will be more informative.@evevkovacs - if it is easy to run an interactive job using a single input file that failed, that would be ideal. If the code passes that trial, then we should resubmit the full job to hop back in the queue.
CC @dkorytov @patricialarsen