Giter VIP home page Giter VIP logo

Comments (11)

guyskk avatar guyskk commented on June 14, 2024

Some code like this is useless, and should remove from document:

try:
	import LightPipes
except ImportError:
	print ("LightPipes not present")
	exit()
import sys
print(sys.path)

from lightpipes.

FredvanGoor avatar FredvanGoor commented on June 14, 2024

Ok, shall do so.

from lightpipes.

guyskk avatar guyskk commented on June 14, 2024

And how about put this into LightPipes?

m=1
nm=1e-9*m
um=1e-6*m
mm=1e-3*m
cm=1e-2*m

then we can use from LightPipes import m,nm,um,mm,cm to replace the code above

from lightpipes.

FredvanGoor avatar FredvanGoor commented on June 14, 2024

Is that not too complicated? We can try.
We have to put m=1.0 I found in one of my examples a round-off error in for example z=11*m. We expect a double in stead of an integer.

from lightpipes.

guyskk avatar guyskk commented on June 14, 2024

Not complicated I think, this can reduce many duplication code.
I'm in favor of use double.

from lightpipes.

FredvanGoor avatar FredvanGoor commented on June 14, 2024

Ok, can you do it?

from lightpipes.

guyskk avatar guyskk commented on June 14, 2024

No problem.

from lightpipes.

FredvanGoor avatar FredvanGoor commented on June 14, 2024

Hi,
I successfully build windows wheels with miniconda after modifications of:
setup.py
(I had to comment out the numpy requirement to prevent error)
windows\tasks.py
windows\__init__.py
See: wheels_log3.txt for wheel creation process

Changed __init__.py such that LP=LightPipes.Init() can be omitted and all commands can be written like 'F=Forvard(z,F)' in stead of 'F=LP.Forvard(z,F)' looks nicer! (Old notation still works, see __init__.py and un-comment the old code in Young.py to check that)

Modified all examples.

Fred

from lightpipes.

guyskk avatar guyskk commented on June 14, 2024

The code like this in __init__.py:

def Axicon(phi, n1, x_shift, y_shift, F):
    return LP.Axicon(phi, n1, x_shift, y_shift, F)

can be change to:

Axicon = LP.Axicon

so that help(Axicon) works.

from lightpipes.

guyskk avatar guyskk commented on June 14, 2024

Don't know why build for py27 64bit failed, I will try it in my windows tomorrow.
And did you build for py34 successfully?

from lightpipes.

FredvanGoor avatar FredvanGoor commented on June 14, 2024

No compiler installed on my laptop.

from lightpipes.

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.