CARTAvis / carta

To CARTA users, this repo holds the CARTA release packages. Please use this repo to log bugs and feature requests. These will be triaged by the development team and prioritised as necessary in the development cycles.
19 stars 0 forks source link

Tiles do not render properly after zoom #193

Open lh-astro opened 12 months ago

lh-astro commented 12 months ago

Describe the bug Miss-alignment of image tile for one large (~23GB) .fits image. This seem to be a specific issue with the images I use.

To Reproduce

  1. Load all images into CARTA
  2. scroll and zoom around until the bug appears.

Expected behavior Tiles should be renders in alignment

Screenshots or videos

  1. Top left image. zoomed out, everything looks ok. screenshot

  2. Top left image. zoomed in, one can notice the artifacts. screenshot2

  3. Top left image. zoomed in further, the tile is still incorrect but zoomed in so far one can not notice the bug. This is the worst part since one may think one is looking at the correct part of the sky. screenshot3

Platform info (please complete the following information):

lh-astro commented 12 months ago

Update: It seem to be related to the fits file having 64 bit floating point precision. Converting it to 32 bit seem to have solved the issue.

lh-astro commented 12 months ago

Update 2: Now I am seeing similar issues with another fits file which did not show such behaviour before.

See see screenshots below. Both images are optical images which should show the same area of the sky. The first screenshot shows the offset issue Update 2: Now I am seeing similar issues with another fits file which did not show such behaviour before.

See see screenshots below. Both images the same area of the sky. In the first image the circles are centered on the source. When zooming in the circles moved to the bottom-left of the source. screenshot1 screenshot2

This might be an unrelated issue though.

lh-astro commented 12 months ago

One more example. The catalogue source position clearly moves away from the source when zoomed in. default

kswang1029 commented 12 months ago

This might be related to a poor internet condition and/or high server load (hence slow tile generation) so that the tile cache is messed up. There are other similar issues reported.

lh-astro commented 12 months ago

@kswang1029 thanks for the quick reply. The connection is a stable 100Mbit/s optical fiber connection or the very good connection at the university, which is only a few hundred meters away from the data center. High server load by other users I think was less likely since I was experiencing these issues also during odd hours such as midnight. Maybe I was causing the high serverload myself by opening 8 images of which 2 are very large (23 GB and 100 GB; the other 6 are below 1GB).

Do you know a workaround I could try out?

kswang1029 commented 12 months ago

@kswang1029 thanks for the quick reply. The connection is a stable 100Mbit/s optical fiber connection or the very good connection at the university, which is only a few hundred meters away from the data center. High server load by other users I think was less likely since I was experiencing these issues also during odd hours such as midnight. Maybe I was causing the high serverload myself by opening 8 images of which 2 are very large (23 GB and 100 GB; the other 6 are below 1GB).

Do you know a workaround I could try out?

On the left hand side of the green circle at the top-right corner of the CARTA window, there is a “green cloud” as an indicator that tiles are streaming. On multi-image load, please try to observe the green cloud and wait until it disappears before zoom/pan your images.

In this dev cycle, one of our developers is investigating this issue (or a similar one). FYI.

lh-astro commented 12 months ago

The last image/animated .gif (https://github.com/CARTAvis/carta/issues/193#issuecomment-1631431248) does not show the green cloud. Can I assume that the images are not being steamed in that case? The issues still seem to persist though.

kswang1029 commented 12 months ago

The last image/animated .gif (#193 (comment)) does not show the green cloud. Can I assume that the images are not being steamed in that case? The issues still seem to persist though.

Hmmm probably. If you hover over the green cloud, what's the latency it reports?

lh-astro commented 12 months ago

The latency is usually between 8 and 50 ms.

kswang1029 commented 12 months ago

Could you provide the following info for diagnostics please? Usually how many images are you loading at once? And what’s the exact cube size for each of them (eg [4000, 4000, 1000, 1])? I would like to see if I can reproduce the issue first. If you can provide the exact images for testing that would be great (but if they are proprietary then simply the cube dimensions are just fine).

lh-astro commented 12 months ago

It is 8 files: 1: 66980 x 53783 2: 23000 x 28000 3: 23000 x 28000 4: 23000 x 28000 5: 22236 x 21892 6: 20925 x 15111 7: 17999 x 13300 8: 8500 x 6650 x 204 x 4

lh-astro commented 12 months ago

I have now also tried to convert all files into .hdf5, even the small files below 1 GB. I have not seen any artifacts since then but I think it needs further testing to be sure that the conversion has an influence.

kswang1029 commented 12 months ago

I have now also tried to convert all files into .hdf5, even the small files below 1 GB. I have not seen any artifacts since then but I think it needs further testing to be sure that the conversion has an influence.

CARTA generates tiles on the fly for non-hdf5 image format. It would require some computing resources if the image is large. hdf5 format, however, has pre-calculated tiles as well as histograms and other auxiliary data. These would save quite some resources for large images. So I guess this is the case. 🙂

kswang1029 commented 12 months ago

It is 8 files: 1: 66980 x 53783 2: 23000 x 28000 3: 23000 x 28000 4: 23000 x 28000 5: 22236 x 21892 6: 20925 x 15111 7: 17999 x 13300 8: 8500 x 6650 x 204 x 4

And in the same order?

lh-astro commented 12 months ago

Actually this order: 1: 66980 x 53783 2: 17999 x 13300 3: 8500 x 6650 x 204 x 4 4: 23000 x 28000 5: 23000 x 28000 6: 23000 x 28000 7: 22236 x 21892 8: 20925 x 15111

lh-astro commented 11 months ago

Update: Using only hdf5 files and avoiding .fits completely, even the small files (500 MB in size), seem to be a workaround the issue.

kswang1029 commented 11 months ago

We have identified a solution and it is under testing. FYI.