-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Opening new file with same name loads old file #45
Comments
please refer to CARTAvis/carta-backend#579 |
I actually think this behaviour is preferable, for the comparison of a reprocessed file that is overwritten while the old one is still open. |
@Jordatious I don't think the current behavior is desirable. But I agree, I often do want the old one still open. The problem is, if I do:
both images are identical in CARTA, and they are both the first version (v1). What I'd like to see is that the first version stays open, but the newly-opened file is also shown - so there are two different image planes with the same name (or maybe a timestamp could be added to the name...). Is this also the behavior you're asking for? |
@keflavich - oh I see! I haven't observed this behaviour. For me, step 3 opens (I presume you mean append) v2, while keeping v1 still loaded. |
Yes, I'm referring to Append only |
I see a similar issue. I open an image using I then copied the current imaging on the disk to a new image on the disk. When I load this new image, I see the new pixel values. This is CARTA running in Google Chrome browser talking to a CARTA server on a remote machine. The image is also on a remote machine. Is there a workaround in CARTA for this? The workaround mentioned earlier in this ticket suggests that |
Could the problem that I am seeing be due to caching in the browser? While I haven't had time to check this systematically, once I remove cached data from the browser (Chrome in my case), image with the same name when re-loaded after it was changed on the disk shows the changed pixels in CARTA as well. And if this is the reason (browser caching), could CARTA code be fixed to remove the cached data in the browser related to the image name being loaded? It will be a massive help. The current behavior leads to a lot of user errors/misinterpretation. |
This problem (CARTA showing old pixels when re-load images with the same name, even though the image on the disk has changed) continues to persist with CARTA 2.0. I have tried using it from Firefox and Chrome. Also, I am using it in the "remote" mode. I.e. the CARTA server is running on a remote machine and I am viewing images across an internet connection. |
I'm trying to reproduce this issue on my development machine. The comments above mention FITS files, but the other issue linked specifies CASA images. @sanbw any chance you have a simple example that I can follow step by step to reproduce the issue? (including details on the file types and how the files are written) |
I have a set of casa images from @kswang1029 with the real, imaginary, amplitude and phase in separate image folders. I tried the following:
images after running I'm not really sure how to reproduce the issue properly, because the method I used to overwrite the file shows that it behaves properly. I also tried just using |
I also tried the same thing with FITS files and it still seemed to work just fine. Even appending the new file worked fine |
The way to reproduce it reliably (at least on my Mac) is the following (using my demo data and script):
demo script and dataset: https://drive.google.com/file/d/1zmrQBJJ_gjxb8p1rA6sBmSLSBOIEs7LV/view?usp=sharing I also tried to keep the first image animating and rerun the script. Surprisingly (or not), even the first image has been deleted by the script, the animation playback is not affected at all. So there must be some kind of caching mechanism (from casacore or OS perhaps) as the root cause of this issue. |
To clarify, according to our tests, this only occurs when opening the same file twice without closing it. So under most circumstances, simply using However, this doesn't solve the very common case of opening the file in a CARTA tab while another tab is open with the same file. In other words:
|
The caching problem also shows up if one loads an image with the same name but a different directory. An often-used case for me. Also, when "appending" files, there is no automatic closure of files and this problem shows up when appending a file with the same name from a different directory. In general, caching based on something as non-unique is the file name, seems to be ripe for bugs/confusing issues. I suggest that the priority of fixing this be raised high. Presence of this makes CARTA very unreliable for precision work requiring comparing images. |
@sanbee as a note here: casaviewer has the same behavior. CARTA uses similar codes to load images. |
@kswang1029: Not sure what you mean by "casaviewer has the same behavior". AFAICT, casaviewer does not show the caching issue being discussed here. It can load two different CASA images with the same name and it shows them both correctly. Also, it does not cache -- so once an image is closed/unloaded and reloaded, it shows the image as it is on the disk at the time of reloading. Or perhaps I misunderstood your comment? |
please refer to the video https://drive.google.com/file/d/1K4bb74CGuI4OJ4cQr-6wNlf_OsOg_242/view?usp=sharing |
It is nearly impossible to understand in detail what's being done in the video. However two points I'll make:
|
@sanbee I am not saying we will not fix the problem. I just wanted to comment that this caching issue exists in the casaviewer too as far as I can see. CARTA used similar codes to handle casa images so CARTA has the issue too. |
@kswang1029 : I see your point. If caching is done in CASACore, which then shows up in any viewer that uses that code, fixing in CASACore may be the right approach (if practically possible). Thanks for the clarification. I realize that I haven't used |
@sanbee Before we fix the problem, could you try to close the image first before loading a new one with the same file name? Based on our test, this should bypass the issue. If you use File->Load to load the image, CARTA will issue a close_file command automatically so the issue should not exist. However, if you use File->Append to load the newly generated image with identical file name, the issue remains. |
@sanbee I'm struggling to reproduce this particular issue on my machine. Could you attach some example images that are used to demonstrate this? Not being able to load files with the same file name is a more serious problem than correctly handling files that are overwritten while open in CARTA. I tried the following:
This works fine for me, so I'm not sure what I'm doing wrong 🤔 |
@veggiesaurus , @kswang1029 : I'll try to get you some images and a possible route to reproduce the problem. But it looks like the earliest I can do is next week. Most of our computers here are down (UPS maintenance work in progress), and will come back online on Sunday at the earliest. |
I tried a case that an imaging script generates a cube first, then make a new folder at the current directory where the cube resides, then the script generates another cube with identical filename in the new folder. After two cubes are generated, I load the two cubes in CARTA (so the file list widget shows two images with identical file name). I cannot reproduce the issue however 🤔 |
I've been seeing problems where I change a file on disk (delete it, re-run clean with entirely different parameters) then reload it, and somehow the old file - which does not exist any more - is shown in CARTA. Is there a caching system responsible for this?
The text was updated successfully, but these errors were encountered: