LASY-org/lasy

Error in reading tiff file

Closed this issue · 8 comments

Hi, I am trying to read an image file which is in a .tiff file format to test the example file (example_modal_decomposition_data.py). However, I am always getting an error

modeCoeffs, waist = hermite_gauss_decomposition(

File "/Users/labpc/opt/anaconda3/lib/python3.9/site-packages/lasy/utils/mode_decomposition.py", line 83, in hermite_gauss_decomposition
w0 = estimate_best_HG_waist(x, y, field)

File "/Users/labpc/opt/anaconda3/lib/python3.9/site-packages/lasy/utils/mode_decomposition.py", line 123, in estimate_best_HG_waist
assert dx == dy
AssertionError

Any suggestions how to fix this error .....

Thanks for reporting this issue.

Would you be able to share your full Python script, so that we can reproduce the error?

Thanks,

Hi @RemiLehe , find attached the python script. For uploading, I included the extension '.txt' because '.py' files cannot be uploaded. Please remove '.txt' extension when using the file.

As you can see, I just replace the image file name in the 'example_modal_decomposition_data.py' example file. The tiff image file is 16 MB in size. Files with size < 10 MB can be uploaded. If you need that also, I can send you by email.

example_modal_decomposition_data_TIFF.py.txt

Hi @RemiLehe, I used tiff file image because it is the most common file format for saving images in experiments. If the question is not in the scope of lasy, we can close this issue, however, if the error is within the scope of lasy and should be tested, I will keep it open.

@alexanatoly Sorry for the late reply! I think that your question is in the scope of lasy.
In order for me to debug this further, could you please send me the image? You can find my email address on the LBNL phonebook: http://phonebook.lbl.gov/

@RemiLehe thank you. The tiff image file was sent to your email address.

Hi @RemiLehe, did you get time to see the tiff file ?
thanks.

Should be fixed by #297.

Hi @MaxThevenet,

Thanks for fixing this issue. I will give it a try.

Alex