Code Monkey home page Code Monkey logo

Comments (2)

tdimiduk avatar tdimiduk commented on July 22, 2024

That is actually corrected in the most recent version of the docs, if you build it yourself, or look at:
http://people.seas.harvard.edu/~tdimiduk/holopy/

If you want to do a dumbbell like that specifically, you might also try out the CSG Union I added but have not formally documented yet.

from holopy.core import Optics, ImageSchema
from holopy.scattering.scatterer import Union, Sphere
from holopy.scattering.theory import DDA
s1 = Sphere(n=1.59, r = .5, center = (5, 4.6, 5))
s2 = Sphere(n=1.59, r = .5, center = (5, 5.4, 5))
schema = ImageSchema(100, .1, Optics(.66, 1.33, (1, 0)))
dumbbell = Union(s1, s2)
holo = DDA.calc_holo(dumbbell, schema)
# csg scattters do support rotations
holo_rotatated = DDA.calc_holo(dumbbell.rotated(1, 0, 0), schema)

I want to get a little bit of feedback on the interface, but if you think this is sensible after using it, I can move to formally documenting the csg interface.

from holopy.

anna-wang avatar anna-wang commented on July 22, 2024

I see. The way it's done now is incompatible with the 10+ other types of
scatterers I've created, such as cylinders with spherical caps, Janus
crescents, floating lenses...

On 29 July 2014 14:24, Tom Dimiduk [email protected] wrote:

That is actually corrected in the most recent version of the docs, if you
build it yourself, or look at:
http://people.seas.harvard.edu/~tdimiduk/holopy/

If you want to do a dumbbell like that specifically, you might also try
out the CSG Union I added but have not formally documented yet.

from holopy.core import Optics, ImageSchemafrom holopy.scattering.scatterer import Union, Spherefrom holopy.scattering.theory import DDAs1 = Sphere(n=1.59, r = .5, center = (5, 4.6, 5))s2 = Sphere(n=1.59, r = .5, center = (5, 5.4, 5))schema = ImageSchema(100, .1, Optics(.66, 1.33, (1, 0)))dumbbell = Union(s1, s2)holo = DDA.calc_holo(dumbbell, schema)# csg scattters do support rotationsholo_rotatated = DDA.calc_holo(dumbbell.rotated(1, 0, 0), schema)

I want to get a little bit of feedback on the interface, but if you think
this is sensible after using it, I can move to formally documenting the csg
interface.


Reply to this email directly or view it on GitHub
#5 (comment).

from holopy.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.