peng-lab / BaSiCPy

MIT License
62 stars 20 forks source link

Saving Corrected Images Example #91

Closed jenna-tomkinson closed 1 year ago

jenna-tomkinson commented 2 years ago

Hello @yfukai,

I appreciated the help you gave in #81. I am one of the biologists within the @gwaybio lab and I was wondering if you could provide some clarification. I noticed that the examples provided do not show how to extract the corrected images and save them into a file. Is there a preferred method of saving that works best for BaSiCPy (i.e skimage.io.imsave or plt.savefig)?

I noticed that when I was using plt.savefig for saving the images, the outputted images were much smaller than the original. Is this to be expected?

Thank you! Jenna

yfukai commented 2 years ago

Hi @jenna-tomkinson, thank you for your interest! The default output will be float32 numpy array, and I recommend saving this in a format that is capable of preserving its data.

yfukai commented 2 years ago

I think we can add this to example notebooks. Re-open for now as a reminder.

jenna-tomkinson commented 2 years ago

Hi @yfukai,

Thank you for opening this back up! My lab is very interested in your method for saving the images and we are excited to be able to compare it to our method. You can view the existing solution we have here: https://github.com/WayScience/NF1_SchwannCell_data/blob/main/1_preprocessing_data/PyBaSiC_Pipelines/Illumination_Correction.ipynb.

Thank you for your work on this package!

Jenna Tomkinson

yfukai commented 2 years ago

Hi thanks @jenna-tomkinson for your update!, it seems that you're using the older version of BaSiCPy. There will come the newer version (now developed in the dev branch) and I think the performance would change with that (as we have an algorithm update, but the original algorithm can also be used.). I'll update you as soon as we get to the release. (You can already install it from GitHub as pip install git+https://github.com/peng-lab/BaSiCPy@dev though)

yfukai commented 2 years ago

The newer version can be found here. https://github.com/peng-lab/BaSiCPy/tree/dev

yfukai commented 1 year ago

Closing for new. Feel free to reopen.