Граф коммитов

429 Коммитов

Автор SHA1 Сообщение Дата
Peter Williams 36ef971ba1 Add `--placeholder-thumbnail` argument to main tilers
Sometimes the thumbnail is crappy, and generating it can actually be
super memory-intensive.
2020-09-16 13:35:31 -04:00
Peter Williams 609c5cd923 toasty/cli.py: stub_wtml() no longer used, yay 2020-09-16 13:25:19 -04:00
Peter Williams 25922824ab docs: add toasty.openexr 2020-09-16 12:07:08 -04:00
Peter Williams 82c39b1ed1 Strip out all of the superseded `toast.py` code
Finally buckled down and updated the test suite to only use the newer
APIs.
2020-09-16 12:05:18 -04:00
Peter Williams af77780b35 Switch all-sky CLI stuff to Builder API 2020-09-16 11:26:26 -04:00
Peter Williams 8c7ad65082 toasty/pyramid.py: create up to base_dir if trying to write a meta-file 2020-09-16 11:20:56 -04:00
Peter Williams 97e77712df toasty/openexr.py: add support for OpenEXR files 2020-09-16 10:58:12 -04:00
Peter Williams 929334cf9c
Merge pull request #17 from pkgw/next
Oops: formalize new hard dep on PyYAML
2020-09-15 15:33:41 -04:00
Peter Williams 30f4a8fbd3 Oops: formalize new hard dep on PyYAML 2020-09-15 15:16:55 -04:00
Peter Williams bd0f8426b1
Merge pull request #16 from pkgw/next
More docs, release 0.1.0
2020-09-15 15:07:35 -04:00
Peter Williams fcc1f3ede9 Back to development 2020-09-15 14:53:02 -04:00
Peter Williams 41e06ca9dd Release version 0.1.0 2020-09-15 14:52:28 -04:00
Peter Williams 883312dea5 MANIFEST.in: include some more files in the dist 2020-09-15 14:50:54 -04:00
Peter Williams f0bbc81a3d docs/toasting.rst: add this 2020-09-15 14:48:06 -04:00
Peter Williams cdd36b3d78 Rename `image-sample-tiles` to just `tile-allsky`. 2020-09-15 14:05:54 -04:00
Peter Williams 166f22ab67 docs/studies.rst: write this up 2020-09-15 14:00:03 -04:00
Peter Williams 0113a38a42 Rename `wwtl-sample-image-tiles` to just `tile-wwtl`. 2020-09-15 12:34:50 -04:00
Peter Williams e2253cf051 Rename `study-sample-image-tiles` to just `tile-study`. 2020-09-15 12:30:49 -04:00
Peter Williams 2dcd32190a docs: work on TOC structure and write a bit more 2020-09-15 12:19:50 -04:00
Peter Williams 6ed487c457
Merge pull request #15 from pkgw/next
Internal improvements and some docs
2020-09-14 22:09:10 -04:00
Peter Williams 5a9a672d2f doc: start work on studies docs 2020-09-14 21:54:22 -04:00
Peter Williams 13905f61f8 docs/cli: add some more 2020-09-14 21:44:51 -04:00
Peter Williams d75d99ce3d docs/cli: add some more 2020-09-14 21:33:11 -04:00
Peter Williams 454c672688 docs: stub docs for the CLI 2020-09-14 21:10:57 -04:00
Peter Williams 2ab51c69c1 docs: update API and tidy 2020-09-14 21:02:56 -04:00
Peter Williams 38bb2b8e64 toasty/builder.py: centralize ops into an imagery builder
After many false starts I think this is the way to go to reduce code
duplication for common operations.
2020-09-14 18:20:00 -04:00
Peter Williams 48f319c2b8 toasty/image.py: add a `black_to_transparent` image loading option
This option does what it says, setting the alpha channel of all-black
pixels to be fully transparent. Implementation is a bit annoying because
there seems to be no efficient way to modify a PIL image in place, which
is worrisome when we aspire to process gigapixel-class images all in
memory if possible. I tried something that is hopefully efficient, and
we'll see if further refinements are needed.
2020-08-25 12:36:27 -04:00
Peter Williams 56db788388 toasty/image.py: avoid PIL decompression-bomb panics when thumbnailing
It turns out that if you're trying to make a thumbnail of a very large
image, PIL's checks for decompression-bomb attacks are triggered.
2020-08-24 13:25:50 -04:00
Peter Williams c592a4cc35 toast/image.py: heyyoo, fix massive performance regression
It turns out that np.asarray(pil_image) has to copy the image data,
so the call becomes extremely expensive if repeated for a large image.
This was killing basic tiling performance.

