linan7788626 / Hoopla

MIT License
1 stars 2 forks source link

Source position should be determined by lens model and image position #4

Open drphilmarshall opened 8 years ago

drphilmarshall commented 8 years ago

I think I want to be able to choose the position of one of the multiple images, and then see the source move to the place predicted by the lens equation as well as the predicted image contour change. What do you think? The source size and shape still needs adjusting in the source plane, though... and it would be useful to see the current model caustics in the panel where that happens...

linan7788626 commented 8 years ago

I think I want to be able to choose the position of one of the multiple images, and then see the source move to the place predicted by the lens equation as well as the predicted image contour change. What do you think?

If I understand it correctly, you would like to involve point sources in this app. I have a C code to solve lensing equations for point sources; I will try to transform it to a javascript code. If I misunderstood it, please feel free to correct me. Thanks

The source size and shape still needs adjusting in the source plane, though... and it would be useful to see the current model caustics in the panel where that happens...

Yes, you are right. I am thinking about how to changing the properties of the source in "source model" block only, including the position of the source. I also try to show the caustic in the "source model" block. I will let you know if I make any progress.

drphilmarshall commented 8 years ago

Computing the source position given one chosen image position is easy, you just plug the image position into the lens equation - no solving required. Ideally we'd be able to move the source either in the source plane or by moving the chosen image position in the image plane (and the model would redraw in either case).

On Sun, Sep 11, 2016 at 8:46 PM, Nan Li notifications@github.com wrote:

I think I want to be able to choose the position of one of the multiple images, and then see the source move to the place predicted by the lens equation as well as the predicted image contour change. What do you think?

If I understand it correctly, you would like to involve point sources in this app. I have a C code to solve lensing equations for point sources; I will try to transform it to a javascript code. If I misunderstood it, please feel free to correct me. Thanks

The source size and shape still needs adjusting in the source plane, though... and it would be useful to see the current model caustics in the panel where that happens...

Yes, you are right. I am thinking about how to changing the properties of the source in "source model" block only, including the position of the source. I also try to show the caustic in the "source model" block. I will let you know if I make any progress.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/linan7788626/LensWranglerPlusPlus/issues/4#issuecomment-246237243, or mute the thread https://github.com/notifications/unsubscribe-auth/AArY91AJB262z1B1aIkr8KSyu3kFMN_Rks5qpMsagaJpZM4J5Pz3 .

drphilmarshall commented 8 years ago

See https://github.com/linan7788626/LensWranglerPlusPlus/issues/1#issuecomment-246733554 for a screenshot and more comments/suggestions about this. I like the way the "Source Model" panel is pre-populated with a central component - for sanity it might be a good idea to insist that there is always at least one source component and that it starts out at the center of the "Source Model" panel.

A simpler UI could be to merge the "Source Model" and "Source Plane" panels, remove the image display, and show the caustics and source model together. We could start out with the center of this panel being the same sky position as the center of the image, and there being a single primary source component there. The caustics would move around relative to the source components as the mass model was manipulated, and the predicted image would update. Then, as we dragged around the source component, or added more source components, the predicted image plane contours would also change. An image plane click would then move the primary source component to a new position in the source plane given by the lens equation.

Now, we could avoid bad fits by always placing the source such that at least one image was matched. In this scheme the image plane click would anchor the primary source position to that given by the lens equation, so that as the mass model was changed, the chosen multiple image was still predicted well. I guess this anchor could then be released if the primary source component was moved by hand? I think this is the behavior I would expect.

Note that in this scheme, there is no concept of choosing the source position by simply mousing over the image - you'd have to (get to!) pick up the source components and move them around. But, we'd still want the image contours to update dynamically, but that should be fine, as image prediction will still be fast. What do you think?