czbiohub-sf / shrimPy

shrimPy: Smart High-throughput Robust Imaging & Measurement in Python
BSD 3-Clause "New" or "Revised" License
8 stars 1 forks source link

Hardcoded focus finding variables in stabilization algorithm #144

Open edyoshikun opened 4 months ago

edyoshikun commented 4 months ago

The focus_finding variables such as NA_Illumination and emission_wavelength are currently hardcoded in #128 in line

As we are thinking about the metadata in the zarr stores, it would be nice to have some of these parameters in the zarr store (i.e magnification, pixel size, NA_Detection, illumination). These are also somewhat used in the reconstruction of the datasets. It would Like our update-scale-metadata we could have the entires that are populated after reconstruction and or with update-imaging-metadata or similar.

What do you think @talonchandler @ziw-liu @ieivanov @mattersoflight ?

ziw-liu commented 4 months ago

Actually they already exist in FOV-level .zattr if the channel is reconstructed by recOrder:

    "settings": {
        "birefringence": null,
        "fluorescence": {
            "apply_inverse": {
                "TV_iterations": 1,
                "TV_rho_strength": 0.001,
                "reconstruction_algorithm": "Tikhonov",
                "regularization_strength": 0.5
            },
            "transfer_function": {
                "index_of_refraction_media": 1.0,
                "numerical_aperture_detection": 0.55,
                "wavelength_emission": 0.527,
                "yx_pixel_size": 0.325,
                "z_padding": 5,
                "z_pixel_size": 1.0
            }
        },
        "input_channel_names": [
            "FITC"
        ],
        "phase": null,
        "reconstruction_dimension": 3,
        "time_indices": "all"
    }
edyoshikun commented 4 months ago

Ah yes that's right. Thanks @ziw-liu. We will add this functionality in another PR.

ziw-liu commented 4 months ago

However be aware of https://github.com/mehta-lab/recOrder/issues/474