Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
1 task
gschlafly opened this issue Mar 14, 2024 · 0 comments
Open
1 task

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

gschlafly opened this issue Mar 14, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@gschlafly
Copy link
Member

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

  • VolumeRaytraceLFM\abstract_classes.py
  • VolumeRaytraceLFM\birefringence_implementations.py

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

  • Try to replicate the issue with a 1x1 microlens array.
@gschlafly gschlafly added the bug Something isn't working label Mar 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant