Closed FredvanGoor closed 7 years ago
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)
Ok, shall do so.
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
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.
Not complicated I think, this can reduce many duplication code. I'm in favor of use double.
Ok, can you do it?
No problem.
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
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.
Don't know why build for py27 64bit
failed, I will try it in my windows tomorrow.
And did you build for py34 successfully?
No compiler installed on my laptop.
To create html documentation I installed and used Sphinx and made a new branch to edit and create examples and to put them on the html site.
I modified conf.py:
You can see the site as it is now on http://pythonhosted.org/LightPipes
I will add more examples from my (large) collection.
Remarks and suggestions are welcome!
Fred