Open gschlafly opened 8 months ago
Strangely, the 3x3 microlens case also does not have all rays passing through a single voxel. It fails the following test while the other microlens options pass: https://github.com/PolarizedLightFieldMicroscopy/GeoBirT/blob/5b45f5a1711c4827932a9573b1c5e749ddcb2f12/tests/test_raytrace_voxels.py#L19-L30
Locally the test test_identify_voxels_repeated_zero_ret_empty_list()
with the 3x3 MLA passes, but it fails with the github action. The number of voxels calculated is 70 instead of the intended 71 voxels.
Locally the test
test_identify_voxels_repeated_zero_ret_empty_list()
with the 3x3 MLA passes, but it fails with the github action. The number of voxels calculated is 70 instead of the intended 71 voxels.
In the github pytest, the voxel index 105
is only counted once instead of twice:
https://github.com/PolarizedLightFieldMicroscopy/GeoBirT/blob/9a039d52e5620ca5107a025304c3def5b92c85ee/tests/test_indexing.py#L81
print("DEBUG: ", sorted([(key, count) for key, count in counts.items()]))
gives the following output:
[(20, 15), (21, 46), (22, 59), (23, 43), (24, 13), (29, 45), (30, 148), (31, 166), (32, 144), (33, 39), (38, 57), (39, 166), (40, 111), (41, 161), (42, 47), (47, 43), (48, 143), (49, 161), (50, 139), (51, 33), (56, 14), (57, 40), (58, 48), (59, 33), (60, 8), (101, 1), (102, 17), (103, 16), (104, 17), (105, 1), (110, 16), (111, 205), (112, 194), (113, 209), (114, 19), (119, 13), (120, 194), (121, 1), (122, 197), (123, 16), (128, 16), (129, 206), (130, 194), (131, 209), (132, 19), (137, 1), (138, 17), (139, 16), (140, 17), (141, 1), (182, 12), (183, 41), (184, 44), (185, 41), (186, 12), (191, 41), (192, 146), (193, 161), (194, 137), (195, 31), (200, 44), (201, 164), (202, 152), (203, 160), (204, 34), (209, 41), (210, 140), (211, 157), (212, 131), (213, 26), (218, 12), (219, 34), (220, 34), (221, 29), (222, 6)]
Perhaps the counts for other voxels differ too!
Description
When simulating the images of a birefringent voxel centered within the volume, the retardance should only be nonzero behind the central microlens. Moreover, since the optic axis of the birefringent voxel is oriented in line with the microscope axis, the retardance image should have circular symmetry.
Symmetry
There is not circular symmetry when using 3x3 microlenses. There are a few hot spots in the bottom left quadrant. Interestingly, there is circular symmetry for 1x1 and 5x5 microlenses.
Containment within central microlens
Through trial and error, I observed that any
n_medium < 1.62
causes there to be nonzero retardance outside of the central microlens. The angles for which each ray is calculated for each pixel behind the detector is calculated here: https://github.com/PolarizedLightFieldMicroscopy/GeoBirT/blob/0d153919a07b5a28a94039c23686a8bffd0ae513/VolumeRaytraceLFM/abstract_classes.py#L369-L421Screenshots
Files
To Reproduce
With either numpy or pytorch backend, run the following simulation code:
with the
optical_config_voxel.json
containing the following parameters:Tasks
cam_pixel_tilt
variable to assure that the angles are not too large.