Comments (4)
What is the wavelength? And can you post the code used to calculate the scattering in both cases?
from holopy.
The wavelength I am using is 465 nm for a sphere with a radius 7.5 micrometres.
I used this code to simulate scattering pattern just I changed the z parameter in both cases:
import holopy as hp
from holopy.scattering import calc_holo, Sphere
from holopy.scattering import Mie
import matplotlib.pyplot as plt
sphere = Sphere(n=1.6, r=7.5, center=(100.0, 100.0, 1000.0))## (Refractive index, Radius in microns, Position in micron)
medium_index = 1.33
illum_wavelen = 0.465
illum_polarization = (1.0, 1.0)
detector = hp.detector_grid(shape=200, spacing=1.0)
Create the scattering theory object
mie = Mie()
holo = calc_holo(detector, sphere, medium_index, illum_wavelen,
illum_polarization, theory='auto')
hp.show(holo)
from holopy.
@BnM-BnM sorry for the late reply. Because you're calculating the hologram at a distance many times the wavelength, you can use the far-field approximations to the Mie solutions to calculate the hologram, which will avoid the numerical issues you're seeing, and save time and computational effort.
import holopy as hp
from holopy.scattering import calc_holo, Sphere
from holopy.scattering import Mie
import matplotlib.pyplot as plt
sphere = Sphere(n=1.6, r=7.5, center=(100.0, 100.0, 1500.0))## (Refractive index, Radius in microns, Position in micron)
medium_index = 1.33
illum_wavelen = 0.465
illum_polarization = (1.0, 1.0)
detector = hp.detector_grid(shape=200, spacing=1.0)
# use far-field solutions
far_field_mie = Mie(compute_escat_radial=False, full_radial_dependence=False)
# make sure to specify the far-field theory; don't use 'auto' here
holo = calc_holo(detector, sphere, medium_index, illum_wavelen,illum_polarization, theory=far_field_mie)
hp.show(holo)
from holopy.
Leaving issue open because documentation should be updated to reflect this advice.
from holopy.
Related Issues (20)
- Problem running "Simple Example Scattering Calculations" ValueError: conflicting MultiIndex level HOT 3
- DDA Memory Error HOT 1
- Background Grayscale changes HOT 1
- The center of the particle is brighter than the surroundings HOT 1
- Adding a new scattering theory HOT 1
- 3D plotting HOT 1
- Installation HOT 3
- Migrate from Travis CI to GitHub Actions
- Migrate from nose to pytest HOT 1
- Migrate from numpy.distutils to meson HOT 1
- Make maintenance release (3.6)
- Make final release of v3 API (HoloPy 3.7)
- Make new API for HoloPy (version 4) HOT 1
- Calculation of noise_sd should be revised
- Test failing for constructive solid geometry with ADDA 1.4
- Processing and simulation methods for iSCAT data
- Tests failing from run_tests.py HOT 2
- trouble installing the ADDA package HOT 2
- Issue with ps_propagate function
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from holopy.