GSoC: Introducing Optical Physics

135 views
Skip to first unread message

Sudhanshu Mishra

unread,
Mar 3, 2014, 5:43:29 AM3/3/14
to sy...@googlegroups.com
Hi

I am a second year undergraduate student of Information Systems from BITS Pilani, India.
I like Physics and I've been using Python for an year. I started developing a Python package called BinPy for electronics computation and simulation.
This is my Github profile.

I want to propose an idea to introduce a new package for optical physics in sympy. I want to do this as a project under GSoC14.

Since we already have vector, optical physics can easily be implemented. As of now only Guassian optics is available. 
If we add more things like Newtonian optics, Maxwell's equation, Fermat's principle, Snell's laws and many more concepts, 
It would be very helpful for the users to do scientific computations related to optics using sympy.

If you like this idea, guide me what should I do now to get familiar with the physics package of sympy.

With Regards
Sudhanshu Mishra

Sachin Joglekar

unread,
Mar 3, 2014, 7:09:35 AM3/3/14
to sy...@googlegroups.com
I would suggest you to go through the API of physics.vector package and see if you have all the functionality you need. I think you should. Once you have done that, you can start thinking of how you will base your work on that module, the target API, etc. Once you have some idea, you can start putting down your proposal on the SymPy wiki, so that we can help you refine it.
(Dont forget about the PR requirement)

Sudhanshu Mishra

unread,
Mar 3, 2014, 7:23:10 AM3/3/14
to sy...@googlegroups.com
To get started should I add a module to solve problems related to Kepler's laws? It will give me a basic idea of physics.vector.

Stefan Krastanov

unread,
Mar 3, 2014, 10:06:44 AM3/3/14
to sy...@googlegroups.com
Why is physics.vector better for optics compared to just a column matrix?
> --
> You received this message because you are subscribed to the Google Groups
> "sympy" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to sympy+un...@googlegroups.com.
> To post to this group, send email to sy...@googlegroups.com.
> Visit this group at http://groups.google.com/group/sympy.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/sympy/93b54396-439e-4c0f-b8db-4f3b93bf2048%40googlegroups.com.
>
> For more options, visit https://groups.google.com/groups/opt_out.

Sudhanshu Mishra

unread,
Mar 3, 2014, 10:21:00 AM3/3/14
to sy...@googlegroups.com
Is this project doable withing the summer duration? 
If we consider adding only necessary things, it should not hinder the next major release of sympy.

With Regards
Sudhanshu Mishra


On Mon, Mar 3, 2014 at 8:46 PM, Sudhanshu Mishra <mrs...@gmail.com> wrote:
Hi Stefan

Using physics.vector will make this work easier. It's always possible to do it without the vector. Not using vector will reduce the readability of the code.

With Regards
Sudhanshu Mishra


You received this message because you are subscribed to a topic in the Google Groups "sympy" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/sympy/brvlmJtmUgM/unsubscribe.
To unsubscribe from this group and all its topics, send an email to sympy+un...@googlegroups.com.

To post to this group, send email to sy...@googlegroups.com.
Visit this group at http://groups.google.com/group/sympy.

Sudhanshu Mishra

unread,
Mar 3, 2014, 10:16:46 AM3/3/14
to sy...@googlegroups.com
Hi Stefan

Using physics.vector will make this work easier. It's always possible to do it without the vector. Not using vector will reduce the readability of the code.

With Regards
Sudhanshu Mishra
On Mon, Mar 3, 2014 at 8:36 PM, Stefan Krastanov <stefan.k...@yale.edu> wrote:
You received this message because you are subscribed to a topic in the Google Groups "sympy" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/sympy/brvlmJtmUgM/unsubscribe.
To unsubscribe from this group and all its topics, send an email to sympy+un...@googlegroups.com.

To post to this group, send email to sy...@googlegroups.com.
Visit this group at http://groups.google.com/group/sympy.

Jason Moore

unread,
Mar 3, 2014, 10:35:33 AM3/3/14
to sy...@googlegroups.com
Stefan,

The physics.vector package provides vectors and tensors that are basis dependent which eases working with vectors defined in multiple reference frames that are rotated with respect to each other. If all of your vectors are defined in a single reference frame, then column matrices suffice.

Sachin Joglekar

unread,
Mar 3, 2014, 10:43:09 AM3/3/14
to sy...@googlegroups.com
I have to agree with Stefan here. In optics, the usual manipulations and calculations are better done with a simple matrix - though if we need to express vectors/coordinates in different systems, you could use the vector API- but that would just be the minimal use. The core operations would be done better with matrices (and faster too).
@Sudhanshu, can you think of any optics application that would require heavy-duty vector stuff?


On Monday, March 3, 2014 4:13:29 PM UTC+5:30, Sudhanshu Mishra wrote:

Sudhanshu Mishra

unread,
Mar 3, 2014, 12:58:18 PM3/3/14
to sy...@googlegroups.com
@Sachin not really extensive but vectors are frequently used in the optics. If there's no issue, I'll use matrix only.
But my question wasn't vector or matrix. Please give me suggestions on how should I proceed with the idea. Can anyone mentor this project, if this idea feels promising?

Ondřej Čertík

unread,
Mar 4, 2014, 2:05:56 PM3/4/14
to sympy
Hi Sudhanshu,

I think this would be an interesting project. Do you have some
applications in mind?
Maybe for teaching or learning? So with your project, it would be
possible to do some problems
from physics textbooks about optics?

Ondrej
> --
> You received this message because you are subscribed to the Google Groups
> "sympy" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to sympy+un...@googlegroups.com.
> To post to this group, send email to sy...@googlegroups.com.
> Visit this group at http://groups.google.com/group/sympy.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/sympy/35d2b9f9-9c0a-41ec-a085-1815f8b0aba5%40googlegroups.com.

Sudhanshu Mishra

unread,
Mar 4, 2014, 2:44:16 PM3/4/14
to sy...@googlegroups.com
Hi Ondřej,

Yes,introducing optics using SymPy will reduce a lot of effort in teaching and learning and the practical applications of the same.
From basics optics like Snell's law, Principle of least time, lens shifts to scientific level such as applications in fibre optics and cost effective
astronomical simulations and problem solving.

I'll start with adding basics first and once I have a proof of concept I'll move to Newtonian optics and Maxwell's optics. SymPy already have Mechanics, Quantum and a few
things related to electrostatics. The only thing missing is optics. Introduction of optics will increase use cases of SymPy.

With Regrds
Sudhanshu Mishra


--
You received this message because you are subscribed to a topic in the Google Groups "sympy" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/sympy/brvlmJtmUgM/unsubscribe.
To unsubscribe from this group and all its topics, send an email to sympy+un...@googlegroups.com.

To post to this group, send email to sy...@googlegroups.com.
Visit this group at http://groups.google.com/group/sympy.
Reply all
Reply to author
Forward
0 new messages