io¶
-
pysmFISH.io.
nd2_to_npy
(gene, raw_data_gene_fname, tmp_gene_dir, processing_hyb, use_ram=True, max_ram=150000000000)[source]¶ Function used to convert Nikon ND2 files in numpy arrays. Important: require the nd2reader (https://github.com/jimrybarski/nd2reader) pip install “nd2reader==2.1.3”. There is a new version based on pims but need to be tested The input ND2 file will have only one channel and will be converted in a binary npy.
- gene: str
- Name of the gene to process (ex. Aldoc)
- raw_data_gene_fname: str
- Path to the ND2 file (ex. ‘/Users/simone/Desktop/test/ND2conversion/BW_Aldoc.nd2’)
- tmp_gene_dir: str
- path to the folder where to save the npy files
- processing_hyb: str
- Name of the processing_hyb to process (ex. EXP-17-BP3597_hyb2)
- use_ram: bool
- If True the images are written first in ram until max_ram is reached
- max_ram: int
- Size of the RAM that can be used as temporary storage