Closed johnnygreco closed 3 years ago
I would like to work on this. Is there a certain dimension size value at which the sample grid should raise a warning or should the warning be used to keep the user from inputting large values?
Thanks for your interest @irvin2492!
This is somewhat arbitrary, but I'd say it would be good to warn the user if image
, defined on line 54, will take up more than 1 Gb of memory. Assuming np.float64
pixels, this will happen when memory_in_Gb > 1
, where memory_in_Gb
is defined like this:
npix = 2 * sample_dim**2
byte_per_pixel = 8 # for np.float64
memory_in_Gb = byte_per_pixel * npix / 1e9
And the check should happen before xx
and yy
are created.
Issue closed by #3.
We should add a user warning when the sampling grid size of
xy_from_grid
reaches some large value.