-
Notifications
You must be signed in to change notification settings - Fork 13
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
OverflowError: memory mapped offset must be positive #2
Comments
Thank you for replying! The way I had the set up is by placing all of the files in one folder, but then it said that there are exactly 41 files with the same names. I noticed that out of these 41 files, only one of them was of different size between the same files. I assumed that since all the other 40 files with the same name have the same size, that they're simply duplicates of the same content. Is that assumption correct? How can I make use of the files of segment 1 and segment 2 without having them all under one directory? Is there a way to separate them, say with a folder structure that contains main.py, segment1/ and segment2/? Again, thank you infinitely! |
No problem. So I think I can guess what might be the issue. The files have the same size because they are binary images with the same dimensions. However, each of them has unique contents and they are not interchangeable. The .slc files represent the single-look complex radar imagery for each channel and flight track. All of them should have the same dimensions and therefore the same file size. If one of them has a smaller file size, maybe there was a problem with the download for that file? Could you try re-downloading that file and see if you get a file with the same file size as the others? That might explain the error if one of the files is smaller than expected. In that case, the calculated byteoffset to start reading from could be larger than the actual file size. The segment 1 and segment 2 files will have slightly different filenames (*_s1 compared to *_s2), for example: pongar_TM275_16009_002_160227_L090HH_01_BC_s1_1x1.slc So you should be able to put them all in the same path. The software expects all the data files to be in the same path, unfortunately it won't work if they are in subfolders for the different segments. Best regards, Michael |
Ah, yes, the annotation files and the .baseline files are the same for both segments. In general, where the file names are identical, then they are the same (they contain information for both segments). You can indeed place all the files into the same directory without naming conflicts. I thought when you said one of the files was smaller it was a .slc file, not a .baseline file. In that case, I am not sure why you get that error when running getslcblock() if all the SLC files are present and are the correct size. |
I've run the code on this dataset many times and never seen this error so I'm still not sure what is causing it. But I have only run it on Mac OS X and CentOS Linux, never on Windows. Did you try running using kapok.uavsarp.load() instead of kapok.uavsar.load() like I suggested? I would be interested in seeing the traceback from kapok.uavsarp.load(). You can indeed keep all those settings the same. Those should be fine. You could try setting azbounds=(0,1000) for example in the call to load() and see if it works. It will only load a portion of the data so you will not get the entire dataset. But since the function fails around 25%, you could use this to test if the rest of the function will complete if only loading the first small fraction of the data. Another thing to try might be setting num_blocks=50 (or other large number) in the call to load(). This will split the SLCs into smaller chunks when trying to form the covariance matrix. That might make loading the data easier. |
Changing num_blocks to 50 still gives an error |
My issue has been resolved. I am running this on a Linux platform, and the error was due to the size of an SLC file. One of the SLC files was too small, so after re-downloading it and running the process again, the error did not occur. |
I installed the library as well as all of its dependencies without error with
pip install kapok
. Tried executing the first code snippet in the manual, I got this errorCode:
Output:
Any idea on how I can solve this?
Environment:
Let me know if there's any more details I can add.
The text was updated successfully, but these errors were encountered: