linan7788626 / Hoopla

MIT License
1 stars 2 forks source link

Initialize model and data by subtracting and measuring channel images #8

Open linan7788626 opened 8 years ago

linan7788626 commented 8 years ago

Goal

We are trying to construct a standalone app that a user can model a lensing system from scratch, including initialization, lens subtraction, and model optimization. We one day hope to embed the Hoopla into SpaceWarps so that citizen scientists can not only help us to identify lenses, but also model lenses trivially.

Tasks

  1. Initialize Hoopla according to the click position from users at Space Warps.
    • [ ] Finds the peak of the red image and assume that this is the center of the lens galaxy, and that pixel has the color of the lens galaxy
    • [ ] Separates the red ("lens") light from the blue ("source") light to make 2 separate PNGs
    • [ ] initializes a lens mass model based on the "lens" light
    • [ ] Initializes a source model based on the "source" light
    • [ ] Displays only the lens light PNG in the "Mass Model" panel, and the source light PNG in the "Image Plane" panel
    • [ ] Builds an "initializing button" to implement the tasks above together.
  2. Model the lens by clicking the "Sample" button. This task is described in #7 .

    Phil's Suggestions

To get started, though, we could also make an "initialize" button that sets up a lens and source model just based on the data image properties. x_lens and y_lens can come from the R channel, x_img and y_img can come from the (B - alpha*R) image, where alpha is a scalar chosen to minimise the difference between the B and R images (as in Tom's BlueRings project here: https://github.com/DES-SL/BlueRings/blob/master/StandAloneRingFinder.py#L66) The lens Einstein radius could just be set to the 3/4 of the arc radius or something.

drphilmarshall commented 8 years ago

There are indeed many steps along the path to productive Space Warps integration! :-)

For example, the first step is to get the Space Warps PIs plus Rafi Kueng and Prasenjit Saha over here, to help guide the project. Rafi is doing a PhD on collaborative online lens modeling, and knows best what his team of citizens needs.

Then, Aprajita Verma and Anupreeta More are working on the Space Warps site itself: they will be able to give good advice on what to focus on so that the Hoopla app is useful for all citizens and not just Rafi's modeling team.

I'll email all these people and invite them over!

Then, I think you should postpone the idea of using the SW click positions to initialize the model, and instead focus on the lens light subtraction initialization. Can you edit your first message to reflect this, please? Thanks!

In short, a standalone app that a user can initialize from scratch (by some combination of subtracting the red from the blue channels and then manipulating the model by hand) is the best thing to focus on at first. "MCMC Sample" and "Optimize" buttons would be fantastic though - everyone will want them! :-)

drphilmarshall commented 8 years ago

PS. This issue's title should probably be changed to something like "Initialize model and data by subtracting and measuring channel images"

linan7788626 commented 8 years ago

Agreed, the title seems to be overkilled, and we should focus on a standalone APP. I just changed the title and updated the list of tasks. Please let me know if you have any other suggestions. Thanks

drphilmarshall commented 8 years ago

I think Task 1 should read:

Initialize Button, when pressed:

This would be a pretty good automatic, one-click initilization routine.

If we already had a mass and source model, however, we could use them to do a better initialization! The mass model could be used to define the position of the lens light (and its color), and the chosen lensed image position could be used to define the position of the lensed source light (as discussed in #4) and its color. I recommend we implement the one-click option anyway, though, because the "initialize" button should always work. BTW do you think it should be labelled "initialize" or better "Separate Foreground/Background" or "Subtract" or something?

drphilmarshall commented 8 years ago

PS. We should replace "LW++" with "Hoopla" in the first comment, as well! :-)

linan7788626 commented 8 years ago

Just did it, thanks for your reminding.

linan7788626 commented 8 years ago

I think Task 1 should read: Initialize Button, when pressed:

  • [ ] Finds the peak of the red image and assume that this is the center of the lens galaxy, and that that pixel has the color of the lens galaxy
    • [ ] Separates the red ("lens") light from the blue ("source") light to make 2 separate PNGs
    • [ ] initializes a lens mass model based on the "lens" light
    • [ ] Initializes a source model based on the "source" light
    • [ ] Displays only the lens light PNG in the "Mass Model" panel, and the source light PNG in the "Image Plane" panel This would be a pretty good automatic, one-click initialization routine.

Sounds great, these bullets make the issue more clear, I will update this issue asap. Thank you.

If we already had a mass and source model, however, we could use them to do a better initialization! The mass model could be used to define the position of the lens light (and its color), and the chosen lensed image position could be used to define the position of the lensed source light (as discussed in #4) and its color. I recommend we implement the one-click option anyway, though, because the "initialize" button should always work. BTW do you think it should be labelled "initialize" or better "Separate Foreground/Background" or "Subtract" or something?

Agreed, let us make the simplest way happens first. In term of the label, I would like to use "initialize" because the tasks list covers more than "Separate" and "subtract" . We can create more issues for the sub-projects (for example, "Separate" and "Subtract") in this issue. I will think about this and implement it later.

drphilmarshall commented 8 years ago

Good plan!

On Thu, Sep 15, 2016 at 12:07 PM, Nan Li notifications@github.com wrote:

I think Task 1 should read: Initialize Button, when pressed:

  • Finds the peak of the red image and assume that this is the center of the lens galaxy, and that that pixel has the color of the lens galaxy
    • Separates the red ("lens") light from the blue ("source") light to make 2 separate PNGs
    • initializes a lens mass model based on the "lens" light
    • Initializes a source model based on the "source" light
    • Displays only the lens light PNG in the "Mass Model" panel, and the source light PNG in the "Image Plane" panel This would be a pretty good automatic, one-click initialization routine.

Sounds great, these bullets make the issue more clear, I will update this issue asap. Thank you.

If we already had a mass and source model, however, we could use them to do a better initialization! The mass model could be used to define the position of the lens light (and its color), and the chosen lensed image position could be used to define the position of the lensed source light (as discussed in #4 https://github.com/linan7788626/Hoopla/issues/4) and its color. I recommend we implement the one-click option anyway, though, because the "initialize" button should always work. BTW do you think it should be labelled "initialize" or better "Separate Foreground/Background" or "Subtract" or something?

Agreed, let us make the simplest way happens first. In term of the label, I would like to use "initialize" because the tasks list covers more than "Separate" and "subtract" . We can create more issues for the sub-projects (for example, "Separate" and "Subtract") in this issue. I will think about this and implement it later.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/linan7788626/Hoopla/issues/8#issuecomment-247422078, or mute the thread https://github.com/notifications/unsubscribe-auth/AArY9yC_O_qzsuTCkuLmtk67F2BxTZ1wks5qqZdigaJpZM4J7zyx .