metaspace2020 / metaspace

Cloud engine and platform for metabolite annotation for imaging mass spectrometry
https://metaspace2020.eu/
Apache License 2.0
44 stars 9 forks source link

Added copy optical image to python client #1416

Closed lmacielvieira closed 10 months ago

lmacielvieira commented 10 months ago

Description

Added feature to python client, in which the user is able to copy an optical image and its transforms from one dataset to another #1410

How to test it

1 - Update client 2 - Call the copy_optical_image function

sm.copy_optical_image( origin_dataset_id='2018-11-07_14h15m28s', destiny_dataset_id='2018-11-07_14h15m30s', )

sergii-mamedov commented 10 months ago

I was thinking of a slightly different implementation. I wouldn't want the images to be spread between multiple datasets. At some point, this will result in the original dataset being deleted and with it the optical images for the remaining datasets. I was thinking of getting only the transformation matrix to use for previously uploaded images. Perhaps it is worth adding a separate function that would receive images from the original dataset, and upload them for the new dataset.

lmacielvieira commented 10 months ago

I was thinking of a slightly different implementation. I wouldn't want the images to be spread between multiple datasets. At some point, this will result in the original dataset being deleted and with it the optical images for the remaining datasets. I was thinking of getting only the transformation matrix to use for previously uploaded images. Perhaps it is worth adding a separate function that would receive images from the original dataset, and upload them for the new dataset.

What do you think about copying the image to the dataset of destiny instead of using the same one? As the transform is based on the source image, it does not make sense to use the same transform if the source image is different.