PolarizedLightFieldMicroscopy / GeoBirT

Geometrical Birefringence Tomography
BSD 3-Clause "New" or "Revised" License
4 stars 2 forks source link

Decreasing to an even # of pixels causes need for larger volume #91

Open gschlafly opened 4 months ago

gschlafly commented 4 months ago

Description

Decreasing the number of pixels per microlens to an even number instead of an odd number caused a large volume shape to be needed. For a 13x13 microlens array and a volume shape of [11, 25, 25], the following number of pixels per microlens worked and did not work:

good: <=13, 15, 17, 19, 21, 23 bad: 14, 16, 18, 20, 22

IndexError: Cumulative Jones Matrix computation failed. Index out of bounds: Attempted to access Delta_n at index [9, 3, 25], but this is outside the valid range of Delta_n's shape (11, 25, 25).

Note that increasing the volume shape to [11, 27, 27] allowed using 16 pixels per microlens.

It could make sense to have the effective lenslet radius be determined by the number of pixels per microlens. Currently the radius is fixed to be 7.5, acting as the aperture.

Screenshots

"pixels_per_ml": 10 image "pixels_per_ml": 17 image "pixels_per_ml": 23 image

Files

To Reproduce

Use the following optical_info and modify the pixels_per_ml:

{
    "volume_shape": [
        11,
        25,
        25
    ],
    "axial_voxel_size_um": 1.0,
    "cube_voxels": true,
    "pixels_per_ml": 17,
    "n_micro_lenses": 13,
    "n_voxels_per_ml": 1,
    "M_obj": 60,
    "na_obj": 1.2,
    "n_medium": 1.35,
    "wavelength": 0.55,
    "camera_pix_pitch": 6.5
}

for a forward simulation ray tracing through any volume of shape [11, 25, 25].

Tasks