Now, toasty.Image() will cache the array generated by this call,
massively speeding up repeated invocations. The data duplication could
be worrisome, but PIL images and their resulting Numpy representations
are read-only, so they can't get out of sync.

We may be able to save memory by discarding the PIL image after doing
the Numpy conversion, but I'll cross that bridge if/when I get there.
2020-08-24 13:23:47 -04:00
Peter Williams cef131d60f Add a plate-carree-planet mode for planetary maps
Inspired by the Titan map we're ingesting.
2020-08-21 20:30:57 -04:00
Peter Williams 49ecba3f34 toasty/image.py: add quickie support for 8-bit grayscale images 2020-08-21 17:05:30 -04:00
Peter Williams fa0880375c
Merge pull request #14 from pkgw/next
Checkpoint some infrastructure work
2020-08-19 10:08:22 -04:00
Peter Williams 4dd91b77d6 toasty/io.py: remove this
Now everything uses the modern `toasty.image.Image` infrastructure,
huzzah! The classical toasting routine needs porting to the newer I/O
but that's honestly not a huge priority right now.
2020-08-19 09:44:47 -04:00
Peter Williams ecfc77c43e toasty/cli.py: switch image-sample-tiles to ImageLoader 2020-08-19 09:31:05 -04:00
Peter Williams 408c94a5c0 toasty/pyramid.py: PyramidIO.write_image() and .write_numpy() no longer needed 2020-08-19 09:27:21 -04:00
Peter Williams fa9544fed2 toasty/samplers.py: reindent so that VS Code detects 4-space indentation 2020-08-19 09:25:27 -04:00
Peter Williams 3965dfc231 toasty/toast.py: convert this to use Toasty images 2020-08-19 09:23:53 -04:00
Peter Williams 8476abe823 toasty/toast.py: reindent so that VS Code detects 4-space indentation 2020-08-19 09:01:13 -04:00
Peter Williams e422a6b176 toasty/merge.py: switch this to use toasty.Image
Various bits of support work are needed to make this possible, but
nothing too ridiculous.
2020-08-18 15:48:49 -04:00
Peter Williams 3d90511aab toasty/image.py: move some methods from Image to ImageMode 2020-08-18 14:52:18 -04:00
Peter Williams 11cba824ba toasty/merge.py: reindent so that VSCode detects 4-space tabs 2020-07-31 18:38:21 -04:00
Peter Williams 5636c0e40e toasty/pyramid.py: remove unused and to-be-superseded read_numpy() method 2020-07-31 18:32:54 -04:00
Peter Williams 9efc0a22d4 toasty/io.py: read_image_as_pil no longer needed 2020-07-31 18:27:51 -04:00
Peter Williams 6794047aa9 docs: update 2020-07-31 18:27:31 -04:00
Peter Williams 0a021f41cd toasty/image.py: put make_thumbnail_bitmap() in a more sensible place 2020-07-31 17:08:22 -04:00
Peter Williams f42b36c7f6 Tidy up image-loading modes 2020-07-31 17:04:16 -04:00
Peter Williams b9ed700fdd Start working on using a generic Image loading class. 2020-07-31 16:48:13 -04:00
Peter Williams b81beacf06 toasty/pyramid.py: add some helpers for planned pipeline improvements 2020-07-31 15:20:53 -04:00
Peter Williams e5a30947a9 toasty/pyramid.py: reindent so that VS Code realizes the tab size is 4 2020-07-30 15:36:45 -04:00
Peter Williams 24f6f160b3 toasty/study.py: minor refactoring 2020-06-23 15:27:42 -04:00